Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
The Seat
object represents a collection of input devices
that belong to a user.
Synopsis
- newtype Seat = Seat (ManagedPtr Seat)
- class (GObject o, IsDescendantOf Seat o) => IsSeat o
- toSeat :: (MonadIO m, IsSeat o) => o -> m Seat
- seatGetCapabilities :: (HasCallStack, MonadIO m, IsSeat a) => a -> m [SeatCapabilities]
- seatGetDisplay :: (HasCallStack, MonadIO m, IsSeat a) => a -> m Display
- seatGetKeyboard :: (HasCallStack, MonadIO m, IsSeat a) => a -> m (Maybe Device)
- seatGetMasterPointers :: (HasCallStack, MonadIO m, IsSeat a) => a -> [SeatCapabilities] -> m [Device]
- seatGetPointer :: (HasCallStack, MonadIO m, IsSeat a) => a -> m (Maybe Device)
- seatGetSlaves :: (HasCallStack, MonadIO m, IsSeat a) => a -> [SeatCapabilities] -> m [Device]
- constructSeatDisplay :: (IsSeat o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o)
- getSeatDisplay :: (MonadIO m, IsSeat o) => o -> m Display
- type C_SeatDeviceAddedCallback = Ptr () -> Ptr Device -> Ptr () -> IO ()
- type SeatDeviceAddedCallback = Device -> IO ()
- afterSeatDeviceAdded :: (IsSeat a, MonadIO m) => a -> SeatDeviceAddedCallback -> m SignalHandlerId
- genClosure_SeatDeviceAdded :: MonadIO m => SeatDeviceAddedCallback -> m (GClosure C_SeatDeviceAddedCallback)
- mk_SeatDeviceAddedCallback :: C_SeatDeviceAddedCallback -> IO (FunPtr C_SeatDeviceAddedCallback)
- noSeatDeviceAddedCallback :: Maybe SeatDeviceAddedCallback
- onSeatDeviceAdded :: (IsSeat a, MonadIO m) => a -> SeatDeviceAddedCallback -> m SignalHandlerId
- wrap_SeatDeviceAddedCallback :: SeatDeviceAddedCallback -> C_SeatDeviceAddedCallback
- type C_SeatDeviceRemovedCallback = Ptr () -> Ptr Device -> Ptr () -> IO ()
- type SeatDeviceRemovedCallback = Device -> IO ()
- afterSeatDeviceRemoved :: (IsSeat a, MonadIO m) => a -> SeatDeviceRemovedCallback -> m SignalHandlerId
- genClosure_SeatDeviceRemoved :: MonadIO m => SeatDeviceRemovedCallback -> m (GClosure C_SeatDeviceRemovedCallback)
- mk_SeatDeviceRemovedCallback :: C_SeatDeviceRemovedCallback -> IO (FunPtr C_SeatDeviceRemovedCallback)
- noSeatDeviceRemovedCallback :: Maybe SeatDeviceRemovedCallback
- onSeatDeviceRemoved :: (IsSeat a, MonadIO m) => a -> SeatDeviceRemovedCallback -> m SignalHandlerId
- wrap_SeatDeviceRemovedCallback :: SeatDeviceRemovedCallback -> C_SeatDeviceRemovedCallback
- type C_SeatToolAddedCallback = Ptr () -> Ptr DeviceTool -> Ptr () -> IO ()
- type SeatToolAddedCallback = DeviceTool -> IO ()
- afterSeatToolAdded :: (IsSeat a, MonadIO m) => a -> SeatToolAddedCallback -> m SignalHandlerId
- genClosure_SeatToolAdded :: MonadIO m => SeatToolAddedCallback -> m (GClosure C_SeatToolAddedCallback)
- mk_SeatToolAddedCallback :: C_SeatToolAddedCallback -> IO (FunPtr C_SeatToolAddedCallback)
- noSeatToolAddedCallback :: Maybe SeatToolAddedCallback
- onSeatToolAdded :: (IsSeat a, MonadIO m) => a -> SeatToolAddedCallback -> m SignalHandlerId
- wrap_SeatToolAddedCallback :: SeatToolAddedCallback -> C_SeatToolAddedCallback
- type C_SeatToolRemovedCallback = Ptr () -> Ptr DeviceTool -> Ptr () -> IO ()
- type SeatToolRemovedCallback = DeviceTool -> IO ()
- afterSeatToolRemoved :: (IsSeat a, MonadIO m) => a -> SeatToolRemovedCallback -> m SignalHandlerId
- genClosure_SeatToolRemoved :: MonadIO m => SeatToolRemovedCallback -> m (GClosure C_SeatToolRemovedCallback)
- mk_SeatToolRemovedCallback :: C_SeatToolRemovedCallback -> IO (FunPtr C_SeatToolRemovedCallback)
- noSeatToolRemovedCallback :: Maybe SeatToolRemovedCallback
- onSeatToolRemoved :: (IsSeat a, MonadIO m) => a -> SeatToolRemovedCallback -> m SignalHandlerId
- wrap_SeatToolRemovedCallback :: SeatToolRemovedCallback -> C_SeatToolRemovedCallback
Exported types
Memory-managed wrapper type.
Instances
Eq Seat Source # | |
IsGValue Seat Source # | Convert |
ManagedPtrNewtype Seat Source # | |
Defined in GI.Gdk.Objects.Seat toManagedPtr :: Seat -> ManagedPtr Seat # | |
TypedObject Seat Source # | |
Defined in GI.Gdk.Objects.Seat | |
GObject Seat Source # | |
Defined in GI.Gdk.Objects.Seat | |
HasParentTypes Seat Source # | |
Defined in GI.Gdk.Objects.Seat | |
type ParentTypes Seat Source # | |
Defined in GI.Gdk.Objects.Seat |
class (GObject o, IsDescendantOf Seat o) => IsSeat o Source #
Instances
(GObject o, IsDescendantOf Seat o) => IsSeat o Source # | |
Defined in GI.Gdk.Objects.Seat |
Methods
Overloaded methods
getCapabilities
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> m [SeatCapabilities] | Returns: the seat capabilities |
Returns the capabilities this Seat
currently has.
getDisplay
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> m Display | Returns: a |
Returns the Display
this seat belongs to.
getKeyboard
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> m (Maybe Device) | Returns: a master |
Returns the master device that routes keyboard events.
getMasterPointers
seatGetMasterPointers Source #
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> [SeatCapabilities] |
|
-> m [Device] | Returns: A list of master pointing devices |
Returns all master pointers with the given capabilities driven by this seat
.
On most backends this function will return a list with a single element (meaning
that all input devices drive the same onscreen cursor).
In other backends where there can possibly be multiple foci (eg. wayland),
this function will return all master GdkDevices
that represent these.
getPointer
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> m (Maybe Device) | Returns: a master |
Returns the master device that routes pointer events.
getSlaves
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> [SeatCapabilities] |
|
-> m [Device] | Returns: A list of |
Returns the slave devices that match the given capabilities.
Properties
display
Display
of this seat.
constructSeatDisplay :: (IsSeat o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “display
” property. This is rarely needed directly, but it is used by new
.
getSeatDisplay :: (MonadIO m, IsSeat o) => o -> m Display Source #
Get the value of the “display
” property.
When overloading is enabled, this is equivalent to
get
seat #display
Signals
deviceAdded
type C_SeatDeviceAddedCallback = Ptr () -> Ptr Device -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type SeatDeviceAddedCallback Source #
The deviceAdded signal is emitted when a new input device is related to this seat.
afterSeatDeviceAdded :: (IsSeat a, MonadIO m) => a -> SeatDeviceAddedCallback -> m SignalHandlerId Source #
Connect a signal handler for the deviceAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
seat #deviceAdded callback
genClosure_SeatDeviceAdded :: MonadIO m => SeatDeviceAddedCallback -> m (GClosure C_SeatDeviceAddedCallback) Source #
Wrap the callback into a GClosure
.
mk_SeatDeviceAddedCallback :: C_SeatDeviceAddedCallback -> IO (FunPtr C_SeatDeviceAddedCallback) Source #
Generate a function pointer callable from C code, from a C_SeatDeviceAddedCallback
.
noSeatDeviceAddedCallback :: Maybe SeatDeviceAddedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
SeatDeviceAddedCallback
onSeatDeviceAdded :: (IsSeat a, MonadIO m) => a -> SeatDeviceAddedCallback -> m SignalHandlerId Source #
Connect a signal handler for the deviceAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
seat #deviceAdded callback
wrap_SeatDeviceAddedCallback :: SeatDeviceAddedCallback -> C_SeatDeviceAddedCallback Source #
Wrap a SeatDeviceAddedCallback
into a C_SeatDeviceAddedCallback
.
deviceRemoved
type C_SeatDeviceRemovedCallback = Ptr () -> Ptr Device -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type SeatDeviceRemovedCallback Source #
The deviceRemoved signal is emitted when an input device is removed (e.g. unplugged).
afterSeatDeviceRemoved :: (IsSeat a, MonadIO m) => a -> SeatDeviceRemovedCallback -> m SignalHandlerId Source #
Connect a signal handler for the deviceRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
seat #deviceRemoved callback
genClosure_SeatDeviceRemoved :: MonadIO m => SeatDeviceRemovedCallback -> m (GClosure C_SeatDeviceRemovedCallback) Source #
Wrap the callback into a GClosure
.
mk_SeatDeviceRemovedCallback :: C_SeatDeviceRemovedCallback -> IO (FunPtr C_SeatDeviceRemovedCallback) Source #
Generate a function pointer callable from C code, from a C_SeatDeviceRemovedCallback
.
noSeatDeviceRemovedCallback :: Maybe SeatDeviceRemovedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
SeatDeviceRemovedCallback
onSeatDeviceRemoved :: (IsSeat a, MonadIO m) => a -> SeatDeviceRemovedCallback -> m SignalHandlerId Source #
Connect a signal handler for the deviceRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
seat #deviceRemoved callback
wrap_SeatDeviceRemovedCallback :: SeatDeviceRemovedCallback -> C_SeatDeviceRemovedCallback Source #
Wrap a SeatDeviceRemovedCallback
into a C_SeatDeviceRemovedCallback
.
toolAdded
type C_SeatToolAddedCallback = Ptr () -> Ptr DeviceTool -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type SeatToolAddedCallback Source #
= DeviceTool |
|
-> IO () |
The toolAdded 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 toolChanged signal accordingly.
A same tool may be used by several devices.
afterSeatToolAdded :: (IsSeat a, MonadIO m) => a -> SeatToolAddedCallback -> m SignalHandlerId Source #
Connect a signal handler for the toolAdded signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
seat #toolAdded callback
genClosure_SeatToolAdded :: MonadIO m => SeatToolAddedCallback -> m (GClosure C_SeatToolAddedCallback) Source #
Wrap the callback into a GClosure
.
mk_SeatToolAddedCallback :: C_SeatToolAddedCallback -> IO (FunPtr C_SeatToolAddedCallback) Source #
Generate a function pointer callable from C code, from a C_SeatToolAddedCallback
.
noSeatToolAddedCallback :: Maybe SeatToolAddedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
SeatToolAddedCallback
onSeatToolAdded :: (IsSeat a, MonadIO m) => a -> SeatToolAddedCallback -> m SignalHandlerId Source #
Connect a signal handler for the toolAdded signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
seat #toolAdded callback
wrap_SeatToolAddedCallback :: SeatToolAddedCallback -> C_SeatToolAddedCallback Source #
Wrap a SeatToolAddedCallback
into a C_SeatToolAddedCallback
.
toolRemoved
type C_SeatToolRemovedCallback = Ptr () -> Ptr DeviceTool -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type SeatToolRemovedCallback Source #
= DeviceTool |
|
-> IO () |
This signal is emitted whenever a tool is no longer known
to this seat
.
afterSeatToolRemoved :: (IsSeat a, MonadIO m) => a -> SeatToolRemovedCallback -> m SignalHandlerId Source #
Connect a signal handler for the toolRemoved signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
seat #toolRemoved callback
genClosure_SeatToolRemoved :: MonadIO m => SeatToolRemovedCallback -> m (GClosure C_SeatToolRemovedCallback) Source #
Wrap the callback into a GClosure
.
mk_SeatToolRemovedCallback :: C_SeatToolRemovedCallback -> IO (FunPtr C_SeatToolRemovedCallback) Source #
Generate a function pointer callable from C code, from a C_SeatToolRemovedCallback
.
noSeatToolRemovedCallback :: Maybe SeatToolRemovedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
SeatToolRemovedCallback
onSeatToolRemoved :: (IsSeat a, MonadIO m) => a -> SeatToolRemovedCallback -> m SignalHandlerId Source #
Connect a signal handler for the toolRemoved signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
seat #toolRemoved callback