| Flutter Windows Embedder |

Public Member Functions | List of all members
flutter::DisplayMonitor Class Reference

`#include <display_monitor.h>`

## Public Member Functions
| DisplayMonitor (FlutterWindowsEngine *engine)
| ~DisplayMonitor ()
void | UpdateDisplays ()
bool | HandleWindowMessage (HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, LRESULT *result)
std::vector< FlutterEngineDisplay > | GetDisplays () const

## Detailed Description

Definition at line 18 of file display_monitor.h.

## Constructor & Destructor Documentation

## ◆ DisplayMonitor()

flutter::DisplayMonitor::DisplayMonitor | ( | FlutterWindowsEngine * | engine | ) |
| explicit

Definition at line 24 of file display_monitor.cc.

25 : engine_(engine), win32_(engine->windows_proc_table()) {}

## ◆ ~DisplayMonitor()

flutter::DisplayMonitor::~DisplayMonitor | ( |  | ) |

Definition at line 27 of file display_monitor.cc.

27 {}

## Member Function Documentation

## ◆ GetDisplays()

std::vector< FlutterEngineDisplay > flutter::DisplayMonitor::GetDisplays | ( |  | ) | const

Definition at line 91 of file display_monitor.cc.

91 {
92 std::vector<FlutterEngineDisplay> displays;
93 MonitorEnumState state = {this, &displays};
94 win32_->EnumDisplayMonitors(nullptr, nullptr, EnumMonitorCallback,
95 reinterpret_cast<LPARAM>(&state));
96
97 if (displays.size() == 1) {
98 displays[0].single_display = true;
99 }
100
101 return displays;
102 }
displays
std::vector< FlutterEngineDisplay > * displays
Definition: display_monitor.cc:19

References displays.

Referenced by UpdateDisplays().

## ◆ HandleWindowMessage()

bool flutter::DisplayMonitor::HandleWindowMessage | ( | HWND | hwnd,
|  | UINT | message,
|  | WPARAM | wparam,
|  | LPARAM | lparam,
|  | LRESULT * | result
| ) |  |

Definition at line 77 of file display_monitor.cc.

81 {
82 switch (message) {
83 case WM_DISPLAYCHANGE:
84 case WM_DPICHANGED:
85 UpdateDisplays();
86 break;
87 }
88 return false;
89 }
flutter::DisplayMonitor::UpdateDisplays
void UpdateDisplays()
Definition: display_monitor.cc:72
message
Win32Message message
Definition: keyboard_unittests.cc:137

References message, and UpdateDisplays().

## ◆ UpdateDisplays()

void flutter::DisplayMonitor::UpdateDisplays | ( |  | ) |

Definition at line 72 of file display_monitor.cc.

72 {
73 auto displays = GetDisplays();
74 engine_->UpdateDisplay(displays);
75 }
flutter::DisplayMonitor::GetDisplays
std::vector< FlutterEngineDisplay > GetDisplays() const
Definition: display_monitor.cc:91
flutter::FlutterWindowsEngine::UpdateDisplay
void UpdateDisplay(const std::vector< FlutterEngineDisplay > &displays)
Definition: flutter_windows_engine.cc:710

References displays, GetDisplays(), and flutter::FlutterWindowsEngine::UpdateDisplay().

Referenced by HandleWindowMessage().

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

- shell/platform/windows/display_monitor.h
- shell/platform/windows/display_monitor.cc