Gdk.Event

Entities

Simple Types

Record Types

Access Types

Constants

Subprograms

Generic Instantiations

Description

A Gdk.Event.Gdk_Event contains a union of all of the event types, 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 types, 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, the pointer to the event can be cast to the appropriate event type, 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;

<group>Gdk, the low-level API</group>

All_Events_Mask

All_Events_Mask : constant Gdk_Event_Mask := 67108862;

Button1_Motion_Mask

Button1_Motion_Mask : constant Gdk_Event_Mask := 32;

Button2_Motion_Mask

Button2_Motion_Mask : constant Gdk_Event_Mask := 64;

Button3_Motion_Mask

Button3_Motion_Mask : constant Gdk_Event_Mask := 128;

Button_Middle

Button_Middle    : constant Gint := 2;

The primary button is typically the left mouse button, or the right button in a left-handed setup. The secondary button is the other one.

Button_Motion_Mask

Button_Motion_Mask : constant Gdk_Event_Mask := 16;

Button_Press_Mask

Button_Press_Mask : constant Gdk_Event_Mask := 256;

Button_Primary

Button_Primary   : constant Gint := 1;

The primary button is typically the left mouse button, or the right button in a left-handed setup. The secondary button is the other one.

Button_Release_Mask

Button_Release_Mask : constant Gdk_Event_Mask := 512;

Button_Secondary

Button_Secondary : constant Gint := 3;

The primary button is typically the left mouse button, or the right button in a left-handed setup. The secondary button is the other one.

Copy

function Copy (Event : Gdk_Event) return Gdk_Event

Copies a Gdk.Event.Gdk_Event, copying or incrementing the reference count of the resources associated with it (e.g. Gdk.Gdk_Window's and strings).

Parameters
Event
Return Value

a copy of Event. The returned Gdk.Event.Gdk_Event should be freed with Gdk.Event.Free.

Double_Button_Press

Double_Button_Press : constant Gdk_Event_Type := Gdk_2button_Press;

Enter_Notify_Mask

Enter_Notify_Mask : constant Gdk_Event_Mask := 4096;

Events_Pending

function Events_Pending return Boolean

Checks if any events are ready to be processed for any display.

Return Value

True if any events are pending.

Exposure_Mask

Exposure_Mask : constant Gdk_Event_Mask := 2;

Focus_Change_Mask

Focus_Change_Mask : constant Gdk_Event_Mask := 16384;

Free

procedure Free (Event : Gdk_Event)

Frees a Gdk.Event.Gdk_Event, freeing or decrementing any resources associated with it. Note that this function should only be called with events returned from functions such as Gdk.Event.Peek, Gdk.Event.Get, Gdk.Event.Copy and gdk_event_new.

Parameters
Event

From_Address

function From_Address (C : System.Address) return Gdk_Event

Convert a C handler to the matching Event structure.

Parameters
C
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Any) return Gdk_Event_Any

Contains the fields which are common to all event structs. Any event pointer can safely be cast to a pointer to a Gdk.Event.Gdk_Event_Any to access these fields.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Button) return Gdk_Event_Button

Used for button press and button release events. The Type field will be one of Gdk.Event.Button_Press, Gdk.Event.Gdk_2button_Press, Gdk.Event.Gdk_3button_Press or Gdk.Event.Button_Release,

Double and triple-clicks result in a sequence of events being received. For double-clicks the order of events will be:

Gdk.Event.Button_Press - Gdk.Event.Gdk_2button_Press - Gdk.Event.Button_Release

Note that the first click is received just like a normal button press, while the second click results in a Gdk.Event.Gdk_2button_Press being received just after the Gdk.Event.Button_Press.

Triple-clicks are very similar to double-clicks, except that Gdk.Event.Gdk_3button_Press is inserted after the third click. The order of the events is:

Gdk.Event.Button_Press - Gdk.Event.Gdk_2button_Press - Gdk.Event.Button_Release - Gdk.Event.Button_Press - Gdk.Event.Gdk_3button_Press - Gdk.Event.Button_Release

For a double click to occur, the second button press must occur within 1/4 of a second of the first. For a triple click to occur, the third button press must also occur within 1/2 second of the first button press.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Configure) return Gdk_Event_Configure

Generated when a window size or position has changed.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Crossing) return Gdk_Event_Crossing

Generated when the pointer enters or leaves a window.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_DND) return Gdk_Event_DND

Generated during DND operations.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Expose) return Gdk_Event_Expose

