Mercurial > molko
comparison src/event.h @ 22:5519ad48822e
doc: add Doxygen documentation, closes #2450
author | David Demelier <markand@malikania.fr> |
---|---|
date | Thu, 09 Jan 2020 20:48:01 +0100 |
parents | bc1fdff76775 |
children | 2a087210c0b8 |
comparison
equal
deleted
inserted
replaced
21:63eaec5ceba9 | 22:5519ad48822e |
---|---|
46 * \brief Store events. | 46 * \brief Store events. |
47 */ | 47 */ |
48 union event { | 48 union event { |
49 enum event_type type; /*!< Which kind of event */ | 49 enum event_type type; /*!< Which kind of event */ |
50 | 50 |
51 /** | |
52 * Store key down/up event. | |
53 */ | |
51 struct { | 54 struct { |
52 enum event_type type; /*!< EVENT_KEYDOWN or EVENT_KEYUP */ | 55 enum event_type type; /*!< EVENT_KEYDOWN or EVENT_KEYUP */ |
53 enum key key; /*!< Which key */ | 56 enum key key; /*!< Which key */ |
54 } key; | 57 } key; |
55 | 58 |
59 /** | |
60 * Store mouse motion event. | |
61 */ | |
56 struct { | 62 struct { |
57 enum event_type type; /*!< EVENT_MOUSE */ | 63 enum event_type type; /*!< EVENT_MOUSE */ |
58 enum mouse_button buttons; /*!< OR'ed buttons that are pressed */ | 64 enum mouse_button buttons; /*!< OR'ed buttons that are pressed */ |
59 int32_t x; /*!< Mouse position in x */ | 65 int32_t x; /*!< Mouse position in x */ |
60 int32_t y; /*!< Mouse position in y */ | 66 int32_t y; /*!< Mouse position in y */ |
61 } mouse; | 67 } mouse; |
62 | 68 |
69 /** | |
70 * Store mouse click event. | |
71 */ | |
63 struct { | 72 struct { |
64 enum event_type type; /*!< EVENT_CLICKDOWN or EVENT_CLICKUP */ | 73 enum event_type type; /*!< EVENT_CLICKDOWN or EVENT_CLICKUP */ |
65 enum mouse_button button; /*!< Unique button that was pressed */ | 74 enum mouse_button button; /*!< Unique button that was pressed */ |
66 int32_t x; /*!< Mouse position in x */ | 75 int32_t x; /*!< Mouse position in x */ |
67 int32_t y; /*!< Mouse position in y */ | 76 int32_t y; /*!< Mouse position in y */ |