gi-gdk-3.0.11: Gdk bindings

CopyrightWill Thompson, Iñaki García Etxebarria and Jonas Platte
LicenseLGPL-2.1
MaintainerIñaki García Etxebarria (garetxe@gmail.com)
Safe HaskellNone
LanguageHaskell2010

GI.Gdk.Objects.Seat

Contents

Description

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

Synopsis

Exported types

newtype Seat Source #

Constructors

Seat (ManagedPtr Seat) 

Instances

GObject Seat Source # 

Methods

gobjectType :: Seat -> IO GType #

IsObject Seat Source # 
IsSeat Seat Source # 
((~) * info (ResolveSeatMethod t Seat), MethodInfo * info Seat p) => IsLabel t (Seat -> p) Source # 

Methods

fromLabel :: Proxy# Symbol t -> Seat -> p #

((~) * info (ResolveSeatMethod t Seat), MethodInfo * info Seat p) => IsLabelProxy t (Seat -> p) Source # 

Methods

fromLabelProxy :: Proxy Symbol t -> Seat -> p #

HasAttributeList * Seat Source # 
type AttributeList Seat Source # 
type SignalList Seat Source # 

toSeat :: IsSeat o => o -> IO Seat Source #

Methods

getCapabilities

seatGetCapabilities Source #

Arguments

:: (HasCallStack, MonadIO m, IsSeat a) 
=> a

seat: a Seat

-> m [SeatCapabilities]

Returns: the seat capabilities

Returns the capabilities this Seat currently has.

Since: 3.20

getDisplay

data SeatGetDisplayMethodInfo Source #

Instances

((~) * signature (m Display), MonadIO m, IsSeat a) => MethodInfo * SeatGetDisplayMethodInfo a signature Source # 

seatGetDisplay Source #

Arguments

:: (HasCallStack, MonadIO m, IsSeat a) 
=> a

seat: a Seat

-> m Display

Returns: a Display. This object is owned by GTK+ and must not be freed.

Returns the Display this seat belongs to.

getKeyboard

data SeatGetKeyboardMethodInfo Source #

Instances

((~) * signature (m (Maybe Device)), MonadIO m, IsSeat a) => MethodInfo * SeatGetKeyboardMethodInfo a signature Source # 

seatGetKeyboard Source #

Arguments

:: (HasCallStack, MonadIO m, IsSeat a) 
=> a

seat: a Seat

-> m (Maybe Device)

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

Returns the master device that routes keyboard events.

Since: 3.20

getPointer

data SeatGetPointerMethodInfo Source #

Instances

((~) * signature (m (Maybe Device)), MonadIO m, IsSeat a) => MethodInfo * SeatGetPointerMethodInfo a signature Source # 

seatGetPointer Source #

Arguments

:: (HasCallStack, MonadIO m, IsSeat a) 
=> a

seat: a Seat

-> m (Maybe Device)

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

Returns the master device that routes pointer events.

Since: 3.20

getSlaves

data SeatGetSlavesMethodInfo Source #

Instances

((~) * signature ([SeatCapabilities] -> m [Device]), MonadIO m, IsSeat a) => MethodInfo * SeatGetSlavesMethodInfo a signature Source # 

seatGetSlaves Source #

Arguments

:: (HasCallStack, MonadIO m, IsSeat a) 
=> a

seat: a Seat

-> [SeatCapabilities]

capabilities: capabilities to get devices for

-> m [Device]

Returns: A list of GdkDevices. The list must be freed with g_list_free(), the elements are owned by GDK and must not be freed.

Returns the slave devices that match the given capabilities.

Since: 3.20

grab

data SeatGrabMethodInfo Source #

Instances

((~) * signature (b -> [SeatCapabilities] -> Bool -> Maybe c -> Maybe Event -> Maybe SeatGrabPrepareFunc -> m GrabStatus), MonadIO m, IsSeat a, IsWindow b, IsCursor c) => MethodInfo * SeatGrabMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy SeatGrabMethodInfo a -> signature -> s #

seatGrab Source #

Arguments

:: (HasCallStack, MonadIO m, IsSeat a, IsWindow b, IsCursor c) 
=> a

seat: a Seat

-> b

window: the Window which will own the grab

-> [SeatCapabilities]

capabilities: capabilities that will be grabbed

-> Bool

ownerEvents: if False then all device events are reported with respect to window and are only reported if selected by eventMask. 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 eventMask. In either mode, unreported events are discarded.

-> Maybe c

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

-> Maybe Event

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

-> Maybe SeatGrabPrepareFunc

prepareFunc: function to prepare the window to be grabbed, it can be Nothing if window is visible before this call.

-> m GrabStatus

Returns: GrabStatusSuccess if the grab was successful.

Grabs the seat so that all events corresponding to the given capabilities are passed to this application until the seat is ungrabbed with seatUngrab, 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 SeatCapabilitiesPointer, all other "pointing" capabilities (eg. SeatCapabilitiesTouch) should be grabbed too, so the user is able to interact with all of those while the grab holds, you should thus use SeatCapabilitiesAllPointing 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 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 ownerEvents 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 EventGrabBroken events that are emitted when the grab ends unvoluntarily.

Since: 3.20

ungrab

data SeatUngrabMethodInfo Source #

Instances

((~) * signature (m ()), MonadIO m, IsSeat a) => MethodInfo * SeatUngrabMethodInfo a signature Source # 

Methods

overloadedMethod :: MethodProxy SeatUngrabMethodInfo a -> signature -> s #

seatUngrab Source #

Arguments

:: (HasCallStack, MonadIO m, IsSeat a) 
=> a

seat: a Seat

-> m () 

Releases a grab added through seatGrab.

Since: 3.20

Properties

display

data SeatDisplayPropertyInfo Source #

Instances

AttrInfo SeatDisplayPropertyInfo Source # 
type AttrOrigin SeatDisplayPropertyInfo Source # 
type AttrLabel SeatDisplayPropertyInfo Source # 
type AttrGetType SeatDisplayPropertyInfo Source # 
type AttrBaseTypeConstraint SeatDisplayPropertyInfo Source # 
type AttrSetTypeConstraint SeatDisplayPropertyInfo Source # 
type AttrAllowedOps SeatDisplayPropertyInfo Source # 

Signals

deviceAdded

deviceRemoved

toolAdded

toolRemoved