Flutter Windows Embedder
flutter::WindowsProcTable Class Reference

#include <windows_proc_table.h>

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 }

◆ ~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 }

◆ 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 }

◆ 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 }

Referenced by flutter::GetPreferredLanguagesFromMUI().


The documentation for this class was generated from the following files:
flutter::WindowsProcTable::DwmIsCompositionEnabled
virtual bool DwmIsCompositionEnabled() const
Definition: windows_proc_table.cc:48