Go to the source code of this file.
Macros | |
#define | FL_TYPE_KEYBOARD_HANDLER fl_keyboard_handler_get_type() |
Functions | |
G_DECLARE_FINAL_TYPE (FlKeyboardHandler, fl_keyboard_handler, FL, KEYBOARD_HANDLER, GObject) | |
FlKeyboardHandler * | fl_keyboard_handler_new (FlBinaryMessenger *messenger, FlKeyboardViewDelegate *view_delegate) |
gboolean | fl_keyboard_handler_handle_event (FlKeyboardHandler *handler, FlKeyEvent *event) |
gboolean | fl_keyboard_handler_is_state_clear (FlKeyboardHandler *handler) |
void | fl_keyboard_handler_sync_modifier_if_needed (FlKeyboardHandler *handler, guint state, double event_time) |
GHashTable * | fl_keyboard_handler_get_pressed_state (FlKeyboardHandler *handler) |
#define FL_TYPE_KEYBOARD_HANDLER fl_keyboard_handler_get_type() |
Definition at line 14 of file fl_keyboard_handler.h.
GHashTable* fl_keyboard_handler_get_pressed_state | ( | FlKeyboardHandler * | handler | ) |
fl_keyboard_handler_get_pressed_state: @handler: the #FlKeyboardHandler 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 590 of file fl_keyboard_handler.cc.
References fl_key_embedder_responder_get_pressed_state().
Referenced by fl_view_get_keyboard_state().
gboolean fl_keyboard_handler_handle_event | ( | FlKeyboardHandler * | handler, |
FlKeyEvent * | event | ||
) |
fl_keyboard_handler_handle_event: @handler: the #FlKeyboardHandler self. @event: the event to be dispatched. It is usually a wrap of a GdkEventKey. This event will be managed and released by #FlKeyboardHandler.
Make the handler 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 541 of file fl_keyboard_handler.cc.
References dispatch_to_responder(), event, fl_key_event_hash(), fl_keyboard_handler_remove_redispatched(), fl_keyboard_handler_user_data_new(), fl_keyboard_pending_event_get_sequence_id(), 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_handler_is_state_clear | ( | FlKeyboardHandler * | handler | ) |
fl_keyboard_handler_is_state_clear: @handler: the #FlKeyboardHandler self.
A debug-only method that queries whether the handler's various states are cleared, i.e. no pending events for redispatching or for responding.
Returns: true if the handler's various states are cleared.
Definition at line 571 of file fl_keyboard_handler.cc.
FlKeyboardHandler* fl_keyboard_handler_new | ( | FlBinaryMessenger * | messenger, |
FlKeyboardViewDelegate * | view_delegate | ||
) |
FlKeyboardHandler:
Processes keyboard events and cooperate with TextInputHandler
.
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:
TextInputHandler
) and are handled synchronously.Create a new #FlKeyboardHandler.
Returns: a new #FlKeyboardHandler.
Definition at line 499 of file fl_keyboard_handler.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_handler_sync_modifier_if_needed | ( | FlKeyboardHandler * | handler, |
guint | state, | ||
double | event_time | ||
) |
fl_keyboard_handler_sync_modifier_if_needed: @handler: the #FlKeyboardHandler 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 577 of file fl_keyboard_handler.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 | ( | FlKeyboardHandler | , |
fl_keyboard_handler | , | ||
FL | , | ||
KEYBOARD_HANDLER | , | ||
GObject | |||
) |