| Flutter Linux Embedder |

Functions
fl_window_state_monitor.h File Reference
`#include <gtk/gtk.h>`
`#include "flutter/shell/platform/linux/public/flutter_linux/fl_engine.h"`

Go to the source code of this file.

## Functions
G_BEGIN_DECLS | G_DECLARE_FINAL_TYPE (FlWindowStateMonitor, fl_window_state_monitor, FL, WINDOW_STATE_MONITOR, GObject)
FlWindowStateMonitor * | fl_window_state_monitor_new (FlBinaryMessenger *messenger, GtkWindow *window)

## Function Documentation

## ◆ fl_window_state_monitor_new()

FlWindowStateMonitor* fl_window_state_monitor_new | ( | FlBinaryMessenger * | messenger,
|  | GtkWindow * | window
| ) |  |

FlWindowStateMonitor:

Monitors a GtkWindow and reports state change events to the Flutter engine. fl_window_state_monitor_new: @messenger: an #FlBinaryMessenger. @window: a #GtkWindow.

Creates a new window state manager to monitor @window and report events to @messenger.

Returns: a new #FlWindowStateMonitor.

Definition at line 104 of file fl_window_state_monitor.cc.

105 {
106 FlWindowStateMonitor* self = FL_WINDOW_STATE_MONITOR(
107 g_object_new(fl_window_state_monitor_get_type(), nullptr));
108 self->messenger = FL_BINARY_MESSENGER(g_object_ref(messenger));
109 self->window = window;
110
111 // Listen to window state changes.
112 self->window_state_event_cb_id =
113 g_signal_connect_swapped(self->window, "window-state-event",
114 G_CALLBACK(window_state_event_cb), self);
115 self->window_state =
116 gdk_window_get_state(gtk_widget_get_window(GTK_WIDGET(self->window)));
117
118 return self;
119 }
window
return window
Definition: fl_application.cc:41
window_state_event_cb
static gboolean window_state_event_cb(FlWindowStateMonitor *self, GdkEvent *event)
Definition: fl_window_state_monitor.cc:60

References window, and window_state_event_cb().

Referenced by realize_cb(), and TEST().

## ◆ G_DECLARE_FINAL_TYPE()

G_BEGIN_DECLS G_DECLARE_FINAL_TYPE | ( | FlWindowStateMonitor | ,
|  | fl_window_state_monitor | ,
|  | FL | ,
|  | WINDOW_STATE_MONITOR | ,
|  | GObject |
| ) |  |