Package: gdk

GBoxed gdk-event-button

Superclasses

gdk-event, common-lisp:structure-object, common-lisp:t

Documented Subclasses

None

Details

Used for button press and button release events. The type field will be one of the :button-press, :double-button-press, triple-button-press, or :button-release values.

Double and triple-clicks result in a sequence of events being received. For double-clicks the order of events will be:
 :button-press
 :button-release
 :button-press
 :double-button-press
 :button-release  
Note that the first click is received just like a normal button press, while the second click results in a :double-button-press event being received just after the :button-press event.

Triple-clicks are very similar to double-clicks, except that the :triple-button-press event is inserted after the third click. The order of the events is:
 :button-press
 :button-release
 :button-press
 :double-button-press
 :button-release
 :button-press
 :triple-button-press
 :button-release  
For a double click to occur, the second button press must occur within 1/4 of a second of the first. For a triple click to occur, the third button press must also occur within 1/2 second of the first button press.
(define-g-boxed-variant-cstruct gdk-event "GdkEvent"
  (type gdk-event-type)
  (window (g-object gdk-window))
  (send-event (:boolean :int8))
  (:variant type
            ...
            ((:button-press
              :2button-press
              :double-button-press
              :3button-press
              :triple-button-press
              :button-release) gdk-event-button
             (time :uint32)
             (x :double)
             (y :double)
             (axes (fixed-array :double 2))
             (state gdk-modifier-type)
             (button :uint)
             (device (g-object gdk-device))
             (x-root :double)
             (y-root :double))
  ... ))  
type
The gdk-event-type type of the event, one of the values :button-press, :2button-press, :double-button-press, :3button-press, :triple-button-press, :button-release.
window
The gdk-window object which received the event.
send-event
True if the event was sent explicitly.
time
The time of the event in milliseconds.
x
The double float x coordinate of the pointer relative to the window.
y
The double float y coordinate of the pointer relative to the window.
axes
The x, y fields translated to the axes of the device.
state
The gdk-modifier-type bit-mask representing the state of the modifier keys, e.g. the Control, Shift and Alt keys, and the pointer buttons.
button
An unsigned integer with the button which was pressed or released, numbered from 1 to 5. Normally button 1 is the left mouse button, 2 is the middle button, and 3 is the right button. On 2-button mice, the middle button can often be simulated by pressing both mouse buttons together.
device
The gdk-device object where the event originated.
x-root
The double float x coordinate of the pointer relative to the root of the screen.
y-root
The double float y coordinate of the pointer relative to the root of the screen.
 

Slot Access Functions

Inherited Slot Access Functions

See also

2021-12-13