Access to fields of the event
The following functions can be used to retrieve some specific fields
from an event. Some of these fields do not exist for all the types of
events (see the description of each event for a list of the relevant
fields).
Note also that you can not pass a null event to them. The parameter must
be a correct event, or the result is undefined.
-
function Get_Event_Type (Event : Gdk_Event) return Gdk_Event_Type;
-
function Get_Send_Event (Event : Gdk_Event) return Boolean;
-
-
function Get_Time (Event : Gdk_Event) return Guint32;
-
function Get_X (Event : Gdk_Event) return Gdouble;
-
function Get_Y (Event : Gdk_Event) return Gdouble;
-
function Get_X_Root (Event : Gdk_Event) return Gdouble;
-
function Get_Y_Root (Event : Gdk_Event) return Gdouble;
-
function Get_Button (Event : Gdk_Event) return Guint;
-
function Get_State (Event : Gdk_Event) return Gdk.Types.Gdk_Modifier_Type;
-
-
function Get_Mode (Event : Gdk_Event) return Gdk_Crossing_Mode;
-
function Get_Detail (Event : Gdk_Event) return Gdk_Notify_Type;
-
function Get_Focus (Event : Gdk_Event) return Boolean;
-
function Get_Width (Event : Gdk_Event) return Gint;
-
function Get_Height (Event : Gdk_Event) return Gint;
-
function Get_Direction (Event : Gdk_Event) return Gdk_Scroll_Direction;
-
function Get_Device_Id (Event : Gdk_Event) return Gdk_Device_Id;
-
function Get_Area (Event : Gdk_Event) return Rectangle.Gdk_Rectangle;
-
function Get_Region (Event : Gdk_Event) return Gdk.Region.Gdk_Region;
-
function Get_Count (Event : Gdk_Event) return Gint;
-
function Get_In (Event : Gdk_Event) return Boolean;
-
function Get_Is_Hint (Event : Gdk_Event) return Boolean;
-
function Get_Key_Val (Event : Gdk_Event) return Gdk.Types.Gdk_Key_Type;
-
function Get_Group (Event : Gdk_Event) return Guint8;
-
function Get_Hardware_Keycode (Event : Gdk_Event) return Guint16;
-
function Get_String (Event : Gdk_Event) return String;
-
function Get_Atom (Event : Gdk_Event) return Gdk.Types.Gdk_Atom;
-
function Get_Property_State (Event : Gdk_Event) return Guint;
-
function Get_Visibility_State
(Event : Gdk_Event) return Gdk_Visibility_State;
-
function Get_Selection (Event : Gdk_Event) return Gdk.Types.Gdk_Atom;
-
function Get_Target (Event : Gdk_Event) return Gdk.Types.Gdk_Atom;
-
function Get_Property (Event : Gdk_Event) return Gdk.Types.Gdk_Atom;
-
function Get_Requestor (Event : Gdk_Event) return Guint32;
-
function Get_Message_Type (Event : Gdk_Event) return Gdk.Types.Gdk_Atom;
-
function Get_Data (Event : Gdk_Event) return Gdk_Event_Client_Data;
Modifying the fields of an event
-
-
procedure Set_X (Event : Gdk_Event; X : Gdouble);
-
procedure Set_Y (Event : Gdk_Event; Y : Gdouble);
-
procedure Set_Xroot (Event : Gdk_Event; Xroot : Gdouble);
-
procedure Set_Yroot (Event : Gdk_Event; Yroot : Gdouble);
-
procedure Set_Width (Event : Gdk_Event; Width : Gint);
-
procedure Set_Height (Event : Gdk_Event; Height : Gint);
-
procedure Set_Button (Event : Gdk_Event; Button : Guint);
-
procedure Set_Time (Event : Gdk_Event; Time : Guint32);
-
procedure Set_State
(Event : Gdk_Event; State : Gdk.Types.Gdk_Modifier_Type);
-
-
procedure Set_Mode (Event : Gdk_Event; Mode : Gdk_Crossing_Mode);
-
procedure Set_Detail (Event : Gdk_Event; Detail : Gdk_Notify_Type);
-
procedure Set_Focus (Event : Gdk_Event; Has_Focus : Boolean);
-
procedure Set_Area (Event : Gdk_Event; Area : Rectangle.Gdk_Rectangle);
-
procedure Set_In (Event : Gdk_Event; Focus_In : Boolean);
-
procedure Set_Is_Hint (Event : Gdk_Event; Is_Hint : Boolean);
-
procedure Set_Key_Val (Event : Gdk_Event; Key : Gdk.Types.Gdk_Key_Type);
-
procedure Set_Group (Event : Gdk_Event; Group : Guint8);
-
procedure Set_Hardware_Keycode (Event : Gdk_Event; Keycode : Guint16);
-
procedure Set_Direction
(Event : Gdk_Event; Direction : Gdk_Scroll_Direction);
-
procedure Set_Atom (Event : Gdk_Event; Atom : Gdk.Types.Gdk_Atom);
-
procedure Set_Property_State (Event : Gdk_Event; State : Guint);
-
procedure Set_Visibility_State
(Event : Gdk_Event; State : Gdk_Visibility_State);
-
procedure Set_Selection (Event : Gdk_Event; Selection : Gdk.Types.Gdk_Atom);
-
procedure Set_Target (Event : Gdk_Event; Target : Gdk.Types.Gdk_Atom);
-
procedure Set_Property (Event : Gdk_Event; Property : Gdk.Types.Gdk_Atom);
-
procedure Set_Requestor (Event : Gdk_Event; Requestor : Guint32);
-
procedure Set_Message_Type (Event : Gdk_Event; Typ : Gdk.Types.Gdk_Atom);
-
procedure Set_String (Event : Gdk_Event; Str : String);
General functions
-
function Get_Type return GType;
-
procedure Deep_Copy (From : Gdk_Event; To : out Gdk_Event);
-
procedure Get_Graphics_Expose
(Event :
out Gdk_Event_Expose;
Window :
Gdk.Gdk_Window);
-
function Events_Pending return Boolean;
-
procedure Get (Event : out Gdk_Event);
-
procedure Peek (Event : out Gdk_Event);
-
procedure Put (Event : Gdk_Event);
-
procedure Set_Show_Events (Show_Events : Boolean := True);
-
function Get_Show_Events return Boolean;
-
procedure Send_Client_Message_To_All (Event : Gdk_Event);
-
function Send_Client_Message
(Event : Gdk_Event;
Xid : Guint32) return Boolean;
-
procedure Allocate
(Event :
out Gdk_Event;
Event_Type : Gdk_Event_Type;
Window :
Gdk.Gdk_Window);
-
procedure Free (Event : in out Gdk_Event);
-
procedure Event_Handler_Set
(Func : Event_Handler_Func; Data : System.Address);
-
function From_Address (C : System.Address) return Gdk_Event;
-
function To_Address (C : Gdk_Event) return System.Address;
-
function Is_Created (E : Gdk_Event) return Boolean;
GValue support
-
function Get_Event (Value : Glib.Values.GValue) return Gdk_Event;
Event Recording
-
procedure Set_Follow_Events (Follow_Events : Boolean := True);
-
function Get_Follow_Events return Boolean;