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 gdk-event-type event types.
:pointer-motion-hint-mask is a special mask which is used to reduce the number of :motion-notifiy events received. Normally a :motion-notify event is received each time the mouse moves. However, if the application spends a lot of time processing the event, updating the display, for example, it can lag behind the position of the mouse. When using :pointer-motion-hint-mask, fewer :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 the function 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 the function gdk-window-set-event-compression. See the documentation of that function for details.
If :touch-mask is enabled, the window will receive touch events from touch-enabled devices. Those will come as sequences of gdk-event-touch with type :touch-update, enclosed by two events with type :touch-begin and :touch-end, or :touch-cancel. The function gdk-event-get-event-sequence returns the event sequence for these events, so different sequences may be distinguished.
(define-g-flags "GdkEventMask" gdk-event-mask (:export t :type-initializer "gdk_event_mask_get_type") (:exposure-mask #.(ash 1 1)) (:pointer-motion-mask #.(ash 1 2)) (:pointer-motion-hint-mask #.(ash 1 3)) (:button-motion-mask #.(ash 1 4)) (:button1-motion-mask #.(ash 1 5)) (:button2-motion-mask #.(ash 1 6)) (:button3-motion-mask #.(ash 1 7)) (:button-press-mask #.(ash 1 8)) (:button-release-mask #.(ash 1 9)) (:key-press-mask #.(ash 1 10)) (:key-release-mask #.(ash 1 11)) (:enter-notify-mask #.(ash 1 12)) (:leave-notify-mask #.(ash 1 13)) (:focus-change-mask #.(ash 1 14)) (:structure-mask #.(ash 1 15)) (:property-change-mask #.(ash 1 16)) (:visibility-notify-mask #.(ash 1 17)) (:proximity-in-mask #.(ash 1 18)) (:proximity-out-mask #.(ash 1 19)) (:substructure-mask #.(ash 1 20)) (:scroll-mask #.(ash 1 21)) (:touch-mask #.(ash 1 22)) (:smooth-scroll-mask #.(ash 1 23)) #+gdk-3-18 (:touchpad-gesture-maske #.(ash 1 24)) #+gdk-3-22 (:tabled-pad-mask #.(ash 1 25)) (:all-events-mask #x3FFFFFE))