Class: Gdk::Seat
- Inherits:
-
Object
- Object
- Gdk::Seat
- Defined in:
- (unknown)
Overview
The Gdk::Seat object represents a collection of input devices that belong to a user.
Instance Method Summary collapse
-
#capabilities ⇒ Gdk::SeatCapabilities
Returns the capabilities this Gdk::Seat currently has.
-
#display ⇒ Gdk::Display
Gdk::Display of this seat.
-
#display=(display) ⇒ Gdk::Display
Gdk::Display of this seat.
-
#get_slaves(capabilities) ⇒ GLib::List
Returns the slave devices that match the given capabilities.
-
#grab(window, capabilities, owner_events, cursor, event, prepare_func, prepare_func_data) ⇒ Gdk::GrabStatus
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.
-
#keyboard ⇒ Gdk::Device
Returns the master device that routes keyboard events.
-
#pointer ⇒ Gdk::Device
Returns the master device that routes pointer events.
-
#ungrab ⇒ nil
Releases a grab added through gdk_seat_grab().
Instance Method Details
#capabilities ⇒ Gdk::SeatCapabilities
Returns the capabilities this Gdk::Seat currently has.
#display ⇒ Gdk::Display
Gdk::Display of this seat.
#display=(display) ⇒ Gdk::Display
Gdk::Display of this seat.
#get_slaves(capabilities) ⇒ GLib::List
Returns the slave devices that match the given capabilities.
#grab(window, capabilities, owner_events, cursor, event, prepare_func, prepare_func_data) ⇒ Gdk::GrabStatus
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_CAPABILITY_POINTER, all other “pointing” capabilities (eg. %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_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::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::EventGrabBroken events that are emitted when the grab ends unvoluntarily.
#keyboard ⇒ Gdk::Device
Returns the master device that routes keyboard events.
#pointer ⇒ Gdk::Device
Returns the master device that routes pointer events.
#ungrab ⇒ nil
Releases a grab added through gdk_seat_grab().