gi-gdk3-3.0.30: Gdk 3.x bindings

Copyright | Will Thompson and Iñaki García Etxebarria
License | LGPL-2.1
Maintainer | Iñaki García Etxebarria
Safe Haskell | None
Language | Haskell2010

GI.Gdk.Interfaces.DevicePad

Contents

- Exported types
- Methods
  - getFeatureGroup
  - getGroupNModes
  - getNFeatures
  - getNGroups

Description

`DevicePad` is an interface implemented by devices of type `InputSourceTabletPad`, it allows querying the features provided by the pad device.

Tablet pads may contain one or more groups, each containing a subset of the buttons/rings/strips available. `devicePadGetNGroups` can be used to obtain the number of groups, `devicePadGetNFeatures` and `devicePadGetFeatureGroup` can be combined to find out the number of buttons/rings/strips the device has, and how are they grouped.

Each of those groups have different modes, which may be used to map each individual pad feature to multiple actions. Only one mode is effective (current) for each given group, different groups may have different current modes. The number of available modes in a group can be found out through `devicePadGetGroupNModes`, and the current mode for a given group will be notified through the `EventPadGroupMode` event.

Synopsis

- newtype DevicePad = DevicePad (ManagedPtr DevicePad)
- class (GObject o, IsDescendantOf DevicePad o) => IsDevicePad o
- toDevicePad :: (MonadIO m, IsDevicePad o) => o -> m DevicePad
- devicePadGetFeatureGroup :: (HasCallStack, MonadIO m, IsDevicePad a) => a -> DevicePadFeature -> Int32 -> m Int32
- devicePadGetGroupNModes :: (HasCallStack, MonadIO m, IsDevicePad a) => a -> Int32 -> m Int32
- devicePadGetNFeatures :: (HasCallStack, MonadIO m, IsDevicePad a) => a -> DevicePadFeature -> m Int32
- devicePadGetNGroups :: (HasCallStack, MonadIO m, IsDevicePad a) => a -> m Int32

# Exported types

newtype DevicePad Source #

Memory-managed wrapper type.

Constructors

DevicePad (ManagedPtr DevicePad) |

#### Instances

Instances details

Eq DevicePad Source # |
Instance details Defined in GI.Gdk.Interfaces.DevicePad Methods (==) :: DevicePad -> DevicePad -> Bool Source # (/=) :: DevicePad -> DevicePad -> Bool Source #
GObject DevicePad Source # |
Instance details Defined in GI.Gdk.Interfaces.DevicePad
ManagedPtrNewtype DevicePad Source # |
Instance details Defined in GI.Gdk.Interfaces.DevicePad Methods toManagedPtr :: DevicePad -> ManagedPtr DevicePad Source #
TypedObject DevicePad Source # |
Instance details Defined in GI.Gdk.Interfaces.DevicePad Methods glibType :: IO GType Source #
HasParentTypes DevicePad Source # |
Instance details Defined in GI.Gdk.Interfaces.DevicePad
IsGValue (Maybe DevicePad) Source # | Convert `DevicePad` to and from `GValue`. See `toGValue` and `fromGValue`.
Instance details Defined in GI.Gdk.Interfaces.DevicePad Methods gvalueGType_ :: IO GType Source # gvalueSet_ :: Ptr GValue -> Maybe DevicePad -> IO () Source # gvalueGet_ :: Ptr GValue -> IO (Maybe DevicePad) Source #
type ParentTypes DevicePad Source # |
Instance details Defined in GI.Gdk.Interfaces.DevicePad type ParentTypes DevicePad = '[Device, Object]

class (GObject o, IsDescendantOf DevicePad o) => IsDevicePad o Source #

Type class for types which can be safely cast to `DevicePad`, for instance with `toDevicePad`.

#### Instances

Instances details

(GObject o, IsDescendantOf DevicePad o) => IsDevicePad o Source # |
Instance details Defined in GI.Gdk.Interfaces.DevicePad

toDevicePad :: (MonadIO m, IsDevicePad o) => o -> m DevicePad Source #

Cast to `DevicePad`, 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

Expand

#### Methods

bindProperty, bindPropertyFull, forceFloating, freezeNotify, getv, grab, isFloating, listAxes, listSlaveDevices, notify, notifyByPspec, ref, refSink, runDispose, stealData, stealQdata, thawNotify, ungrab, unref, warp, watchClosure.

#### Getters

getAssociatedDevice, getAxes, getAxisUse, getData, getDeviceType, getDisplay, getFeatureGroup, getGroupNModes, getHasCursor, getKey, getLastEventWindow, getMode, getNAxes, getNFeatures, getNGroups, getNKeys, getName, getPosition, getPositionDouble, getProductId, getProperty, getQdata, getSeat, getSource, getVendorId, getWindowAtPosition, getWindowAtPositionDouble.

#### Setters

setAxisUse, setData, setDataFull, setKey, setMode, setProperty.

## getFeatureGroup

devicePadGetFeatureGroup Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevicePad a) |
=> a | `pad`: a `DevicePad`
-> DevicePadFeature | `feature`: the feature type to get the group from
-> Int32 | `featureIdx`: the index of the feature to get the group from
-> m Int32 | Returns: The group number of the queried pad feature.

Returns the group the given `feature` and `idx` belong to, or -1 if feature/index do not exist in `pad`.

Since: 3.22

## getGroupNModes

devicePadGetGroupNModes Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevicePad a) |
=> a | `pad`: a `DevicePad`
-> Int32 | `groupIdx`: group to get the number of available modes from
-> m Int32 | Returns: The number of modes available in `group`.

Returns the number of modes that `group` may have.

Since: 3.22

## getNFeatures

devicePadGetNFeatures Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevicePad a) |
=> a | `pad`: a `DevicePad`
-> DevicePadFeature | `feature`: a pad feature
-> m Int32 | Returns: The amount of elements of type `feature` that this pad has.

Returns the number of features a tablet pad has.

Since: 3.22

## getNGroups

devicePadGetNGroups Source #

Arguments

:: (HasCallStack, MonadIO m, IsDevicePad a) |
=> a | `pad`: a `DevicePad`
-> m Int32 | Returns: The number of button/ring/strip groups in the pad.

Returns the number of groups this pad device has. Pads have at least one group. A pad group is a subcollection of buttons/strip/rings that is affected collectively by a same current mode.

Since: 3.22