Index

Package: Event

Description

package Gdk.Event is

The Gdk.Event.Gdk_Event struct contains a union of all of the event structs, and allows access to the data fields in a number of ways.

The event type is always the first field in all of the event structs, and can always be accessed with the following code, no matter what type of event it is: GdkEvent *event; GdkEventType type; type = event->type; To access other fields of the event structs, the pointer to the event can be cast to the appropriate event struct pointer, or the union member name can be used. For example if the event type is Gdk.Event.Button_Press then the x coordinate of the button press can be accessed with: GdkEvent *event; gdouble x; x = ((GdkEventButton*)event)->x; or: GdkEvent *event; gdouble x; x = event->button.x;

Packages

Gdk_Event_Type_Properties (new Glib.Generic_Properties.Generic_Internal_Discrete_Property)

package Gdk_Event_Type_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Event_Type);

Gdk_Event_Mask_Properties (new Glib.Generic_Properties.Generic_Internal_Discrete_Property)

package Gdk_Event_Mask_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Event_Mask);

Gdk_Visibility_State_Properties (new Glib.Generic_Properties.Generic_Internal_Discrete_Property)

package Gdk_Visibility_State_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Visibility_State);

Gdk_Scroll_Direction_Properties (new Glib.Generic_Properties.Generic_Internal_Discrete_Property)

package Gdk_Scroll_Direction_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Scroll_Direction);

Gdk_Notify_Type_Properties (new Glib.Generic_Properties.Generic_Internal_Discrete_Property)

package Gdk_Notify_Type_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Notify_Type);

Gdk_Crossing_Mode_Properties (new Glib.Generic_Properties.Generic_Internal_Discrete_Property)

package Gdk_Crossing_Mode_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Crossing_Mode);

Gdk_Property_State_Properties (new Glib.Generic_Properties.Generic_Internal_Discrete_Property)

package Gdk_Property_State_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Property_State);

Gdk_Window_State_Properties (new Glib.Generic_Properties.Generic_Internal_Discrete_Property)

package Gdk_Window_State_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Window_State);

Gdk_Setting_Action_Properties (new Glib.Generic_Properties.Generic_Internal_Discrete_Property)

package Gdk_Setting_Action_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Setting_Action);

Gdk_Owner_Change_Properties (new Glib.Generic_Properties.Generic_Internal_Discrete_Property)

package Gdk_Owner_Change_Properties is
      new Generic_Internal_Discrete_Property (Gdk_Owner_Change);

Handler_Set_User_Data (generic)

Types

Gdk_Event_Type

type Gdk_Event_Type is (
      Nothing,
      Delete,
      Destroy,
      Expose,
      Motion_Notify,
      Button_Press,
      Gdk_2button_Press,
      Gdk_3button_Press,
      Button_Release,
      Key_Press,
      Key_Release,
      Enter_Notify,
      Leave_Notify,
      Focus_Change,
      Configure,
      Map,
      Unmap,
      Property_Notify,
      Selection_Clear,
      Selection_Request,
      Selection_Notify,
      Proximity_In,
      Proximity_Out,
      Drag_Enter,
      Drag_Leave,
      Drag_Motion,
      Drag_Status,
      Drop_Start,
      Drop_Finished,
      Client_Event,
      Visibility_Notify,
      Scroll,
      Window_State,
      Setting,
      Owner_Change,
      Grab_Broken,
      Damage,
      Touch_Begin,
      Touch_Update,
      Touch_End,
      Touch_Cancel);

Gdk_Event_Mask

type Gdk_Event_Mask is mod 2 ** Integer'Size;

Gdk_Visibility_State

type Gdk_Visibility_State is (
      Visibility_Unobscured,
      Visibility_Partial,
      Visibility_Fully_Obscured);

Gdk_Scroll_Direction

