Copyright | Will Thompson and Iñaki García Etxebarria |
---|---|
License | LGPL-2.1 |
Maintainer | Iñaki García Etxebarria |
Safe Haskell | None |
Language | Haskell2010 |
A physical tool associated to a GdkDevice
.
Synopsis
- newtype DeviceTool = DeviceTool (ManagedPtr DeviceTool)
- class (GObject o, IsDescendantOf DeviceTool o) => IsDeviceTool o
- toDeviceTool :: (MonadIO m, IsDeviceTool o) => o -> m DeviceTool
- deviceToolGetAxes :: (HasCallStack, MonadIO m, IsDeviceTool a) => a -> m [AxisFlags]
- deviceToolGetHardwareId :: (HasCallStack, MonadIO m, IsDeviceTool a) => a -> m Word64
- deviceToolGetSerial :: (HasCallStack, MonadIO m, IsDeviceTool a) => a -> m Word64
- deviceToolGetToolType :: (HasCallStack, MonadIO m, IsDeviceTool a) => a -> m DeviceToolType
- constructDeviceToolAxes :: (IsDeviceTool o, MonadIO m) => [AxisFlags] -> m (GValueConstruct o)
- getDeviceToolAxes :: (MonadIO m, IsDeviceTool o) => o -> m [AxisFlags]
- constructDeviceToolHardwareId :: (IsDeviceTool o, MonadIO m) => Word64 -> m (GValueConstruct o)
- getDeviceToolHardwareId :: (MonadIO m, IsDeviceTool o) => o -> m Word64
- constructDeviceToolSerial :: (IsDeviceTool o, MonadIO m) => Word64 -> m (GValueConstruct o)
- getDeviceToolSerial :: (MonadIO m, IsDeviceTool o) => o -> m Word64
- constructDeviceToolToolType :: (IsDeviceTool o, MonadIO m) => DeviceToolType -> m (GValueConstruct o)
- getDeviceToolToolType :: (MonadIO m, IsDeviceTool o) => o -> m DeviceToolType
Exported types
newtype DeviceTool Source #
Memory-managed wrapper type.
Instances
Eq DeviceTool Source # | |
Defined in GI.Gdk.Objects.DeviceTool (==) :: DeviceTool -> DeviceTool -> Bool # (/=) :: DeviceTool -> DeviceTool -> Bool # | |
GObject DeviceTool Source # | |
Defined in GI.Gdk.Objects.DeviceTool | |
ManagedPtrNewtype DeviceTool Source # | |
Defined in GI.Gdk.Objects.DeviceTool | |
TypedObject DeviceTool Source # | |
Defined in GI.Gdk.Objects.DeviceTool | |
HasParentTypes DeviceTool Source # | |
Defined in GI.Gdk.Objects.DeviceTool | |
IsGValue (Maybe DeviceTool) Source # | Convert |
Defined in GI.Gdk.Objects.DeviceTool gvalueGType_ :: IO GType # gvalueSet_ :: Ptr GValue -> Maybe DeviceTool -> IO () # gvalueGet_ :: Ptr GValue -> IO (Maybe DeviceTool) # | |
type ParentTypes DeviceTool Source # | |
Defined in GI.Gdk.Objects.DeviceTool type ParentTypes DeviceTool = '[Object] |
class (GObject o, IsDescendantOf DeviceTool o) => IsDeviceTool o Source #
Type class for types which can be safely cast to DeviceTool
, for instance with toDeviceTool
.
Instances
(GObject o, IsDescendantOf DeviceTool o) => IsDeviceTool o Source # | |
Defined in GI.Gdk.Objects.DeviceTool |
toDeviceTool :: (MonadIO m, IsDeviceTool o) => o -> m DeviceTool Source #
Cast to DeviceTool
, for types for which this is known to be safe. For general casts, use castTo
.
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
getAxes, getData, getHardwareId, getProperty, getQdata, getSerial, getToolType.
Setters
getAxes
:: (HasCallStack, MonadIO m, IsDeviceTool a) | |
=> a |
|
-> m [AxisFlags] | Returns: the axes of |
Gets the axes of the tool.
getHardwareId
deviceToolGetHardwareId Source #
:: (HasCallStack, MonadIO m, IsDeviceTool a) | |
=> a |
|
-> m Word64 | Returns: The hardware identifier of this tool. |
Gets the hardware ID of this tool, or 0 if it's not known.
When non-zero, the identifier is unique for the given tool model,
meaning that two identical tools will share the same hardwareId
,
but will have different serial numbers (see
deviceToolGetSerial
).
This is a more concrete (and device specific) method to identify
a GdkDeviceTool
than deviceToolGetToolType
,
as a tablet may support multiple devices with the same
GdkDeviceToolType
, but different hardware identifiers.
getSerial
:: (HasCallStack, MonadIO m, IsDeviceTool a) | |
=> a |
|
-> m Word64 | Returns: The serial ID for this tool |
Gets the serial number of this tool.
This value can be used to identify a physical tool (eg. a tablet pen) across program executions.
getToolType
deviceToolGetToolType Source #
:: (HasCallStack, MonadIO m, IsDeviceTool a) | |
=> a |
|
-> m DeviceToolType | Returns: The physical type for this tool. This can be used to figure out what sort of pen is being used, such as an airbrush or a pencil. |
Gets the GdkDeviceToolType
of the tool.
Properties
axes
The axes of the tool.
constructDeviceToolAxes :: (IsDeviceTool o, MonadIO m) => [AxisFlags] -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “axes
” property. This is rarely needed directly, but it is used by new
.
getDeviceToolAxes :: (MonadIO m, IsDeviceTool o) => o -> m [AxisFlags] Source #
Get the value of the “axes
” property.
When overloading is enabled, this is equivalent to
get
deviceTool #axes
hardwareId
The hardware ID of the tool.
constructDeviceToolHardwareId :: (IsDeviceTool o, MonadIO m) => Word64 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “hardware-id
” property. This is rarely needed directly, but it is used by new
.
getDeviceToolHardwareId :: (MonadIO m, IsDeviceTool o) => o -> m Word64 Source #
Get the value of the “hardware-id
” property.
When overloading is enabled, this is equivalent to
get
deviceTool #hardwareId
serial
The serial number of the tool.
constructDeviceToolSerial :: (IsDeviceTool o, MonadIO m) => Word64 -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “serial
” property. This is rarely needed directly, but it is used by new
.
getDeviceToolSerial :: (MonadIO m, IsDeviceTool o) => o -> m Word64 Source #
Get the value of the “serial
” property.
When overloading is enabled, this is equivalent to
get
deviceTool #serial
toolType
The type of the tool.
constructDeviceToolToolType :: (IsDeviceTool o, MonadIO m) => DeviceToolType -> m (GValueConstruct o) Source #
Construct a GValueConstruct
with valid value for the “tool-type
” property. This is rarely needed directly, but it is used by new
.
getDeviceToolToolType :: (MonadIO m, IsDeviceTool o) => o -> m DeviceToolType Source #
Get the value of the “tool-type
” property.
When overloading is enabled, this is equivalent to
get
deviceTool #toolType