home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 22 gnu / 22-gnu.zip / gwm18a.zip / wl_event.h < prev    next >
C/C++ Source or Header  |  1995-07-03  |  2KB  |  83 lines

  1. /* Copyright 1989 GROUPE BULL -- See license conditions in file COPYRIGHT
  2.  * Copyright 1989 Massachusetts Institute of Technology
  3.  */
  4. /************************\
  5. *              *
  6. *  WOOL_OBJECT: WLEvent     *
  7. *  DEFINITIONS         *
  8. *              *
  9. \************************/
  10.  
  11. #ifndef INCLUDE_WL_EVENT_H
  12. #define INCLUDE_WL_EVENT_H
  13.  
  14. /* type */
  15.  
  16. typedef struct _WOOL_Event {
  17.     WOOL_HEADER;
  18.     int        (*match)();    /* func to match Xevents. Kind of a subtype */
  19.     int        (*release)();   /* func to wait for release (or NULL) */
  20.     int             x_type;     /* the X type of the event */
  21.     unsigned int mask;        /* the XSelectInput mask */
  22.     unsigned int user_mask;    /* the user-events mask */
  23.     unsigned int state;        /* state (modifier) */
  24.     unsigned int detail;    /* detail (keysym, button) */
  25.     unsigned int flags;        /* misc flags */
  26. }              *WOOL_Event;
  27.  
  28. /* defs */
  29.  
  30. #define UNDEFINED_KEYCODE -2        /* -1 is any key */
  31.                      /* flags field: */
  32. #define FREEZE_ON_GRABS (1 << 0)    /* replayable grab ? */
  33.  
  34. #define must_be_event(obj, n) must_be(WLEvent, obj, n)
  35.  
  36. /* exported functions */
  37.  
  38. EXT void wool_all_events_make();
  39. EXT WOOL_Event wool_event_make();
  40. EXT WOOL_Event WLEvent_make();
  41. EXT WOOL_OBJECT WLEvent_print();
  42. EXT int WLEvent_buttonpress();
  43. EXT int WLEvent_keypress();
  44. EXT WOOL_OBJECT set_grab();
  45. EXT WOOL_OBJECT remove_grab();
  46. EXT WOOL_OBJECT wool_set_grab();
  47.  
  48. /* fields */
  49.  
  50. EXT int GWM_invalid_context INIT(1);
  51.  
  52. /* methods */
  53.  
  54. EXT WOOL_METHOD WLEvent[]
  55. #ifdef DO_INIT
  56. = {
  57.    (WOOL_METHOD) 0,        /* METHODS_ARRAY */
  58.    WLNumber_eval,        /* WOOL_eval 1 */
  59.    WLEvent_print,        /* WOOL_print 2 */
  60.    WLNumber_free,        /* WOOL_free 3 */
  61.    wool_undefined_method_2,        /* WOOL_execute 4 */
  62.    wool_undefined_method_2,        /* WOOL_set 5 */
  63.    wool_undefined_method_1,    /* WOOL_get_C_value 6 */
  64.    wool_undefined_method_1,    /* WOOL_open 7 */
  65.    wool_undefined_method_1,    /* WOOL_close 8 */
  66.    wool_undefined_method_2,    /* WOOL_process_event 9 */
  67.    wool_undefined_method_1,    /* WOOL_copy 10 */
  68.    wool_undefined_method_2,    /* WOOL_get_dimensions 11 */
  69.    wool_undefined_method_2,    /* WOOL_draw 12 */
  70.    wool_undefined_method_2,    /* WOOL_equal 13 */
  71.    wool_undefined_method_2,
  72.    wool_undefined_method_2,
  73.    wool_undefined_method_1,
  74.    wool_undefined_method_1,
  75.    wool_undefined_method_1,
  76.    wool_undefined_method_1,
  77.    wool_undefined_method_1
  78. }
  79. #endif /* DO_INIT */
  80.                ;
  81.  
  82. #endif /* INCLUDE_WL_EVENT_H */
  83.