type Gdk_Scroll_Direction is (
      Scroll_Up,
      Scroll_Down,
      Scroll_Left,
      Scroll_Right,
      Scroll_Smooth);

Gdk_Notify_Type

type Gdk_Notify_Type is (
      Notify_Ancestor,
      Notify_Virtual,
      Notify_Inferior,
      Notify_Nonlinear,
      Notify_Nonlinear_Virtual,
      Notify_Unknown);

Gdk_Crossing_Mode

type Gdk_Crossing_Mode is (
      Crossing_Normal,
      Crossing_Grab,
      Crossing_Ungrab,
      Crossing_Gtk_Grab,
      Crossing_Gtk_Ungrab,
      Crossing_State_Changed,
      Crossing_Touch_Begin,
      Crossing_Touch_End,
      Crossing_Device_Switch);

Gdk_Property_State

type Gdk_Property_State is (
      Property_New_Value,
      Property_Delete);

Gdk_Window_State

type Gdk_Window_State is mod 2 ** Integer'Size;

Gdk_Setting_Action

type Gdk_Setting_Action is (
      Setting_Action_New,
      Setting_Action_Changed,
      Setting_Action_Deleted);

Gdk_Owner_Change

type Gdk_Owner_Change is (
      Owner_Change_New_Owner,
      Owner_Change_Destroy,
      Owner_Change_Close);

Gdk_Event_Any

type Gdk_Event_Any is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
   end record;

Gdk_Event_Button

type Gdk_Event_Button is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Time : Guint32;
      X : Gdouble;
      Y : Gdouble;
      Axes : access Gdouble;
      State : Gdk.Types.Gdk_Modifier_Type;
      Button : Guint;
      Device : System.Address;
      X_Root : Gdouble;
      Y_Root : Gdouble;
   end record;

Gdk_Event_Expose

type Gdk_Event_Expose is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Area : Gdk.Rectangle.Gdk_Rectangle;
      Region : Cairo.Region.Cairo_Region;
      Count : Gint;
   end record;

Gdk_Event_Visibility

type Gdk_Event_Visibility is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      State : Gdk_Visibility_State;
   end record;

Gdk_Event_Motion

type Gdk_Event_Motion is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Time : Guint32;
      X : Gdouble;
      Y : Gdouble;
      Axes : access Gdouble;
      State : Gdk.Types.Gdk_Modifier_Type;
      Is_Hint : Gint16;
      Device : System.Address;
      X_Root : Gdouble;
      Y_Root : Gdouble;
   end record;

Gdk_Event_Scroll

type Gdk_Event_Scroll is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Time : Guint32;
      X : Gdouble;
      Y : Gdouble;
      State : Gdk.Types.Gdk_Modifier_Type;
      Direction : Gdk_Scroll_Direction;
      Device : System.Address;
      X_Root : Gdouble;
      Y_Root : Gdouble;
      Delta_X : Gdouble;
      Delta_Y : Gdouble;
   end record;

Gdk_Event_Key

type Gdk_Event_Key is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Time : Guint32;
      State : Gdk.Types.Gdk_Modifier_Type;
      Keyval : Gdk.Types.Gdk_Key_Type;
      Length : Gint;
      String : Interfaces.C.Strings.chars_ptr;
      Hardware_Keycode : Guint16;
      Group : Guint8;
      Is_Modifier : Guint;
   end record;

Gdk_Event_Crossing

type Gdk_Event_Crossing is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Subwindow : Gdk.Gdk_Window;
      Time : Guint32;
      X : Gdouble;
      Y : Gdouble;
      X_Root : Gdouble;
      Y_Root : Gdouble;
      Mode : Gdk_Crossing_Mode;
      Detail : Gdk_Notify_Type;
      Focus : Boolean;
      State : Gdk.Types.Gdk_Modifier_Type;
   end record;

Gdk_Event_Focus

type Gdk_Event_Focus is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Gtk_In : Gint16;
   end record;

Gdk_Event_Configure

