X11workbench Toolkit  1.0
Mouse Pointer Event Handling

Macros

#define WB_POINTER_UNSPECIFIED   0 /* possible motion or state-change notifications */
 Unspecified event, possible motion or state-chagne notification.
 
#define WB_POINTER_CLICK   1
 Mouse 'click' event.
 
#define WB_POINTER_DBLCLICK   2
 WB_POINTER 'double-click' event, send in lieu of WB_POINTER_CLICK for double-click.
 
#define WB_POINTER_DRAG   3 /* window proc returns window ID to support drag/drop */
 WB_POINTER 'drag' event, window proc MUST return the window ID to auto-support drag/drop.
 
#define WB_POINTER_DROP   4 /* may not happen if drag is canceled */
 WB_POINTER 'drop' event, only sent if drag/drop supported AND was not 'canceled'; see WB_POINTER_CANCEL.
 
#define WB_POINTER_MOVE   5 /* motion notify while dragging */
 WB_POINTER 'move' event, for motion notification during drag/drop.
 
#define WB_POINTER_CANCEL   6 /* reservedly any kind of cancellation, but for now, 'drag cancel' */
 WB_POINTER 'cancel' event, cancels an ongoing operation, such as drag/drop (useful for resource cleanup)
 
#define WB_POINTER_SCROLLUP   7 /* scroll event, mouse button 4 */
 WB_POINTER 'scroll up' event, caused by mouse button 4.
 
#define WB_POINTER_SCROLLDOWN   8 /* scroll event, mouse button 5 */
 WB_POINTER 'scroll down' event, caused by mouse button 5.
 
#define WB_POINTER_BUTTON1   1 /* these are bitmasks */
 WB_POINTER button bitmask indicating that button 1 is pressed.
 
#define WB_POINTER_BUTTON2   2
 WB_POINTER button bitmask indicating that button 2 is pressed.
 
#define WB_POINTER_BUTTON3   4
 WB_POINTER button bitmask indicating that button 3 is pressed.
 
#define WB_POINTER_BUTTON4   8
 WB_POINTER button bitmask indicating that button 4 (scroll wheel 'up') is pressed.
 
#define WB_POINTER_BUTTON5   16
 WB_POINTER button bitmask indicating that button 5 (scroll wheel 'down') is pressed.
 

Variables

Atom aWB_POINTER
 pointer click/double-click/drag notifications generated by API More...
 

Detailed Description

The X11workbench Toolkit API provides for mid-level pointer event handling via WB_POINTER ClientMessage notification events.
See aWB_POINTER for more info.

Variable Documentation

◆ aWB_POINTER

Atom aWB_POINTER

pointer click/double-click/drag notifications generated by API

Mid-level pointer click/double-click/drag handling generates WB_POINTER notifications (i.e. mouse motion) via ClientMessage passed to the appropriate window in addition to the normal pointer notification events via the normal event system.

WB_POINTER notification message format (relative to XEvent.xclient)

type == ClientMessage
message_type == aWB_POINTER
format == 32 (always)
data.l[0] is one of the notification codes

data.l[1] is a bitmap of the mouse button state (bit set when pressed)

  • WB_POINTER_BUTTON1 - bit 0 - left button
  • WB_POINTER_BUTTON2 - bit 1 - right button
  • WB_POINTER_BUTTON3 - bit 2 - center button
  • WB_POINTER_BUTTON4 - bit 3 - mouse wheel up
  • WB_POINTER_BUTTON5 - bit 4 - mouse wheel down

data.l[2] is 'WB_KEYEVENT_xxx' mask for CTRL+ALT+SHIFT

  • WB_KEYEVENT_ALT
  • WB_KEYEVENT_CTRL
  • WB_KEYEVENT_SHIFT

data.l[3] is translated X coordinate
data.l[4] is translated Y coordinate

'pointer' notifications (generated by API)

Definition at line 459 of file window_helper.c.