Generated when all or part of a window becomes visible and needs to be redrawn.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Focus) return Gdk_Event_Focus

Describes a change of keyboard focus.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Grab_Broken) return Gdk_Event_Grab_Broken

Generated when a pointer or keyboard grab is broken. On X11, this happens when the grab window becomes unviewable (i.e. it or one of its ancestors is unmapped), or if the same application grabs the pointer or keyboard again. Note that implicit grabs (which are initiated by button presses) can also cause Gdk.Event.Gdk_Event_Grab_Broken events. Generated when a pointer or keyboard grab is broken. On X11, this happens when the grab window becomes unviewable (i.e. it or one of its ancestors is unmapped), or if the same application grabs the pointer or keyboard again. Note that implicit grabs (which are initiated by button presses) can also cause Gdk.Event.Gdk_Event_Grab_Broken events.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Key) return Gdk_Event_Key

Describes a key press or key release event.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Motion) return Gdk_Event_Motion

Generated when the pointer moves.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Owner_Change) return Gdk_Event_Owner_Change

Generated when the owner of a selection changes. On X11, this information is only available if the X server supports the XFIXES extension.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Pad_Axis) return Gdk_Event_Pad_Axis

Generated during GDK_SOURCE_TABLET_PAD interaction with tactile sensors.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Pad_Button) return Gdk_Event_Pad_Button

Generated during GDK_SOURCE_TABLET_PAD button presses and releases.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Pad_Group_Mode) return Gdk_Event_Pad_Group_Mode

Generated during GDK_SOURCE_TABLET_PAD mode switches in a group.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Property) return Gdk_Event_Property

Describes a property change on a window.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Proximity) return Gdk_Event_Proximity

Proximity events are generated when using GDK's wrapper for the XInput extension. The XInput extension is an add-on for standard X that allows you to use nonstandard devices such as graphics tablets. A proximity event indicates that the stylus has moved in or out of contact with the tablet, or perhaps that the user's finger has moved in or out of contact with a touch screen.

This event type will be used pretty rarely. It only is important for XInput aware programs that are drawing their own cursor.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Record) return Gdk_Event_Record

A Gdk.Event.Gdk_Event contains a union of all of the event types, 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 types, 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, the pointer to the event can be cast to the appropriate event type, 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;
Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Scroll) return Gdk_Event_Scroll

Generated from button presses for the buttons 4 to 7. Wheel mice are usually configured to generate button press events for buttons 4 and 5 when the wheel is turned.

Some GDK backends can also generate "smooth" scroll events, which can be recognized by the Gdk.Event.Scroll_Smooth scroll direction. For these, the scroll deltas can be obtained with Gdk.Event.Get_Scroll_Deltas.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Selection) return Gdk_Event_Selection

Generated when a selection is requested or ownership of a selection is taken over by another client application.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Sequence) return Gdk_Event_Sequence
Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Setting) return Gdk_Event_Setting

Generated when a setting is modified.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Touch) return Gdk_Event_Touch

Used for touch events. Type field will be one of Gdk.Event.Touch_Begin, Gdk.Event.Touch_Update, Gdk.Event.Touch_End or Gdk.Event.Touch_Cancel.

Touch events are grouped into sequences by means of the Sequence field, which can also be obtained with Gdk.Event.Get_Event_Sequence. Each sequence begins with a Gdk.Event.Touch_Begin event, followed by any number of Gdk.Event.Touch_Update events, and ends with a Gdk.Event.Touch_End (or Gdk.Event.Touch_Cancel) event. With multitouch devices, there may be several active sequences at the same time.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Touchpad_Pinch) return Gdk_Event_Touchpad_Pinch

Generated during touchpad swipe gestures.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Touchpad_Swipe) return Gdk_Event_Touchpad_Swipe

Generated during touchpad swipe gestures.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Visibility) return Gdk_Event_Visibility

Generated when the window visibility status has changed.

Parameters
B
Return Value

From_Object_Free

function From_Object_Free (B : access Gdk_Event_Window_State) return Gdk_Event_Window_State

Generated when the state of a toplevel window changes.

Parameters
B
Return Value

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);

Specifies the crossing mode for Gdk.Event.Gdk_Event_Crossing.

Enumeration Literal
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_Crossing_Mode_Properties

package Gdk_Crossing_Mode_Properties is
   new Generic_Internal_Discrete_Property (Gdk_Crossing_Mode);

Gdk_Event

type Gdk_Event is access all Gdk_Event_Record;