type Gdk_Event_Configure is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      X : Gint;
      Y : Gint;
      Width : Gint;
      Height : Gint;
   end record;

Gdk_Event_Property

type Gdk_Event_Property is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Atom : Gdk.Types.Gdk_Atom;
      Time : Guint32;
      State : Gdk_Property_State;
   end record;

Gdk_Event_Selection

type Gdk_Event_Selection is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Selection : Gdk.Types.Gdk_Atom;
      Target : Gdk.Types.Gdk_Atom;
      Property : Gdk.Types.Gdk_Atom;
      Time : Guint32;
      Requestor : Gdk.Gdk_Window;
   end record;

Gdk_Event_Owner_Change

type Gdk_Event_Owner_Change is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Owner : Gdk.Gdk_Window;
      Reason : Gdk_Owner_Change;
      Selection : Gdk.Types.Gdk_Atom;
      Time : Guint32;
      Selection_Time : Guint32;
   end record;

Gdk_Event_Proximity

type Gdk_Event_Proximity is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Time : Guint32;
      Device : System.Address;
   end record;

Gdk_Event_DND

type Gdk_Event_DND is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Context : System.Address;
      Time : Guint32;
      X_Root : Gshort;
      Y_Root : Gshort;
   end record;

Gdk_Event_Window_State

type Gdk_Event_Window_State is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Changed_Mask : Gdk_Window_State;
      New_Window_State : Gdk_Window_State;
   end record;

Gdk_Event_Setting

type Gdk_Event_Setting is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Action : Gdk_Setting_Action;
      Name : Interfaces.C.Strings.chars_ptr;
   end record;

Gdk_Event_Touch

type Gdk_Event_Touch is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Time : Guint32;
      X : Gdouble;
      Y : Gdouble;
      Axes : access Gdouble;
      State : Gdk.Types.Gdk_Modifier_Type;
      Sequence : System.Address;
      Emulating_Pointer : Boolean;
      Device : System.Address;
      X_Root : Gdouble;
      Y_Root : Gdouble;
   end record;

Gdk_Event_Sequence

type Gdk_Event_Sequence is new Glib.C_Proxy;

Gdk_Event_Grab_Broken

type Gdk_Event_Grab_Broken is record
      The_Type : Gdk_Event_Type;
      Window : Gdk.Gdk_Window;
      Send_Event : Gint8;
      Keyboard : Boolean;
      Implicit : Boolean;
      Grab_Window : Gdk.Gdk_Window;
   end record;

Gdk_Event_Record

