Gdk.Seat

Entities

Simple Types

Tagged Types

Access Types

Constants

Subprograms

Generic Instantiations

Description

The Gdk.Seat.Gdk_Seat object represents a collection of input devices that belong to a user.

Cb_Gdk_Seat_GObject_Void

type Cb_Gdk_Seat_GObject_Void is not null access procedure
  (Self   : access Gdk_Seat_Record'Class;
   Device : not null access Glib.Object.GObject_Record'Class);
Parameters
Self
Device

Cb_GObject_GObject_Void

type Cb_GObject_GObject_Void is not null access procedure
  (Self   : access Glib.Object.GObject_Record'Class;
   Device : not null access Glib.Object.GObject_Record'Class);
Parameters
Self
Device

Convert

function Convert (R : Gdk.Seat.Gdk_Seat) return System.Address
Parameters
R
Return Value

Convert

function Convert (R : System.Address) return Gdk.Seat.Gdk_Seat
Parameters
R
Return Value

Display_Property

Display_Property : constant Glib.Properties.Property_Boxed;

Type: Display Gdk.Display.Gdk_Display of this seat.

Gdk_Seat

type Gdk_Seat is access all Gdk_Seat_Record'Class;

Gdk_Seat_Capabilities

type Gdk_Seat_Capabilities is mod 2 ** Integer'Size;

Flags describing the seat capabilities.

Gdk_Seat_Capabilities_Properties

package Gdk_Seat_Capabilities_Properties is
   new Generic_Internal_Discrete_Property (Gdk_Seat_Capabilities);

Gdk_Seat_Capability_All

Gdk_Seat_Capability_All : constant Gdk_Seat_Capabilities := 15;

Gdk_Seat_Capability_All_Pointing

Gdk_Seat_Capability_All_Pointing : constant Gdk_Seat_Capabilities := 7;

Gdk_Seat_Capability_Keyboard

Gdk_Seat_Capability_Keyboard : constant Gdk_Seat_Capabilities := 8;

Gdk_Seat_Capability_None

Gdk_Seat_Capability_None : constant Gdk_Seat_Capabilities := 0;

Gdk_Seat_Capability_Pointer

Gdk_Seat_Capability_Pointer : constant Gdk_Seat_Capabilities := 1;

Gdk_Seat_Capability_Tablet_Stylus

Gdk_Seat_Capability_Tablet_Stylus : constant Gdk_Seat_Capabilities := 4;

Gdk_Seat_Capability_Touch

Gdk_Seat_Capability_Touch : constant Gdk_Seat_Capabilities := 2;

Gdk_Seat_Grab_Prepare_Func

type Gdk_Seat_Grab_Prepare_Func is access procedure
  (Seat   : not null access Gdk_Seat_Record'Class;
   Window : Gdk.Gdk_Window);

Type of the callback used to set up Window so it can be grabbed. A typical action would be ensuring the window is visible, although there's room for other initialization actions. Since: gtk+ 3.20

Parameters
Seat

the Gdk.Seat.Gdk_Seat being grabbed

Window

the Gdk.Gdk_Window being grabbed

Gdk_Seat_List

package Gdk_Seat_List is new Generic_List (Gdk.Seat.Gdk_Seat);

Gdk_Seat_Record

type Gdk_Seat_Record is new GObject_Record with null record;

Get_Capabilities

function Get_Capabilities
   (Self : not null access Gdk_Seat_Record) return Gdk_Seat_Capabilities

Returns the capabilities this Gdk.Seat.Gdk_Seat currently has. Since: gtk+ 3.20

Parameters
Self
Return Value

the seat capabilities

Get_Display

function Get_Display
   (Self : not null access Gdk_Seat_Record) return Glib.Object.GObject

Returns the Gdk.Display.Gdk_Display this seat belongs to.

Parameters
Self
Return Value

Get_Keyboard

function Get_Keyboard
   (Self : not null access Gdk_Seat_Record) return Gdk.Device.Gdk_Device

Returns the master device that routes keyboard events. Since: gtk+ 3.20

Parameters
Self
Return Value

a master Gdk.Device.Gdk_Device with keyboard capabilities. This object is owned by GTK+ and must not be freed.

Get_Pointer

function Get_Pointer
   (Self : not null access Gdk_Seat_Record) return Gdk.Device.Gdk_Device

Returns the master device that routes pointer events. Since: gtk+ 3.20

Parameters
Self
Return Value

a master Gdk.Device.Gdk_Device with pointer capabilities. This object is owned by GTK+ and must not be freed.

Get_Slaves

function Get_Slaves
   (Self         : not null access Gdk_Seat_Record;
    Capabilities : Gdk_Seat_Capabilities)
    return Gdk.Device.Device_List.Glist

Returns the slave devices that match the given capabilities. Since: gtk+ 3.20

Parameters
Self
Capabilities

capabilities to get devices for

Return Value

Get_Type

function Get_Type return Glib.GType
Return Value

Grab

function Grab
   (Self         : not null access Gdk_Seat_Record;
    Window       : Gdk.Gdk_Window;
    Capabilities : Gdk_Seat_Capabilities;
    Owner_Events : Boolean;
    Cursor       : Gdk.Gdk_Cursor;
    Event        : Gdk.Event.Gdk_Event;
    Prepare_Func : Gdk_Seat_Grab_Prepare_Func) return Gdk_Grab_Status

Grabs the seat so that all events corresponding to the given Capabilities are passed to this application until the seat is ungrabbed with Gdk.Seat.Ungrab, or the window becomes hidden. This overrides any previous grab on the seat by this client. As a rule of thumb, if a grab is desired over Gdk.Seat.Gdk_Seat_Capability_Pointer, all other "pointing" capabilities (eg. Gdk.Seat.Gdk_Seat_Capability_Touch) should be grabbed too, so the user is able to interact with all of those while the grab holds, you should thus use Gdk.Seat.Gdk_Seat_Capability_All_Pointing most commonly. Grabs are used for operations which need complete control over the events corresponding to the given capabilities. For example in GTK+ this is used for Drag and Drop operations, popup menus and such. Note that if the event mask of a Gdk.Gdk_Window has selected both button press and button release events, or touch begin and touch end, then a press event will cause an automatic grab until the button is released, equivalent to a grab on the window with Owner_Events set to True. This is done because most applications expect to receive paired press and release events. If you set up anything at the time you take the grab that needs to be cleaned up when the grab ends, you should handle the Gdk.Event.Gdk_Event_Grab_Broken events that are emitted when the grab ends unvoluntarily. Since: gtk+ 3.20

Parameters
Self
Window

the Gdk.Gdk_Window which will own the grab

Capabilities

capabilities that will be grabbed

Owner_Events

if False then all device events are reported with respect to Window and are only reported if selected by Event_Mask. If True then pointer events for this application are reported as normal, but pointer events outside this application are reported with respect to Window and only if selected by Event_Mask. In either mode, unreported events are discarded.

Cursor

the cursor to display while the grab is active. If this is null then the normal cursors are used for Window and its descendants, and the cursor for Window is used elsewhere.

Event

the event that is triggering the grab, or null if none is available.

Prepare_Func

function to prepare the window to be grabbed, it can be null if Window is visible before this call.

Return Value

GDK_GRAB_SUCCESS if the grab was successful.

On_Device_Added

procedure On_Device_Added
   (Self  : not null access Gdk_Seat_Record;
    Call  : Cb_Gdk_Seat_GObject_Void;
    After : Boolean := False)

The ::device-added signal is emitted when a new input device is related to this seat.

Parameters
Self
Call
After

On_Device_Added

procedure On_Device_Added
   (Self  : not null access Gdk_Seat_Record;
    Call  : Cb_GObject_GObject_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

The ::device-added signal is emitted when a new input device is related to this seat.

Parameters
Self
Call
Slot
After

On_Device_Removed

procedure On_Device_Removed
   (Self  : not null access Gdk_Seat_Record;
    Call  : Cb_Gdk_Seat_GObject_Void;
    After : Boolean := False)

The ::device-removed signal is emitted when an input device is removed (e.g. unplugged).

Parameters
Self
Call
After

On_Device_Removed

procedure On_Device_Removed
   (Self  : not null access Gdk_Seat_Record;
    Call  : Cb_GObject_GObject_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

The ::device-removed signal is emitted when an input device is removed (e.g. unplugged).

Parameters
Self
Call
Slot
After

On_Tool_Added

procedure On_Tool_Added
   (Self  : not null access Gdk_Seat_Record;
    Call  : Cb_Gdk_Seat_GObject_Void;
    After : Boolean := False)

The ::tool-added signal is emitted whenever a new tool is made known to the seat. The tool may later be assigned to a device (i.e. on proximity with a tablet). The device will emit the Gdk.Device.Gdk_Device::tool-changed signal accordingly.

A same tool may be used by several devices.

Parameters
Self
Call
After

On_Tool_Added

procedure On_Tool_Added
   (Self  : not null access Gdk_Seat_Record;
    Call  : Cb_GObject_GObject_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

The ::tool-added signal is emitted whenever a new tool is made known to the seat. The tool may later be assigned to a device (i.e. on proximity with a tablet). The device will emit the Gdk.Device.Gdk_Device::tool-changed signal accordingly.

A same tool may be used by several devices.

Parameters
Self
Call
Slot
After

On_Tool_Removed

procedure On_Tool_Removed
   (Self  : not null access Gdk_Seat_Record;
    Call  : Cb_Gdk_Seat_GObject_Void;
    After : Boolean := False)

This signal is emitted whenever a tool is no longer known to this Seat.

Parameters
Self
Call
After

On_Tool_Removed

procedure On_Tool_Removed
   (Self  : not null access Gdk_Seat_Record;
    Call  : Cb_GObject_GObject_Void;
    Slot  : not null access Glib.Object.GObject_Record'Class;
    After : Boolean := False)

This signal is emitted whenever a tool is no longer known to this Seat.

Parameters
Self
Call
Slot
After

Property_Gdk_Seat_Capabilities

type Property_Gdk_Seat_Capabilities is new Gdk_Seat_Capabilities_Properties.Property;

Signal_Device_Added

Signal_Device_Added : constant Glib.Signal_Name := "device-added";

The ::device-added signal is emitted when a new input device is related to this seat.

Signal_Device_Removed

Signal_Device_Removed : constant Glib.Signal_Name := "device-removed";

The ::device-removed signal is emitted when an input device is removed (e.g. unplugged).

Signal_Tool_Added

Signal_Tool_Added : constant Glib.Signal_Name := "tool-added";

The ::tool-added signal is emitted whenever a new tool is made known to the seat. The tool may later be assigned to a device (i.e. on proximity with a tablet). The device will emit the Gdk.Device.Gdk_Device::tool-changed signal accordingly.

A same tool may be used by several devices.

Signal_Tool_Removed

Signal_Tool_Removed : constant Glib.Signal_Name := "tool-removed";

This signal is emitted whenever a tool is no longer known to this Seat.

Ungrab

procedure Ungrab (Self : not null access Gdk_Seat_Record)

Releases a grab added through Gdk.Seat.Grab. Since: gtk+ 3.20

Parameters
Self