package Event_Mask_Properties is new Generic_Internal_Discrete_Property (Gdk_Event_Mask);
type Gdk_Event_Type is (Nothing, -- No event occurred. Delete, -- A window delete event was sent by the window manager. The specified -- window should be deleted. Destroy, -- A window has been destroyed. Expose, -- Part of a window has been uncovered. Motion_Notify, Button_Press, -- A mouse button was pressed. Gdk_2button_Press, -- Double-click Gdk_3button_Press, -- Triple-click Button_Release, -- A mouse button was released. Key_Press, -- A key was pressed. Key_Release, -- A key was released. Enter_Notify, -- A window was entered. Leave_Notify, -- A window was exited. Focus_Change, -- The focus window has changed. (The focus window gets keyboard events) Configure, Map, -- A window has been mapped. (It is now visible on the screen). Unmap, -- A window has been unmapped. (It is no longer visible on the screen). 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, No_Expose, Scroll, -- A mouse wheel was scrolled either up or down. Window_State, Setting, Owner_Change, -- Emitted when the owner of a selection has changed -- Added in gtk+ 2.6 -- See Gdk.Display.Supports_Selection_Notification Grab_Broken -- A pointer or keyboard grab was broken -- Added in gtk+ 2.8 );
type Gdk_Event_Mask is mod 2 ** 32;
type Gdk_Visibility_State is (Visibility_Unobscured, Visibility_Partial, Visibility_Fully_Obscured);
type Gdk_Scroll_Direction is (Scroll_Up, Scroll_Down, Scroll_Left, Scroll_Right);
type Gdk_Notify_Type is (Notify_Ancestor, Notify_Virtual, Notify_Inferior, Notify_Non_Linear, Notify_Non_Linear_Virtual, Notify_Unknown);
type Gdk_Setting_Action is (Setting_Action_New, Setting_Action_Changed, Setting_Action_Deleted);
type Gdk_Device_Id is new Guint32;
type Gdk_Event is new Gdk.C_Proxy;
subtype Gdk_Event_Any is Gdk_Event;
subtype Gdk_Event_Expose is Gdk_Event;
subtype Gdk_Event_No_Expose is Gdk_Event;
subtype Gdk_Event_Visibility is Gdk_Event;
subtype Gdk_Event_Motion is Gdk_Event;
subtype Gdk_Event_Button is Gdk_Event;
subtype Gdk_Event_Scroll is Gdk_Event;
subtype Gdk_Event_Key is Gdk_Event;
subtype Gdk_Event_Crossing is Gdk_Event;
subtype Gdk_Event_Focus is Gdk_Event;
subtype Gdk_Event_Configure is Gdk_Event;
subtype Gdk_Event_Property is Gdk_Event;
subtype Gdk_Event_Selection is Gdk_Event;
subtype Gdk_Event_Proximity is Gdk_Event;
subtype Gdk_Event_Client is Gdk_Event;
subtype Gdk_Event_Setting is Gdk_Event;
subtype Gdk_Event_Window_State is Gdk_Event;
subtype Gdk_Event_DND is Gdk_Event;
type Gdk_Event_Client_Data_Format is (Char_Array, Short_Array, Long_Array);
type Gdk_Event_Client_Data (Format : Gdk_Event_Client_Data_Format) is record case Format is when Char_Array => B : String (1 .. Number_Of_Characters); when Short_Array => S : Gshort_Array (1 .. Number_Of_Shorts); when Long_Array => L : Glong_Array (1 .. Number_Of_Longs); end case; end record;
type Event_Handler_Func is access procedure (Event : Gdk_Event; Data : System.Address);
type Property_Gdk_Event_Mask is new Event_Mask_Properties.Property;
Exposure_Mask : constant Gdk_Event_Mask := 2 ** 1;
Pointer_Motion_Mask : constant Gdk_Event_Mask := 2 ** 2;
Pointer_Motion_Hint_Mask : constant Gdk_Event_Mask := 2 ** 3;
Button_Motion_Mask : constant Gdk_Event_Mask := 2 ** 4;
Button1_Motion_Mask : constant Gdk_Event_Mask := 2 ** 5;
Button2_Motion_Mask : constant Gdk_Event_Mask := 2 ** 6;
Button3_Motion_Mask : constant Gdk_Event_Mask := 2 ** 7;
Button_Press_Mask : constant Gdk_Event_Mask := 2 ** 8;
Button_Release_Mask : constant Gdk_Event_Mask := 2 ** 9;
Key_Press_Mask : constant Gdk_Event_Mask := 2 ** 10;
Key_Release_Mask : constant Gdk_Event_Mask := 2 ** 11;
Enter_Notify_Mask : constant Gdk_Event_Mask := 2 ** 12;
Leave_Notify_Mask : constant Gdk_Event_Mask := 2 ** 13;
Focus_Change_Mask : constant Gdk_Event_Mask := 2 ** 14;
Structure_Mask : constant Gdk_Event_Mask := 2 ** 15;
Property_Change_Mask : constant Gdk_Event_Mask := 2 ** 16;
Visibility_Notify_Mask : constant Gdk_Event_Mask := 2 ** 17;
Proximity_In_Mask : constant Gdk_Event_Mask := 2 ** 18;
Proximity_Out_Mask : constant Gdk_Event_Mask := 2 ** 19;
Substructure_Mask : constant Gdk_Event_Mask := 2 ** 20;
Scroll_Mask : constant Gdk_Event_Mask := 2 ** 21;
All_Events_Mask : constant Gdk_Event_Mask := 16#3FFFFE#;
Window_State_Withdraw : constant Gdk_Window_State := 2 ** 0;
Window_State_Iconified : constant Gdk_Window_State := 2 ** 1;
Window_State_Maximized : constant Gdk_Window_State := 2 ** 2;
Window_State_Sticky : constant Gdk_Window_State := 2 ** 3;
Invalid_Field : exception;
function Get_Event_Type
( | Event | : Gdk_Event) return Gdk_Event_Type; |
function Get_Send_Event
( | Event | : Gdk_Event) return Boolean; |
function Get_Window
( | Event | : Gdk_Event) return Gdk.Gdk_Window; |
function Get_State
( | Event | : Gdk_Event) return Gdk.Types.Gdk_Modifier_Type; |
function Get_Subwindow
( | Event | : Gdk_Event) return Gdk.Gdk_Window; |
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_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_In
( | Event | : Gdk_Event) return Boolean; |
function Get_Key_Val
( | Event | : Gdk_Event) return Gdk.Types.Gdk_Key_Type; |
function Get_String
( | Event | : Gdk_Event) return String; |
function Get_Atom
( | Event | : Gdk_Event) return Gdk.Types.Gdk_Atom; |
function Get_Visibility_State
( | Event | : Gdk_Event) return Gdk_Visibility_State; |
function Get_Selection
( | Event | : Gdk_Event) return Gdk.Types.Gdk_Atom; |
procedure Set_Window
( | Event | : Gdk_Event; |
Win | : Gdk.Gdk_Window); |
procedure Set_State
( | Event | : Gdk_Event; |
State | : Gdk.Types.Gdk_Modifier_Type); |
procedure Set_Subwindow
( | Event | : Gdk_Event; |
Window | : Gdk.Gdk_Window); |
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_Is_Hint
( | Event | : Gdk_Event; |
Is_Hint | : Boolean); |
procedure Set_Key_Val
( | Event | : Gdk_Event; |
Key | : Gdk.Types.Gdk_Key_Type); |
procedure Set_Direction
( | Event | : Gdk_Event; |
Direction | : Gdk_Scroll_Direction); |
procedure Set_Atom
( | Event | : Gdk_Event; |
Atom | : Gdk.Types.Gdk_Atom); |
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_Message_Type
( | Event | : Gdk_Event; |
Typ | : Gdk.Types.Gdk_Atom); |
procedure Set_String
( | Event | : Gdk_Event; |
Str | : String); |
procedure Get_Graphics_Expose
( | Event | : out Gdk_Event_Expose; |
Window | : Gdk.Gdk_Window); |
procedure Peek
( | Event | : out Gdk_Event); |
procedure Put
( | Event | : Gdk_Event); |
procedure Send_Client_Message_To_All
( | Event | : Gdk_Event); |
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; |
function Get_Event
( | Value | : Glib.Values.GValue) return Gdk_Event; |
function Get_Follow_Events return Boolean;
This package provides functions dealing with events from the window system.
In GtkAda applications, the events are handled automatically in Gtk.Main.Do_Event, and passed on to the appropriate widgets, so these functions are rarely needed. !! Warning !! This is one of the only package that requires manual memory management in some cases. If you use the function Allocate, you have to use the function Free too...
Binding from C File version 1.3.6