Listing 6

typedef struct
   {
   int         type;   /* ButtonPress */
   unsigned long   serial;
   Bool            send_event;
   Display     *display;
   Window      window;
   Window      root;
   Window      subwindow;
   Time            time;
   int         x, y;   /* where the mouse was */
   int         x_root, y_root;
   unsigned int    state;
   unsigned int    button; /* which button was pressed */
   Bool            same_screen;
   } XButtonEvent;