Subversion Repositories Kolibri OS

Rev

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

  1. #ifndef __MGTK_EVENT_H
  2. #define __MGTK_EVENT_H
  3.  
  4. typedef struct {
  5.     int evType;
  6.     union {
  7.         struct {
  8.             int evCommand;
  9.             int evMessage;
  10.             void * info;
  11.             unsigned long info_long;
  12.             unsigned char info_char;
  13.         } command;
  14.         struct {
  15.             int xMouse;
  16.             int yMouse;
  17.             int bMouse;
  18.         } mouse;
  19.         struct {
  20.             int keyId;
  21.         } key;
  22.         struct {
  23.             int butId;
  24.         } button;
  25.     } type;
  26. } GEvent;
  27.  
  28. #define GEVENT_NOTHING          0
  29. #define GEVENT_COMMAND          1
  30. #define GEVENT_MOUSE            2
  31. #define GEVENT_CLICK            3
  32. #define GEVENT_KEYBOARD         4
  33. #define GEVENT_IDLE             5
  34. #define GEVENT_BUTTON           6
  35.  
  36. #define cm_Ignore       0
  37. #define cm_Disable      1
  38. #define cm_Enable       2
  39. #define cm_Click        3
  40. #define cm_Paint        4
  41. #define cm_Quit         5
  42. #define cm_Clicked      6
  43. #define cm_Scroll       7
  44. #define cm_Radio        8
  45. #define cm_Scrollup     9
  46. #define cm_Scrolldown   10
  47. #define cm_KillMenu     11
  48.  
  49. #endif
  50.