Provides access to key events.
type Cb_GObject_Gdk_Modifier_Type_Boolean is not null access function
(Self : access Glib.Object.GObject_Record'Class;
State : Gdk.Enums.Gdk_Modifier_Type) return Boolean;
type Cb_GObject_Guint_Guint_Gdk_Modifier_Type_Boolean is not null access function
(Self : access Glib.Object.GObject_Record'Class;
Keyval : Guint;
Keycode : Guint;
State : Gdk.Enums.Gdk_Modifier_Type) return Boolean;
type Cb_GObject_Guint_Guint_Gdk_Modifier_Type_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class;
Keyval : Guint;
Keycode : Guint;
State : Gdk.Enums.Gdk_Modifier_Type);
type Cb_GObject_Void is not null access procedure
(Self : access Glib.Object.GObject_Record'Class);
type Cb_Gtk_Event_Controller_Key_Gdk_Modifier_Type_Boolean is not null access function
(Self : access Gtk_Event_Controller_Key_Record'Class;
State : Gdk.Enums.Gdk_Modifier_Type) return Boolean;
type Cb_Gtk_Event_Controller_Key_Guint_Guint_Gdk_Modifier_Type_Boolean is not null access function
(Self : access Gtk_Event_Controller_Key_Record'Class;
Keyval : Guint;
Keycode : Guint;
State : Gdk.Enums.Gdk_Modifier_Type) return Boolean;
type Cb_Gtk_Event_Controller_Key_Guint_Guint_Gdk_Modifier_Type_Void is not null access procedure
(Self : access Gtk_Event_Controller_Key_Record'Class;
Keyval : Guint;
Keycode : Guint;
State : Gdk.Enums.Gdk_Modifier_Type);
type Cb_Gtk_Event_Controller_Key_Void is not null access procedure
(Self : access Gtk_Event_Controller_Key_Record'Class);
function Forward
(Self : not null access Gtk_Event_Controller_Key_Record;
Widget : not null access Gtk.Widget.Gtk_Widget_Record'Class)
return Boolean
Forwards the current event of this Controller to a Widget. This function can only be used in handlers for the [signalGtk.EventControllerKey::key-pressed], [signalGtk.EventControllerKey::key-released] or [signalGtk.EventControllerKey::modifiers] signals.
a GtkWidget
whether the Widget handled the event
function Get_Group
(Self : not null access Gtk_Event_Controller_Key_Record) return Guint
Gets the key group of the current event of this Controller. See [methodGdk.KeyEvent.get_layout].
the key group
function Get_Im_Context
(Self : not null access Gtk_Event_Controller_Key_Record)
return Gtk.IM_Context.Gtk_IM_Context
Gets the input method context of the key Controller.
the GtkIMContext. Has transfer-ownership='none'.
function Get_Type return Glib.GType
type Gtk_Event_Controller_Key is access all Gtk_Event_Controller_Key_Record'Class;
function Gtk_Event_Controller_Key_New return Gtk_Event_Controller_Key
Creates a new event controller that will handle key events.
type Gtk_Event_Controller_Key_Record is new Gtk_Event_Controller_Record with null record;
procedure Gtk_New (Self : out Gtk_Event_Controller_Key)
Creates a new event controller that will handle key events. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
procedure Initialize
(Self : not null access Gtk_Event_Controller_Key_Record'Class)
Creates a new event controller that will handle key events. Initialize does nothing if the object was already created with another call to Initialize* or G_New.
procedure On_Im_Update
(Self : not null access Gtk_Event_Controller_Key_Record;
Call : Cb_GObject_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted whenever the input method context filters away a keypress and prevents the Controller receiving it.
See [methodGtk.EventControllerKey.set_im_context] and [methodGtk.IMContext.filter_keypress].
procedure On_Im_Update
(Self : not null access Gtk_Event_Controller_Key_Record;
Call : Cb_Gtk_Event_Controller_Key_Void;
After : Boolean := False)
Emitted whenever the input method context filters away a keypress and prevents the Controller receiving it.
See [methodGtk.EventControllerKey.set_im_context] and [methodGtk.IMContext.filter_keypress].
procedure On_Key_Pressed
(Self : not null access Gtk_Event_Controller_Key_Record;
Call : Cb_GObject_Guint_Guint_Gdk_Modifier_Type_Boolean;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted whenever a key is pressed.
Callback parameters: -- @param Keyval the pressed key. -- @param Keycode the raw code of the pressed key. -- @param State the bitmask, representing the state of modifier keys and -- pointer buttons.
procedure On_Key_Pressed
(Self : not null access Gtk_Event_Controller_Key_Record;
Call : Cb_Gtk_Event_Controller_Key_Guint_Guint_Gdk_Modifier_Type_Boolean;
After : Boolean := False)
Emitted whenever a key is pressed.
Callback parameters: -- @param Keyval the pressed key. -- @param Keycode the raw code of the pressed key. -- @param State the bitmask, representing the state of modifier keys and -- pointer buttons.
procedure On_Key_Released
(Self : not null access Gtk_Event_Controller_Key_Record;
Call : Cb_GObject_Guint_Guint_Gdk_Modifier_Type_Void;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted whenever a key is released.
Callback parameters: -- @param Keyval the released key. -- @param Keycode the raw code of the released key. -- @param State the bitmask, representing the state of modifier keys and -- pointer buttons.
procedure On_Key_Released
(Self : not null access Gtk_Event_Controller_Key_Record;
Call : Cb_Gtk_Event_Controller_Key_Guint_Guint_Gdk_Modifier_Type_Void;
After : Boolean := False)
Emitted whenever a key is released.
Callback parameters: -- @param Keyval the released key. -- @param Keycode the raw code of the released key. -- @param State the bitmask, representing the state of modifier keys and -- pointer buttons.
procedure On_Modifiers
(Self : not null access Gtk_Event_Controller_Key_Record;
Call : Cb_GObject_Gdk_Modifier_Type_Boolean;
Slot : not null access Glib.Object.GObject_Record'Class;
After : Boolean := False)
Emitted whenever the state of modifier keys and pointer buttons change.
Callback parameters: -- @param State the bitmask, representing the new state of modifier keys -- and pointer buttons.
procedure On_Modifiers
(Self : not null access Gtk_Event_Controller_Key_Record;
Call : Cb_Gtk_Event_Controller_Key_Gdk_Modifier_Type_Boolean;
After : Boolean := False)
Emitted whenever the state of modifier keys and pointer buttons change.
Callback parameters: -- @param State the bitmask, representing the new state of modifier keys -- and pointer buttons.
procedure Set_Im_Context
(Self : not null access Gtk_Event_Controller_Key_Record;
Im_Context : access Gtk.IM_Context.Gtk_IM_Context_Record'Class)
Sets the input method context of the key Controller.
a GtkIMContext
Signal_Im_Update : constant Glib.Signal_Name := "im-update";
Emitted whenever the input method context filters away a keypress and prevents the Controller receiving it.
See [methodGtk.EventControllerKey.set_im_context] and [methodGtk.IMContext.filter_keypress].
Signal_Key_Pressed : constant Glib.Signal_Name := "key-pressed";
Emitted whenever a key is pressed.
Callback parameters: -- @param Keyval the pressed key. -- @param Keycode the raw code of the pressed key. -- @param State the bitmask, representing the state of modifier keys and -- pointer buttons.
Signal_Key_Released : constant Glib.Signal_Name := "key-released";
Emitted whenever a key is released.
Callback parameters: -- @param Keyval the released key. -- @param Keycode the raw code of the released key. -- @param State the bitmask, representing the state of modifier keys and -- pointer buttons.
Signal_Modifiers : constant Glib.Signal_Name := "modifiers";
Emitted whenever the state of modifier keys and pointer buttons change.
Callback parameters: -- @param State the bitmask, representing the new state of modifier keys -- and pointer buttons.