DevicePadRef
public struct DevicePadRef : DevicePadProtocol, GWeakCapturing
The DevicePadRef
type acts as a lightweight Swift reference to an underlying GdkDevicePad
instance.
It exposes methods that can operate on this data type through DevicePadProtocol
conformance.
Use DevicePadRef
only as an unowned
reference to an existing GdkDevicePad
instance.
GdkDevicePad
is an interface implemented by devices of type
GDK_SOURCE_TABLET_PAD
, 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. gdk_device_pad_get_n_groups()
can be used to obtain the number of groups, gdk_device_pad_get_n_features()
and gdk_device_pad_get_feature_group()
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 gdk_device_pad_get_group_n_modes()
, and the current
mode for a given group will be notified through the GdkEventPadGroupMode
event.
-
Untyped pointer to the underlying `GdkDevicePad` instance.
For type-safe access, use the generated, typed pointer
device_pad_ptr
property instead.Declaration
Swift
public let ptr: UnsafeMutableRawPointer!
-
Designated initialiser from the underlying
C
data typeDeclaration
Swift
@inlinable init(_ p: UnsafeMutablePointer<GdkDevicePad>)
-
Designated initialiser from a constant pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init(_ p: UnsafePointer<GdkDevicePad>)
-
Conditional initialiser from an optional pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafeMutablePointer<GdkDevicePad>?)
-
Conditional initialiser from an optional, non-mutable pointer to the underlying
C
data typeDeclaration
Swift
@inlinable init!(_ maybePointer: UnsafePointer<GdkDevicePad>?)
-
Conditional initialiser from an optional
gpointer
Declaration
Swift
@inlinable init!(gpointer g: gpointer?)
-
Conditional initialiser from an optional, non-mutable
gconstpointer
Declaration
Swift
@inlinable init!(gconstpointer g: gconstpointer?)
-
Reference intialiser for a related type that implements
DevicePadProtocol
Declaration
Swift
@inlinable init<T>(_ other: T) where T : DevicePadProtocol
-
This factory is syntactic sugar for setting weak pointers wrapped in
GWeak<T>
Declaration
Swift
@inlinable static func unowned<T>(_ other: T) -> DevicePadRef where T : DevicePadProtocol
-
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
DevicePadProtocol
.Declaration
Swift
@inlinable init<T>(cPointer: UnsafeMutablePointer<T>)
-
Unsafe typed initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
DevicePadProtocol
.Declaration
Swift
@inlinable init<T>(constPointer: UnsafePointer<T>)
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
DevicePadProtocol
.Declaration
Swift
@inlinable init(mutating raw: UnsafeRawPointer)
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
DevicePadProtocol
.Declaration
Swift
@inlinable init(raw: UnsafeMutableRawPointer)
-
Unsafe untyped initialiser. Do not use unless you know the underlying data type the pointer points to conforms to
DevicePadProtocol
.Declaration
Swift
@inlinable init(opaquePointer: OpaquePointer)