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 |
- Exported types
- Methods
- Overloaded methods
- getAssociatedDevice
- getAxes
- getAxisNames
- getAxisUse
- getCapsLockState
- getDeviceTool
- getDeviceType
- getDirection
- getDisplay
- getHasCursor
- getKey
- getLastEventSurface
- getModifierState
- getNAxes
- getNKeys
- getName
- getNumLockState
- getNumTouches
- getProductId
- getScrollLockState
- getSeat
- getSource
- getSurfaceAtPosition
- getVendorId
- hasBidiLayouts
- listSlaveDevices
- setAxisUse
- setKey
- Properties
- Signals
Synopsis
- newtype Device = Device (ManagedPtr Device)
- class (GObject o, IsDescendantOf Device o) => IsDevice o
- toDevice :: (MonadIO m, IsDevice o) => o -> m Device
- deviceGetAssociatedDevice :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Maybe Device)
- deviceGetAxes :: (HasCallStack, MonadIO m, IsDevice a) => a -> m [AxisFlags]
- deviceGetAxisNames :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Maybe [Text])
- deviceGetAxisUse :: (HasCallStack, MonadIO m, IsDevice a) => a -> Word32 -> m AxisUse
- deviceGetCapsLockState :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool
- deviceGetDeviceTool :: (HasCallStack, MonadIO m, IsDevice a) => a -> m DeviceTool
- deviceGetDeviceType :: (HasCallStack, MonadIO m, IsDevice a) => a -> m DeviceType
- deviceGetDirection :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Direction
- deviceGetDisplay :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Display
- deviceGetHasCursor :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool
- deviceGetKey :: (HasCallStack, MonadIO m, IsDevice a) => a -> Word32 -> m (Bool, Word32, [ModifierType])
- deviceGetLastEventSurface :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Maybe Surface)
- deviceGetModifierState :: (HasCallStack, MonadIO m, IsDevice a) => a -> m [ModifierType]
- deviceGetNAxes :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Int32
- deviceGetNKeys :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Int32
- deviceGetName :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Text
- deviceGetNumLockState :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool
- deviceGetNumTouches :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Word32
- deviceGetProductId :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Maybe Text)
- deviceGetScrollLockState :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool
- deviceGetSeat :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Seat
- deviceGetSource :: (HasCallStack, MonadIO m, IsDevice a) => a -> m InputSource
- deviceGetSurfaceAtPosition :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Maybe Surface, Double, Double)
- deviceGetVendorId :: (HasCallStack, MonadIO m, IsDevice a) => a -> m (Maybe Text)
- deviceHasBidiLayouts :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool
- deviceListSlaveDevices :: (HasCallStack, MonadIO m, IsDevice a) => a -> m [Device]
- deviceSetAxisUse :: (HasCallStack, MonadIO m, IsDevice a) => a -> Word32 -> AxisUse -> m ()
- deviceSetKey :: (HasCallStack, MonadIO m, IsDevice a) => a -> Word32 -> Word32 -> [ModifierType] -> m ()
- getDeviceAssociatedDevice :: (MonadIO m, IsDevice o) => o -> m (Maybe Device)
- getDeviceAxes :: (MonadIO m, IsDevice o) => o -> m [AxisFlags]
- getDeviceCapsLockState :: (MonadIO m, IsDevice o) => o -> m Bool
- getDeviceDirection :: (MonadIO m, IsDevice o) => o -> m Direction
- constructDeviceDisplay :: (IsDevice o, MonadIO m, IsDisplay a) => a -> m (GValueConstruct o)
- getDeviceDisplay :: (MonadIO m, IsDevice o) => o -> m Display
- getDeviceHasBidiLayouts :: (MonadIO m, IsDevice o) => o -> m Bool
- constructDeviceHasCursor :: (IsDevice o, MonadIO m) => Bool -> m (GValueConstruct o)
- getDeviceHasCursor :: (MonadIO m, IsDevice o) => o -> m Bool
- getDeviceModifierState :: (MonadIO m, IsDevice o) => o -> m [ModifierType]
- getDeviceNAxes :: (MonadIO m, IsDevice o) => o -> m Word32
- constructDeviceName :: (IsDevice o, MonadIO m) => Text -> m (GValueConstruct o)
- getDeviceName :: (MonadIO m, IsDevice o) => o -> m Text
- getDeviceNumLockState :: (MonadIO m, IsDevice o) => o -> m Bool
- constructDeviceNumTouches :: (IsDevice o, MonadIO m) => Word32 -> m (GValueConstruct o)
- getDeviceNumTouches :: (MonadIO m, IsDevice o) => o -> m Word32
- constructDeviceProductId :: (IsDevice o, MonadIO m) => Text -> m (GValueConstruct o)
- getDeviceProductId :: (MonadIO m, IsDevice o) => o -> m (Maybe Text)
- getDeviceScrollLockState :: (MonadIO m, IsDevice o) => o -> m Bool
- clearDeviceSeat :: (MonadIO m, IsDevice o) => o -> m ()
- constructDeviceSeat :: (IsDevice o, MonadIO m, IsSeat a) => a -> m (GValueConstruct o)
- getDeviceSeat :: (MonadIO m, IsDevice o) => o -> m Seat
- setDeviceSeat :: (MonadIO m, IsDevice o, IsSeat a) => o -> a -> m ()
- constructDeviceSource :: (IsDevice o, MonadIO m) => InputSource -> m (GValueConstruct o)
- getDeviceSource :: (MonadIO m, IsDevice o) => o -> m InputSource
- getDeviceTool :: (MonadIO m, IsDevice o) => o -> m (Maybe DeviceTool)
- constructDeviceType :: (IsDevice o, MonadIO m) => DeviceType -> m (GValueConstruct o)
- getDeviceType :: (MonadIO m, IsDevice o) => o -> m DeviceType
- constructDeviceVendorId :: (IsDevice o, MonadIO m) => Text -> m (GValueConstruct o)
- getDeviceVendorId :: (MonadIO m, IsDevice o) => o -> m (Maybe Text)
- type C_DeviceChangedCallback = Ptr () -> Ptr () -> IO ()
- type DeviceChangedCallback = IO ()
- afterDeviceChanged :: (IsDevice a, MonadIO m) => a -> DeviceChangedCallback -> m SignalHandlerId
- genClosure_DeviceChanged :: MonadIO m => DeviceChangedCallback -> m (GClosure C_DeviceChangedCallback)
- mk_DeviceChangedCallback :: C_DeviceChangedCallback -> IO (FunPtr C_DeviceChangedCallback)
- noDeviceChangedCallback :: Maybe DeviceChangedCallback
- onDeviceChanged :: (IsDevice a, MonadIO m) => a -> DeviceChangedCallback -> m SignalHandlerId
- wrap_DeviceChangedCallback :: DeviceChangedCallback -> C_DeviceChangedCallback
- type C_DeviceToolChangedCallback = Ptr () -> Ptr DeviceTool -> Ptr () -> IO ()
- type DeviceToolChangedCallback = DeviceTool -> IO ()
- afterDeviceToolChanged :: (IsDevice a, MonadIO m) => a -> DeviceToolChangedCallback -> m SignalHandlerId
- genClosure_DeviceToolChanged :: MonadIO m => DeviceToolChangedCallback -> m (GClosure C_DeviceToolChangedCallback)
- mk_DeviceToolChangedCallback :: C_DeviceToolChangedCallback -> IO (FunPtr C_DeviceToolChangedCallback)
- noDeviceToolChangedCallback :: Maybe DeviceToolChangedCallback
- onDeviceToolChanged :: (IsDevice a, MonadIO m) => a -> DeviceToolChangedCallback -> m SignalHandlerId
- wrap_DeviceToolChangedCallback :: DeviceToolChangedCallback -> C_DeviceToolChangedCallback
Exported types
Memory-managed wrapper type.
Instances
Eq Device Source # | |
IsGValue Device Source # | Convert |
ManagedPtrNewtype Device Source # | |
Defined in GI.Gdk.Objects.Device toManagedPtr :: Device -> ManagedPtr Device # | |
TypedObject Device Source # | |
Defined in GI.Gdk.Objects.Device | |
GObject Device Source # | |
Defined in GI.Gdk.Objects.Device | |
HasParentTypes Device Source # | |
Defined in GI.Gdk.Objects.Device | |
type ParentTypes Device Source # | |
Defined in GI.Gdk.Objects.Device |
class (GObject o, IsDescendantOf Device o) => IsDevice o Source #
Instances
(GObject o, IsDescendantOf Device o) => IsDevice o Source # | |
Defined in GI.Gdk.Objects.Device |
Methods
Overloaded methods
getAssociatedDevice
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.
getAxes
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m [AxisFlags] |
Returns the axes currently available on the device.
getAxisNames
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m (Maybe [Text]) | Returns: A null-terminated string array,
free with |
Returns a null-terminated array of strings, containing the labels for
the axes that device
currently has.
If the device has no axes, Nothing
is returned.
getAxisUse
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> Word32 |
|
-> m AxisUse | Returns: a |
Returns the axis use for index_
.
getCapsLockState
deviceGetCapsLockState :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool Source #
No description available in the introspection data.
getDeviceTool
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m DeviceTool | Returns: the |
Retrieves the DeviceTool
associated to device
.
getDeviceType
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m DeviceType | Returns: the |
Returns the device type for device
.
getDirection
deviceGetDirection :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Direction Source #
No description available in the introspection data.
getDisplay
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Display | Returns: a |
Returns the Display
to which device
pertains.
getHasCursor
:: (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.
getKey
:: (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.
getLastEventSurface
deviceGetLastEventSurface Source #
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m (Maybe Surface) | Returns: the last surface the device |
Gets information about which surface 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 surfaces.
getModifierState
deviceGetModifierState :: (HasCallStack, MonadIO m, IsDevice a) => a -> m [ModifierType] Source #
No description available in the introspection data.
getNAxes
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Int32 | Returns: the number of axes. |
Returns the number of axes the device currently has.
getNKeys
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Int32 | Returns: the number of keys. |
Returns the number of keys the device currently has.
getName
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Text | Returns: a name |
Determines the name of the device.
getNumLockState
deviceGetNumLockState :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool Source #
No description available in the introspection data.
getNumTouches
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Word32 | Returns: the number of touch points |
Retrieves the number of touch points associated to device
.
getProductId
:: (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.
getScrollLockState
deviceGetScrollLockState :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool Source #
No description available in the introspection data.
getSeat
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m Seat | Returns: A |
Returns the Seat
the device belongs to.
getSource
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m InputSource | Returns: a |
Determines the type of the device.
getSurfaceAtPosition
deviceGetSurfaceAtPosition Source #
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> m (Maybe Surface, Double, Double) |
Obtains the surface underneath device
, returning the location of the device in winX
and winY
in
double precision. Returns Nothing
if the surface 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 gdk_seat_grab()
.
getVendorId
:: (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; }
hasBidiLayouts
deviceHasBidiLayouts :: (HasCallStack, MonadIO m, IsDevice a) => a -> m Bool Source #
No description available in the introspection data.
listSlaveDevices
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
:: (HasCallStack, MonadIO m, IsDevice a) | |
=> a |
|
-> Word32 |
|
-> AxisUse |
|
-> m () |
Specifies how an axis of a device is used.
setKey
:: (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.
Properties
associatedDevice
Associated pointer or keyboard with this device, if any. Devices of type GDK_DEVICE_TYPE_MASTER
always come in keyboard/pointer pairs. Other device types will have a Nothing
associated device.
getDeviceAssociatedDevice :: (MonadIO m, IsDevice o) => o -> m (Maybe Device) Source #
Get the value of the “associated-device
” property.
When overloading is enabled, this is equivalent to
get
device #associatedDevice
axes
The axes currently available for this device.
getDeviceAxes :: (MonadIO m, IsDevice o) => o -> m [AxisFlags] Source #
Get the value of the “axes
” property.
When overloading is enabled, this is equivalent to
get
device #axes
capsLockState
No description available in the introspection data.
getDeviceCapsLockState :: (MonadIO m, IsDevice o) => o -> m Bool Source #
Get the value of the “caps-lock-state
” property.
When overloading is enabled, this is equivalent to
get
device #capsLockState
direction
No description available in the introspection data.
getDeviceDirection :: (MonadIO m, IsDevice o) => o -> m Direction Source #
Get the value of the “direction
” property.
When overloading is enabled, this is equivalent to
get
device #direction
display
constructDeviceDisplay :: (IsDevice 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
.
getDeviceDisplay :: (MonadIO m, IsDevice o) => o -> m Display Source #
Get the value of the “display
” property.
When overloading is enabled, this is equivalent to
get
device #display
hasBidiLayouts
No description available in the introspection data.
getDeviceHasBidiLayouts :: (MonadIO m, IsDevice o) => o -> m Bool Source #
Get the value of the “has-bidi-layouts
” property.
When overloading is enabled, this is equivalent to
get
device #hasBidiLayouts
hasCursor
Whether the device is represented by a cursor on the screen. Devices of type
DeviceTypeMaster
will have True
here.
constructDeviceHasCursor :: (IsDevice o, MonadIO m) => Bool -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “has-cursor
” property. This is rarely needed directly, but it is used by new
.
getDeviceHasCursor :: (MonadIO m, IsDevice o) => o -> m Bool Source #
Get the value of the “has-cursor
” property.
When overloading is enabled, this is equivalent to
get
device #hasCursor
modifierState
No description available in the introspection data.
getDeviceModifierState :: (MonadIO m, IsDevice o) => o -> m [ModifierType] Source #
Get the value of the “modifier-state
” property.
When overloading is enabled, this is equivalent to
get
device #modifierState
nAxes
Number of axes in the device.
getDeviceNAxes :: (MonadIO m, IsDevice o) => o -> m Word32 Source #
Get the value of the “n-axes
” property.
When overloading is enabled, this is equivalent to
get
device #nAxes
name
The device name.
constructDeviceName :: (IsDevice o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “name
” property. This is rarely needed directly, but it is used by new
.
getDeviceName :: (MonadIO m, IsDevice o) => o -> m Text Source #
Get the value of the “name
” property.
When overloading is enabled, this is equivalent to
get
device #name
numLockState
No description available in the introspection data.
getDeviceNumLockState :: (MonadIO m, IsDevice o) => o -> m Bool Source #
Get the value of the “num-lock-state
” property.
When overloading is enabled, this is equivalent to
get
device #numLockState
numTouches
The maximal number of concurrent touches on a touch device. Will be 0 if the device is not a touch device or if the number of touches is unknown.
constructDeviceNumTouches :: (IsDevice o, MonadIO m) => Word32 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “num-touches
” property. This is rarely needed directly, but it is used by new
.
getDeviceNumTouches :: (MonadIO m, IsDevice o) => o -> m Word32 Source #
Get the value of the “num-touches
” property.
When overloading is enabled, this is equivalent to
get
device #numTouches
productId
Product ID of this device, see deviceGetProductId
.
constructDeviceProductId :: (IsDevice o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “product-id
” property. This is rarely needed directly, but it is used by new
.
getDeviceProductId :: (MonadIO m, IsDevice o) => o -> m (Maybe Text) Source #
Get the value of the “product-id
” property.
When overloading is enabled, this is equivalent to
get
device #productId
scrollLockState
No description available in the introspection data.
getDeviceScrollLockState :: (MonadIO m, IsDevice o) => o -> m Bool Source #
Get the value of the “scroll-lock-state
” property.
When overloading is enabled, this is equivalent to
get
device #scrollLockState
seat
Seat
of this device.
clearDeviceSeat :: (MonadIO m, IsDevice o) => o -> m () Source #
Set the value of the “seat
” property to Nothing
.
When overloading is enabled, this is equivalent to
clear
#seat
constructDeviceSeat :: (IsDevice o, MonadIO m, IsSeat a) => a -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “seat
” property. This is rarely needed directly, but it is used by new
.
getDeviceSeat :: (MonadIO m, IsDevice o) => o -> m Seat Source #
Get the value of the “seat
” property.
When overloading is enabled, this is equivalent to
get
device #seat
setDeviceSeat :: (MonadIO m, IsDevice o, IsSeat a) => o -> a -> m () Source #
Set the value of the “seat
” property.
When overloading is enabled, this is equivalent to
set
device [ #seat:=
value ]
source
Source type for the device.
constructDeviceSource :: (IsDevice o, MonadIO m) => InputSource -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “source
” property. This is rarely needed directly, but it is used by new
.
getDeviceSource :: (MonadIO m, IsDevice o) => o -> m InputSource Source #
Get the value of the “source
” property.
When overloading is enabled, this is equivalent to
get
device #source
tool
No description available in the introspection data.
getDeviceTool :: (MonadIO m, IsDevice o) => o -> m (Maybe DeviceTool) Source #
Get the value of the “tool
” property.
When overloading is enabled, this is equivalent to
get
device #tool
type
Device role in the device manager.
constructDeviceType :: (IsDevice o, MonadIO m) => DeviceType -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “type
” property. This is rarely needed directly, but it is used by new
.
getDeviceType :: (MonadIO m, IsDevice o) => o -> m DeviceType Source #
Get the value of the “type
” property.
When overloading is enabled, this is equivalent to
get
device #type
vendorId
Vendor ID of this device, see deviceGetVendorId
.
constructDeviceVendorId :: (IsDevice o, MonadIO m) => Text -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “vendor-id
” property. This is rarely needed directly, but it is used by new
.
getDeviceVendorId :: (MonadIO m, IsDevice o) => o -> m (Maybe Text) Source #
Get the value of the “vendor-id
” property.
When overloading is enabled, this is equivalent to
get
device #vendorId
Signals
changed
type C_DeviceChangedCallback = Ptr () -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DeviceChangedCallback = IO () Source #
The changed signal is emitted either when the Device
has changed the number of either axes or keys. For example
In X this will normally happen when the slave device routing
events through the master device changes (for example, user
switches from the USB mouse to a tablet), in that case the
master device will change to reflect the new slave device
axes and keys.
afterDeviceChanged :: (IsDevice a, MonadIO m) => a -> DeviceChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the changed signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
device #changed callback
genClosure_DeviceChanged :: MonadIO m => DeviceChangedCallback -> m (GClosure C_DeviceChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_DeviceChangedCallback :: C_DeviceChangedCallback -> IO (FunPtr C_DeviceChangedCallback) Source #
Generate a function pointer callable from C code, from a C_DeviceChangedCallback
.
noDeviceChangedCallback :: Maybe DeviceChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DeviceChangedCallback
onDeviceChanged :: (IsDevice a, MonadIO m) => a -> DeviceChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the changed signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
device #changed callback
wrap_DeviceChangedCallback :: DeviceChangedCallback -> C_DeviceChangedCallback Source #
Wrap a DeviceChangedCallback
into a C_DeviceChangedCallback
.
toolChanged
type C_DeviceToolChangedCallback = Ptr () -> Ptr DeviceTool -> Ptr () -> IO () Source #
Type for the callback on the (unwrapped) C side.
type DeviceToolChangedCallback Source #
= DeviceTool |
|
-> IO () |
The toolChanged signal is emitted on pen/eraser
GdkDevices
whenever tools enter or leave proximity.
afterDeviceToolChanged :: (IsDevice a, MonadIO m) => a -> DeviceToolChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the toolChanged signal, to be run after the default handler. When overloading is enabled, this is equivalent to
after
device #toolChanged callback
genClosure_DeviceToolChanged :: MonadIO m => DeviceToolChangedCallback -> m (GClosure C_DeviceToolChangedCallback) Source #
Wrap the callback into a GClosure
.
mk_DeviceToolChangedCallback :: C_DeviceToolChangedCallback -> IO (FunPtr C_DeviceToolChangedCallback) Source #
Generate a function pointer callable from C code, from a C_DeviceToolChangedCallback
.
noDeviceToolChangedCallback :: Maybe DeviceToolChangedCallback Source #
A convenience synonym for
.Nothing
:: Maybe
DeviceToolChangedCallback
onDeviceToolChanged :: (IsDevice a, MonadIO m) => a -> DeviceToolChangedCallback -> m SignalHandlerId Source #
Connect a signal handler for the toolChanged signal, to be run before the default handler. When overloading is enabled, this is equivalent to
on
device #toolChanged callback