ButtonEventProtocol
public protocol ButtonEventProtocol : EventProtocol
The ButtonEventProtocol protocol exposes the methods and properties of an underlying GdkButtonEvent instance.
The default implementation of these can be found in the protocol extension below.
For a concrete class that implements these methods and properties, see ButtonEvent.
Alternatively, use ButtonEventRef as a lighweight, unowned reference if you already have an instance you just want to use.
An event related to a button on a pointer device.
-
Untyped pointer to the underlying
GdkButtonEventinstance.Declaration
Swift
var ptr: UnsafeMutableRawPointer! { get } -
button_event_ptrDefault implementationTyped pointer to the underlying
GdkButtonEventinstance.Default Implementation
Return the stored, untyped pointer as a typed pointer to the
GdkButtonEventinstance.Declaration
Swift
var button_event_ptr: UnsafeMutablePointer<GdkButtonEvent>! { get } -
Required Initialiser for types conforming to
ButtonEventProtocolDeclaration
Swift
init(raw: UnsafeMutableRawPointer)
-
getButton()Extension methodExtract the button number from a button event.
Declaration
Swift
@inlinable func getButton() -> Int -
buttonExtension methodExtract the button number from a button event.
Declaration
Swift
@inlinable var button: Int { get }
View on GitHub
Install in Dash
ButtonEventProtocol Protocol Reference