| Flutter Linux Embedder |

Functions
fl_keyboard_view_delegate.cc File Reference
`#include "flutter/shell/platform/linux/fl_keyboard_view_delegate.h"`

Go to the source code of this file.

## Functions
| G_DEFINE_INTERFACE (FlKeyboardViewDelegate, fl_keyboard_view_delegate, G_TYPE_OBJECT) static void fl_keyboard_view_delegate_default_init(FlKeyboardViewDelegateInterface *iface)
void | fl_keyboard_view_delegate_send_key_event (FlKeyboardViewDelegate *self, const FlutterKeyEvent *event, FlutterKeyEventCallback callback, void *user_data)
gboolean | fl_keyboard_view_delegate_text_filter_key_press (FlKeyboardViewDelegate *self, FlKeyEvent *event)
FlBinaryMessenger * | fl_keyboard_view_delegate_get_messenger (FlKeyboardViewDelegate *self)
void | fl_keyboard_view_delegate_redispatch_event (FlKeyboardViewDelegate *self, FlKeyEvent *event)
void | fl_keyboard_view_delegate_subscribe_to_layout_change (FlKeyboardViewDelegate *self, KeyboardLayoutNotifier notifier)
guint | fl_keyboard_view_delegate_lookup_key (FlKeyboardViewDelegate *self, const GdkKeymapKey *key)
GHashTable * | fl_keyboard_view_delegate_get_keyboard_state (FlKeyboardViewDelegate *self)

## Function Documentation

## ◆ fl_keyboard_view_delegate_get_keyboard_state()

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 67 of file fl_keyboard_view_delegate.cc.

68 {
69 g_return_val_if_fail(FL_IS_KEYBOARD_VIEW_DELEGATE(self), nullptr);
70
71 return FL_KEYBOARD_VIEW_DELEGATE_GET_IFACE(self)->get_keyboard_state(self);
72 }

Referenced by get_keyboard_state().

## ◆ fl_keyboard_view_delegate_get_messenger()

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.

36 {
37 g_return_val_if_fail(FL_IS_KEYBOARD_VIEW_DELEGATE(self), nullptr);
38
39 return FL_KEYBOARD_VIEW_DELEGATE_GET_IFACE(self)->get_messenger(self);
40 }

Referenced by fl_keyboard_handler_new().

## ◆ fl_keyboard_view_delegate_lookup_key()

guint fl_keyboard_view_delegate_lookup_key | ( | FlKeyboardViewDelegate * | self,
|  | const GdkKeymapKey * | key
| ) |  |

Definition at line 60 of file fl_keyboard_view_delegate.cc.

61 {
62 g_return_val_if_fail(FL_IS_KEYBOARD_VIEW_DELEGATE(self), 0);
63
64 return FL_KEYBOARD_VIEW_DELEGATE_GET_IFACE(self)->lookup_key(self, key);
65 }

Referenced by convert_key_to_char().

## ◆ fl_keyboard_view_delegate_redispatch_event()

void fl_keyboard_view_delegate_redispatch_event | ( | FlKeyboardViewDelegate * | delegate,
|  | FlKeyEvent * | event
| ) |  |

fl_keyboard_view_delegate_redispatch_event:

Handles `FlKeyboardHandler`'s request to insert a GDK event to the system for redispatching.

Definition at line 42 of file fl_keyboard_view_delegate.cc.

43 {
44 g_return_if_fail(FL_IS_KEYBOARD_VIEW_DELEGATE(self));
45 g_return_if_fail(event != nullptr);
46
47 return FL_KEYBOARD_VIEW_DELEGATE_GET_IFACE(self)->redispatch_event(self,
48 event);
49 }

References event.

Referenced by responder_handle_event_callback().

## ◆ fl_keyboard_view_delegate_send_key_event()

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 `FlKeyboardHandler`'s request to send a `FlutterKeyEvent` through the embedder API to the framework.

The ownership of the `event` is kept by the keyboard handler, 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.

17 {
18 g_return_if_fail(FL_IS_KEYBOARD_VIEW_DELEGATE(self));
19 g_return_if_fail(event != nullptr);
20
21 FL_KEYBOARD_VIEW_DELEGATE_GET_IFACE(self)->send_key_event(
22 self, event, callback, user_data);
23 }

References callback, event, and user_data.

Referenced by fl_keyboard_handler_new().

## ◆ fl_keyboard_view_delegate_subscribe_to_layout_change()

void fl_keyboard_view_delegate_subscribe_to_layout_change | ( | FlKeyboardViewDelegate * | self,
|  | KeyboardLayoutNotifier | notifier
| ) |  |

Definition at line 51 of file fl_keyboard_view_delegate.cc.

53 {
54 g_return_if_fail(FL_IS_KEYBOARD_VIEW_DELEGATE(self));
55
56 return FL_KEYBOARD_VIEW_DELEGATE_GET_IFACE(self)->subscribe_to_layout_change(
57 self, std::move(notifier));
58 }

Referenced by fl_keyboard_handler_dispose(), and fl_keyboard_handler_new().

## ◆ fl_keyboard_view_delegate_text_filter_key_press()

gboolean fl_keyboard_view_delegate_text_filter_key_press | ( | FlKeyboardViewDelegate * | delegate,
|  | FlKeyEvent * | event
| ) |  |

fl_keyboard_view_delegate_text_filter_key_press:

Handles `FlKeyboardHandler`'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 handler.

Definition at line 25 of file fl_keyboard_view_delegate.cc.

27 {
28 g_return_val_if_fail(FL_IS_KEYBOARD_VIEW_DELEGATE(self), false);
29 g_return_val_if_fail(event != nullptr, false);
30
31 return FL_KEYBOARD_VIEW_DELEGATE_GET_IFACE(self)->text_filter_key_press(
32 self, event);
33 }

References event.

Referenced by responder_handle_event_callback().

## ◆ G_DEFINE_INTERFACE()

G_DEFINE_INTERFACE | ( | FlKeyboardViewDelegate | ,
|  | fl_keyboard_view_delegate | ,
|  | G_TYPE_OBJECT |
| ) |  |

Definition at line 7 of file fl_keyboard_view_delegate.cc.

12 {}
event
FlKeyEvent * event
Definition: fl_key_channel_responder.cc:118
user_data
FlKeyEvent uint64_t FlKeyResponderAsyncCallback gpointer user_data
Definition: fl_key_channel_responder.cc:121
callback
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Definition: fl_key_channel_responder.cc:120