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 |
- Exported types
- Methods
- getAssociatedDevice
- getAxes
- getAxisUse
- getDeviceType
- getDisplay
- getHasCursor
- getKey
- getLastEventWindow
- getMode
- getNAxes
- getNKeys
- getName
- getPosition
- getPositionDouble
- getProductId
- getSeat
- getSource
- getVendorId
- getWindowAtPosition
- getWindowAtPositionDouble
- grab
- grabInfoLibgtkOnly
- listAxes
- listSlaveDevices
- setAxisUse
- setKey
- setMode
- ungrab
- warp
- Properties
- Signals
The Device
object represents a single input device, such
as a keyboard, a mouse, a touchpad, etc.
See the DeviceManager
documentation for more information
about the various kinds of master and slave devices, and their
relationships.
- newtype Device = Device (ManagedPtr Device)
- class GObject o => IsDevice o
- toDevice :: IsDevice o => o -> IO Device
- noDevice :: Maybe Device
- data DeviceGetAssociatedDeviceMethodInfo
- deviceGetAssociatedDevice :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Maybe Device)
- data DeviceGetAxesMethodInfo
- deviceGetAxes :: (HasCallStack, MonadIO m, IsDevice a) => a -> m [AxisFlags]
- data DeviceGetAxisUseMethodInfo
- deviceGetAxisUse :: (HasCallStack, MonadIO m, IsDevice a) => a -> Word32 -> m AxisUse
- data DeviceGetDeviceTypeMethodInfo
- deviceGetDeviceType :: (HasCallStack, MonadIO m, IsDevice a) => a -> m DeviceType
- data DeviceGetDisplayMethodInfo
- deviceGetDisplay :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Display
- data DeviceGetHasCursorMethodInfo
- deviceGetHasCursor :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool
- data DeviceGetKeyMethodInfo
- deviceGetKey :: (HasCallStack, MonadIO m, IsDevice a) => a -> Word32 -> m (Bool, Word32, [ModifierType])
- data DeviceGetLastEventWindowMethodInfo
- deviceGetLastEventWindow :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Maybe Window)
- data DeviceGetModeMethodInfo
- deviceGetMode :: (HasCallStack, MonadIO m, IsDevice a) => a -> m InputMode
- data DeviceGetNAxesMethodInfo
- deviceGetNAxes :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Int32
- data DeviceGetNKeysMethodInfo
- deviceGetNKeys :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Int32
- data DeviceGetNameMethodInfo
- deviceGetName :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- data DeviceGetPositionMethodInfo
- deviceGetPosition :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Screen, Int32, Int32)
- data DeviceGetPositionDoubleMethodInfo
- deviceGetPositionDouble :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Screen, Double, Double)
- data DeviceGetProductIdMethodInfo
- deviceGetProductId :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Maybe Text)
- data DeviceGetSeatMethodInfo
- deviceGetSeat :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Seat
- data DeviceGetSourceMethodInfo
- deviceGetSource :: (HasCallStack, MonadIO m, IsDevice a) => a -> m InputSource
- data DeviceGetVendorIdMethodInfo
- deviceGetVendorId :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Maybe Text)
- data DeviceGetWindowAtPositionMethodInfo
- deviceGetWindowAtPosition :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Maybe Window, Int32, Int32)
- data DeviceGetWindowAtPositionDoubleMethodInfo
- deviceGetWindowAtPositionDouble :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Maybe Window, Double, Double)
- data DeviceGrabMethodInfo
- deviceGrab :: (HasCallStack, MonadIO m, IsDevice a, IsWindow b, IsCursor c) => a -> b -> GrabOwnership -> Bool -> [EventMask] -> Maybe c -> Word32 -> m GrabStatus
- deviceGrabInfoLibgtkOnly :: (HasCallStack, MonadIO m, IsDisplay a, IsDevice b) => a -> b -> m (Bool, Window, Bool)
- data DeviceListAxesMethodInfo
- deviceListAxes :: (HasCallStack, MonadIO m, IsDevice a) => a -> m [Atom]
- data DeviceListSlaveDevicesMethodInfo
- deviceListSlaveDevices :: (HasCallStack, MonadIO m, IsDevice a) => a -> m [Device]
- data DeviceSetAxisUseMethodInfo
- deviceSetAxisUse :: (HasCallStack, MonadIO m, IsDevice a) => a -> Word32 -> AxisUse -> m ()
- data DeviceSetKeyMethodInfo
- deviceSetKey :: (HasCallStack, MonadIO m, IsDevice a) => a -> Word32 -> Word32 -> [ModifierType] -> m ()
- data DeviceSetModeMethodInfo
- deviceSetMode :: (HasCallStack, MonadIO m, IsDevice a) => a -> InputMode -> m Bool
- data DeviceUngrabMethodInfo
- deviceUngrab :: (HasCallStack, MonadIO m, IsDevice a) => a -> Word32 -> m ()
- data DeviceWarpMethodInfo
- deviceWarp :: (HasCallStack, MonadIO m, IsDevice a, IsScreen b) => a -> b -> Int32 -> Int32 -> m ()
- data DeviceAssociatedDevicePropertyInfo
- deviceAssociatedDevice :: AttrLabelProxy "associatedDevice"
- getDeviceAssociatedDevice :: (MonadIO m, IsDevice o) => o -> m (Maybe Device)
- data DeviceAxesPropertyInfo
- deviceAxes :: AttrLabelProxy "axes"
- getDeviceAxes :: (MonadIO m, IsDevice o) => o -> m [AxisFlags]
- data DeviceDeviceManagerPropertyInfo
- constructDeviceDeviceManager :: (IsDevice o, IsDeviceManager a) => a -> IO (GValueConstruct o)
- deviceDeviceManager :: AttrLabelProxy "deviceManager"
- getDeviceDeviceManager :: (MonadIO m, IsDevice o) => o -> m (Maybe DeviceManager)
- data DeviceDisplayPropertyInfo
- constructDeviceDisplay :: (IsDevice o, IsDisplay a) => a -> IO (GValueConstruct o)
- deviceDisplay :: AttrLabelProxy "display"
- getDeviceDisplay :: (MonadIO m, IsDevice o) => o -> m Display
- data DeviceHasCursorPropertyInfo
- constructDeviceHasCursor :: IsDevice o => Bool -> IO (GValueConstruct o)
- deviceHasCursor :: AttrLabelProxy "hasCursor"
- getDeviceHasCursor :: (MonadIO m, IsDevice o) => o -> m Bool
- data DeviceInputModePropertyInfo
- constructDeviceInputMode :: IsDevice o => InputMode -> IO (GValueConstruct o)
- deviceInputMode :: AttrLabelProxy "inputMode"
- getDeviceInputMode :: (MonadIO m, IsDevice o) => o -> m InputMode
- setDeviceInputMode :: (MonadIO m, IsDevice o) => o -> InputMode -> m ()
- data DeviceInputSourcePropertyInfo
- constructDeviceInputSource :: IsDevice o => InputSource -> IO (GValueConstruct o)
- deviceInputSource :: AttrLabelProxy "inputSource"
- getDeviceInputSource :: (MonadIO m, IsDevice o) => o -> m InputSource
- data DeviceNAxesPropertyInfo
- deviceNAxes :: AttrLabelProxy "nAxes"
- getDeviceNAxes :: (MonadIO m, IsDevice o) => o -> m Word32
- data DeviceNamePropertyInfo
- constructDeviceName :: IsDevice o => Text -> IO (GValueConstruct o)
- deviceName :: AttrLabelProxy "name"
- getDeviceName :: (MonadIO m, IsDevice o) => o -> m Text
- data DeviceNumTouchesPropertyInfo
- constructDeviceNumTouches :: IsDevice o => Word32 -> IO (GValueConstruct o)
- deviceNumTouches :: AttrLabelProxy "numTouches"
- getDeviceNumTouches :: (MonadIO m, IsDevice o) => o -> m Word32
- data DeviceProductIdPropertyInfo
- constructDeviceProductId :: IsDevice o => Text -> IO (GValueConstruct o)
- deviceProductId :: AttrLabelProxy "productId"
- getDeviceProductId :: (MonadIO m, IsDevice o) => o -> m (Maybe Text)
- data DeviceSeatPropertyInfo
- clearDeviceSeat :: (MonadIO m, IsDevice o) => o -> m ()
- constructDeviceSeat :: (IsDevice o, IsSeat a) => a -> IO (GValueConstruct o)
- deviceSeat :: AttrLabelProxy "seat"
- getDeviceSeat :: (MonadIO m, IsDevice o) => o -> m Seat
- setDeviceSeat :: (MonadIO m, IsDevice o, IsSeat a) => o -> a -> m ()
- data DeviceToolPropertyInfo
- deviceTool :: AttrLabelProxy "tool"
- getDeviceTool :: (MonadIO m, IsDevice o) => o -> m (Maybe DeviceTool)
- data DeviceTypePropertyInfo
- constructDeviceType :: IsDevice o => DeviceType -> IO (GValueConstruct o)
- deviceType :: AttrLabelProxy "type"
- getDeviceType :: (MonadIO m, IsDevice o) => o -> m DeviceType
- data DeviceVendorIdPropertyInfo
- constructDeviceVendorId :: IsDevice o => Text -> IO (GValueConstruct o)
- deviceVendorId :: AttrLabelProxy "vendorId"
- getDeviceVendorId :: (MonadIO m, IsDevice o) => o -> m (Maybe Text)
- type C_DeviceChangedCallback = Ptr () -> Ptr () -> IO ()
- type DeviceChangedCallback = IO ()
- data DeviceChangedSignalInfo
- afterDeviceChanged :: (GObject a, MonadIO m) => a -> DeviceChangedCallback -> m SignalHandlerId
- genClosure_DeviceChanged :: DeviceChangedCallback -> IO Closure
- mk_DeviceChangedCallback :: C_DeviceChangedCallback -> IO (FunPtr C_DeviceChangedCallback)
- noDeviceChangedCallback :: Maybe DeviceChangedCallback
- onDeviceChanged :: (GObject a, MonadIO m) => a -> DeviceChangedCallback -> m SignalHandlerId
- wrap_DeviceChangedCallback :: DeviceChangedCallback -> Ptr () -> Ptr () -> IO ()
- type C_DeviceToolChangedCallback = Ptr () -> Ptr DeviceTool -> Ptr () -> IO ()
- type DeviceToolChangedCallback = DeviceTool -> IO ()
- data DeviceToolChangedSignalInfo
- afterDeviceToolChanged :: (GObject a, MonadIO m) => a -> DeviceToolChangedCallback -> m SignalHandlerId
- genClosure_DeviceToolChanged :: DeviceToolChangedCallback -> IO Closure
- mk_DeviceToolChangedCallback :: C_DeviceToolChangedCallback -> IO (FunPtr C_DeviceToolChangedCallback)
- noDeviceToolChangedCallback :: Maybe DeviceToolChangedCallback
- onDeviceToolChanged :: (GObject a, MonadIO m) => a -> DeviceToolChangedCallback -> m SignalHandlerId
- wrap_DeviceToolChangedCallback :: DeviceToolChangedCallback -> Ptr () -> Ptr DeviceTool -> Ptr () -> IO ()
Exported types
GObject Device Source # | |
IsObject Device Source # | |
IsDevice Device Source # | |
((~) * info (ResolveDeviceMethod t Device), MethodInfo * info Device p) => IsLabel t (Device -> p) Source # | |
((~) * info (ResolveDeviceMethod t Device), MethodInfo * info Device p) => IsLabelProxy t (Device -> p) Source # | |
HasAttributeList * Device Source # | |
type AttributeList Device Source # | |
type SignalList Device Source # | |
Methods
getAssociatedDevice
data DeviceGetAssociatedDeviceMethodInfo Source #
((~) * signature (m (Maybe Device)), MonadIO m, IsDevice a) => MethodInfo * DeviceGetAssociatedDeviceMethodInfo a signature Source # | |
deviceGetAssociatedDevice Source #
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m (Maybe Device) | Returns: The associated device, or
|
Returns the associated device to device
, if device
is of type
DeviceTypeMaster
, it will return the paired pointer or
keyboard.
If device
is of type DeviceTypeSlave
, it will return
the master device to which device
is attached to.
If device
is of type DeviceTypeFloating
, Nothing
will be
returned, as there is no associated device.
Since: 3.0
getAxes
data DeviceGetAxesMethodInfo Source #
((~) * signature (m [AxisFlags]), MonadIO m, IsDevice a) => MethodInfo * DeviceGetAxesMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m [AxisFlags] |
Returns the axes currently available on the device.
Since: 3.22
getAxisUse
data DeviceGetAxisUseMethodInfo Source #
((~) * signature (Word32 -> m AxisUse), MonadIO m, IsDevice a) => MethodInfo * DeviceGetAxisUseMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> Word32 |
|
-> m AxisUse | Returns: a |
Returns the axis use for index_
.
Since: 2.20
getDeviceType
data DeviceGetDeviceTypeMethodInfo Source #
((~) * signature (m DeviceType), MonadIO m, IsDevice a) => MethodInfo * DeviceGetDeviceTypeMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m DeviceType | Returns: the |
Returns the device type for device
.
Since: 3.0
getDisplay
data DeviceGetDisplayMethodInfo Source #
((~) * signature (m Display), MonadIO m, IsDevice a) => MethodInfo * DeviceGetDisplayMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Display | Returns: a |
Returns the Display
to which device
pertains.
Since: 3.0
getHasCursor
data DeviceGetHasCursorMethodInfo Source #
((~) * signature (m Bool), MonadIO m, IsDevice a) => MethodInfo * DeviceGetHasCursorMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Bool | Returns: |
Determines whether the pointer follows device motion. This is not meaningful for keyboard devices, which don't have a pointer.
Since: 2.20
getKey
data DeviceGetKeyMethodInfo Source #
((~) * signature (Word32 -> m (Bool, Word32, [ModifierType])), MonadIO m, IsDevice a) => MethodInfo * DeviceGetKeyMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> Word32 |
|
-> m (Bool, Word32, [ModifierType]) | Returns: |
If index_
has a valid keyval, this function will return True
and fill in keyval
and modifiers
with the keyval settings.
Since: 2.20
getLastEventWindow
data DeviceGetLastEventWindowMethodInfo Source #
((~) * signature (m (Maybe Window)), MonadIO m, IsDevice a) => MethodInfo * DeviceGetLastEventWindowMethodInfo a signature Source # | |
deviceGetLastEventWindow Source #
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m (Maybe Window) | Returns: the last window the device |
Gets information about which window the given pointer device is in, based on events
that have been received so far from the display server. If another application
has a pointer grab, or this application has a grab with owner_events = False
,
Nothing
may be returned even if the pointer is physically over one of this
application's windows.
Since: 3.12
getMode
data DeviceGetModeMethodInfo Source #
((~) * signature (m InputMode), MonadIO m, IsDevice a) => MethodInfo * DeviceGetModeMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m InputMode | Returns: a |
Determines the mode of the device.
Since: 2.20
getNAxes
data DeviceGetNAxesMethodInfo Source #
((~) * signature (m Int32), MonadIO m, IsDevice a) => MethodInfo * DeviceGetNAxesMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Int32 | Returns: the number of axes. |
Returns the number of axes the device currently has.
Since: 3.0
getNKeys
data DeviceGetNKeysMethodInfo Source #
((~) * signature (m Int32), MonadIO m, IsDevice a) => MethodInfo * DeviceGetNKeysMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Int32 | Returns: the number of keys. |
Returns the number of keys the device currently has.
Since: 2.24
getName
data DeviceGetNameMethodInfo Source #
((~) * signature (m Text), MonadIO m, IsDevice a) => MethodInfo * DeviceGetNameMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Text | Returns: a name |
Determines the name of the device.
Since: 2.20
getPosition
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m (Screen, Int32, Int32) |
Gets the current location of device
. As a slave device
coordinates are those of its master pointer, This function
may not be called on devices of type DeviceTypeSlave
,
unless there is an ongoing grab on them, see deviceGrab
.
Since: 3.0
getPositionDouble
deviceGetPositionDouble Source #
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m (Screen, Double, Double) |
Gets the current location of device
in double precision. As a slave device's
coordinates are those of its master pointer, this function
may not be called on devices of type DeviceTypeSlave
,
unless there is an ongoing grab on them. See deviceGrab
.
Since: 3.10
getProductId
data DeviceGetProductIdMethodInfo Source #
((~) * signature (m (Maybe Text)), MonadIO m, IsDevice a) => MethodInfo * DeviceGetProductIdMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m (Maybe Text) | Returns: the product ID, or |
Returns the product ID of this device, or Nothing
if this information couldn't
be obtained. This ID is retrieved from the device, and is thus constant for
it. See deviceGetVendorId
for more information.
Since: 3.16
getSeat
data DeviceGetSeatMethodInfo Source #
((~) * signature (m Seat), MonadIO m, IsDevice a) => MethodInfo * DeviceGetSeatMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Seat | Returns: A |
Returns the Seat
the device belongs to.
Since: 3.20
getSource
data DeviceGetSourceMethodInfo Source #
((~) * signature (m InputSource), MonadIO m, IsDevice a) => MethodInfo * DeviceGetSourceMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m InputSource | Returns: a |
Determines the type of the device.
Since: 2.20
getVendorId
data DeviceGetVendorIdMethodInfo Source #
((~) * signature (m (Maybe Text)), MonadIO m, IsDevice a) => MethodInfo * DeviceGetVendorIdMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m (Maybe Text) | Returns: the vendor ID, or |
Returns the vendor ID of this device, or Nothing
if this information couldn't
be obtained. This ID is retrieved from the device, and is thus constant for
it.
This function, together with deviceGetProductId
, can be used to eg.
compose Settings
paths to store settings for this device.
C code
static GSettings * get_device_settings (GdkDevice *device) { const gchar *vendor, *product; GSettings *settings; GdkDevice *device; gchar *path; vendor = gdk_device_get_vendor_id (device); product = gdk_device_get_product_id (device); path = g_strdup_printf ("/org/example/app/devices/%s:%s/", vendor, product); settings = g_settings_new_with_path (DEVICE_SCHEMA, path); g_free (path); return settings; }
Since: 3.16
getWindowAtPosition
deviceGetWindowAtPosition Source #
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m (Maybe Window, Int32, Int32) |
Obtains the window underneath device
, returning the location of the device in winX
and winY
. Returns
Nothing
if the window tree under device
is not known to GDK (for example, belongs to another application).
As a slave device coordinates are those of its master pointer, This
function may not be called on devices of type DeviceTypeSlave
,
unless there is an ongoing grab on them, see deviceGrab
.
Since: 3.0
getWindowAtPositionDouble
deviceGetWindowAtPositionDouble Source #
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m (Maybe Window, Double, Double) |
Obtains the window underneath device
, returning the location of the device in winX
and winY
in
double precision. Returns Nothing
if the window tree under device
is not known to GDK (for example,
belongs to another application).
As a slave device coordinates are those of its master pointer, This
function may not be called on devices of type DeviceTypeSlave
,
unless there is an ongoing grab on them, see deviceGrab
.
Since: 3.0
grab
data DeviceGrabMethodInfo Source #
((~) * signature (b -> GrabOwnership -> Bool -> [EventMask] -> Maybe c -> Word32 -> m GrabStatus), MonadIO m, IsDevice a, IsWindow b, IsCursor c) => MethodInfo * DeviceGrabMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a, IsWindow b, IsCursor c) | |
=> a |
|
-> b |
|
-> GrabOwnership |
|
-> Bool |
|
-> [EventMask] |
|
-> Maybe c |
|
-> Word32 |
|
-> m GrabStatus | Returns: |
Deprecated: (Since version 3.20.)Use seatGrab
instead.
Grabs the device so that all events coming from this device are passed to
this application until the device is ungrabbed with deviceUngrab
,
or the window becomes unviewable. This overrides any previous grab on the device
by this client.
Note that device
and window
need to be on the same display.
Device grabs are used for operations which need complete control over the given device events (either pointer or keyboard). For example in GTK+ this is used for Drag and Drop operations, popup menus and such.
Note that if the event mask of an X window has selected both button press
and button release events, then a button press event will cause an automatic
pointer grab until the button is released. X does this automatically since
most applications expect to receive button press and release events in pairs.
It is equivalent to a pointer grab on the window with ownerEvents
set to
True
.
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.0
grabInfoLibgtkOnly
deviceGrabInfoLibgtkOnly Source #
:: (HasCallStack, MonadIO m, IsDisplay a, IsDevice b) | |
=> a |
|
-> b |
|
-> m (Bool, Window, Bool) | Returns: |
Deprecated: (Since version 3.16)The symbol was never meant to be used outside of GTK+
Determines information about the current keyboard grab. This is not public API and must not be used by applications.
listAxes
data DeviceListAxesMethodInfo Source #
((~) * signature (m [Atom]), MonadIO m, IsDevice a) => MethodInfo * DeviceListAxesMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m [Atom] | Returns:
A |
Returns a List
of GdkAtoms
, containing the labels for
the axes that device
currently has.
Since: 3.0
listSlaveDevices
data DeviceListSlaveDevicesMethodInfo Source #
((~) * signature (m [Device]), MonadIO m, IsDevice a) => MethodInfo * DeviceListSlaveDevicesMethodInfo a signature Source # | |
deviceListSlaveDevices Source #
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m [Device] | Returns:
the list of slave devices, or |
If the device if of type DeviceTypeMaster
, it will return
the list of slave devices attached to it, otherwise it will return
Nothing
setAxisUse
data DeviceSetAxisUseMethodInfo Source #
((~) * signature (Word32 -> AxisUse -> m ()), MonadIO m, IsDevice a) => MethodInfo * DeviceSetAxisUseMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> Word32 |
|
-> AxisUse |
|
-> m () |
Specifies how an axis of a device is used.
setKey
data DeviceSetKeyMethodInfo Source #
((~) * signature (Word32 -> Word32 -> [ModifierType] -> m ()), MonadIO m, IsDevice a) => MethodInfo * DeviceSetKeyMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> Word32 |
|
-> Word32 |
|
-> [ModifierType] |
|
-> m () |
Specifies the X key event to generate when a macro button of a device is pressed.
setMode
data DeviceSetModeMethodInfo Source #
((~) * signature (InputMode -> m Bool), MonadIO m, IsDevice a) => MethodInfo * DeviceSetModeMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> InputMode |
|
-> m Bool | Returns: |
Sets a the mode of an input device. The mode controls if the device is active and whether the device’s range is mapped to the entire screen or to a single window.
Note: This is only meaningful for floating devices, master devices (and slaves connected to these) drive the pointer cursor, which is not limited by the input mode.
ungrab
data DeviceUngrabMethodInfo Source #
((~) * signature (Word32 -> m ()), MonadIO m, IsDevice a) => MethodInfo * DeviceUngrabMethodInfo a signature Source # | |
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> Word32 |
|
-> m () |
warp
data DeviceWarpMethodInfo Source #
:: (HasCallStack, MonadIO m, IsDevice a, IsScreen b) | |
=> a |
|
-> b |
|
-> Int32 |
|
-> Int32 |
|
-> m () |
Warps device
in display
to the point x
,y
on
the screen screen
, unless the device is confined
to a window by a grab, in which case it will be moved
as far as allowed by the grab. Warping the pointer
creates events as if the user had moved the mouse
instantaneously to the destination.
Note that the pointer should normally be under the
control of the user. This function was added to cover
some rare use cases like keyboard navigation support
for the color picker in the GtkColorSelectionDialog
.
Since: 3.0
Properties
associatedDevice
data DeviceAssociatedDevicePropertyInfo Source #
deviceAssociatedDevice :: AttrLabelProxy "associatedDevice" Source #
axes
data DeviceAxesPropertyInfo Source #
deviceAxes :: AttrLabelProxy "axes" Source #
deviceManager
data DeviceDeviceManagerPropertyInfo Source #
constructDeviceDeviceManager :: (IsDevice o, IsDeviceManager a) => a -> IO (GValueConstruct o) Source #
deviceDeviceManager :: AttrLabelProxy "deviceManager" Source #
getDeviceDeviceManager :: (MonadIO m, IsDevice o) => o -> m (Maybe DeviceManager) Source #
display
data DeviceDisplayPropertyInfo Source #
constructDeviceDisplay :: (IsDevice o, IsDisplay a) => a -> IO (GValueConstruct o) Source #
deviceDisplay :: AttrLabelProxy "display" Source #
hasCursor
data DeviceHasCursorPropertyInfo Source #
constructDeviceHasCursor :: IsDevice o => Bool -> IO (GValueConstruct o) Source #
deviceHasCursor :: AttrLabelProxy "hasCursor" Source #
inputMode
data DeviceInputModePropertyInfo Source #
constructDeviceInputMode :: IsDevice o => InputMode -> IO (GValueConstruct o) Source #
deviceInputMode :: AttrLabelProxy "inputMode" Source #
inputSource
data DeviceInputSourcePropertyInfo Source #
constructDeviceInputSource :: IsDevice o => InputSource -> IO (GValueConstruct o) Source #
deviceInputSource :: AttrLabelProxy "inputSource" Source #
getDeviceInputSource :: (MonadIO m, IsDevice o) => o -> m InputSource Source #
nAxes
data DeviceNAxesPropertyInfo Source #
deviceNAxes :: AttrLabelProxy "nAxes" Source #
name
data DeviceNamePropertyInfo Source #
constructDeviceName :: IsDevice o => Text -> IO (GValueConstruct o) Source #
deviceName :: AttrLabelProxy "name" Source #
numTouches
data DeviceNumTouchesPropertyInfo Source #
constructDeviceNumTouches :: IsDevice o => Word32 -> IO (GValueConstruct o) Source #
deviceNumTouches :: AttrLabelProxy "numTouches" Source #
productId
data DeviceProductIdPropertyInfo Source #
constructDeviceProductId :: IsDevice o => Text -> IO (GValueConstruct o) Source #
deviceProductId :: AttrLabelProxy "productId" Source #
seat
data DeviceSeatPropertyInfo Source #
clearDeviceSeat :: (MonadIO m, IsDevice o) => o -> m () Source #
constructDeviceSeat :: (IsDevice o, IsSeat a) => a -> IO (GValueConstruct o) Source #
deviceSeat :: AttrLabelProxy "seat" Source #
tool
data DeviceToolPropertyInfo Source #
deviceTool :: AttrLabelProxy "tool" Source #
getDeviceTool :: (MonadIO m, IsDevice o) => o -> m (Maybe DeviceTool) Source #
type
data DeviceTypePropertyInfo Source #
constructDeviceType :: IsDevice o => DeviceType -> IO (GValueConstruct o) Source #
deviceType :: AttrLabelProxy "type" Source #
getDeviceType :: (MonadIO m, IsDevice o) => o -> m DeviceType Source #
vendorId
data DeviceVendorIdPropertyInfo Source #
constructDeviceVendorId :: IsDevice o => Text -> IO (GValueConstruct o) Source #
deviceVendorId :: AttrLabelProxy "vendorId" Source #
Signals
changed
type DeviceChangedCallback = IO () Source #
afterDeviceChanged :: (GObject a, MonadIO m) => a -> DeviceChangedCallback -> m SignalHandlerId Source #
onDeviceChanged :: (GObject a, MonadIO m) => a -> DeviceChangedCallback -> m SignalHandlerId Source #
wrap_DeviceChangedCallback :: DeviceChangedCallback -> Ptr () -> Ptr () -> IO () Source #
toolChanged
type C_DeviceToolChangedCallback = Ptr () -> Ptr DeviceTool -> Ptr () -> IO () Source #
type DeviceToolChangedCallback = DeviceTool -> IO () Source #
afterDeviceToolChanged :: (GObject a, MonadIO m) => a -> DeviceToolChangedCallback -> m SignalHandlerId Source #
mk_DeviceToolChangedCallback :: C_DeviceToolChangedCallback -> IO (FunPtr C_DeviceToolChangedCallback) Source #
onDeviceToolChanged :: (GObject a, MonadIO m) => a -> DeviceToolChangedCallback -> m SignalHandlerId Source #
wrap_DeviceToolChangedCallback :: DeviceToolChangedCallback -> Ptr () -> Ptr DeviceTool -> Ptr () -> IO () Source #