Gdk_Event_Any

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

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;
Record fields
The_Type
Window
Send_Event
Time
X
Y
Axes
State
Button
Device
X_Root
Y_Root

Gdk_Event_Configure

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

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;
Record fields
The_Type
Window
Send_Event
Subwindow
Time
X
Y
X_Root
Y_Root
Mode
Detail
Focus
State

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;
Record fields
The_Type
Window
Send_Event
Context
Time
X_Root
Y_Root

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 : Glib.Gint := 0;
end record;
Record fields
The_Type
Window
Send_Event
Area
Region
Count

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;
Record fields
The_Type
Window
Send_Event
Gtk_In

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.

Parameters
Event

the Gdk.Event.Gdk_Event to process.

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;
Record fields
The_Type
Window
Send_Event
Keyboard
Implicit
Grab_Window

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 : Glib.Gint := 0;
   String : Gtkada.Types.Chars_Ptr;
   Hardware_Keycode : Guint16;
   Group : Guint8;
   Is_Modifier : Guint;
end record;
Record fields
The_Type
Window
Send_Event
Time
State
Keyval
Length
String
Hardware_Keycode
Group
Is_Modifier

Gdk_Event_Mask

type Gdk_Event_Mask is mod 2 ** Integer'Size;

A set of bit-flags to indicate which events a window is to receive. Most of these masks map onto one or more of the Gdk.Event.Gdk_Event_Type event types above.

See the [input handling overview][chap-input-handling] for details of [event masks][event-masks] and [event propagation][event-propagation].

Gdk.Event.Pointer_Motion_Hint_Mask is deprecated. It is a special mask to reduce the number of Gdk.Event.Motion_Notify events received. When using Gdk.Event.Pointer_Motion_Hint_Mask, fewer Gdk.Event.Motion_Notify events will be sent, some of which are marked as a hint (the is_hint member is True). To receive more motion events after a motion hint event, the application needs to asks for more, by calling Gdk.Event.Request_Motions.

Since GTK 3.8, motion events are already compressed by default, independent of this mechanism. This compression can be disabled with Gdk.Window.Set_Event_Compression. See the documentation of that function for details.

If Gdk.Event.Touch_Mask is enabled, the window will receive touch events from touch-enabled devices. Those will come as sequences of Gdk.Event.Gdk_Event_Touch with type Gdk.Event.Touch_Update, enclosed by two events with type Gdk.Event.Touch_Begin and Gdk.Event.Touch_End (or Gdk.Event.Touch_Cancel). Gdk.Event.Get_Event_Sequence returns the event sequence for these events, so different sequences may be distinguished.

Gdk_Event_Mask_Properties

package Gdk_Event_Mask_Properties is
   new Generic_Internal_Discrete_Property (Gdk_Event_Mask);

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;
Record fields
The_Type
Window
Send_Event
Time
X
Y
Axes
State
Is_Hint
Device
X_Root
Y_Root

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

Parameters
The_Type

a Gdk.Event.Gdk_Event_Type

Return Value

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;
Record fields
The_Type
Window
Send_Event
Owner
Reason
Selection
Time
Selection_Time

Gdk_Event_Pad_Axis

type Gdk_Event_Pad_Axis is record
   The_Type : Gdk_Event_Type;
   Window : Gdk.Gdk_Window;
   Send_Event : Gint8;
   Time : Guint32;
   Group : Guint;
   Index : Guint;
   Mode : Guint;
   Value : Gdouble;
end record;
Record fields
The_Type
Window
Send_Event
Time
Group
Index
Mode
Value

Gdk_Event_Pad_Button

type Gdk_Event_Pad_Button is record
   The_Type : Gdk_Event_Type;
   Window : Gdk.Gdk_Window;
   Send_Event : Gint8;
   Time : Guint32;
   Group : Guint;
   Button : Guint;
   Mode : Guint;
end record;
Record fields
The_Type
Window
Send_Event
Time
Group
Button
Mode

Gdk_Event_Pad_Group_Mode

type Gdk_Event_Pad_Group_Mode is record
   The_Type : Gdk_Event_Type;
   Window : Gdk.Gdk_Window;
   Send_Event : Gint8;
   Time : Guint32;
   Group : Guint;
   Mode : Guint;
