#include "flutter/shell/platform/linux/fl_platform_handler.h"
#include <gtk/gtk.h>
#include <cstring>
#include "flutter/shell/platform/linux/fl_platform_channel.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_method_channel.h"
Go to the source code of this file.
Classes | |
struct | _FlPlatformHandler |
Functions | |
static void | clipboard_text_cb (GtkClipboard *clipboard, const gchar *text, gpointer user_data) |
static void | clipboard_text_has_strings_cb (GtkClipboard *clipboard, const gchar *text, gpointer user_data) |
static FlMethodResponse * | clipboard_set_data (FlMethodCall *method_call, const gchar *text, gpointer user_data) |
static FlMethodResponse * | clipboard_get_data (FlMethodCall *method_call, const gchar *format, gpointer user_data) |
static FlMethodResponse * | clipboard_has_strings (FlMethodCall *method_call, gpointer user_data) |
static void | quit_application () |
static void | request_app_exit_response_cb (GObject *object, GAsyncResult *result, gpointer user_data) |
static void | request_app_exit (FlPlatformHandler *self, FlPlatformChannelExitType type) |
static void | system_initialization_complete (gpointer user_data) |
static FlMethodResponse * | system_exit_application (FlMethodCall *method_call, FlPlatformChannelExitType type, gpointer user_data) |
static void | system_sound_play (const gchar *type, gpointer user_data) |
static void | system_navigator_pop (gpointer user_data) |
static void | fl_platform_handler_dispose (GObject *object) |
static void | fl_platform_handler_class_init (FlPlatformHandlerClass *klass) |
static void | fl_platform_handler_init (FlPlatformHandler *self) |
FlPlatformHandler * | fl_platform_handler_new (FlBinaryMessenger *messenger) |
void | fl_platform_handler_request_app_exit (FlPlatformHandler *self) |
Variables | |
static constexpr char | kInProgressError [] = "In Progress" |
static constexpr char | kUnknownClipboardFormatError [] |
static constexpr char | kTextPlainFormat [] = "text/plain" |
static constexpr char | kSoundTypeAlert [] = "SystemSoundType.alert" |
static constexpr char | kSoundTypeClick [] = "SystemSoundType.click" |
static FlPlatformChannelVTable | platform_channel_vtable |
|
static |
Definition at line 65 of file fl_platform_handler.cc.
References clipboard_text_cb(), fl_method_error_response_new(), format, kTextPlainFormat, kUnknownClipboardFormatError, and method_call.
|
static |
Definition at line 85 of file fl_platform_handler.cc.
References clipboard_text_has_strings_cb(), and method_call.
|
static |
|
static |
Definition at line 37 of file fl_platform_handler.cc.
References fl_platform_channel_respond_clipboard_get_data(), method_call, and user_data.
Referenced by clipboard_get_data().
|
static |
Definition at line 45 of file fl_platform_handler.cc.
References fl_platform_channel_respond_clipboard_has_strings(), method_call, and user_data.
Referenced by clipboard_has_strings().
|
static |
Definition at line 233 of file fl_platform_handler.cc.
References fl_platform_handler_dispose().
|
static |
Definition at line 221 of file fl_platform_handler.cc.
Referenced by fl_platform_handler_class_init().
|
static |
Definition at line 237 of file fl_platform_handler.cc.
FlPlatformHandler* fl_platform_handler_new | ( | FlBinaryMessenger * | messenger | ) |
FlPlatformHandler:
#FlPlatformHandler is a handler that implements the shell side of SystemChannels.platform from the Flutter services library. fl_platform_handler_new: @messenger: an #FlBinaryMessenger
Creates a new handler that implements SystemChannels.platform from the Flutter services library.
Returns: a new #FlPlatformHandler
Definition at line 251 of file fl_platform_handler.cc.
References fl_platform_channel_new(), and platform_channel_vtable.
Referenced by fl_engine_start(), fl_test_application_activate(), and TEST().
void fl_platform_handler_request_app_exit | ( | FlPlatformHandler * | handler | ) |
fl_platform_handler_request_app_exit: @handler: an #FlPlatformHandler
Request the application exits (i.e. due to the window being requested to be closed).
Calling this will only send an exit request to the framework if the framework has already indicated that it is ready to receive requests by sending a "System.initializationComplete" method call on the platform channel. Calls before initialization is complete will result in an immediate exit.
Definition at line 264 of file fl_platform_handler.cc.
References FL_PLATFORM_CHANNEL_EXIT_TYPE_CANCELABLE, and request_app_exit().
Referenced by fl_engine_request_app_exit().
|
static |
Definition at line 97 of file fl_platform_handler.cc.
Referenced by request_app_exit(), request_app_exit_response_cb(), system_exit_application(), and system_navigator_pop().
|
static |
Definition at line 152 of file fl_platform_handler.cc.
References FL_PLATFORM_CHANNEL_EXIT_TYPE_REQUIRED, fl_platform_channel_system_request_app_exit(), quit_application(), request_app_exit_response_cb(), and type.
Referenced by fl_platform_handler_request_app_exit(), and system_exit_application().
|
static |
Definition at line 122 of file fl_platform_handler.cc.
References error, FL_PLATFORM_CHANNEL_EXIT_RESPONSE_EXIT, fl_platform_channel_respond_system_exit_application(), fl_platform_channel_system_request_app_exit_finish(), quit_application(), and user_data.
Referenced by request_app_exit().
|
static |
Definition at line 174 of file fl_platform_handler.cc.
References fl_method_error_response_new(), FL_PLATFORM_CHANNEL_EXIT_RESPONSE_EXIT, FL_PLATFORM_CHANNEL_EXIT_TYPE_REQUIRED, fl_platform_channel_make_system_request_app_exit_response(), kInProgressError, method_call, quit_application(), request_app_exit(), type, and user_data.
|
static |
|
static |
Definition at line 217 of file fl_platform_handler.cc.
References quit_application().
|
static |
Definition at line 203 of file fl_platform_handler.cc.
References kSoundTypeAlert, kSoundTypeClick, and type.
|
staticconstexpr |
Definition at line 13 of file fl_platform_handler.cc.
Referenced by system_exit_application().
|
staticconstexpr |
Definition at line 19 of file fl_platform_handler.cc.
Referenced by system_sound_play().
|
staticconstexpr |
Definition at line 20 of file fl_platform_handler.cc.
Referenced by system_sound_play().
|
staticconstexpr |
Definition at line 17 of file fl_platform_handler.cc.
Referenced by clipboard_get_data().
|
staticconstexpr |
Definition at line 14 of file fl_platform_handler.cc.
Referenced by clipboard_get_data().
|
static |
Definition at line 241 of file fl_platform_handler.cc.
Referenced by fl_platform_handler_new().