home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / S12518.ZIP / MSGS.H < prev    next >
Text File  |  1989-10-19  |  2KB  |  56 lines

  1. /* msgs.h RHS 9/30/89
  2.  *
  3.  * global message macros and defines for kernel messaging system
  4.  *
  5.  */
  6.  
  7. #define     SCAN                    0x0100
  8. #define     EVENT                   0x0200
  9. #define     MOUSE                   0x1000
  10.  
  11. #define     ASCIICODE(val)          (val)
  12. #define     SCANCODE(val)           (val | SCAN)
  13. #define     EVENTCODE(val)          (val | EVENT)
  14.  
  15. #define     MOUSECODE(val)          (val | MOUSE)
  16. #define     ButtonEvent(event)      (event & MOUSE)
  17. #define     MOUSECODEOFF(val)       (val &= ~MOUSE)
  18.  
  19.  
  20. #define     MSG_COPY                EVENTCODE(1)
  21. #define     MSG_CUT                 EVENTCODE(2)
  22. #define     MSG_PASTE               EVENTCODE(3)
  23.  
  24. #define     MSG_CLR                 EVENTCODE(14)
  25. #define     MSG_ESCAPE              EVENTCODE(15)
  26.  
  27. #define     MSG_UPARROW             SCANCODE(72)
  28. #define     MSG_LEFTARROW           SCANCODE(75)
  29. #define     MSG_RIGHTARROW          SCANCODE(77)
  30. #define     MSG_DOWNARROW           SCANCODE(80)
  31. #define     MSG_DEL                 SCANCODE(83)
  32. #define     MSG_HOME                SCANCODE(71)
  33. #define     MSG_END                 SCANCODE(79)
  34.  
  35. #define     MSG_B1UP                EVENTCODE(100)
  36. #define     MSG_B1DOWN              EVENTCODE(101)
  37. #define     MSG_B2UP                EVENTCODE(102)
  38. #define     MSG_B2DOWN              EVENTCODE(103)
  39. #define     MSG_B3UP                EVENTCODE(104)
  40. #define     MSG_B3DOWN              EVENTCODE(105)
  41. #define     MSG_MOUSEMOVED          EVENTCODE(106)
  42. #define     MSG_CHAR                EVENTCODE(107)
  43.  
  44. #define     ENTER                   13
  45. #define     ESC                     27
  46. #define     MSG_BACKSPACE           8
  47. #define     ALT_C                   SCANCODE(46)
  48. #define     ALT_O                   SCANCODE(24)
  49. #define     ALT_U                   SCANCODE(22)
  50. #define     ALT_P                   SCANCODE(25)
  51.  
  52. #define     MOUMSG(ptr)             ((MOUEVENTINFO FAR *)ptr)
  53. #define     KBDMSG(ptr)             ((KBDKEYINFO FAR *)ptr)
  54.  
  55.  
  56.