 |
Flutter Linux Embedder
|
|
Go to the documentation of this file.
15 "Unknown Clipboard Format";
34 G_DEFINE_TYPE(FlPlatformHandler, fl_platform_handler, G_TYPE_OBJECT)
57 GtkClipboard* clipboard =
58 gtk_clipboard_get_default(gdk_display_get_default());
59 gtk_clipboard_set_text(clipboard, text, -1);
74 GtkClipboard* clipboard =
75 gtk_clipboard_get_default(gdk_display_get_default());
87 GtkClipboard* clipboard =
88 gtk_clipboard_get_default(gdk_display_get_default());
98 GApplication* app = g_application_get_default();
107 if (GTK_IS_APPLICATION(app)) {
110 g_autoptr(GList) windows =
111 g_list_copy(gtk_application_get_windows(GTK_APPLICATION(app)));
112 for (GList* link = windows; link != NULL; link = link->next) {
113 GtkWidget* window = GTK_WIDGET(link->data);
114 gtk_window_set_application(GTK_WINDOW(window), NULL);
118 g_application_quit(app);
123 GAsyncResult* result,
125 FlPlatformHandler*
self = FL_PLATFORM_HANDLER(
user_data);
127 g_autoptr(GError)
error =
nullptr;
130 object, result, &exit_response, &
error)) {
131 if (g_error_matches(
error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
134 g_warning(
"Failed to complete System.requestAppExit: %s",
error->message);
144 if (self->exit_application_method_call !=
nullptr) {
146 self->exit_application_method_call, exit_response);
154 if (!self->app_initialization_complete ||
169 FlPlatformHandler*
self = FL_PLATFORM_HANDLER(
user_data);
170 self->app_initialization_complete =
TRUE;
177 FlPlatformHandler*
self = FL_PLATFORM_HANDLER(
user_data);
179 if (self->exit_application_method_call !=
nullptr) {
183 self->exit_application_method_call =
188 if (!self->app_initialization_complete ||
205 GdkDisplay* display = gdk_display_get_default();
206 if (display !=
nullptr) {
207 gdk_display_beep(display);
212 g_warning(
"Ignoring unknown sound type %s in SystemSound.play.\n",
type);
222 FlPlatformHandler*
self = FL_PLATFORM_HANDLER(
object);
224 g_cancellable_cancel(self->cancellable);
226 g_clear_object(&self->channel);
227 g_clear_object(&self->exit_application_method_call);
228 g_clear_object(&self->cancellable);
230 G_OBJECT_CLASS(fl_platform_handler_parent_class)->dispose(
object);
238 self->cancellable = g_cancellable_new();
252 g_return_val_if_fail(FL_IS_BINARY_MESSENGER(messenger),
nullptr);
254 FlPlatformHandler*
self = FL_PLATFORM_HANDLER(
255 g_object_new(fl_platform_handler_get_type(),
nullptr));
259 self->app_initialization_complete = FALSE;
265 g_return_if_fail(FL_IS_PLATFORM_HANDLER(
self));
G_MODULE_EXPORT FlMethodErrorResponse * fl_method_error_response_new(const gchar *code, const gchar *message, FlValue *details)
G_MODULE_EXPORT FlMethodSuccessResponse * fl_method_success_response_new(FlValue *result)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue gpointer user_data
G_BEGIN_DECLS G_MODULE_EXPORT FlMethodCall * method_call
G_DEFINE_TYPE(FlBasicMessageChannelResponseHandle, fl_basic_message_channel_response_handle, G_TYPE_OBJECT) static void fl_basic_message_channel_response_handle_dispose(GObject *object)
const uint8_t uint32_t uint32_t GError ** error
uint32_t uint32_t * format