event.h 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554
  1. /*
  2. * File : event.h
  3. * This file is part of RTGUI in RT-Thread RTOS
  4. * COPYRIGHT (C) 2006 - 2009, RT-Thread Development Team
  5. *
  6. * The license and distribution terms for this file may be
  7. * found in the file LICENSE in this distribution or at
  8. * http://www.rt-thread.org/license/LICENSE
  9. *
  10. * Change Logs:
  11. * Date Author Notes
  12. * 2009-10-04 Bernard first version
  13. */
  14. #ifndef __RTGUI_EVENT_H__
  15. #define __RTGUI_EVENT_H__
  16. #ifdef __cplusplus
  17. extern "C" {
  18. #endif
  19. #include <rtdevice.h>
  20. #include <rtgui/rtgui.h>
  21. #include <rtgui/kbddef.h>
  22. /* NOTE: if you create a new event type, remember to add it into the union
  23. * rtgui_event_generic */
  24. enum _rtgui_event_type
  25. {
  26. /* applications event */
  27. RTGUI_EVENT_APP_CREATE, /* create an application */
  28. RTGUI_EVENT_APP_DESTROY, /* destroy an application */
  29. RTGUI_EVENT_APP_ACTIVATE, /* activate an application */
  30. /* window event */
  31. RTGUI_EVENT_WIN_CREATE, /* create a window */
  32. RTGUI_EVENT_WIN_DESTROY, /* destroy a window */
  33. RTGUI_EVENT_WIN_SHOW, /* show a window */
  34. RTGUI_EVENT_WIN_HIDE, /* hide a window */
  35. RTGUI_EVENT_WIN_ACTIVATE, /* activate a window */
  36. RTGUI_EVENT_WIN_DEACTIVATE, /* deactivate a window */
  37. RTGUI_EVENT_WIN_CLOSE, /* close a window */
  38. RTGUI_EVENT_WIN_MOVE, /* move a window */
  39. RTGUI_EVENT_WIN_RESIZE, /* resize a window */
  40. RTGUI_EVENT_WIN_MODAL_ENTER, /* the window is entering modal mode.
  41. This event should be sent after the
  42. window got setup and before the
  43. application got setup. */
  44. /* WM event */
  45. RTGUI_EVENT_SET_WM, /* set window manager */
  46. RTGUI_EVENT_UPDATE_BEGIN, /* update a rect */
  47. RTGUI_EVENT_UPDATE_END, /* update a rect */
  48. RTGUI_EVENT_MONITOR_ADD, /* add a monitor rect */
  49. RTGUI_EVENT_MONITOR_REMOVE, /* remove a monitor rect */
  50. RTGUI_EVENT_SHOW, /* the widget is going to be shown */
  51. RTGUI_EVENT_HIDE, /* the widget is going to be hidden */
  52. RTGUI_EVENT_PAINT, /* paint on screen */
  53. RTGUI_EVENT_TIMER, /* timer */
  54. RTGUI_EVENT_UPDATE_TOPLVL, /* update the toplevel */
  55. /* virtual paint event */
  56. RTGUI_EVENT_VPAINT_REQ, /* virtual paint request (server -> client) */
  57. /* clip rect information */
  58. RTGUI_EVENT_CLIP_INFO, /* clip rect info */
  59. /* mouse and keyboard event */
  60. RTGUI_EVENT_MOUSE_MOTION, /* mouse motion */
  61. RTGUI_EVENT_MOUSE_BUTTON, /* mouse button info */
  62. RTGUI_EVENT_KBD, /* keyboard info */
  63. RTGUI_EVENT_TOUCH, /* touch event to server */
  64. RTGUI_EVENT_GESTURE, /* gesture event */
  65. /* widget event */
  66. RTGUI_EVENT_FOCUSED, /* widget focused */
  67. RTGUI_EVENT_SCROLLED, /* scroll bar scrolled */
  68. RTGUI_EVENT_RESIZE, /* widget resize */
  69. RTGUI_EVENT_SELECTED, /* widget selected */
  70. RTGUI_EVENT_UNSELECTED, /* widget un-selected */
  71. RTGUI_EVENT_MV_MODEL, /* data of a model has been changed */
  72. WBUS_NOTIFY_EVENT,
  73. /* user command event. It should always be the last command type. */
  74. RTGUI_EVENT_COMMAND = 0x0100, /* user command */
  75. };
  76. typedef enum _rtgui_event_type rtgui_event_type;
  77. enum
  78. {
  79. RTGUI_STATUS_OK = 0, /* status ok */
  80. RTGUI_STATUS_ERROR, /* generic error */
  81. RTGUI_STATUS_NRC, /* no resource */
  82. };
  83. struct rtgui_event
  84. {
  85. /* the event type */
  86. enum _rtgui_event_type type;
  87. /* user field of event */
  88. rt_uint16_t user;
  89. /* the event sender */
  90. struct rtgui_app *sender;
  91. /* mailbox to acknowledge request */
  92. rt_mailbox_t ack;
  93. };
  94. typedef struct rtgui_event rtgui_event_t;
  95. #define RTGUI_EVENT(e) ((struct rtgui_event*)(e))
  96. extern struct rtgui_app* rtgui_app_self(void);
  97. #define RTGUI_EVENT_INIT(e, t) do \
  98. { \
  99. (e)->type = (t); \
  100. (e)->user = 0; \
  101. (e)->sender = rtgui_app_self(); \
  102. (e)->ack = RT_NULL; \
  103. } while (0)
  104. /*
  105. * RTGUI Application Event
  106. */
  107. struct rtgui_event_application
  108. {
  109. struct rtgui_event parent;
  110. struct rtgui_app *app;
  111. };
  112. /* gui application init */
  113. #define RTGUI_EVENT_APP_CREATE_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_APP_CREATE)
  114. #define RTGUI_EVENT_APP_DESTROY_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_APP_DESTROY)
  115. #define RTGUI_EVENT_APP_ACTIVATE_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_APP_ACTIVATE)
  116. /*
  117. * RTGUI Window Event
  118. */
  119. #define _RTGUI_EVENT_WIN_ELEMENTS \
  120. struct rtgui_event parent; \
  121. struct rtgui_win *wid;
  122. /*
  123. * RTGUI Window Event
  124. */
  125. struct rtgui_event_win
  126. {
  127. _RTGUI_EVENT_WIN_ELEMENTS
  128. };
  129. struct rtgui_event_win_create
  130. {
  131. _RTGUI_EVENT_WIN_ELEMENTS
  132. struct rtgui_win *parent_window;
  133. };
  134. struct rtgui_event_win_move
  135. {
  136. _RTGUI_EVENT_WIN_ELEMENTS
  137. rt_int16_t x, y;
  138. };
  139. struct rtgui_event_win_resize
  140. {
  141. _RTGUI_EVENT_WIN_ELEMENTS
  142. rtgui_rect_t rect;
  143. };
  144. #define rtgui_event_win_destroy rtgui_event_win
  145. #define rtgui_event_win_show rtgui_event_win
  146. #define rtgui_event_win_hide rtgui_event_win
  147. #define rtgui_event_win_activate rtgui_event_win
  148. #define rtgui_event_win_deactivate rtgui_event_win
  149. #define rtgui_event_win_close rtgui_event_win
  150. #define rtgui_event_win_modal_enter rtgui_event_win
  151. /* window event init */
  152. #define RTGUI_EVENT_WIN_CREATE_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_WIN_CREATE)
  153. #define RTGUI_EVENT_WIN_DESTROY_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_WIN_DESTROY)
  154. #define RTGUI_EVENT_WIN_SHOW_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_WIN_SHOW)
  155. #define RTGUI_EVENT_WIN_HIDE_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_WIN_HIDE)
  156. #define RTGUI_EVENT_WIN_ACTIVATE_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_WIN_ACTIVATE)
  157. #define RTGUI_EVENT_WIN_DEACTIVATE_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_WIN_DEACTIVATE)
  158. #define RTGUI_EVENT_WIN_CLOSE_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_WIN_CLOSE)
  159. #define RTGUI_EVENT_WIN_MOVE_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_WIN_MOVE)
  160. #define RTGUI_EVENT_WIN_RESIZE_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_WIN_RESIZE)
  161. #define RTGUI_EVENT_WIN_MODAL_ENTER_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_WIN_MODAL_ENTER)
  162. /*
  163. * RTGUI set window manager
  164. */
  165. struct rtgui_event_set_wm
  166. {
  167. struct rtgui_event parent;
  168. struct rtgui_app *app;
  169. };
  170. #define RTGUI_EVENT_SET_WM_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_SET_WM);
  171. /*
  172. * RTGUI Other Event
  173. */
  174. struct rtgui_event_update_begin
  175. {
  176. struct rtgui_event parent;
  177. /* the update rect */
  178. rtgui_rect_t rect;
  179. };
  180. struct rtgui_event_update_end
  181. {
  182. struct rtgui_event parent;
  183. /* the update rect */
  184. rtgui_rect_t rect;
  185. };
  186. struct rtgui_event_monitor
  187. {
  188. _RTGUI_EVENT_WIN_ELEMENTS
  189. /* the monitor rect */
  190. rtgui_rect_t rect;
  191. };
  192. struct rtgui_event_paint
  193. {
  194. _RTGUI_EVENT_WIN_ELEMENTS
  195. rtgui_rect_t rect; /* rect to be updated */
  196. };
  197. struct rtgui_timer;
  198. struct rtgui_event_timer
  199. {
  200. struct rtgui_event parent;
  201. struct rtgui_timer *timer;
  202. };
  203. typedef struct rtgui_event_timer rtgui_event_timer_t;
  204. struct rtgui_event_clip_info
  205. {
  206. _RTGUI_EVENT_WIN_ELEMENTS
  207. /* the number of rects */
  208. //rt_uint32_t num_rect;
  209. /* rtgui_rect_t *rects */
  210. };
  211. #define RTGUI_EVENT_GET_RECT(e, i) &(((rtgui_rect_t*)(e + 1))[i])
  212. #define RTGUI_EVENT_UPDATE_BEGIN_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_UPDATE_BEGIN)
  213. #define RTGUI_EVENT_UPDATE_END_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_UPDATE_END)
  214. #define RTGUI_EVENT_MONITOR_ADD_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_MONITOR_ADD)
  215. #define RTGUI_EVENT_MONITOR_REMOVE_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_MONITOR_REMOVE)
  216. #define RTGUI_EVENT_CLIP_INFO_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_CLIP_INFO)
  217. #define RTGUI_EVENT_PAINT_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_PAINT)
  218. #define RTGUI_EVENT_TIMER_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_TIMER)
  219. #define rtgui_event_show rtgui_event
  220. #define rtgui_event_hide rtgui_event
  221. #define RTGUI_EVENT_SHOW_INIT(e) RTGUI_EVENT_INIT((e), RTGUI_EVENT_SHOW)
  222. #define RTGUI_EVENT_HIDE_INIT(e) RTGUI_EVENT_INIT((e), RTGUI_EVENT_HIDE)
  223. struct rtgui_event_update_toplvl
  224. {
  225. struct rtgui_event parent;
  226. struct rtgui_win *toplvl;
  227. };
  228. #define RTGUI_EVENT_UPDATE_TOPLVL_INIT(e) \
  229. do { \
  230. RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_UPDATE_TOPLVL); \
  231. (e)->toplvl = RT_NULL; \
  232. } while (0)
  233. struct rtgui_event_vpaint_req
  234. {
  235. _RTGUI_EVENT_WIN_ELEMENTS
  236. struct rtgui_event_vpaint_req *sender;
  237. struct rt_completion *cmp;
  238. struct rtgui_dc* buffer;
  239. };
  240. #define RTGUI_EVENT_VPAINT_REQ_INIT(e, win, cm) \
  241. do { \
  242. RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_VPAINT_REQ); \
  243. (e)->wid = win; \
  244. (e)->cmp = cm; \
  245. (e)->sender = (e); \
  246. (e)->buffer = RT_NULL; \
  247. rt_completion_init((e)->cmp); \
  248. } while (0)
  249. /**
  250. * RTGUI Gesture Event
  251. */
  252. enum rtgui_gesture_type
  253. {
  254. RTGUI_GESTURE_NONE = 0x0000,
  255. RTGUI_GESTURE_TAP = 0x0001,
  256. /* Usually used to zoom in and out. */
  257. RTGUI_GESTURE_PINCH = 0x0002,
  258. RTGUI_GESTURE_DRAG = 0x0004,
  259. RTGUI_GESTURE_LONGPRESS = 0x0008,
  260. /* PINCH, DRAG finished. */
  261. RTGUI_GESTURE_FINISH = 0x8000,
  262. /* The corresponding gesture should be canceled. */
  263. RTGUI_GESTURE_CANCEL = 0x4000,
  264. RTGUI_GESTURE_TYPE_MASK = 0x0FFF,
  265. };
  266. struct rtgui_event_gesture
  267. {
  268. _RTGUI_EVENT_WIN_ELEMENTS
  269. enum rtgui_gesture_type type;
  270. };
  271. /*
  272. * RTGUI Mouse and Keyboard Event
  273. */
  274. struct rtgui_event_mouse
  275. {
  276. _RTGUI_EVENT_WIN_ELEMENTS
  277. rt_uint16_t x, y;
  278. rt_uint16_t button;
  279. /* Timestamp of this event sampled in driver. */
  280. rt_tick_t ts;
  281. /* id of touch session(from down to up). Different session should have
  282. * different id. id should never be 0. */
  283. rt_uint32_t id;
  284. };
  285. #define RTGUI_MOUSE_BUTTON_LEFT 0x01
  286. #define RTGUI_MOUSE_BUTTON_RIGHT 0x02
  287. #define RTGUI_MOUSE_BUTTON_MIDDLE 0x03
  288. #define RTGUI_MOUSE_BUTTON_WHEELUP 0x04
  289. #define RTGUI_MOUSE_BUTTON_WHEELDOWN 0x08
  290. #define RTGUI_MOUSE_BUTTON_DOWN 0x10
  291. #define RTGUI_MOUSE_BUTTON_UP 0x20
  292. #define RTGUI_EVENT_GESTURE_INIT(e, gtype) \
  293. do { \
  294. RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_GESTURE); \
  295. (e)->type = gtype; \
  296. } while (0)
  297. struct rtgui_event_kbd
  298. {
  299. _RTGUI_EVENT_WIN_ELEMENTS
  300. rt_uint16_t type; /* key down or up */
  301. rt_uint16_t key; /* current key */
  302. rt_uint16_t mod; /* current key modifiers */
  303. rt_uint16_t unicode; /* translated character */
  304. };
  305. #define RTGUI_KBD_IS_SET_CTRL(e) ((e)->mod & (RTGUI_KMOD_LCTRL | RTGUI_KMOD_RCTRL))
  306. #define RTGUI_KBD_IS_SET_ALT(e) ((e)->mod & (RTGUI_KMOD_LALT | RTGUI_KMOD_RALT))
  307. #define RTGUI_KBD_IS_SET_SHIFT(e) ((e)->mod & (RTGUI_KMOD_LSHIFT| RTGUI_KMOD_RSHIFT))
  308. #define RTGUI_KBD_IS_UP(e) ((e)->type == RTGUI_KEYUP)
  309. #define RTGUI_KBD_IS_DOWN(e) ((e)->type == RTGUI_KEYDOWN)
  310. #define RTGUI_EVENT_MOUSE_MOTION_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_MOUSE_MOTION)
  311. #define RTGUI_EVENT_MOUSE_BUTTON_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_MOUSE_BUTTON)
  312. #define RTGUI_EVENT_KBD_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_KBD)
  313. /**
  314. * RTGUI Touch Event
  315. * NOTE: There is not touch event to user applications, it's handled by server.
  316. */
  317. struct rtgui_event_touch
  318. {
  319. struct rtgui_event parent;
  320. rt_uint16_t x, y;
  321. rt_uint16_t up_down;
  322. rt_uint16_t resv;
  323. };
  324. #define RTGUI_TOUCH_UP 0x01
  325. #define RTGUI_TOUCH_DOWN 0x02
  326. #define RTGUI_TOUCH_MOTION 0x03
  327. #define RTGUI_EVENT_TOUCH_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_TOUCH)
  328. struct rtgui_event_command
  329. {
  330. _RTGUI_EVENT_WIN_ELEMENTS
  331. /* command type */
  332. rt_int32_t type;
  333. /* command id */
  334. rt_int32_t command_id;
  335. /* command string */
  336. char command_string[RTGUI_NAME_MAX];
  337. };
  338. #define RTGUI_EVENT_COMMAND_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_COMMAND)
  339. #define RTGUI_CMD_UNKNOWN 0x00
  340. #define RTGUI_CMD_WM_CLOSE 0x10
  341. #define RTGUI_CMD_USER_INT 0x20
  342. #define RTGUI_CMD_USER_STRING 0x21
  343. /************************************************************************/
  344. /* Widget Event */
  345. /************************************************************************/
  346. #define RTGUI_WIDGET_EVENT_INIT(e, t) do \
  347. { \
  348. (e)->type = (t); \
  349. (e)->sender = RT_NULL; \
  350. (e)->ack = RT_NULL; \
  351. } while (0)
  352. /*
  353. * RTGUI Scrollbar Event
  354. */
  355. struct rtgui_event_scrollbar
  356. {
  357. struct rtgui_event parent;
  358. rt_uint8_t event;
  359. };
  360. #define RTGUI_SCROLL_LINEUP 0x01
  361. #define RTGUI_SCROLL_LINEDOWN 0x02
  362. #define RTGUI_SCROLL_PAGEUP 0x03
  363. #define RTGUI_SCROLL_PAGEDOWN 0x04
  364. #define RTGUI_EVENT_SCROLLED_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_SCROLLED)
  365. /*
  366. * RTGUI Widget Focused Event
  367. */
  368. struct rtgui_event_focused
  369. {
  370. struct rtgui_event parent;
  371. struct rtgui_widget *widget;
  372. };
  373. #define RTGUI_EVENT_FOCUSED_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_FOCUSED)
  374. /*
  375. * RTGUI Widget Resize Event
  376. */
  377. struct rtgui_event_resize
  378. {
  379. struct rtgui_event parent;
  380. rt_int16_t x, y;
  381. rt_int16_t w, h;
  382. };
  383. #define RTGUI_EVENT_RESIZE_INIT(e) RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_RESIZE)
  384. /*
  385. * RTGUI Model/View Event
  386. */
  387. enum rtgui_event_model_mode
  388. {
  389. RTGUI_MV_DATA_ADDED,
  390. RTGUI_MV_DATA_CHANGED,
  391. RTGUI_MV_DATA_DELETED,
  392. };
  393. struct rtgui_event_mv_model
  394. {
  395. struct rtgui_event parent;
  396. struct rtgui_mv_model *model;
  397. struct rtgui_mv_view *view;
  398. rt_size_t first_data_changed_idx;
  399. rt_size_t last_data_changed_idx;
  400. };
  401. #define _RTGUI_EVENT_MV_INIT_TYPE(T) \
  402. rt_inline void RTGUI_EVENT_MV_MODEL_##T##_INIT(struct rtgui_event_mv_model *e) \
  403. { \
  404. RTGUI_EVENT_INIT(&((e)->parent), RTGUI_EVENT_MV_MODEL); \
  405. (e)->parent.user = RTGUI_MV_DATA_##T; \
  406. } \
  407. /* useless struct to allow trailing semicolon */ \
  408. struct dummy
  409. _RTGUI_EVENT_MV_INIT_TYPE(ADDED);
  410. _RTGUI_EVENT_MV_INIT_TYPE(CHANGED);
  411. _RTGUI_EVENT_MV_INIT_TYPE(DELETED);
  412. #undef _RTGUI_EVENT_MV_INIT_TYPE
  413. #define _RTGUI_EVENT_MV_IS_TYPE(T) \
  414. rt_inline rt_bool_t RTGUI_EVENT_MV_MODEL_IS_##T(struct rtgui_event_mv_model *e) \
  415. { \
  416. return e->parent.user == RTGUI_MV_DATA_##T; \
  417. } \
  418. /* useless struct to allow trailing semicolon */ \
  419. struct dummy
  420. _RTGUI_EVENT_MV_IS_TYPE(ADDED);
  421. _RTGUI_EVENT_MV_IS_TYPE(CHANGED);
  422. _RTGUI_EVENT_MV_IS_TYPE(DELETED);
  423. #undef _RTGUI_EVENT_MV_IS_TYPE
  424. #undef _RTGUI_EVENT_WIN_ELEMENTS
  425. union rtgui_event_generic
  426. {
  427. struct rtgui_event base;
  428. struct rtgui_event_application app_create;
  429. struct rtgui_event_application app_destroy;
  430. struct rtgui_event_application app_activate;
  431. struct rtgui_event_set_wm set_wm;
  432. struct rtgui_event_win win_base;
  433. struct rtgui_event_win_create win_create;
  434. struct rtgui_event_win_move win_move;
  435. struct rtgui_event_win_resize win_resize;
  436. struct rtgui_event_win_destroy win_destroy;
  437. struct rtgui_event_win_show win_show;
  438. struct rtgui_event_win_hide win_hide;
  439. struct rtgui_event_win_activate win_activate;
  440. struct rtgui_event_win_deactivate win_deactivate;
  441. struct rtgui_event_win_close win_close;
  442. struct rtgui_event_win_modal_enter win_modal_enter;
  443. struct rtgui_event_update_begin update_begin;
  444. struct rtgui_event_update_end update_end;
  445. struct rtgui_event_monitor monitor;
  446. struct rtgui_event_paint paint;
  447. struct rtgui_event_timer timer;
  448. struct rtgui_event_update_toplvl update_toplvl;
  449. struct rtgui_event_vpaint_req vpaint_req;
  450. struct rtgui_event_clip_info clip_info;
  451. struct rtgui_event_mouse mouse;
  452. struct rtgui_event_kbd kbd;
  453. struct rtgui_event_touch touch;
  454. struct rtgui_event_gesture gesture;
  455. struct rtgui_event_scrollbar scrollbar;
  456. struct rtgui_event_focused focused;
  457. struct rtgui_event_resize resize;
  458. struct rtgui_event_mv_model model;
  459. struct rtgui_event_command command;
  460. };
  461. #ifdef __cplusplus
  462. }
  463. #endif
  464. #endif