EventTouchProtocol

public protocol EventTouchProtocol

The EventTouchProtocol protocol exposes the methods and properties of an underlying GdkEventTouch 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 EventTouch. Alternatively, use EventTouchRef as a lighweight, unowned reference if you already have an instance you just want to use.

Used for touch events. type field will be one of GDK_TOUCH_BEGIN, GDK_TOUCH_UPDATE, GDK_TOUCH_END or GDK_TOUCH_CANCEL.

Touch events are grouped into sequences by means of the sequence field, which can also be obtained with gdk_event_get_event_sequence(). Each sequence begins with a GDK_TOUCH_BEGIN event, followed by any number of GDK_TOUCH_UPDATE events, and ends with a GDK_TOUCH_END (or GDK_TOUCH_CANCEL) event. With multitouch devices, there may be several active sequences at the same time.

  • ptr

    Untyped pointer to the underlying GdkEventTouch instance.

    Declaration

    Swift

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

    Typed pointer to the underlying GdkEventTouch instance.

    Default Implementation

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

    Declaration

    Swift

    var _ptr: UnsafeMutablePointer<GdkEventTouch>! { get }
  • Required Initialiser for types conforming to EventTouchProtocol

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

EventTouch Record: EventTouchProtocol extension (methods and fields)

  • type Extension method

    the type of the event (GDK_TOUCH_BEGIN, GDK_TOUCH_UPDATE, GDK_TOUCH_END, GDK_TOUCH_CANCEL)

    Declaration

    Swift

    @inlinable
    var type: GdkEventType { get set }
  • window Extension method

    the window which received the event

    Declaration

    Swift

    @inlinable
    var window: WindowRef! { get set }
  • sendEvent Extension method

    true if the event was sent explicitly.

    Declaration

    Swift

    @inlinable
    var sendEvent: gint8 { get set }
  • time Extension method

    the time of the event in milliseconds.

    Declaration

    Swift

    @inlinable
    var time: guint32 { get set }
  • x Extension method

    the x coordinate of the pointer relative to the window

    Declaration

    Swift

    @inlinable
    var x: gdouble { get set }
  • y Extension method

    the y coordinate of the pointer relative to the window

    Declaration

    Swift

    @inlinable
    var y: gdouble { get set }
  • axes Extension method

    x, y translated to the axes of device, or nil if device is the mouse

    Declaration

    Swift

    @inlinable
    var axes: UnsafeMutablePointer<gdouble>! { get set }
  • state Extension method

    a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See GdkModifierType

    Declaration

    Swift

    @inlinable
    var state: ModifierType { get set }
  • sequence Extension method

    the event sequence that the event belongs to

    Declaration

    Swift

    @inlinable
    var sequence: EventSequenceRef! { get set }
  • emulatingPointer Extension method

    whether the event should be used for emulating pointer event

    Declaration

    Swift

    @inlinable
    var emulatingPointer: gboolean { get set }
  • device Extension method

    the master device that the event originated from. Use gdk_event_get_source_device() to get the slave device.

    Declaration

    Swift

    @inlinable
    var device: DeviceRef! { get set }
  • xRoot Extension method

    the x coordinate of the pointer relative to the root of the screen

    Declaration

    Swift

    @inlinable
    var xRoot: gdouble { get set }
  • yRoot Extension method

    the y coordinate of the pointer relative to the root of the screen

    Declaration

    Swift

    @inlinable
    var yRoot: gdouble { get set }