KeyEventStructProtocol

public protocol KeyEventStructProtocol

Encapsulates information about a key event.

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

  • ptr

    Untyped pointer to the underlying AtkKeyEventStruct instance.

    Declaration

    Swift

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

    Typed pointer to the underlying AtkKeyEventStruct instance.

    Default Implementation

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

    Declaration

    Swift

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

    Declaration

    Swift

    init(raw: UnsafeMutableRawPointer)

KeyEventStruct Record: KeyEventStructProtocol extension (methods and fields)

  • type Extension method

    An AtkKeyEventType, generally one of ATK_KEY_EVENT_PRESS or ATK_KEY_EVENT_RELEASE

    Declaration

    Swift

    @inlinable
    var type: gint { get set }
  • state Extension method

    A bitmask representing the state of the modifier keys immediately after the event takes place. The meaning of the bits is currently defined to match the bitmask used by GDK in GdkEventType.state, see http://developer.gnome.org/doc/API/2.0/gdk/gdk-Event-Structures.html`GdkEventKey`

    Declaration

    Swift

    @inlinable
    var state: guint { get set }
  • keyval Extension method

    A guint representing a keysym value corresponding to those used by GDK and X11: see /usr/X11/include/keysymdef.h.

    Declaration

    Swift

    @inlinable
    var keyval: guint { get set }
  • length Extension method

    The length of member string.

    Declaration

    Swift

    @inlinable
    var length: gint { get set }
  • string Extension method

    A string containing one of the following: either a string approximating the text that would result from this keypress, if the key is a control or graphic character, or a symbolic name for this keypress. Alphanumeric and printable keys will have the symbolic key name in this string member, for instance “A”. “0”, “semicolon”, “aacute”. Keypad keys have the prefix “KP”.

    Declaration

    Swift

    @inlinable
    var string: UnsafeMutablePointer<gchar>! { get set }
  • keycode Extension method

    The raw hardware code that generated the key event. This field is raraly useful.

    Declaration

    Swift

    @inlinable
    var keycode: guint16 { get set }
  • timestamp Extension method

    A timestamp in milliseconds indicating when the event occurred. These timestamps are relative to a starting point which should be considered arbitrary, and only used to compare the dispatch times of events to one another.

    Declaration

    Swift

    @inlinable
    var timestamp: guint32 { get set }