Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
The GdkSeat
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]
- seatGetDevices :: (HasCallStack, MonadIO m, IsSeat a) => a -> [SeatCapabilities] -> m [Device]
- seatGetDisplay :: (HasCallStack, MonadIO m, IsSeat a) => a -> m Display
- seatGetKeyboard :: (HasCallStack, MonadIO m, IsSeat a) => a -> m (Maybe Device)
- seatGetPointer :: (HasCallStack, MonadIO m, IsSeat a) => a -> m (Maybe Device)
- seatGetTools :: (HasCallStack, MonadIO m, IsSeat a) => a -> m [DeviceTool]
- constructSeatDisplay :: (IsSeat o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o)
- getSeatDisplay :: (MonadIO m, IsSeat o) => o -> m Display
- type SeatDeviceAddedCallback = Device -> IO ()
- afterSeatDeviceAdded :: (IsSeat a, MonadIO m) => a -> ((?self :: a) => SeatDeviceAddedCallback) -> m SignalHandlerId
- onSeatDeviceAdded :: (IsSeat a, MonadIO m) => a -> ((?self :: a) => SeatDeviceAddedCallback) -> m SignalHandlerId
- type SeatDeviceRemovedCallback = Device -> IO ()
- afterSeatDeviceRemoved :: (IsSeat a, MonadIO m) => a -> ((?self :: a) => SeatDeviceRemovedCallback) -> m SignalHandlerId
- onSeatDeviceRemoved :: (IsSeat a, MonadIO m) => a -> ((?self :: a) => SeatDeviceRemovedCallback) -> m SignalHandlerId
- type SeatToolAddedCallback = DeviceTool -> IO ()
- afterSeatToolAdded :: (IsSeat a, MonadIO m) => a -> ((?self :: a) => SeatToolAddedCallback) -> m SignalHandlerId
- onSeatToolAdded :: (IsSeat a, MonadIO m) => a -> ((?self :: a) => SeatToolAddedCallback) -> m SignalHandlerId
- type SeatToolRemovedCallback = DeviceTool -> IO ()
- afterSeatToolRemoved :: (IsSeat a, MonadIO m) => a -> ((?self :: a) => SeatToolRemovedCallback) -> m SignalHandlerId
- onSeatToolRemoved :: (IsSeat a, MonadIO m) => a -> ((?self :: a) => SeatToolRemovedCallback) -> m SignalHandlerId
Exported types
Memory-managed wrapper type.
Instances
Eq Seat Source # | |
GObject Seat Source # | |
Defined in GI.Gdk.Objects.Seat | |
ManagedPtrNewtype Seat Source # | |
Defined in GI.Gdk.Objects.Seat toManagedPtr :: Seat -> ManagedPtr Seat # | |
TypedObject Seat Source # | |
Defined in GI.Gdk.Objects.Seat | |
HasParentTypes Seat Source # | |
Defined in GI.Gdk.Objects.Seat | |
IsGValue (Maybe Seat) Source # | Convert |
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
Click to display all available methods, including inherited ones
Methods
bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, isFloating, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, unref, watchClosure.
Getters
getCapabilities, getData, getDevices, getDisplay, getKeyboard, getPointer, getProperty, getQdata, getTools.
Setters
getCapabilities
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> m [SeatCapabilities] | Returns: the seat capabilities |
Returns the capabilities this GdkSeat
currently has.
getDevices
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> [SeatCapabilities] |
|
-> m [Device] | Returns: A list
of |
Returns the devices that match the given capabilities.
getDisplay
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> m Display | Returns: a |
Returns the GdkDisplay
this seat belongs to.
getKeyboard
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> m (Maybe Device) | Returns: a |
Returns the device that routes keyboard events.
getPointer
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> m (Maybe Device) | Returns: a |
Returns the device that routes pointer events.
getTools
:: (HasCallStack, MonadIO m, IsSeat a) | |
=> a |
|
-> m [DeviceTool] | Returns:
A list of tools. Free with |
Returns all GdkDeviceTools
that are known to the application.
Properties
display
GdkDisplay
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 SeatDeviceAddedCallback Source #
Emitted when a new input device is related to this seat.
afterSeatDeviceAdded :: (IsSeat a, MonadIO m) => a -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onSeatDeviceAdded :: (IsSeat a, MonadIO m) => a -> ((?self :: 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
deviceRemoved
type SeatDeviceRemovedCallback Source #
Emitted when an input device is removed (e.g. unplugged).
afterSeatDeviceRemoved :: (IsSeat a, MonadIO m) => a -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onSeatDeviceRemoved :: (IsSeat a, MonadIO m) => a -> ((?self :: 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
toolAdded
type SeatToolAddedCallback Source #
= DeviceTool |
|
-> IO () |
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 Device::toolChanged signal accordingly.
A same tool may be used by several devices.
afterSeatToolAdded :: (IsSeat a, MonadIO m) => a -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onSeatToolAdded :: (IsSeat a, MonadIO m) => a -> ((?self :: 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
toolRemoved
type SeatToolRemovedCallback Source #
= DeviceTool |
|
-> IO () |
Emitted whenever a tool is no longer known to this seat
.
afterSeatToolRemoved :: (IsSeat a, MonadIO m) => a -> ((?self :: 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
By default the object invoking the signal is not passed to the callback.
If you need to access it, you can use the implit ?self
parameter.
Note that this requires activating the ImplicitParams
GHC extension.
onSeatToolRemoved :: (IsSeat a, MonadIO m) => a -> ((?self :: 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