Package: gdk

Flags gdk-event-mask

Details

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))  
:exposure-mask
Receive expose events.
:pointer-motion-mask
Receive all pointer motion events.
:pointer-motion-hint-mask
See the explanation above.
:button-motion-mask
Receive pointer motion events while any button is pressed.
:button1-motion-mask
Receive pointer motion events while 1 button is pressed.
:button2-motion-mask
Receive pointer motion events while 2 button is pressed.
:button3-motion-mask
Receive pointer motion events while 3 button is pressed.
:button-press-mask
Receive button press events.
:button-release-mask
Receive button release events.
:key-press-mask
Receive key press events.
:key-release-mask
Receive key release events.
:enter-notify-mask
Receive window enter events.
:leave-notify-mask
Receive window leave events.
:focus-change-mask
Receive focus change events.
:structure-mask
Receive events about window configuration change.
:property-change-mask
Receive property change events.
:visibility-notify-mask
Receive visibility change events.
:proximity-in-mask
Receive proximity in events.
:proximity-out-mask
Receive proximity out events.
:substructure-mask
Receive events about window configuration changes of child windows.
:scroll-mask
Receive scroll events.
:touch-mask
Receive touch events.
:smooth-scroll-mask
Receive smooth scrolling events.
:touchpad-gesture-mask
Receive touchpad gesture events. Since 3.18
:tablet-pad
Receive tablet pad events. Since 3.22
:all-events-mask
The combination of all the above event masks.
 

See also

2019-3-18