15 "Unknown Clipboard Format";
35G_DEFINE_TYPE(FlPlatformHandler, fl_platform_handler, G_TYPE_OBJECT)
58 GtkClipboard* clipboard =
75 GtkClipboard* clipboard =
88 GtkClipboard* clipboard =
99 GApplication* app = g_application_get_default();
100 if (app ==
nullptr) {
108 if (GTK_IS_APPLICATION(app)) {
112 g_list_copy(gtk_application_get_windows(GTK_APPLICATION(app)));
113 for (GList* link = windows; link != NULL; link = link->next) {
114 GtkWidget*
window = GTK_WIDGET(link->data);
115 gtk_window_set_application(GTK_WINDOW(
window), NULL);
119 g_application_quit(app);
124 GAsyncResult* result,
131 object, result, &exit_response, &
error)) {
132 if (g_error_matches(
error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
135 g_warning(
"Failed to complete System.requestAppExit: %s",
error->message);
145 if (
self->exit_application_method_call !=
nullptr) {
147 self->exit_application_method_call, exit_response);
155 if (!
self->app_initialization_complete ||
171 self->app_initialization_complete =
TRUE;
180 if (
self->exit_application_method_call !=
nullptr) {
184 self->exit_application_method_call =
189 if (!
self->app_initialization_complete ||
207 if (display !=
nullptr) {
215 g_warning(
"Ignoring unknown sound type %s in SystemSound.play.\n",
type);
225 FlPlatformHandler*
self = FL_PLATFORM_HANDLER(
object);
227 g_cancellable_cancel(
self->cancellable);
229 g_clear_object(&
self->channel);
230 g_clear_object(&
self->exit_application_method_call);
231 g_clear_object(&
self->cancellable);
233 G_OBJECT_CLASS(fl_platform_handler_parent_class)->dispose(
object);
241 self->cancellable = g_cancellable_new();
255 g_return_val_if_fail(FL_IS_BINARY_MESSENGER(messenger),
nullptr);
257 FlPlatformHandler*
self = FL_PLATFORM_HANDLER(
258 g_object_new(fl_platform_handler_get_type(),
nullptr));
262 self->app_initialization_complete = FALSE;
268 g_return_if_fail(FL_IS_PLATFORM_HANDLER(
self));
G_DEFINE_TYPE(FlBasicMessageChannelResponseHandle, fl_basic_message_channel_response_handle, G_TYPE_OBJECT) static void fl_basic_message_channel_response_handle_dispose(GObject *object)
g_autoptr(GMutexLocker) locker
G_BEGIN_DECLS G_MODULE_EXPORT FlMethodCall * method_call
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)
const uint8_t uint32_t uint32_t GError ** error
uint32_t uint32_t * format
GdkDisplay * gdk_display_get_default()
GtkClipboard * gtk_clipboard_get_default(GdkDisplay *display)
void gtk_clipboard_request_text(GtkClipboard *clipboard, GtkClipboardTextReceivedFunc callback, gpointer user_data)
void gdk_display_beep(GdkDisplay *display)
void gtk_clipboard_set_text(GtkClipboard *clipboard, const gchar *text, gint len)