Subversion Repositories Kolibri OS

Rev

Go to most recent revision | Blame | Last modification | View Log | Download | RSS feed

  1. /*
  2.  * This file is part of libdom.
  3.  * Licensed under the MIT License,
  4.  *                http://www.opensource.org/licenses/mit-license.php
  5.  * Copyright 2009 Bo Yang <struggleyb.nku@gmail.com>
  6.  */
  7.  
  8. #ifndef dom_events_ui_event_h_
  9. #define dom_events_ui_event_h_
  10.  
  11. #include <stdbool.h>
  12. #include <dom/core/exceptions.h>
  13. #include <dom/core/string.h>
  14.  
  15. struct dom_abstract_view;
  16.  
  17. typedef struct dom_ui_event dom_ui_event;
  18.  
  19. dom_exception _dom_ui_event_get_view(dom_ui_event *evt,
  20.                 struct dom_abstract_view **view);
  21. #define dom_ui_event_get_view(e, v) _dom_ui_event_get_view( \
  22.                 (dom_ui_event *) (e), (struct dom_abstract_view **) (v))
  23.  
  24. dom_exception _dom_ui_event_get_detail(dom_ui_event *evt,
  25.                 int32_t *detail);
  26. #define dom_ui_event_get_detail(e, d) _dom_ui_event_get_detail(\
  27.                 (dom_ui_event *) (e), (int32_t *) (d))
  28.  
  29. dom_exception _dom_ui_event_init(dom_ui_event *evt, dom_string *type,
  30.                 bool bubble, bool cancelable, struct dom_abstract_view *view,
  31.                 int32_t detail);
  32. #define dom_ui_event_init(e, t, b, c, v, d) _dom_ui_event_init( \
  33.                 (dom_ui_event *) (e), (dom_string *) (t), (bool) (b), \
  34.                 (bool) (c), (struct dom_abstract_view *) (v), (int32_t) (d))
  35.  
  36. dom_exception _dom_ui_event_init_ns(dom_ui_event *evt,
  37.                 dom_string *namespace, dom_string *type,
  38.                 bool bubble, bool cancelable, struct dom_abstract_view *view,
  39.                 int32_t detail);
  40. #define dom_ui_event_init_ns(e, n, t, b, c, v, d) _dom_ui_event_init_ns( \
  41.                 (dom_ui_event *) (e), (dom_string *) (n), \
  42.                 (dom_string *) (t), (bool) (b), (bool) (c), \
  43.                 (struct dom_abstract_view *) (v), (int32_t) (d))
  44.  
  45. #endif
  46.