end record;
Record fields
The_Type
Window
Send_Event
Time
Group
Mode

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;
Record fields
The_Type
Window
Send_Event
Atom
Time
State

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;
Record fields
The_Type
Window
Send_Event
Time
Device

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;
      when Gdk.Event.Touchpad_Swipe =>
      Touchpad_Swipe : Gdk_Event_Touchpad_Swipe;
      when Gdk.Event.Touchpad_Pinch =>
      Touchpad_Pinch : Gdk_Event_Touchpad_Pinch;
      when Gdk.Event.Pad_Button_Press
      | Gdk.Event.Pad_Button_Release =>
      Pad_Button : Gdk_Event_Pad_Button;
      when Gdk.Event.Pad_Ring
      | Gdk.Event.Pad_Strip =>
      Pad_Axis : Gdk_Event_Pad_Axis;
      when Gdk.Event.Pad_Group_Mode =>
      Pad_Group_Mode : Gdk_Event_Pad_Group_Mode;
   end case;
end record;
Record fields
The_Type
Any
Expose
Visibility
Motion
Button
Touch
Scroll
Key
Crossing
Focus_Change
Configure
Property
Selection
Owner_Change
Proximity
Dnd
Window_State
Setting
Grab_Broken
Touchpad_Swipe
Touchpad_Pinch
Pad_Button
Pad_Axis
Pad_Group_Mode

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;
   Is_Stop : Guint;
end record;
Record fields
The_Type
Window
Send_Event
Time
X
Y
State
Direction
Device
X_Root
Y_Root
Delta_X
Delta_Y
Is_Stop

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;
Record fields
The_Type
Window
Send_Event
Selection
Target
Property
Time
Requestor

Gdk_Event_Sequence

type Gdk_Event_Sequence is new Glib.C_Proxy;

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 : Gtkada.Types.Chars_Ptr;
end record;
Record fields
The_Type
Window
Send_Event
Action
Name

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 : Gdk_Event_Sequence;
   Emulating_Pointer : Boolean;
   Device : System.Address;
   X_Root : Gdouble;
   Y_Root : Gdouble;
end record;
Record fields
The_Type
Window
Send_Event
Time
X
Y
Axes
State
Sequence
Emulating_Pointer
Device
X_Root
Y_Root

Gdk_Event_Touchpad_Pinch

type Gdk_Event_Touchpad_Pinch is record
   The_Type : Gdk_Event_Type;
   Window : Gdk.Gdk_Window;
   Send_Event : Gint8;
   Phase : Gint8;
   N_Fingers : Gint8;
   Time : Guint32;
   X : Gdouble;
   Y : Gdouble;
   Dx : Gdouble;
   Dy : Gdouble;
   Angle_Delta : Gdouble;
   Scale : Gdouble;
   X_Root : Gdouble;
   Y_Root : Gdouble;
   State : Gdk.Types.Gdk_Modifier_Type;
end record;
Record fields
The_Type
Window
Send_Event
Phase
N_Fingers
Time
X
Y
Dx
Dy
Angle_Delta
Scale
X_Root
Y_Root
State

Gdk_Event_Touchpad_Swipe

type Gdk_Event_Touchpad_Swipe is record
   The_Type : Gdk_Event_Type;
   Window : Gdk.Gdk_Window;
   Send_Event : Gint8;
   Phase : Gint8;
   N_Fingers : Gint8;
   Time : Guint32;
   X : Gdouble;
   Y : Gdouble;
   Dx : Gdouble;
   Dy : Gdouble;
   X_Root : Gdouble;
   Y_Root : Gdouble;
   State : Gdk.Types.Gdk_Modifier_Type;
end record;
Record fields
The_Type
Window
Send_Event
Phase
N_Fingers
Time
X
Y
Dx
Dy
X_Root
Y_Root
State

Gdk_Event_Type

type Gdk_Event_Type is (
   Nothing,
   Delete,
   Destroy,
   Expose,
   Motion_Notify,
   Button_Press,
   Gdk_2button_Press,
   Gdk_3button_Press,
   …,
   Pad_Group_Mode);

Specifies the type of the event.

Do not confuse these events with the signals that GTK+ widgets emit. Although many of these events result in corresponding signals being emitted, the events are often transformed or filtered along the way.

In some language bindings, the values Gdk.Event.Gdk_2button_Press and Gdk.Event.Gdk_3button_Press would translate into something syntactically invalid (eg Gdk.EventType.2ButtonPress, where a symbol is not allowed to start with a number). In that case, the aliases GDK_DOUBLE_BUTTON_PRESS and GDK_TRIPLE_BUTTON_PRESS can be used instead.