type Gdk_Event_Record (The_Type : Gdk_Event_Type := Gdk.Event.Nothing) is record
      case The_Type is

         when Gdk.Event.Nothing
         | Gdk.Event.Delete
         | Gdk.Event.Destroy
         | Gdk.Event.Map
         | Gdk.Event.Unmap
         | Gdk.Event.Client_Event =>
         Any : Gdk_Event_Any;

         when Gdk.Event.Expose
         | Gdk.Event.Damage =>
         Expose : Gdk_Event_Expose;

         when Gdk.Event.Visibility_Notify =>
         Visibility : Gdk_Event_Visibility;

         when Gdk.Event.Motion_Notify =>
         Motion : Gdk_Event_Motion;

         when Gdk.Event.Button_Press
         | Gdk.Event.Gdk_2button_Press
         | Gdk.Event.Gdk_3button_Press
         | Gdk.Event.Button_Release =>
         Button : Gdk_Event_Button;

         when Gdk.Event.Touch_Begin
         | Gdk.Event.Touch_Update
         | Gdk.Event.Touch_End
         | Gdk.Event.Touch_Cancel =>
         Touch : Gdk_Event_Touch;

         when Gdk.Event.Scroll =>
         Scroll : Gdk_Event_Scroll;

         when Gdk.Event.Key_Press
         | Gdk.Event.Key_Release =>
         Key : Gdk_Event_Key;

         when Gdk.Event.Enter_Notify
         | Gdk.Event.Leave_Notify =>
         Crossing : Gdk_Event_Crossing;

         when Gdk.Event.Focus_Change =>
         Focus_Change : Gdk_Event_Focus;

         when Gdk.Event.Configure =>
         Configure : Gdk_Event_Configure;

         when Gdk.Event.Property_Notify =>
         Property : Gdk_Event_Property;

         when Gdk.Event.Selection_Clear
         | Gdk.Event.Selection_Request
         | Gdk.Event.Selection_Notify =>
         Selection : Gdk_Event_Selection;

         when Gdk.Event.Owner_Change =>
         Owner_Change : Gdk_Event_Owner_Change;

         when Gdk.Event.Proximity_In
         | Gdk.Event.Proximity_Out =>
         Proximity : Gdk_Event_Proximity;

         when Gdk.Event.Drag_Enter
         | Gdk.Event.Drag_Leave
         | Gdk.Event.Drag_Motion
         | Gdk.Event.Drag_Status
         | Gdk.Event.Drop_Start
         | Gdk.Event.Drop_Finished =>
         Dnd : Gdk_Event_DND;

         when Gdk.Event.Window_State =>
         Window_State : Gdk_Event_Window_State;

         when Gdk.Event.Setting =>
         Setting : Gdk_Event_Setting;

         when Gdk.Event.Grab_Broken =>
         Grab_Broken : Gdk_Event_Grab_Broken;
      end case;
   end record;

Gdk_Event

type Gdk_Event is access all Gdk_Event_Record;

Gdk_Event_Func

type Gdk_Event_Func is access procedure (Event : Gdk_Event);
Specifies the type of function passed to Gdk.Event.Handler_Set to handle all GDK events. "event": the Gdk.Event.Gdk_Event to process.

Property_Gdk_Event_Type

type Property_Gdk_Event_Type is new Gdk_Event_Type_Properties.Property;

Property_Gdk_Event_Mask

type Property_Gdk_Event_Mask is new Gdk_Event_Mask_Properties.Property;

Property_Gdk_Visibility_State

type Property_Gdk_Visibility_State is new Gdk_Visibility_State_Properties.Property;

Property_Gdk_Scroll_Direction

type Property_Gdk_Scroll_Direction is new Gdk_Scroll_Direction_Properties.Property;

Property_Gdk_Notify_Type

type Property_Gdk_Notify_Type is new Gdk_Notify_Type_Properties.Property;

Property_Gdk_Crossing_Mode

type Property_Gdk_Crossing_Mode is new Gdk_Crossing_Mode_Properties.Property;

Property_Gdk_Property_State

type Property_Gdk_Property_State is new Gdk_Property_State_Properties.Property;

Property_Gdk_Window_State

type Property_Gdk_Window_State is new Gdk_Window_State_Properties.Property;

Property_Gdk_Setting_Action

type Property_Gdk_Setting_Action is new Gdk_Setting_Action_Properties.Property;

Property_Gdk_Owner_Change

type Property_Gdk_Owner_Change is new Gdk_Owner_Change_Properties.Property;

Constants & Global variables

Exposure_Mask (Gdk_Event_Mask)

Exposure_Mask : constant Gdk_Event_Mask := 2;

Pointer_Motion_Mask (Gdk_Event_Mask)

Pointer_Motion_Mask : constant Gdk_Event_Mask := 4;

Pointer_Motion_Hint_Mask (Gdk_Event_Mask)

Pointer_Motion_Hint_Mask : constant Gdk_Event_Mask := 8;

Button_Motion_Mask (Gdk_Event_Mask)

Button_Motion_Mask : constant Gdk_Event_Mask := 16;

Button1_Motion_Mask (Gdk_Event_Mask)

Button1_Motion_Mask : constant Gdk_Event_Mask := 32;

