Changeset 1358 for libcaca/trunk/caca
- Timestamp:
- Nov 12, 2006, 12:06:34 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/caca/caca.h
r1104 r1358 34 34 #endif 35 35 36 /** \e libcaca context */36 /** \e libcaca display context */ 37 37 typedef struct caca_display caca_display_t; 38 /** event structure */38 /** \e libcaca event structure */ 39 39 typedef struct caca_event caca_event_t; 40 40 41 /** \brief User events.41 /** \brief Handling of user events. 42 42 * 43 43 * This structure is filled by caca_get_event() when an event is received. 44 * The \e type field is always valid. The validity of the \e data union 45 * depends on the value of the \e type field: 46 * - \b CACA_EVENT_NONE: no other field is valid. 47 * - \b CACA_EVENT_KEY_PRESS, \b CACA_EVENT_KEY_RELEASE: the \e data.key.ch 48 * field is valid and contains either the ASCII value for the key, or 49 * an \e enum \e caca_key value. If the value is a printable ASCII 50 * character, the \e data.key.utf32 and \e data.key.utf8 fields are 51 * also filled and contain respectively the UTF-32/UCS-4 and the UTF-8 52 * representations of the character. Otherwise, their content is 53 * undefined. 54 * - \b CACA_EVENT_MOUSE_PRESS, \b CACA_EVENT_MOUSE_RELEASE: the 55 * \e data.mouse.button field is valid and contains the index of the 56 * mouse button that was pressed. 57 * - \b CACA_EVENT_MOUSE_MOTION: the \e data.mouse.x and \e data.mouse.y 58 * fields are valid and contain the mouse coordinates in character 59 * cells. 60 * - \b CACA_EVENT_RESIZE: the \e data.resize.w and \e data.resize.h 61 * fields are valid and contain the new width and height values of 62 * the \e libcucul canvas attached to \e libcaca. 63 * - \b CACA_EVENT_QUIT: no other field is valid. 64 * 65 * The result of accessing data members outside the above conditions is 66 * undefined. 67 */ 44 * The \e type field is always valid. */ 68 45 struct caca_event 69 46 { 47 /** \brief User event type enumeration. 48 * 49 * This enum serves two purposes: 50 * - Build listening masks for caca_get_event(). 51 * - Define the type of a \e caca_event_t. 52 */ 70 53 enum caca_event_type 71 54 { … … 81 64 82 65 CACA_EVENT_ANY = 0xffff /**< Bitmask for any event. */ 83 } type; 66 } 67 /** \brief User event type member. 68 * 69 * This field is always valid when caca_get_event() returns. 70 */ 71 type; 84 72 73 /** \brief User event data member. 74 * 75 * The validity of the \e data union depends on the value of the \e type 76 * field: 77 * - \c CACA_EVENT_NONE: no field is valid. 78 * - \c CACA_EVENT_KEY_PRESS, \c CACA_EVENT_KEY_RELEASE: the 79 * \e data.key.ch field is valid and contains either the ASCII value for 80 * the key, or an \e enum \e caca_key value. If the value is a printable 81 * ASCII character, the \e data.key.utf32 and \e data.key.utf8 fields are 82 * also filled and contain respectively the UTF-32/UCS-4 and the UTF-8 83 * representations of the character. Otherwise, their content is 84 * undefined. 85 * - \c CACA_EVENT_MOUSE_PRESS, \c CACA_EVENT_MOUSE_RELEASE: the 86 * \e data.mouse.button field is valid and contains the index of the 87 * mouse button that was pressed. 88 * - \c CACA_EVENT_MOUSE_MOTION: the \e data.mouse.x and \e data.mouse.y 89 * fields are valid and contain the mouse coordinates in character 90 * cells. 91 * - \c CACA_EVENT_RESIZE: the \e data.resize.w and \e data.resize.h 92 * fields are valid and contain the new width and height values of 93 * the \e libcucul canvas attached to \e libcaca. 94 * - \c CACA_EVENT_QUIT: no other field is valid. 95 * 96 * The result of accessing data members outside the above conditions is 97 * undefined. 98 */ 85 99 union 86 100 {
Note: See TracChangeset
for help on using the changeset viewer.