| Flutter Windows Embedder |

display_monitor.h
Go to the documentation of this file.
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef FLUTTER_SHELL_PLATFORM_WINDOWS_DISPLAY_MONITOR_H_
6 #define FLUTTER_SHELL_PLATFORM_WINDOWS_DISPLAY_MONITOR_H_
7
8 #include <windows.h>
9 #include <memory>
10 #include <vector>
11
12 #include "flutter/shell/platform/embedder/embedder.h"
13 #include "flutter/shell/platform/windows/windows_proc_table.h"
14
15 namespace flutter {
16
17 class FlutterWindowsEngine;
18 class DisplayMonitor {
19 public:
20 explicit DisplayMonitor(FlutterWindowsEngine* engine);
21 ~DisplayMonitor();
22
23 // Updates the display information and notifies the engine
24 void UpdateDisplays();
25
26 // Handles Windows messages related to display changes
27 // Returns true if the message was handled and should not be further processed
28 bool HandleWindowMessage(HWND hwnd,
29 UINT message,
30 WPARAM wparam,
31 LPARAM lparam,
32 LRESULT* result);
33
34 // Get the display information for all displays
35 std::vector<FlutterEngineDisplay> GetDisplays() const;
36
37 private:
38 // Called by EnumDisplayMonitors once for each display.
39 static BOOL CALLBACK EnumMonitorCallback(HMONITOR monitor,
40 HDC hdc,
41 LPRECT rect,
42 LPARAM data);
43
44 FlutterWindowsEngine* engine_;
45
46 std::shared_ptr<WindowsProcTable> win32_;
47 };
48 } // namespace flutter
49 #endif // FLUTTER_SHELL_PLATFORM_WINDOWS_DISPLAY_MONITOR_H_
flutter::DisplayMonitor
Definition: display_monitor.h:18
flutter::DisplayMonitor::UpdateDisplays
void UpdateDisplays()
Definition: display_monitor.cc:72
flutter::DisplayMonitor::GetDisplays
std::vector< FlutterEngineDisplay > GetDisplays() const
Definition: display_monitor.cc:91
flutter::DisplayMonitor::~DisplayMonitor
~DisplayMonitor()
Definition: display_monitor.cc:27
flutter::DisplayMonitor::DisplayMonitor
DisplayMonitor(FlutterWindowsEngine *engine)
Definition: display_monitor.cc:24
flutter::DisplayMonitor::HandleWindowMessage
bool HandleWindowMessage(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, LRESULT *result)
Definition: display_monitor.cc:77
flutter::FlutterWindowsEngine
Definition: flutter_windows_engine.h:92
message
Win32Message message
Definition: keyboard_unittests.cc:137
flutter
Definition: accessibility_bridge_windows.cc:11
windows_proc_table.h