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_interntal_events_ui_event_h_
  9. #define dom_interntal_events_ui_event_h_
  10.  
  11. #include <dom/events/ui_event.h>
  12.  
  13. #include "events/event.h"
  14.  
  15. /**
  16.  * The modifier key state
  17.  */
  18. typedef enum {
  19.         DOM_MOD_CTRL = (1<<0),
  20.         DOM_MOD_META = (1<<1),
  21.         DOM_MOD_SHIFT = (1<<2),
  22.         DOM_MOD_ALT = (1<<3),
  23.         DOM_MOD_ALT_GRAPH = (1<<4),
  24.         DOM_MOD_CAPS_LOCK = (1<<5),
  25.         DOM_MOD_NUM_LOCK = (1<<6),
  26.         DOM_MOD_SCROLL = (1<<7)
  27. } dom_modifier_key;
  28.  
  29. /**
  30.  * The UIEvent
  31.  */
  32. struct dom_ui_event {
  33.         struct dom_event base;  /**< The base class */
  34.         struct dom_abstract_view *view; /**< The AbstractView */
  35.         int32_t detail; /**< Some private data for this event */
  36. };
  37.  
  38. /* Constructor */
  39. dom_exception _dom_ui_event_create(struct dom_document *doc,
  40.                 struct dom_ui_event **evt);
  41.  
  42. /* Destructor */
  43. void _dom_ui_event_destroy(struct dom_ui_event *evt);
  44.  
  45. /* Initialise function */
  46. dom_exception _dom_ui_event_initialise(struct dom_document *doc,
  47.                 struct dom_ui_event *evt);
  48.  
  49. /* Finalise function */
  50. void _dom_ui_event_finalise(struct dom_ui_event *evt);
  51.  
  52. #endif
  53.