| Flutter Linux Embedder |

fl_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_LINUX_FL_DISPLAY_MONITOR_H_
6 #define FLUTTER_SHELL_PLATFORM_LINUX_FL_DISPLAY_MONITOR_H_
7
8 #include <gdk/gdk.h>
9
10 #include "flutter/shell/platform/embedder/embedder.h"
11 #include "flutter/shell/platform/linux/public/flutter_linux/fl_engine.h"
12
13 G_BEGIN_DECLS
14
15 G_DECLARE_FINAL_TYPE(FlDisplayMonitor,
16 fl_display_monitor,
17 FL,
18 DISPLAY_MONITOR,
19 GObject);
20
21 /**
22 * fl_display_monitor_new:
23 * @engine: engine to update.
24 * @display: display to monitor.
25 *
26 * Creates a new object to keep the engine updated with the currently used
27 * displays. In GDK, a display is called a "monitor".
28 *
29 * Returns: a new #FlDisplayMontior.
30 */
31 FlDisplayMonitor* fl_display_monitor_new(FlEngine* engine, GdkDisplay* display);
32
33 /**
34 * fl_display_monitor_start:
35 * @monitor: an #FlDisplayMonitor.
36 *
37 * Start monitoring for display changes.
38 */
39 void fl_display_monitor_start(FlDisplayMonitor* monitor);
40
41 /**
42 * fl_display_monitor_get_display_id:
43 * @monitor: an #FlDisplayMonitor.
44 * @gdk_monitor: GDK monitor to get display ID for.
45 *
46 * Get the ID Flutter is using for a given monitor.
47 *
48 * Returns: an ID or 0 if unknown.
49 */
50 FlutterEngineDisplayId fl_display_monitor_get_display_id(
51 FlDisplayMonitor* monitor,
52 GdkMonitor* gdk_monitor);
53
54 G_END_DECLS
55
56 #endif // FLUTTER_SHELL_PLATFORM_LINUX_FL_DISPLAY_MONITOR_H_
FL
FL
Definition: fl_binary_messenger.cc:27
fl_display_monitor_new
FlDisplayMonitor * fl_display_monitor_new(FlEngine *engine, GdkDisplay *display)
Definition: fl_display_monitor.cc:94
G_DECLARE_FINAL_TYPE
G_BEGIN_DECLS G_DECLARE_FINAL_TYPE(FlDisplayMonitor, fl_display_monitor, FL, DISPLAY_MONITOR, GObject)
fl_display_monitor_get_display_id
FlutterEngineDisplayId fl_display_monitor_get_display_id(FlDisplayMonitor *monitor, GdkMonitor *gdk_monitor)
Definition: fl_display_monitor.cc:115
fl_display_monitor_start
void fl_display_monitor_start(FlDisplayMonitor *monitor)
Definition: fl_display_monitor.cc:103
fl_engine.h