Enumeration Literal
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
Touchpad_Swipe
Touchpad_Pinch
Pad_Button_Press
Pad_Button_Release
Pad_Ring
Pad_Strip
Pad_Group_Mode

Gdk_Event_Type_Properties

package Gdk_Event_Type_Properties is
   new Generic_Internal_Discrete_Property (Gdk_Event_Type);

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;
Record fields
The_Type
Window
Send_Event
State

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;
Record fields
The_Type
Window
Send_Event
Changed_Mask
New_Window_State

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

Parameters
Event
The_Type

a Gdk.Event.Gdk_Event_Type

Gdk_Notify_Type

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

Specifies the kind of crossing for Gdk.Event.Gdk_Event_Crossing.

See the X11 protocol specification of LeaveNotify for full details of crossing event generation.

Enumeration Literal
Notify_Ancestor
Notify_Virtual
Notify_Inferior
Notify_Nonlinear
Notify_Nonlinear_Virtual
Notify_Unknown

Gdk_Notify_Type_Properties

package Gdk_Notify_Type_Properties is
   new Generic_Internal_Discrete_Property (Gdk_Notify_Type);

Gdk_Owner_Change

type Gdk_Owner_Change is (
   Owner_Change_New_Owner,
   Owner_Change_Destroy,
   Owner_Change_Close);

Specifies why a selection ownership was changed.

Enumeration Literal
Owner_Change_New_Owner
Owner_Change_Destroy
Owner_Change_Close

Gdk_Owner_Change_Properties

package Gdk_Owner_Change_Properties is
   new Generic_Internal_Discrete_Property (Gdk_Owner_Change);

Gdk_Property_State

type Gdk_Property_State is (
   Property_New_Value,
   Property_Delete);

Specifies the type of a property change for a Gdk.Event.Gdk_Event_Property.

Enumeration Literal
Property_New_Value
Property_Delete

Gdk_Property_State_Properties

package Gdk_Property_State_Properties is
   new Generic_Internal_Discrete_Property (Gdk_Property_State);

Gdk_Scroll_Direction

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

Specifies the direction for Gdk.Event.Gdk_Event_Scroll.

Enumeration Literal
Scroll_Up
Scroll_Down
Scroll_Left
Scroll_Right
Scroll_Smooth

Gdk_Scroll_Direction_Properties

package Gdk_Scroll_Direction_Properties is
   new Generic_Internal_Discrete_Property (Gdk_Scroll_Direction);

Gdk_Setting_Action

type Gdk_Setting_Action is (
   Setting_Action_New,
   Setting_Action_Changed,
   Setting_Action_Deleted);

Specifies the kind of modification applied to a setting in a Gdk.Event.Gdk_Event_Setting.

Enumeration Literal
Setting_Action_New
Setting_Action_Changed
Setting_Action_Deleted

Gdk_Setting_Action_Properties

package Gdk_Setting_Action_Properties is
   new Generic_Internal_Discrete_Property (Gdk_Setting_Action);

Gdk_Visibility_State

type Gdk_Visibility_State is (
   Visibility_Unobscured,
   Visibility_Partial,
   Visibility_Fully_Obscured);

Specifies the visiblity status of a window for a Gdk.Event.Gdk_Event_Visibility.

Enumeration Literal
Visibility_Unobscured
Visibility_Partial
Visibility_Fully_Obscured

Gdk_Visibility_State_Properties

package Gdk_Visibility_State_Properties is
   new Generic_Internal_Discrete_Property (Gdk_Visibility_State);

Gdk_Window_State

type Gdk_Window_State is mod 2 ** Integer'Size;

Specifies the state of a toplevel window.

Gdk_Window_State_Properties

package Gdk_Window_State_Properties is
   new Generic_Internal_Discrete_Property (Gdk_Window_State);

Get

function Get return Gdk_Event

Checks all open displays for a Gdk.Event.Gdk_Event to process,to be processed on, fetching events from the windowing system if necessary. See Gdk.Display.Get_Event.

Return Value

the next Gdk.Event.Gdk_Event to be processed, or null if no events are pending. The returned Gdk.Event.Gdk_Event should be freed with Gdk.Event.Free.

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

Parameters
Event
Event2

second Gdk.Event.Gdk_Event

Angle

return location for the relative angle between both events

Return Value

True if the angle could be calculated.

Get_Axis

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

Extract the axis value for a particular axis use from an event structure.

Parameters
Event
Axis_Use

the axis use to look for

Value

location to store the value found