Button2_Motion_Mask (Gdk_Event_Mask)

Button2_Motion_Mask : constant Gdk_Event_Mask := 64;

Button3_Motion_Mask (Gdk_Event_Mask)

Button3_Motion_Mask : constant Gdk_Event_Mask := 128;

Button_Press_Mask (Gdk_Event_Mask)

Button_Press_Mask : constant Gdk_Event_Mask := 256;

Button_Release_Mask (Gdk_Event_Mask)

Button_Release_Mask : constant Gdk_Event_Mask := 512;

Key_Press_Mask (Gdk_Event_Mask)

Key_Press_Mask : constant Gdk_Event_Mask := 1024;

Key_Release_Mask (Gdk_Event_Mask)

Key_Release_Mask : constant Gdk_Event_Mask := 2048;

Enter_Notify_Mask (Gdk_Event_Mask)

Enter_Notify_Mask : constant Gdk_Event_Mask := 4096;

Leave_Notify_Mask (Gdk_Event_Mask)

Leave_Notify_Mask : constant Gdk_Event_Mask := 8192;

Focus_Change_Mask (Gdk_Event_Mask)

Focus_Change_Mask : constant Gdk_Event_Mask := 16384;

Structure_Mask (Gdk_Event_Mask)

Structure_Mask : constant Gdk_Event_Mask := 32768;

Property_Change_Mask (Gdk_Event_Mask)

Property_Change_Mask : constant Gdk_Event_Mask := 65536;

Visibility_Notify_Mask (Gdk_Event_Mask)

Visibility_Notify_Mask : constant Gdk_Event_Mask := 131072;

Proximity_In_Mask (Gdk_Event_Mask)

Proximity_In_Mask : constant Gdk_Event_Mask := 262144;

Proximity_Out_Mask (Gdk_Event_Mask)

Proximity_Out_Mask : constant Gdk_Event_Mask := 524288;

Substructure_Mask (Gdk_Event_Mask)

Substructure_Mask : constant Gdk_Event_Mask := 1048576;

Scroll_Mask (Gdk_Event_Mask)

Scroll_Mask : constant Gdk_Event_Mask := 2097152;

Touch_Mask (Gdk_Event_Mask)

Touch_Mask : constant Gdk_Event_Mask := 4194304;

Smooth_Scroll_Mask (Gdk_Event_Mask)

Smooth_Scroll_Mask : constant Gdk_Event_Mask := 8388608;

All_Events_Mask (Gdk_Event_Mask)

All_Events_Mask : constant Gdk_Event_Mask := 16777214;

Window_State_Withdrawn (Gdk_Window_State)

Window_State_Withdrawn : constant Gdk_Window_State := 1;

Window_State_Iconified (Gdk_Window_State)

Window_State_Iconified : constant Gdk_Window_State := 2;

Window_State_Maximized (Gdk_Window_State)

Window_State_Maximized : constant Gdk_Window_State := 4;

Window_State_Sticky (Gdk_Window_State)

Window_State_Sticky : constant Gdk_Window_State := 8;

Window_State_Fullscreen (Gdk_Window_State)

Window_State_Fullscreen : constant Gdk_Window_State := 16;

Window_State_Above (Gdk_Window_State)

Window_State_Above : constant Gdk_Window_State := 32;

Window_State_Below (Gdk_Window_State)

Window_State_Below : constant Gdk_Window_State := 64;

Window_State_Focused (Gdk_Window_State)

Window_State_Focused : constant Gdk_Window_State := 128;

Double_Button_Press (Gdk_Event_Type)

Double_Button_Press : constant Gdk_Event_Type := Gdk_2button_Press;

Triple_Button_Press (Gdk_Event_Type)

Triple_Button_Press : constant Gdk_Event_Type := Gdk_3button_Press;

Invalid_Gdouble_Value (Glib.Gdouble)

