#include <gdk/gdk.h>
#include <cinttypes>
#include <functional>
#include <memory>
#include "flutter/shell/platform/embedder/embedder.h"
#include "flutter/shell/platform/linux/fl_key_event.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_binary_messenger.h"
Go to the source code of this file.
Classes | |
struct | _FlKeyboardViewDelegateInterface |
Typedefs | |
typedef std::function< void()> | KeyboardLayoutNotifier |
Functions | |
G_BEGIN_DECLS | G_DECLARE_INTERFACE (FlKeyboardViewDelegate, fl_keyboard_view_delegate, FL, KEYBOARD_VIEW_DELEGATE, GObject) |
void | fl_keyboard_view_delegate_send_key_event (FlKeyboardViewDelegate *delegate, const FlutterKeyEvent *event, FlutterKeyEventCallback callback, void *user_data) |
gboolean | fl_keyboard_view_delegate_text_filter_key_press (FlKeyboardViewDelegate *delegate, FlKeyEvent *event) |
FlBinaryMessenger * | fl_keyboard_view_delegate_get_messenger (FlKeyboardViewDelegate *delegate) |
void | fl_keyboard_view_delegate_redispatch_event (FlKeyboardViewDelegate *delegate, std::unique_ptr< FlKeyEvent > event) |
void | fl_keyboard_view_delegate_subscribe_to_layout_change (FlKeyboardViewDelegate *delegate, KeyboardLayoutNotifier notifier) |
guint | fl_keyboard_view_delegate_lookup_key (FlKeyboardViewDelegate *delegate, const GdkKeymapKey *key) |
GHashTable * | fl_keyboard_view_delegate_get_keyboard_state (FlKeyboardViewDelegate *delegate) |
typedef std::function<void()> KeyboardLayoutNotifier |
Definition at line 17 of file fl_keyboard_view_delegate.h.
GHashTable* fl_keyboard_view_delegate_get_keyboard_state | ( | FlKeyboardViewDelegate * | delegate | ) |
fl_keyboard_view_delegate_get_keyboard_state:
Returns the keyboard pressed state. The hash table contains one entry per pressed keys, mapping from the logical key to the physical key.*
Definition at line 68 of file fl_keyboard_view_delegate.cc.
Referenced by get_keyboard_state().
FlBinaryMessenger* fl_keyboard_view_delegate_get_messenger | ( | FlKeyboardViewDelegate * | delegate | ) |
fl_keyboard_view_delegate_get_messenger:
Returns a binary messenger that can be used to send messages to the framework.
The ownership of messenger is kept by the view delegate.
Definition at line 35 of file fl_keyboard_view_delegate.cc.
Referenced by fl_keyboard_manager_new().
guint fl_keyboard_view_delegate_lookup_key | ( | FlKeyboardViewDelegate * | delegate, |
const GdkKeymapKey * | key | ||
) |
void fl_keyboard_view_delegate_redispatch_event | ( | FlKeyboardViewDelegate * | delegate, |
std::unique_ptr< FlKeyEvent > | event | ||
) |
fl_keyboard_view_delegate_redispatch_event:
Handles FlKeyboardManager
's request to insert a GDK event to the system for redispatching.
The ownership of event will be transferred to the view delegate. The view delegate is responsible to call fl_key_event_dispose.
Definition at line 42 of file fl_keyboard_view_delegate.cc.
References event.
Referenced by responder_handle_event_callback().
void fl_keyboard_view_delegate_send_key_event | ( | FlKeyboardViewDelegate * | delegate, |
const FlutterKeyEvent * | event, | ||
FlutterKeyEventCallback | callback, | ||
void * | user_data | ||
) |
fl_keyboard_view_delegate_send_key_event:
Handles FlKeyboardManager
's request to send a FlutterKeyEvent
through the embedder API to the framework.
The ownership of the event
is kept by the keyboard manager, and the event
might be immediately destroyed after this function returns.
The callback
must eventually be called exactly once with the event result and the user_data
.
Definition at line 14 of file fl_keyboard_view_delegate.cc.
References callback, event, and user_data.
Referenced by fl_keyboard_manager_new().
void fl_keyboard_view_delegate_subscribe_to_layout_change | ( | FlKeyboardViewDelegate * | delegate, |
KeyboardLayoutNotifier | notifier | ||
) |
Definition at line 52 of file fl_keyboard_view_delegate.cc.
Referenced by fl_keyboard_manager_dispose(), and fl_keyboard_manager_new().
gboolean fl_keyboard_view_delegate_text_filter_key_press | ( | FlKeyboardViewDelegate * | delegate, |
FlKeyEvent * | event | ||
) |
fl_keyboard_view_delegate_text_filter_key_press:
Handles FlKeyboardManager
's request to check if the GTK text input IM filter would like to handle a GDK event.
The ownership of the event
is kept by the keyboard manager.
Definition at line 25 of file fl_keyboard_view_delegate.cc.
References event.
Referenced by responder_handle_event_callback().
G_BEGIN_DECLS G_DECLARE_INTERFACE | ( | FlKeyboardViewDelegate | , |
fl_keyboard_view_delegate | , | ||
FL | , | ||
KEYBOARD_VIEW_DELEGATE | , | ||
GObject | |||
) |