| Flutter Linux Embedder |

Functions
fl_mouse_cursor_plugin.h File Reference
`#include <gdk/gdk.h>`
`#include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h"`
`#include "flutter/shell/platform/linux/public/flutter_linux/fl_view.h"`

Go to the source code of this file.

## Functions
G_BEGIN_DECLS | G_DECLARE_FINAL_TYPE (FlMouseCursorPlugin, fl_mouse_cursor_plugin, FL, MOUSE_CURSOR_PLUGIN, GObject)
FlMouseCursorPlugin * | fl_mouse_cursor_plugin_new (FlBinaryMessenger *messenger, FlView *view)

## Function Documentation

## ◆ fl_mouse_cursor_plugin_new()

FlMouseCursorPlugin* fl_mouse_cursor_plugin_new | ( | FlBinaryMessenger * | messenger,
|  | FlView * | view
| ) |  |

FlMouseCursorPlugin:

#FlMouseCursorPlugin is a mouse_cursor channel that implements the shell side of SystemChannels.mouseCursor from the Flutter services library. fl_mouse_cursor_plugin_new: @messenger: an #FlBinaryMessenger. @view: an #FlView to control.

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

Returns: a new #FlMouseCursorPlugin.

Definition at line 163 of file fl_mouse_cursor_plugin.cc.

164 {
165 g_return_val_if_fail(FL_IS_BINARY_MESSENGER(messenger), nullptr);
166
167 FlMouseCursorPlugin* self = FL_MOUSE_CURSOR_PLUGIN(
168 g_object_new(fl_mouse_cursor_plugin_get_type(), nullptr));
169
170 g_autoptr(FlStandardMethodCodec) codec = fl_standard_method_codec_new();
171 self->channel =
172 fl_method_channel_new(messenger, kChannelName, FL_METHOD_CODEC(codec));
173 fl_method_channel_set_method_call_handler(self->channel, method_call_cb, self,
174 nullptr);
175 self->view = view;
176 if (view != nullptr) {
177 g_object_add_weak_pointer(G_OBJECT(view),
178 reinterpret_cast<gpointer*>(&(self->view)));
179 }
180
181 return self;
182 }

References fl_method_channel_new(), fl_method_channel_set_method_call_handler(), fl_standard_method_codec_new(), g_object_add_weak_pointer(), kChannelName, method_call_cb(), and self.

Referenced by fl_view_constructed().

## ◆ G_DECLARE_FINAL_TYPE()

G_BEGIN_DECLS G_DECLARE_FINAL_TYPE | ( | FlMouseCursorPlugin | ,
|  | fl_mouse_cursor_plugin | ,
|  | FL | ,
|  | MOUSE_CURSOR_PLUGIN | ,
|  | GObject |
| ) |  |

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
kChannelName
static constexpr char kChannelName[]
Definition: fl_mouse_cursor_plugin.cc:13
fl_standard_method_codec_new
G_MODULE_EXPORT FlStandardMethodCodec * fl_standard_method_codec_new()
Definition: fl_standard_method_codec.cc:248
method_call_cb
static void method_call_cb(FlMethodChannel *channel, FlMethodCall *method_call, gpointer user_data)
Definition: fl_mouse_cursor_plugin.cc:122
g_object_add_weak_pointer
g_object_add_weak_pointer(G_OBJECT(self), reinterpret_cast< gpointer * >(&self->engine))
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
self
GdkEvent FlView * self
Definition: fl_view.cc:100