| Flutter Linux Embedder |

Classes | Functions
fl_mouse_cursor_channel.h File Reference
`#include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h"`

Go to the source code of this file.

## Classes
struct | FlMouseCursorChannelVTable

## Functions
G_BEGIN_DECLS | G_DECLARE_FINAL_TYPE (FlMouseCursorChannel, fl_mouse_cursor_channel, FL, MOUSE_CURSOR_CHANNEL, GObject)
FlMouseCursorChannel * | fl_mouse_cursor_channel_new (FlBinaryMessenger *messenger, FlMouseCursorChannelVTable *vtable, gpointer user_data)

## Function Documentation

## ◆ fl_mouse_cursor_channel_new()

FlMouseCursorChannel* fl_mouse_cursor_channel_new | ( | FlBinaryMessenger * | messenger,
|  | FlMouseCursorChannelVTable * | vtable,
|  | gpointer | user_data
| ) |  |

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

Creates a new channel that implements SystemChannels.mouseCursor from the Flutter services library.

Returns: a new #FlMouseCursorChannel.

Definition at line 85 of file fl_mouse_cursor_channel.cc.

88 {
89 g_return_val_if_fail(FL_IS_BINARY_MESSENGER(messenger), nullptr);
90
91 FlMouseCursorChannel* self = FL_MOUSE_CURSOR_CHANNEL(
92 g_object_new(fl_mouse_cursor_channel_get_type(), nullptr));
93
94 self->vtable = vtable;
95 self->user_data = user_data;
96
97 g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
98 self->channel =
99 fl_method_channel_new(messenger, kChannelName, FL_METHOD_CODEC(codec));
100 fl_method_channel_set_method_call_handler(self->channel, method_call_cb, self,
101 nullptr);
102
103 return self;
104 }
user_data
G_BEGIN_DECLS G_MODULE_EXPORT FlValue gpointer user_data
Definition: fl_event_channel.h:90
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_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
method_call_cb
static void method_call_cb(FlMethodChannel *channel, FlMethodCall *method_call, gpointer user_data)
Definition: fl_mouse_cursor_channel.cc:49
kChannelName
static constexpr char kChannelName[]
Definition: fl_mouse_cursor_channel.cc:12
fl_standard_method_codec_new
G_MODULE_EXPORT FlStandardMethodCodec * fl_standard_method_codec_new()
Definition: fl_standard_method_codec.cc:291

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_mouse_cursor_handler_new().

## ◆ G_DECLARE_FINAL_TYPE()

G_BEGIN_DECLS G_DECLARE_FINAL_TYPE | ( | FlMouseCursorChannel | ,
|  | fl_mouse_cursor_channel | ,
|  | FL | ,
|  | MOUSE_CURSOR_CHANNEL | ,
|  | GObject |
| ) |  |