Go to the source code of this file.
Macros | |
#define | FL_TYPE_KEYBOARD_MANAGER fl_keyboard_manager_get_type() |
Functions | |
G_DECLARE_FINAL_TYPE (FlKeyboardManager, fl_keyboard_manager, FL, KEYBOARD_MANAGER, GObject) | |
FlKeyboardManager * | fl_keyboard_manager_new (FlBinaryMessenger *messenger, FlKeyboardViewDelegate *view_delegate) |
gboolean | fl_keyboard_manager_handle_event (FlKeyboardManager *manager, FlKeyEvent *event) |
gboolean | fl_keyboard_manager_is_state_clear (FlKeyboardManager *manager) |
void | fl_keyboard_manager_sync_modifier_if_needed (FlKeyboardManager *manager, guint state, double event_time) |
GHashTable * | fl_keyboard_manager_get_pressed_state (FlKeyboardManager *manager) |
#define FL_TYPE_KEYBOARD_MANAGER fl_keyboard_manager_get_type() |
Definition at line 14 of file fl_keyboard_manager.h.
GHashTable* fl_keyboard_manager_get_pressed_state | ( | FlKeyboardManager * | manager | ) |
fl_keyboard_manager_get_pressed_state: @manager: the FlKeyboardManager self.
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 688 of file fl_keyboard_manager.cc.
References fl_key_embedder_responder_get_pressed_state().
Referenced by fl_view_get_keyboard_state().
gboolean fl_keyboard_manager_handle_event | ( | FlKeyboardManager * | manager, |
FlKeyEvent * | event | ||
) |
fl_keyboard_manager_handle_event: @manager: the FlKeyboardManager self. @event: the event to be dispatched. It is usually a wrap of a GdkEventKey. This event will be managed and released by FlKeyboardManager.
Make the manager process a system key event. This might eventually send messages to the framework, trigger text input effects, or redispatch the event back to the system.
Definition at line 638 of file fl_keyboard_manager.cc.
References dispatch_to_responder(), event, fl_keyboard_manager_get_event_hash(), fl_keyboard_manager_remove_redispatched(), fl_keyboard_manager_user_data_new(), fl_keyboard_pending_event_new(), get_logical_key_from_layout(), guarantee_layout(), TRUE, and user_data.
Referenced by fl_view_key_press_event(), and fl_view_key_release_event().
gboolean fl_keyboard_manager_is_state_clear | ( | FlKeyboardManager * | manager | ) |
fl_keyboard_manager_is_state_clear: @manager: the FlKeyboardManager self.
A debug-only method that queries whether the manager's various states are cleared, i.e. no pending events for redispatching or for responding.
Returns: true if the manager's various states are cleared.
Definition at line 669 of file fl_keyboard_manager.cc.
FlKeyboardManager* fl_keyboard_manager_new | ( | FlBinaryMessenger * | messenger, |
FlKeyboardViewDelegate * | view_delegate | ||
) |
FlKeyboardManager:
Processes keyboard events and cooperate with TextInputPlugin
.
A keyboard event goes through a few sections, each can choose to handle the event, and only unhandled events can move to the next section:
TextInputPlugin
) and are handled synchronously.Create a new FlKeyboardManager.
Returns: a new FlKeyboardManager.
Definition at line 585 of file fl_keyboard_manager.cc.
References callback, event, fl_key_channel_responder_new(), fl_key_embedder_responder_new(), fl_keyboard_view_delegate_get_messenger(), fl_keyboard_view_delegate_send_key_event(), fl_keyboard_view_delegate_subscribe_to_layout_change(), fl_method_channel_new(), fl_method_channel_set_method_call_handler(), fl_standard_method_codec_new(), kChannelName, and method_call_handler().
Referenced by init_keyboard().
void fl_keyboard_manager_sync_modifier_if_needed | ( | FlKeyboardManager * | manager, |
guint | state, | ||
double | event_time | ||
) |
fl_keyboard_manager_sync_modifier_if_needed: @manager: the FlKeyboardManager self. @state: the state of the modifiers mask. @event_time: the time attribute of the incoming GDK event.
If needed, synthesize modifier keys up and down event by comparing their current pressing states with the given modifiers mask.
Definition at line 675 of file fl_keyboard_manager.cc.
References fl_key_embedder_responder_sync_modifiers_if_needed(), and state.
Referenced by motion_notify_event_cb(), and send_pointer_button_event().
G_DECLARE_FINAL_TYPE | ( | FlKeyboardManager | , |
fl_keyboard_manager | , | ||
FL | , | ||
KEYBOARD_MANAGER | , | ||
GObject | |||
) |