Flutter Linux Embedder
fl_windowing_channel.h File Reference

Go to the source code of this file.

Classes

struct  FlWindowingSize
 
struct  FlWindowingChannelVTable
 

Enumerations

enum  FlWindowState {
  FL_WINDOW_STATE_UNDEFINED,
  FL_WINDOW_STATE_RESTORED,
  FL_WINDOW_STATE_MAXIMIZED,
  FL_WINDOW_STATE_MINIMIZED
}
 

Functions

G_BEGIN_DECLS G_DECLARE_FINAL_TYPE (FlWindowingChannel, fl_windowing_channel, FL, WINDOWING_CHANNEL, GObject)
 
FlWindowingChannel * fl_windowing_channel_new (FlBinaryMessenger *messenger, FlWindowingChannelVTable *vtable, gpointer user_data)
 
FlMethodResponse * fl_windowing_channel_make_create_regular_response (int64_t view_id, FlWindowingSize *size, FlWindowState state)
 
FlMethodResponse * fl_windowing_channel_make_modify_regular_response ()
 
FlMethodResponse * fl_windowing_channel_make_destroy_window_response ()
 

Enumeration Type Documentation

◆ FlWindowState

Enumerator
FL_WINDOW_STATE_UNDEFINED 
FL_WINDOW_STATE_RESTORED 
FL_WINDOW_STATE_MAXIMIZED 
FL_WINDOW_STATE_MINIMIZED 

Definition at line 20 of file fl_windowing_channel.h.

Function Documentation

◆ fl_windowing_channel_make_create_regular_response()

FlMethodResponse* fl_windowing_channel_make_create_regular_response ( int64_t  view_id,
FlWindowingSize size,
FlWindowState  state 
)

◆ fl_windowing_channel_make_destroy_window_response()

FlMethodResponse* fl_windowing_channel_make_destroy_window_response ( )

Definition at line 294 of file fl_windowing_channel.cc.

294  {
295  return FL_METHOD_RESPONSE(fl_method_success_response_new(nullptr));
296 }

References fl_method_success_response_new().

Referenced by destroy_window().

◆ fl_windowing_channel_make_modify_regular_response()

FlMethodResponse* fl_windowing_channel_make_modify_regular_response ( )

Definition at line 290 of file fl_windowing_channel.cc.

290  {
291  return FL_METHOD_RESPONSE(fl_method_success_response_new(nullptr));
292 }

References fl_method_success_response_new().

Referenced by modify_regular().

◆ fl_windowing_channel_new()

FlWindowingChannel* fl_windowing_channel_new ( FlBinaryMessenger *  messenger,
FlWindowingChannelVTable vtable,
gpointer  user_data 
)

fl_windowing_channel_new: @messenger: an #FlBinaryMessenger @vtable: callbacks for incoming method calls. @user_data: data to pass in callbacks.

Creates a new channel that sends handled windowing requests from the platform.

Returns: a new #FlWindowingChannel

Definition at line 257 of file fl_windowing_channel.cc.

259  {
260  FlWindowingChannel* self = FL_WINDOWING_CHANNEL(
261  g_object_new(fl_windowing_channel_get_type(), nullptr));
262 
263  self->vtable = vtable;
264  self->user_data = user_data;
265 
266  g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
267  self->channel =
268  fl_method_channel_new(messenger, kChannelName, FL_METHOD_CODEC(codec));
270  nullptr);
271 
272  return self;
273 }

References fl_method_channel_new(), fl_method_channel_set_method_call_handler(), fl_standard_method_codec_new(), kChannelName, method_call_cb(), and user_data.

Referenced by fl_windowing_handler_new().

◆ G_DECLARE_FINAL_TYPE()