Get_Button

function Get_Button (Event : Gdk_Event) return Guint

Extract the button number from an event

Parameters
Event
Return Value

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

Parameters
Event
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

Return Value

True if the center could be calculated.

Get_Coords

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

Extract the event window relative x/y coordinates from an event.

Parameters
Event
X_Win

location to put event window x coordinate

Y_Win

location to put event window y coordinate

Get_Device_Tool

function Get_Device_Tool
   (Event : Gdk_Event) return Gdk.Device_Tool.Gdk_Device_Tool

If the event was generated by a device that supports different tools (eg. a tablet), this function will return a Gdk.Device_Tool.Gdk_Device_Tool representing the tool that caused the event. Otherwise, null will be returned. Note: the Gdk.Device_Tool.Gdk_Device_Tool<!-- -->s will be constant during the application lifetime, if settings must be stored persistently across runs, see Gdk.Device_Tool.Get_Serial Since: gtk+ 3.22

Parameters
Event
Return Value

The current device tool, or null

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

Parameters
Event
Event2

second Gdk.Event.Gdk_Event

Distance

return location for the distance

Return Value

True if the distance could be calculated.

Get_Event

function Get_Event (Value : Glib.Values.GValue) return Gdk_Event

Convert a value into a Gdk_Event.

Parameters
Value
Return Value

Get_Event_Sequence

function Get_Event_Sequence (Event : Gdk_Event) return Gdk_Event_Sequence

If Event if of type Gdk.Event.Touch_Begin, Gdk.Event.Touch_Update, Gdk.Event.Touch_End or Gdk.Event.Touch_Cancel, returns the Gdk.Event.Gdk_Event_Sequence to which the event belongs. Otherwise, return null. Since: gtk+ 3.4

Parameters
Event
Return Value

the event sequence that the event belongs to

Get_Event_Type

function Get_Event_Type (Event : Gdk_Event) return Gdk_Event_Type

Retrieves the type of the event. Since: gtk+ 3.10

Parameters
Event
Return Value

a Gdk.Event.Gdk_Event_Type

Get_Key_Val

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

Code of the key that was pressed (and that generated the event)

Parameters
Event
Return Value

Get_Keycode

function Get_Keycode (Event : Gdk_Event) return Guint

Hardware key code of the key that was pressed

Parameters
Event
Return Value

Get_Pointer_Emulated

function Get_Pointer_Emulated (Event : Gdk_Event) return Boolean

event: a Gdk.Event.Gdk_Event Returns whether this event is an 'emulated' pointer event (typically from a touch event), as opposed to a real one. Since: gtk+ 3.22

Parameters
Event
Return Value

True if this event is emulated

Get_Root_Coords

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

Extract the root window relative x/y coordinates from an event.

Parameters
Event
X_Root

location to put root window x coordinate

Y_Root

location to put root window y coordinate

Get_Scancode

function Get_Scancode (Event : Gdk_Event) return Glib.Gint

Gets the keyboard low-level scancode of a key event. This is usually hardware_keycode. On Windows this is the high word of WM_KEY{DOWN,UP} lParam which contains the scancode and some extended flags. Since: gtk+ 3.22

Parameters
Event
Return Value

The associated keyboard scancode or 0

Get_Scroll_Deltas

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

Retrieves the scroll deltas from a Gdk.Event.Gdk_Event See also: Gdk.Event.Get_Scroll_Direction Since: gtk+ 3.4

Parameters
Event
Delta_X

return location for X delta

Delta_Y

return location for Y delta

Get_Scroll_Direction

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

Extracts the scroll direction from an event. If Event is not of type Gdk.Event.Scroll, the contents of Direction are undefined. If you wish to handle both discrete and smooth scrolling, you should check the return value of this function, or of Gdk.Event.Get_Scroll_Deltas; for instance:

GdkScrollDirection direction;
double vscroll_factor = 0.0;
double x_scroll, y_scroll;

if (gdk_event_get_scroll_direction (event, &direction))
  {
    // Handle discrete scrolling with a known constant delta;
    const double delta = 12.0;

    switch (direction)
      {
      case GDK_SCROLL_UP:
        vscroll_factor = -delta;
        break;
      case GDK_SCROLL_DOWN:
        vscroll_factor = delta;
        break;
      default:
        // no scrolling
        break;
      }
  }
else if (gdk_event_get_scroll_deltas (event, &x_scroll, &y_scroll))
  {
    // Handle smooth scrolling directly
    vscroll_factor = y_scroll;
  }