Invalid_Gdouble_Value : constant Gdouble := Gdouble'Last - 1.0;

Invalid_Gint_Value (Glib.Gint)

Invalid_Gint_Value    : constant Gint    := Gint'Last - 1;

Invalid_Guint_Value (Glib.Guint)

Invalid_Guint_Value   : constant Guint   := Guint'Last - 1;

Invalid_Guint32_Value (Glib.Guint32)

Invalid_Guint32_Value : constant Guint32 := Guint32'Last - 1;

Invalid_Gulong_Value (Glib.Gulong)

Invalid_Gulong_Value  : constant Gulong  := Gulong'Last - 1;

Subprograms & Entries

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Any) return Gdk_Event_Any;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Button) return Gdk_Event_Button;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Expose) return Gdk_Event_Expose;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Visibility) return Gdk_Event_Visibility;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Motion) return Gdk_Event_Motion;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Scroll) return Gdk_Event_Scroll;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Key) return Gdk_Event_Key;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Crossing) return Gdk_Event_Crossing;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Focus) return Gdk_Event_Focus;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Configure) return Gdk_Event_Configure;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Property) return Gdk_Event_Property;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Selection) return Gdk_Event_Selection;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Owner_Change) return Gdk_Event_Owner_Change;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Proximity) return Gdk_Event_Proximity;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_DND) return Gdk_Event_DND;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Window_State) return Gdk_Event_Window_State;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Setting) return Gdk_Event_Setting;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Touch) return Gdk_Event_Touch;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Sequence) return Gdk_Event_Sequence;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Grab_Broken) return Gdk_Event_Grab_Broken;

From_Object_Free

function From_Object_Free 
(B: access Gdk_Event_Record) return Gdk_Event_Record;

Gdk_New

procedure Gdk_New 
(Event: out Gdk_Event;
The_Type: Gdk_Event_Type);
Creates a new event of the given type. All fields are set to 0. Since: gtk+ 2.2 "type": a Gdk.Event.Gdk_Event_Type

Gdk_Event_New

function Gdk_Event_New 
(The_Type: Gdk_Event_Type) return Gdk_Event;
Creates a new event of the given type. All fields are set to 0. Since: gtk+ 2.2 "type": a Gdk.Event.Gdk_Event_Type

Get_Type

function Get_Type return Glib.GType;

Get_Angle

function Get_Angle 
(Event: Gdk_Event;
Event2: Gdk_Event;
Angle: access Gdouble) return Boolean;
If both events contain X/Y information, this function will return True and return in Angle the relative angle from Event1 to Event2. The rotation direction for positive angles is from the positive X axis towards the positive Y axis. Since: gtk+ 3.0 "event2": second Gdk.Event.Gdk_Event "angle": return location for the relative angle between both events

Get_Center

function Get_Center 
(Event: Gdk_Event;
Event2: Gdk_Event;
X: access Gdouble;
Y: access Gdouble) return Boolean;
If both events contain X/Y information, the center of both coordinates will be returned in X and Y. Since: gtk+ 3.0 "event2": second Gdk.Event.Gdk_Event "x": return location for the X coordinate of the center "y": return location for the Y coordinate of the center

Get_Distance

function Get_Distance 
(Event: Gdk_Event;
Event2: Gdk_Event;
Distance: access Gdouble) return Boolean;
If both events have X/Y information, the distance between both coordinates (as in a straight line going from Event1 to Event2) will be returned. Since: gtk+ 3.0 "event2": second Gdk.Event.Gdk_Event "distance": return location for the distance

Copy

function Copy 
(Event: Gdk_Event) return Gdk_Event;

Free

procedure Free 
(Event: Gdk_Event);

Get_Axis

procedure Get_Axis 
(Event: Gdk_Event;
Axis_Use: Gdk_Axis_Use;
Value: out Gdouble);

Get_Coords

