EventMask
public struct EventMask : OptionSet
A set of bit-flags to indicate which events a window is to receive.
Most of these masks map onto one or more of the GdkEventType
event types
above.
See the input handling overview for details of event masks and event propagation.
GDK_POINTER_MOTION_HINT_MASK
is deprecated. It is a special mask
to reduce the number of GDK_MOTION_NOTIFY
events received. When using
GDK_POINTER_MOTION_HINT_MASK
, fewer GDK_MOTION_NOTIFY
events will
be sent, some of which are marked as a hint (the is_hint member is
true
). To receive more motion events after a motion hint event,
the application needs to asks for more, by calling
gdk_event_request_motions()
.
Since GTK 3.8, motion events are already compressed by default, independent
of this mechanism. This compression can be disabled with
gdk_window_set_event_compression()
. See the documentation of that function
for details.
If GDK_TOUCH_MASK
is enabled, the window will receive touch events
from touch-enabled devices. Those will come as sequences of GdkEventTouch
with type GDK_TOUCH_UPDATE
, enclosed by two events with
type GDK_TOUCH_BEGIN
and GDK_TOUCH_END
(or GDK_TOUCH_CANCEL
).
gdk_event_get_event_sequence()
returns the event sequence for these
events, so different sequences may be distinguished.
-
The corresponding value of the raw type
Declaration
Swift
public var rawValue: UInt32
-
The equivalent raw Int value
Declaration
Swift
@inlinable public var intValue: Int { get set }
-
The equivalent raw
gint
valueDeclaration
Swift
@inlinable public var int: gint { get set }
-
The equivalent underlying
GdkEventMask
enum valueDeclaration
Swift
@inlinable public var value: GdkEventMask { get set }
-
Creates a new instance with the specified raw value
Declaration
Swift
@inlinable public init(rawValue: UInt32)
-
Creates a new instance with the specified
GdkEventMask
enum valueDeclaration
Swift
@inlinable public init(_ enumValue: GdkEventMask)
-
Creates a new instance with the specified Int value
Declaration
Swift
@inlinable public init<I>(_ intValue: I) where I : BinaryInteger
-
receive expose events
Declaration
Swift
public static let exposureMask: EventMask
-
receive all pointer motion events
Declaration
Swift
public static let pointerMotionMask: EventMask
-
deprecated. see the explanation above
Declaration
Swift
public static let pointerMotionHintMask: EventMask
-
receive pointer motion events while any button is pressed
Declaration
Swift
public static let buttonMotionMask: EventMask
-
receive pointer motion events while 1 button is pressed
Declaration
Swift
public static let button1MotionMask: EventMask
-
receive pointer motion events while 2 button is pressed
Declaration
Swift
public static let button2MotionMask: EventMask
-
receive pointer motion events while 3 button is pressed
Declaration
Swift
public static let button3MotionMask: EventMask
-
receive button press events
Declaration
Swift
public static let buttonPressMask: EventMask
-
receive button release events
Declaration
Swift
public static let buttonReleaseMask: EventMask
-
receive key press events
Declaration
Swift
public static let keyPressMask: EventMask
-
receive key release events
Declaration
Swift
public static let keyReleaseMask: EventMask
-
receive window enter events
Declaration
Swift
public static let enterNotifyMask: EventMask
-
receive window leave events
Declaration
Swift
public static let leaveNotifyMask: EventMask
-
receive focus change events
Declaration
Swift
public static let focusChangeMask: EventMask
-
receive events about window configuration change
Declaration
Swift
public static let structureMask: EventMask
-
receive property change events
Declaration
Swift
public static let propertyChangeMask: EventMask
-
receive visibility change events
Declaration
Swift
public static let visibilityNotifyMask: EventMask
-
receive proximity in events
Declaration
Swift
public static let proximityInMask: EventMask
-
receive proximity out events
Declaration
Swift
public static let proximityOutMask: EventMask
-
receive events about window configuration changes of child windows
Declaration
Swift
public static let substructureMask: EventMask
-
receive scroll events
Declaration
Swift
public static let scrollMask: EventMask
-
receive touch events. Since 3.4
Declaration
Swift
public static let touchMask: EventMask
-
receive smooth scrolling events. Since 3.4
Declaration
Swift
public static let smoothScrollMask: EventMask
-
receive touchpad gesture events. Since 3.18
Declaration
Swift
public static let touchpadGestureMask: EventMask
-
receive tablet pad events. Since 3.22
Declaration
Swift
public static let tabletPadMask: EventMask
-
the combination of all the above event masks.
Declaration
Swift
public static let allEventsMask: EventMask