Since: gtk+ 3.2

Parameters
Event
Direction

location to store the scroll direction

Get_Seat

function Get_Seat (Event : Gdk_Event) return Glib.Object.GObject

Returns the Gdk.Seat.Gdk_Seat this event was generated for. Since: gtk+ 3.20

Parameters
Event
Return Value

Get_Show_Events

function Get_Show_Events return Boolean

Gets whether event debugging output is enabled.

Return Value

True if event debugging output is enabled.

Get_State

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

State of the mouse buttons and keyboard keys just prior to the event

Parameters
Event
Return Value

Get_Time

function Get_Time (Event : Gdk_Event) return Guint32

Returns the time stamp from Event, if there is one; otherwise returns GDK_CURRENT_TIME. If Event is null, returns GDK_CURRENT_TIME.

Parameters
Event
Return Value

time stamp field from Event

Get_Type

function Get_Type return Glib.GType
Return Value

Get_Window

function Get_Window (Event : Gdk_Event) return Gdk.Gdk_Window

Extracts the Gdk.Gdk_Window associated with an event. Since: gtk+ 3.10

Parameters
Event
Return Value

The Gdk.Gdk_Window associated with the event

Handler_Set

procedure Handler_Set (Func : Gdk_Event_Func)

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+.)

Parameters
Func

the function to call to handle events from GDK.

Invalid_Gdouble_Value

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

Invalid_Gint_Value

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

Invalid_Guint32_Value

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

Invalid_Guint_Value

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

Invalid_Gulong_Value

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

Is_Scroll_Stop_Event

function Is_Scroll_Stop_Event (Event : Gdk_Event) return Boolean

Check whether a scroll event is a stop scroll event. Scroll sequences with smooth scroll information may provide a stop scroll event once the interaction with the device finishes, e.g. by lifting a finger. This stop scroll event is the signal that a widget may trigger kinetic scrolling based on the current velocity. Stop scroll events always have a a delta of 0/0. Since: gtk+ 3.20

Parameters
Event
Return Value

True if the event is a scroll stop event

Key_Press_Mask

Key_Press_Mask : constant Gdk_Event_Mask := 1024;

Key_Release_Mask

Key_Release_Mask : constant Gdk_Event_Mask := 2048;

Leave_Notify_Mask

Leave_Notify_Mask : constant Gdk_Event_Mask := 8192;

Peek

function Peek return Gdk_Event

If there is an event waiting in the event queue of some open display, returns a copy of it. See Gdk.Display.Peek_Event.

Return Value

a copy of the first Gdk.Event.Gdk_Event on some event queue, or null if no events are in any queues. The returned Gdk.Event.Gdk_Event should be freed with Gdk.Event.Free.

Pointer_Motion_Hint_Mask

Pointer_Motion_Hint_Mask : constant Gdk_Event_Mask := 8;

Pointer_Motion_Mask

Pointer_Motion_Mask : constant Gdk_Event_Mask := 4;

Property_Change_Mask

Property_Change_Mask : constant Gdk_Event_Mask := 65536;

Property_Gdk_Crossing_Mode

type Property_Gdk_Crossing_Mode is new Gdk_Crossing_Mode_Properties.Property;

Property_Gdk_Event_Mask

type Property_Gdk_Event_Mask is new Gdk_Event_Mask_Properties.Property;

Property_Gdk_Event_Type

type Property_Gdk_Event_Type is new Gdk_Event_Type_Properties.Property;

Property_Gdk_Notify_Type

type Property_Gdk_Notify_Type is new Gdk_Notify_Type_Properties.Property;

Property_Gdk_Owner_Change

type Property_Gdk_Owner_Change is new Gdk_Owner_Change_Properties.Property;

Property_Gdk_Property_State

type Property_Gdk_Property_State is new Gdk_Property_State_Properties.Property;

Property_Gdk_Scroll_Direction

type Property_Gdk_Scroll_Direction is new Gdk_Scroll_Direction_Properties.Property;

Property_Gdk_Setting_Action

type Property_Gdk_Setting_Action is new Gdk_Setting_Action_Properties.Property;

Property_Gdk_Visibility_State

type Property_Gdk_Visibility_State is new Gdk_Visibility_State_Properties.Property;

Property_Gdk_Window_State

type Property_Gdk_Window_State is new Gdk_Window_State_Properties.Property;

Proximity_In_Mask

Proximity_In_Mask : constant Gdk_Event_Mask := 262144;