procedure Get_Coords 
(Event: Gdk_Event;
X_Win: out Gdouble;
Y_Win: out Gdouble);

Get_Event_Sequence

function Get_Event_Sequence 
(Event: Gdk_Event) return System.Address;

Get_Root_Coords

procedure Get_Root_Coords 
(Event: Gdk_Event;
X_Root: out Gdouble;
Y_Root: out Gdouble);

Get_Scroll_Deltas

procedure Get_Scroll_Deltas 
(Event: Gdk_Event;
Delta_X: out Gdouble;
Delta_Y: out Gdouble);

Get_Scroll_Direction

procedure Get_Scroll_Direction 
(Event: Gdk_Event;
Direction: out Gdk_Scroll_Direction);

Get_Time

function Get_Time 
(Event: Gdk_Event) return Guint32;

Put

procedure Put 
(Event: Gdk_Event);

Triggers_Context_Menu

function Triggers_Context_Menu 
(Event: Gdk_Event) return Boolean;
This function returns whether a Gdk.Event.Gdk_Event_Button should trigger a context menu, according to platform conventions. The right mouse button always triggers context menus. Additionally, if gdk_keymap_get_modifier_mask returns a non-0 mask for GDK_MODIFIER_INTENT_CONTEXT_MENU, then the left mouse button will also trigger a context menu if this modifier is pressed. This function should always be used instead of simply checking for event->button == GDK_BUTTON_SECONDARY. Since: gtk+ 3.4

Get_Button

function Get_Button 
(Event: Gdk_Event) return Guint;

Get_State

function Get_State 
(Event: Gdk_Event) return Gdk.Types.Gdk_Modifier_Type;

Get_Key_Val

function Get_Key_Val 
(Event: Gdk_Event) return Gdk.Types.Gdk_Key_Type;

Get_Keycode

function Get_Keycode 
(Event: Gdk_Event) return Guint;

Get_Event_Type

function Get_Event_Type 
(Event: Gdk_Event) return Gdk_Event_Type;

Get_Window

function Get_Window 
(Event: Gdk_Event) return Gdk.Gdk_Window;

Handler_Set

procedure Handler_Set 
(Func: Gdk_Event_Func;
Notify: Glib.G_Destroy_Notify_Address);
Sets the function to call to handle all events from GDK. Note that GTK+ uses this to install its own event handler, so it is usually not useful for GTK+ applications. (Although an application can call this function then call Gtk.Main.Main_Do_Event to pass events to GTK+.) "func": the function to call to handle events from GDK. "notify": the function to call when the handler function is removed, i.e. when Gdk.Event.Handler_Set is called with another event handler.

From_Address

function From_Address 
(C: System.Address) return Gdk_Event;
Convert a C handler to the matching Event structure.

To_Address

function To_Address 
(C: Gdk_Event) return System.Address;
Convert an event to the underlying C handler.

Get_Event

function Get_Event 
(Value: Glib.Values.GValue) return Gdk_Event;
Convert a value into a Gdk_Event.

To_Event

function To_Event 
(Event: access Gdk_Event_Button) return Gdk_Event;

To_Event

function To_Event 
(Event: access Gdk_Event_Key) return Gdk_Event;
Cast Event into a Gdk_Event, which can be used to call some of subprograms in the API. The return value is a pointer to Event, which should therefore remain valid as long as the pointer is in use.

Request_Motions

procedure Request_Motions 
(Event: Gdk_Event_Motion);

Events_Pending

function Events_Pending return Boolean;
Checks if any events are ready to be processed for any display.

Set_Show_Events

procedure Set_Show_Events 
(Show_Events: Boolean);
Sets whether a trace of received events is output. Note that GTK+ must be compiled with debugging (that is, configured using the <option>--enable-debug</option> option) to use this option. "show_events": True to output event debugging information.

Get_Show_Events

function Get_Show_Events return Boolean;
Gets whether event debugging output is enabled.