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.

  • ptr

    Untyped pointer to the underlying GdkButtonEvent instance.

    Declaration

    Swift

    var ptr: UnsafeMutableRawPointer! { get }
  • button_event_ptr Default implementation

    Typed pointer to the underlying GdkButtonEvent instance.

    Default Implementation

    Return the stored, untyped pointer as a typed pointer to the GdkButtonEvent instance.

    Declaration

    Swift

    var button_event_ptr: UnsafeMutablePointer<GdkButtonEvent>! { get }
  • Required Initialiser for types conforming to ButtonEventProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

ButtonEvent Class: ButtonEventProtocol extension (methods and fields)

  • getButton() Extension method

    Extract the button number from a button event.

    Declaration

    Swift

    @inlinable
    func getButton() -> Int
  • button Extension method

    Extract the button number from a button event.

    Declaration

    Swift

    @inlinable
    var button: Int { get }