Flutter Engine
 
Loading...
Searching...
No Matches
display_manager.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_MANAGER_H_
6#define FLUTTER_SHELL_PLATFORM_WINDOWS_DISPLAY_MANAGER_H_
7
8#include <windows.h>
9#include <memory>
10#include <vector>
11
14
15namespace flutter {
16
17class FlutterWindowsEngine;
19 public:
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,
30 WPARAM wparam,
31 LPARAM lparam,
32 LRESULT* result);
33
34 // Finds the display information associated with the id.
35 std::optional<FlutterEngineDisplay> FindById(FlutterEngineDisplayId id);
36
37 // Get the display information for all displays
38 std::vector<FlutterEngineDisplay> GetDisplays() const;
39
40 private:
41 // Called by EnumDisplayMonitors once for each display.
42 static BOOL CALLBACK EnumMonitorCallback(HMONITOR monitor,
43 HDC hdc,
44 LPRECT rect,
45 LPARAM data);
46
47 // Helper method that creates a |FlutterEngineDisplay| from the
48 // provided |monitor|.
49 std::optional<FlutterEngineDisplay> FromMonitor(HMONITOR monitor) const;
50
51 FlutterWindowsEngine* engine_;
52
53 std::shared_ptr<WindowsProcTable> win32_;
54};
55} // namespace flutter
56#endif // FLUTTER_SHELL_PLATFORM_WINDOWS_DISPLAY_MANAGER_H_
std::optional< FlutterEngineDisplay > FindById(FlutterEngineDisplayId id)
bool HandleWindowMessage(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam, LRESULT *result)
std::vector< FlutterEngineDisplay > GetDisplays() const
uint64_t FlutterEngineDisplayId
Definition embedder.h:1043
FlutterEngine engine
Definition main.cc:84
G_BEGIN_DECLS GBytes * message
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
Definition switch_defs.h:36
int BOOL
LONG_PTR LRESULT
unsigned int UINT
LONG_PTR LPARAM
UINT_PTR WPARAM
#define CALLBACK