Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | List of all members
flutter::WindowsProcTable Class Reference

#include <windows_proc_table.h>

Inheritance diagram for flutter::WindowsProcTable:
flutter::testing::MockWindowsProcTable

Public Member Functions

 WindowsProcTable ()
 
virtual ~WindowsProcTable ()
 
virtual BOOL GetPointerType (UINT32 pointer_id, POINTER_INPUT_TYPE *pointer_type) const
 
virtual LRESULT GetThreadPreferredUILanguages (DWORD flags, PULONG count, PZZWSTR languages, PULONG length) const
 
virtual bool GetHighContrastEnabled () const
 
virtual bool DwmIsCompositionEnabled () const
 
virtual HRESULT DwmFlush () const
 

Detailed Description

Definition at line 17 of file windows_proc_table.h.

Constructor & Destructor Documentation

◆ WindowsProcTable()

flutter::WindowsProcTable::WindowsProcTable ( )

Definition at line 12 of file windows_proc_table.cc.

12 {
13 user32_ = fml::NativeLibrary::Create("user32.dll");
14 get_pointer_type_ =
15 user32_->ResolveFunction<GetPointerType_*>("GetPointerType");
16}
const std::optional< T > ResolveFunction(const char *symbol)
static fml::RefPtr< NativeLibrary > Create(const char *path)

◆ ~WindowsProcTable()

flutter::WindowsProcTable::~WindowsProcTable ( )
virtual

Definition at line 18 of file windows_proc_table.cc.

18 {
19 user32_ = nullptr;
20}

Member Function Documentation

◆ DwmFlush()

HRESULT flutter::WindowsProcTable::DwmFlush ( ) const
virtual

Definition at line 57 of file windows_proc_table.cc.

57 {
58 return ::DwmFlush();
59}

◆ DwmIsCompositionEnabled()

bool flutter::WindowsProcTable::DwmIsCompositionEnabled ( ) const
virtual

Definition at line 48 of file windows_proc_table.cc.

48 {
49 BOOL composition_enabled;
50 if (SUCCEEDED(::DwmIsCompositionEnabled(&composition_enabled))) {
51 return composition_enabled;
52 }
53
54 return true;
55}
virtual bool DwmIsCompositionEnabled() const
int BOOL
#define SUCCEEDED(hr)

◆ GetHighContrastEnabled()

bool flutter::WindowsProcTable::GetHighContrastEnabled ( ) const
virtual

Definition at line 38 of file windows_proc_table.cc.

38 {
39 HIGHCONTRAST high_contrast = {.cbSize = sizeof(HIGHCONTRAST)};
40 if (!::SystemParametersInfoW(SPI_GETHIGHCONTRAST, sizeof(HIGHCONTRAST),
41 &high_contrast, 0)) {
42 return false;
43 }
44
45 return high_contrast.dwFlags & HCF_HIGHCONTRASTON;
46}

◆ GetPointerType()

BOOL flutter::WindowsProcTable::GetPointerType ( UINT32  pointer_id,
POINTER_INPUT_TYPE *  pointer_type 
) const
virtual

Definition at line 22 of file windows_proc_table.cc.

23 {
24 if (!get_pointer_type_.has_value()) {
25 return FALSE;
26 }
27
28 return get_pointer_type_.value()(pointer_id, pointer_type);
29}
return FALSE

◆ GetThreadPreferredUILanguages()

LRESULT flutter::WindowsProcTable::GetThreadPreferredUILanguages ( DWORD  flags,
PULONG  count,
PZZWSTR  languages,
PULONG  length 
) const
virtual

Definition at line 31 of file windows_proc_table.cc.

34 {
35 return ::GetThreadPreferredUILanguages(flags, count, languages, length);
36}
int count
FlutterSemanticsFlag flags
size_t length

The documentation for this class was generated from the following files: