Copyright | Will Thompson, Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria (garetxe@gmail.com) |
Safe Haskell | None |
Language | Haskell2010 |
The Seat
object represents a collection of input devices
that belong to a user.
- newtype Seat = Seat (ManagedPtr Seat)
- class GObject o => IsSeat o
- toSeat :: IsSeat o => o -> IO Seat
- noSeat :: Maybe Seat
- data SeatGetCapabilitiesMethodInfo
- seatGetCapabilities :: (HasCallStack, MonadIO m, IsSeat a) => a -> m [SeatCapabilities]
- data SeatGetDisplayMethodInfo
- seatGetDisplay :: (HasCallStack, MonadIO m, IsSeat a) => a -> m Display
- data SeatGetKeyboardMethodInfo
- seatGetKeyboard :: (HasCallStack, MonadIO m, IsSeat a) => a -> m (Maybe Device)
- data SeatGetPointerMethodInfo
- seatGetPointer :: (HasCallStack, MonadIO m, IsSeat a) => a -> m (Maybe Device)
- data SeatGetSlavesMethodInfo
- seatGetSlaves :: (HasCallStack, MonadIO m, IsSeat a) => a -> [SeatCapabilities] -> m [Device]
- data SeatGrabMethodInfo
- seatGrab :: (HasCallStack, MonadIO m, IsSeat a, IsWindow b, IsCursor c) => a -> b -> [SeatCapabilities] -> Bool -> Maybe c -> Maybe Event -> Maybe SeatGrabPrepareFunc -> m GrabStatus
- data SeatUngrabMethodInfo
- seatUngrab :: (HasCallStack, MonadIO m, IsSeat a) => a -> m ()
- data SeatDisplayPropertyInfo
- constructSeatDisplay :: (IsSeat o, IsDisplay a) => a -> IO (GValueConstruct o)
- getSeatDisplay :: (MonadIO m, IsSeat o) => o -> m Display
- seatDisplay :: AttrLabelProxy "display"
- type C_SeatDeviceAddedCallback = Ptr () -> Ptr Device -> Ptr () -> IO ()
- type SeatDeviceAddedCallback = Device -> IO ()
- data SeatDeviceAddedSignalInfo
- afterSeatDeviceAdded :: (GObject a, MonadIO m) => a -> SeatDeviceAddedCallback -> m SignalHandlerId
- genClosure_SeatDeviceAdded :: SeatDeviceAddedCallback -> IO Closure
- mk_SeatDeviceAddedCallback :: C_SeatDeviceAddedCallback -> IO (FunPtr C_SeatDeviceAddedCallback)
- noSeatDeviceAddedCallback :: Maybe SeatDeviceAddedCallback
- onSeatDeviceAdded :: (GObject a, MonadIO m) => a -> SeatDeviceAddedCallback -> m SignalHandlerId
- wrap_SeatDeviceAddedCallback :: SeatDeviceAddedCallback -> Ptr () -> Ptr Device -> Ptr () -> IO ()
- type C_SeatDeviceRemovedCallback = Ptr () -> Ptr Device -> Ptr () -> IO ()
- type SeatDeviceRemovedCallback = Device -> IO ()
- data SeatDeviceRemovedSignalInfo
- afterSeatDeviceRemoved :: (GObject a, MonadIO m) => a -> SeatDeviceRemovedCallback -> m SignalHandlerId
- genClosure_SeatDeviceRemoved :: SeatDeviceRemovedCallback -> IO Closure
- mk_SeatDeviceRemovedCallback :: C_SeatDeviceRemovedCallback -> IO (FunPtr C_SeatDeviceRemovedCallback)
- noSeatDeviceRemovedCallback :: Maybe SeatDeviceRemovedCallback
- onSeatDeviceRemoved :: (GObject a, MonadIO m) => a -> SeatDeviceRemovedCallback -> m SignalHandlerId
- wrap_SeatDeviceRemovedCallback :: SeatDeviceRemovedCallback -> Ptr () -> Ptr Device -> Ptr () -> IO ()
- type C_SeatToolAddedCallback = Ptr () -> Ptr DeviceTool -> Ptr () -> IO ()
- type SeatToolAddedCallback = DeviceTool -> IO ()
- data SeatToolAddedSignalInfo
- afterSeatToolAdded :: (GObject a, MonadIO m) => a -> SeatToolAddedCallback -> m SignalHandlerId
- genClosure_SeatToolAdded :: SeatToolAddedCallback -> IO Closure
- mk_SeatToolAddedCallback :: C_SeatToolAddedCallback -> IO (FunPtr C_SeatToolAddedCallback)
- noSeatToolAddedCallback :: Maybe SeatToolAddedCallback
- onSeatToolAdded :: (GObject a, MonadIO m) => a -> SeatToolAddedCallback -> m SignalHandlerId
- wrap_SeatToolAddedCallback :: SeatToolAddedCallback -> Ptr () -> Ptr DeviceTool -> Ptr () -> IO ()
- type C_SeatToolRemovedCallback = Ptr () -> Ptr DeviceTool -> Ptr () -> IO ()
- type SeatToolRemovedCallback = DeviceTool -> IO ()
- data SeatToolRemovedSignalInfo
- afterSeatToolRemoved :: (GObject a, MonadIO m) => a -> SeatToolRemovedCallback -> m SignalHandlerId
- genClosure_SeatToolRemoved :: SeatToolRemovedCallback -> IO Closure
- mk_SeatToolRemovedCallback :: C_SeatToolRemovedCallback -> IO (FunPtr C_SeatToolRemovedCallback)
- noSeatToolRemovedCallback :: Maybe SeatToolRemovedCallback
- onSeatToolRemoved :: (GObject a, MonadIO m) => a -> SeatToolRemovedCallback -> m SignalHandlerId
- wrap_SeatToolRemovedCallback :: SeatToolRemovedCallback -> Ptr () -> Ptr DeviceTool -> Ptr () -> IO ()
Exported types
GObject Seat Source # | |
IsObject Seat Source # | |
IsSeat Seat Source # | |
((~) * info (ResolveSeatMethod t Seat), MethodInfo * info Seat p) => IsLabel t (Seat -> p) Source # | |
((~) * info (ResolveSeatMethod t Seat), MethodInfo * info Seat p) => IsLabelProxy t (Seat -> p) Source # | |
HasAttributeList * Seat Source # | |
type AttributeList Seat Source # | |
type SignalList Seat Source # | |
Methods
getCapabilities
data SeatGetCapabilitiesMethodInfo Source #
((~) * signature (m [SeatCapabilities]), MonadIO m, IsSeat a) => MethodInfo * SeatGetCapabilitiesMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> m [SeatCapabilities] | Returns: the seat capabilities |
Returns the capabilities this Seat
currently has.
Since: 3.20
getDisplay
data SeatGetDisplayMethodInfo Source #
((~) * signature (m Display), MonadIO m, IsSeat a) => MethodInfo * SeatGetDisplayMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> m Display | Returns: a |
Returns the Display
this seat belongs to.
getKeyboard
data SeatGetKeyboardMethodInfo Source #
((~) * signature (m (Maybe Device)), MonadIO m, IsSeat a) => MethodInfo * SeatGetKeyboardMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> m (Maybe Device) | Returns: a master |
Returns the master device that routes keyboard events.
Since: 3.20
getPointer
data SeatGetPointerMethodInfo Source #
((~) * signature (m (Maybe Device)), MonadIO m, IsSeat a) => MethodInfo * SeatGetPointerMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> m (Maybe Device) | Returns: a master |
Returns the master device that routes pointer events.
Since: 3.20
getSlaves
data SeatGetSlavesMethodInfo Source #
((~) * signature ([SeatCapabilities] -> m [Device]), MonadIO m, IsSeat a) => MethodInfo * SeatGetSlavesMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> [SeatCapabilities] |
|
-> m [Device] | Returns: A list of |
Returns the slave devices that match the given capabilities.
Since: 3.20
grab
data SeatGrabMethodInfo Source #
((~) * 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 # | |
:: (HasCallStack, MonadIO m, IsSeat a, IsWindow b, IsCursor c) | |
=> a |
|
-> b |
|
-> [SeatCapabilities] |
|
-> Bool |
|
-> Maybe c |
|
-> Maybe Event |
|
-> Maybe SeatGrabPrepareFunc |
|
-> m GrabStatus | Returns: |
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 #
((~) * signature (m ()), MonadIO m, IsSeat a) => MethodInfo * SeatUngrabMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> m () |
Releases a grab added through seatGrab
.
Since: 3.20
Properties
display
data SeatDisplayPropertyInfo Source #
constructSeatDisplay :: (IsSeat o, IsDisplay a) => a -> IO (GValueConstruct o) Source #
seatDisplay :: AttrLabelProxy "display" Source #
Signals
deviceAdded
type SeatDeviceAddedCallback = Device -> IO () Source #
afterSeatDeviceAdded :: (GObject a, MonadIO m) => a -> SeatDeviceAddedCallback -> m SignalHandlerId Source #
mk_SeatDeviceAddedCallback :: C_SeatDeviceAddedCallback -> IO (FunPtr C_SeatDeviceAddedCallback) Source #
onSeatDeviceAdded :: (GObject a, MonadIO m) => a -> SeatDeviceAddedCallback -> m SignalHandlerId Source #
wrap_SeatDeviceAddedCallback :: SeatDeviceAddedCallback -> Ptr () -> Ptr Device -> Ptr () -> IO () Source #
deviceRemoved
type SeatDeviceRemovedCallback = Device -> IO () Source #
afterSeatDeviceRemoved :: (GObject a, MonadIO m) => a -> SeatDeviceRemovedCallback -> m SignalHandlerId Source #
mk_SeatDeviceRemovedCallback :: C_SeatDeviceRemovedCallback -> IO (FunPtr C_SeatDeviceRemovedCallback) Source #
onSeatDeviceRemoved :: (GObject a, MonadIO m) => a -> SeatDeviceRemovedCallback -> m SignalHandlerId Source #
wrap_SeatDeviceRemovedCallback :: SeatDeviceRemovedCallback -> Ptr () -> Ptr Device -> Ptr () -> IO () Source #
toolAdded
type C_SeatToolAddedCallback = Ptr () -> Ptr DeviceTool -> Ptr () -> IO () Source #
type SeatToolAddedCallback = DeviceTool -> IO () Source #
afterSeatToolAdded :: (GObject a, MonadIO m) => a -> SeatToolAddedCallback -> m SignalHandlerId Source #
onSeatToolAdded :: (GObject a, MonadIO m) => a -> SeatToolAddedCallback -> m SignalHandlerId Source #
wrap_SeatToolAddedCallback :: SeatToolAddedCallback -> Ptr () -> Ptr DeviceTool -> Ptr () -> IO () Source #
toolRemoved
type C_SeatToolRemovedCallback = Ptr () -> Ptr DeviceTool -> Ptr () -> IO () Source #
type SeatToolRemovedCallback = DeviceTool -> IO () Source #
afterSeatToolRemoved :: (GObject a, MonadIO m) => a -> SeatToolRemovedCallback -> m SignalHandlerId Source #
mk_SeatToolRemovedCallback :: C_SeatToolRemovedCallback -> IO (FunPtr C_SeatToolRemovedCallback) Source #
onSeatToolRemoved :: (GObject a, MonadIO m) => a -> SeatToolRemovedCallback -> m SignalHandlerId Source #
wrap_SeatToolRemovedCallback :: SeatToolRemovedCallback -> Ptr () -> Ptr DeviceTool -> Ptr () -> IO () Source #