* the same alignments
*/
typedef struct {
- unsigned char evt_type; /* event type: 0: keyboard, 1: mouse */
- unsigned char evt_kbstat; /* keyboard status (ALT, SHIFT, etc..) */
- unsigned char evt_mask; /* mouse event mask */
- unsigned char evt_button; /* button status */
- unsigned short evt_xpos; /* X coord (or keycode if keybd event) */
- unsigned short evt_ypos; /* Y coord */
- unsigned long evt_time; /* time stamp of event */
-#define evt_keycode evt_xpos /* reuse this slot for keybd events !! */
-#define evt_scancode evt_ypos /* store here the BIOS scan code */
+ /** event type: 0: keyboard, 1: mouse */
+ unsigned char evt_type;
+
+ /** keyboard status (ALT, SHIFT, etc..) */
+ unsigned char evt_kbstat;
+
+ /** mouse event mask */
+ unsigned char evt_mask;
+
+ /** button status */
+ unsigned char evt_button;
+
+ /** X coord (or keycode if keybd event) */
+ unsigned short evt_xpos;
+
+ /** Y coord */
+ unsigned short evt_ypos;
+
+ /** time stamp of event */
+ unsigned long evt_time;
+
+ /** reuse this slot for keybd events !! */
+#define evt_keycode evt_xpos
+
+ /** store here the BIOS scan code */
+#define evt_scancode evt_ypos
} EventRecord;
typedef struct {
- unsigned short evq_maxsize; /* max size of event queue */
- unsigned short evq_cursize; /* number of events in the queue */
- unsigned short evq_rdptr; /* next event to read */
- unsigned short evq_wrptr; /* next event to be written */
- short evq_xpos; /* current X coordinate of mouse */
- short evq_ypos; /* current Y coordinate of mouse */
- short evq_xmin; /* minimal mouse X coordinate */
- short evq_ymin; /* minimal mouse Y coordinate */
- short evq_xmax; /* maximal mouse X coordinate */
- short evq_ymax; /* maximal mouse Y coordinate */
- short evq_xspeed; /* horizontal speed (mickey/coord) */
- short evq_yspeed; /* vertical speed (mickey/coord) */
- unsigned short evq_thresh; /* fast movement threshold */
- unsigned short evq_accel; /* multiplier for fast move */
- unsigned char evq_drawmouse; /* interrupt handler has to draw mouse */
- unsigned char evq_moved; /* set if mouse moved */
- unsigned char evq_delchar; /* character removed from BIOS buffer */
- unsigned char evq_enable; /* event generation control flag */
- EventRecord evq_events[1]; /* event buffer space */
+ /** max size of event queue */
+ unsigned short evq_maxsize;
+
+ /** number of events in the queue */
+ unsigned short evq_cursize;
+
+ /** next event to read */
+ unsigned short evq_rdptr;
+
+ /** next event to be written */
+ unsigned short evq_wrptr;
+
+ /** current X coordinate of mouse */
+ short evq_xpos;
+
+ /** current Y coordinate of mouse */
+ short evq_ypos;
+
+ /** minimal mouse X coordinate */
+ short evq_xmin;
+
+ /** minimal mouse Y coordinate */
+ short evq_ymin;
+
+ /** maximal mouse X coordinate */
+ short evq_xmax;
+
+ /** maximal mouse Y coordinate */
+ short evq_ymax;
+
+ /** horizontal speed (mickey/coord) */
+ short evq_xspeed;
+
+ /** vertical speed (mickey/coord) */
+ short evq_yspeed;
+
+ /** fast movement threshold */
+ unsigned short evq_thresh;
+
+ /** multiplier for fast move */
+ unsigned short evq_accel;
+
+ /** interrupt handler has to draw mouse */
+ unsigned char evq_drawmouse;
+
+ /** set if mouse moved */
+ unsigned char evq_moved;
+
+ /** character removed from BIOS buffer */
+ unsigned char evq_delchar;
+
+ /** event generation control flag */
+ unsigned char evq_enable;
+
+ /** event buffer space */
+ EventRecord evq_events[1];
} EventQueue;
-/*
+/**
* event types
*/
#define EVENT_KEYBD 0
#define EVENT_MOUSE 1
-/*
+/**
* MOUSE event flag bits
* (also defined in "mousex.h" of the graphics library)
+ * \defgroup MouseEventFlagBits MOUSE event flag bits
+ * @{
*/
#ifndef M_MOTION
#define M_BUTTON_UP (M_LEFT_UP | M_MIDDLE_UP | M_RIGHT_UP)
#define M_BUTTON_CHANGE (M_BUTTON_UP | M_BUTTON_DOWN )
-/*
+/**
* MOUSE button status bits
+ * \defgroup MouseButtonStatusBits MOUSE button status bits
+ * @{
*/
#define M_LEFT 1
#define M_RIGHT 2
#define M_MIDDLE 4
+/** @} */
-#endif /* M_MOTION */
+#endif
+/** @} */
-/*
+/**
* KEYBOARD status word bits
* (also defined in "mousex.h" of the graphics library)
+ * \defgroup KeyboardStatusWordBits KEYBOARD status word bits
+ * @{
*/
#ifndef KB_SHIFT
-#define KB_RIGHTSHIFT 0x01 /* right shift key depressed */
-#define KB_LEFTSHIFT 0x02 /* left shift key depressed */
-#define KB_CTRL 0x04 /* CTRL depressed */
-#define KB_ALT 0x08 /* ALT depressed */
-#define KB_SCROLLOCK 0x10 /* SCROLL LOCK active */
-#define KB_NUMLOCK 0x20 /* NUM LOCK active */
-#define KB_CAPSLOCK 0x40 /* CAPS LOCK active */
-#define KB_INSERT 0x80 /* INSERT state active */
+/** right shift key depressed */
+#define KB_RIGHTSHIFT 0x01
+
+/** left shift key depressed */
+#define KB_LEFTSHIFT 0x02
+
+/** CTRL depressed */
+#define KB_CTRL 0x04
+
+/** ALT depressed */
+#define KB_ALT 0x08
+
+/** SCROLL LOCK active */
+#define KB_SCROLLOCK 0x10
+
+/** NUM LOCK active */
+#define KB_NUMLOCK 0x20
+
+/** CAPS LOCK active */
+#define KB_CAPSLOCK 0x40
+
+/** INSERT state active */
+#define KB_INSERT 0x80
#define KB_SHIFT (KB_LEFTSHIFT | KB_RIGHTSHIFT)
-#endif /* KB_SHIFT */
+#endif
+/** @} */
/*
* set this bit in 'evq_enable' to generate the corresponding event