G_BEGIN_DECLS G_DECLARE_FINAL_TYPE ( FlWindowingChannel  ,
fl_windowing_channel  ,
FL  ,
WINDOWING_CHANNEL  ,
GObject   
)
method_call_cb
static void method_call_cb(FlMethodChannel *channel, FlMethodCall *method_call, gpointer user_data)
Definition: fl_windowing_channel.cc:216
FL_WINDOW_STATE_RESTORED
@ FL_WINDOW_STATE_RESTORED
Definition: fl_windowing_channel.h:22
fl_method_channel_new
G_MODULE_EXPORT FlMethodChannel * fl_method_channel_new(FlBinaryMessenger *messenger, const gchar *name, FlMethodCodec *codec)
Definition: fl_method_channel.cc:112
fl_value_set_string_take
G_MODULE_EXPORT void fl_value_set_string_take(FlValue *self, const gchar *key, FlValue *value)
Definition: fl_value.cc:650
fl_standard_method_codec_new
G_MODULE_EXPORT FlStandardMethodCodec * fl_standard_method_codec_new()
Definition: fl_standard_method_codec.cc:291
FlWindowingSize::height
double height
Definition: fl_windowing_channel.h:30
fl_value_new_list
G_MODULE_EXPORT FlValue * fl_value_new_list()
Definition: fl_value.cc:349
kSizeKey
static constexpr char kSizeKey[]
Definition: fl_windowing_channel.cc:17
FlValue
typedefG_BEGIN_DECLS struct _FlValue FlValue
Definition: fl_value.h:42
kViewIdKey
static constexpr char kViewIdKey[]
Definition: fl_windowing_channel.cc:22
FL_WINDOW_STATE_UNDEFINED
@ FL_WINDOW_STATE_UNDEFINED
Definition: fl_windowing_channel.h:21
kChannelName
static constexpr char kChannelName[]
Definition: fl_windowing_channel.cc:10
fl_value_new_int
G_MODULE_EXPORT FlValue * fl_value_new_int(int64_t value)
Definition: fl_value.cc:262
fl_method_success_response_new
G_MODULE_EXPORT FlMethodSuccessResponse * fl_method_success_response_new(FlValue *result)
Definition: fl_method_response.cc:126
state
AtkStateType state
Definition: fl_accessible_node.cc:10
user_data
G_BEGIN_DECLS G_MODULE_EXPORT FlValue gpointer user_data
Definition: fl_event_channel.h:90
FL_WINDOW_STATE_MINIMIZED
@ FL_WINDOW_STATE_MINIMIZED
Definition: fl_windowing_channel.h:24
fl_value_new_map
G_MODULE_EXPORT FlValue * fl_value_new_map()
Definition: fl_value.cc:366
kStateKey
static constexpr char kStateKey[]
Definition: fl_windowing_channel.cc:21
FL_WINDOW_STATE_MAXIMIZED
@ FL_WINDOW_STATE_MAXIMIZED
Definition: fl_windowing_channel.h:23
FlWindowState
FlWindowState
Definition: fl_windowing_channel.h:20
fl_value_append_take
G_MODULE_EXPORT void fl_value_append_take(FlValue *self, FlValue *value)
Definition: fl_value.cc:600
fl_value_set_string
G_MODULE_EXPORT void fl_value_set_string(FlValue *self, const gchar *key, FlValue *value)
Definition: fl_value.cc:639
fl_method_channel_set_method_call_handler
G_MODULE_EXPORT void fl_method_channel_set_method_call_handler(FlMethodChannel *self, FlMethodChannelMethodCallHandler handler, gpointer user_data, GDestroyNotify destroy_notify)
Definition: fl_method_channel.cc:134
FlWindowingSize::width
double width
Definition: fl_windowing_channel.h:29
fl_value_new_float
G_MODULE_EXPORT FlValue * fl_value_new_float(double value)
Definition: fl_value.cc:269
fl_value_new_string
G_MODULE_EXPORT FlValue * fl_value_new_string(const gchar *value)
Definition: fl_value.cc:276
window_state_to_string
static const gchar * window_state_to_string(FlWindowState state)
Definition: fl_windowing_channel.cc:77