Proximity_Out_Mask

Proximity_Out_Mask : constant Gdk_Event_Mask := 524288;

Put

procedure Put (Event : Gdk_Event)

Appends a copy of the given event onto the front of the event queue for event->any.window's display, or the default event queue if event->any.window is null. See Gdk.Display.Put_Event.

Parameters
Event

Request_Motions

procedure Request_Motions (Event : Gdk_Event_Motion)

Request more motion notifies if Event is a motion notify hint event. This function should be used instead of Gdk.Window.Get_Pointer to request further motion notifies, because it also works for extension events where motion notifies are provided for devices other than the core pointer. Coordinate extraction, processing and requesting more motion events from a Gdk.Event.Motion_Notify event usually works like this:

{
  // motion_event handler
  x = motion_event->x;
  y = motion_event->y;
  // handle (x,y) motion
  gdk_event_request_motions (motion_event); // handles is_hint events
}

Since: gtk+ 2.12

Parameters
Event

a valid Gdk.Event.Gdk_Event

Scroll_Mask

Scroll_Mask : constant Gdk_Event_Mask := 2097152;

Set_Device_Tool

procedure Set_Device_Tool
   (Event : Gdk_Event;
    Tool  : access Gdk.Device_Tool.Gdk_Device_Tool_Record'Class)

Sets the device tool for this event, should be rarely used. Since: gtk+ 3.22

Parameters
Event
Tool

tool to set on the event, or null

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 --enable-debug option) to use this option.

Parameters
Show_Events

True to output event debugging information.

Smooth_Scroll_Mask

Smooth_Scroll_Mask : constant Gdk_Event_Mask := 8388608;

Structure_Mask

Structure_Mask : constant Gdk_Event_Mask := 32768;

Substructure_Mask

Substructure_Mask : constant Gdk_Event_Mask := 1048576;

Tablet_Pad_Mask

Tablet_Pad_Mask : constant Gdk_Event_Mask := 33554432;

To_Address

function To_Address (C : Gdk_Event) return System.Address

Convert an event to the underlying C handler.

Parameters
C
Return Value

To_Event

function To_Event (Event : access Gdk_Event_Button) 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.

Parameters
Event
Return Value

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.

Parameters
Event
Return Value

Touch_Mask

Touch_Mask : constant Gdk_Event_Mask := 4194304;

Touchpad_Gesture_Mask

Touchpad_Gesture_Mask : constant Gdk_Event_Mask := 16777216;

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

Parameters
Event
Return Value

True if the event should trigger a context menu.

Triple_Button_Press

Triple_Button_Press : constant Gdk_Event_Type := Gdk_3button_Press;

Visibility_Notify_Mask

Visibility_Notify_Mask : constant Gdk_Event_Mask := 131072;

Window_State_Above

Window_State_Above : constant Gdk_Window_State := 32;

Window_State_Below

Window_State_Below : constant Gdk_Window_State := 64;

Window_State_Bottom_Resizable

Window_State_Bottom_Resizable : constant Gdk_Window_State := 16384;

Window_State_Bottom_Tiled

Window_State_Bottom_Tiled : constant Gdk_Window_State := 8192;

Window_State_Focused

Window_State_Focused : constant Gdk_Window_State := 128;

Window_State_Fullscreen

Window_State_Fullscreen : constant Gdk_Window_State := 16;

Window_State_Iconified

Window_State_Iconified : constant Gdk_Window_State := 2;

Window_State_Left_Resizable

Window_State_Left_Resizable : constant Gdk_Window_State := 65536;

Window_State_Left_Tiled

Window_State_Left_Tiled : constant Gdk_Window_State := 32768;

Window_State_Maximized

Window_State_Maximized : constant Gdk_Window_State := 4;

Window_State_Right_Resizable

Window_State_Right_Resizable : constant Gdk_Window_State := 4096;

Window_State_Right_Tiled

Window_State_Right_Tiled : constant Gdk_Window_State := 2048;

Window_State_Sticky

Window_State_Sticky : constant Gdk_Window_State := 8;

Window_State_Tiled

Window_State_Tiled : constant Gdk_Window_State := 256;

Window_State_Top_Resizable

Window_State_Top_Resizable : constant Gdk_Window_State := 1024;

Window_State_Top_Tiled

Window_State_Top_Tiled : constant Gdk_Window_State := 512;

Window_State_Withdrawn

Window_State_Withdrawn : constant Gdk_Window_State := 1;