XButtonEvent, XKeyEvent, XMotionEvent - KeyPress, KeyRelease, ButtonPress, ButtonRelease, and MotionNotify event structures
The structures for KeyPress, KeyRelease, ButtonPress, ButtonRelease, and MotionNotify events contain:
typedef struct {
int type; ButtonPress or ButtonRelease
unsigned long serial; # of last request processed by server
Bool send_event; true if this came from a SendEvent request
Display *display; Display the event was read from
Window window; ``event'' window it is reported relative to
Window root; root window that the event occurred on
Window subwindow; child window
Time time; milliseconds
int x, y; pointer x, y coordinates in event window
int x_root, y_root; coordinates relative to root
unsigned int state; key or button mask
unsigned int button; detail
Bool same_screen; same screen flag
} XButtonEvent;
typedef XButtonEvent XButtonPressedEvent;
typedef XButtonEvent XButtonReleasedEvent;