home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / s12628.zip / MSGS.H < prev    next >
Text File  |  1990-07-01  |  3KB  |  75 lines

  1. /* msgs.h RHS
  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_INIT                EVENTCODE(4)
  25. #define     MSG_REQUEST             EVENTCODE(5)
  26. #define     MSG_ADVISE              EVENTCODE(6)
  27. #define     MSG_TERM                EVENTCODE(7)
  28.  
  29. #define     MSG_CLR                 EVENTCODE(14)
  30. #define     MSG_ESCAPE              EVENTCODE(15)
  31.  
  32. #define     MSG_RESETINITBUTTON     EVENTCODE(16)
  33. #define     MSG_RESETPASTEBUTTON    EVENTCODE(17)
  34.  
  35. #define     MSG_APPNAME             EVENTCODE(18)
  36. #define     MSG_TOPICNAME           EVENTCODE(19)
  37. #define     MSG_ITEMNAME            EVENTCODE(20)
  38.  
  39. #define     MSG_UPARROW             SCANCODE(72)
  40. #define     MSG_LEFTARROW           SCANCODE(75)
  41. #define     MSG_RIGHTARROW          SCANCODE(77)
  42. #define     MSG_DOWNARROW           SCANCODE(80)
  43. #define     MSG_DEL                 SCANCODE(83)
  44. #define     MSG_HOME                SCANCODE(71)
  45. #define     MSG_END                 SCANCODE(79)
  46.  
  47. #define     MSG_B1UP                EVENTCODE(100)
  48. #define     MSG_B1DOWN              EVENTCODE(101)
  49. #define     MSG_B2UP                EVENTCODE(102)
  50. #define     MSG_B2DOWN              EVENTCODE(103)
  51. #define     MSG_B3UP                EVENTCODE(104)
  52. #define     MSG_B3DOWN              EVENTCODE(105)
  53. #define     MSG_MOUSEMOVED          EVENTCODE(106)
  54. #define     MSG_CHAR                EVENTCODE(107)
  55.  
  56. #define     ENTER                   13
  57. #define     ESC                     27
  58. #define     MSG_BACKSPACE           8
  59. #define     ALT_A                   SCANCODE(30)
  60. #define     ALT_C                   SCANCODE(46)
  61. #define     ALT_I                   SCANCODE(23)
  62. #define     ALT_O                   SCANCODE(24)
  63. #define     ALT_P                   SCANCODE(25)
  64. #define     ALT_R                   SCANCODE(19)
  65. #define     ALT_T                   SCANCODE(20)
  66. #define     ALT_U                   SCANCODE(22)
  67. #define     ALT_1                   SCANCODE(120)
  68. #define     ALT_2                   SCANCODE(121)
  69. #define     ALT_3                   SCANCODE(122)
  70.  
  71. #define     MOUMSG(ptr)             ((MOUEVENTINFO FAR *)ptr)
  72. #define     KBDMSG(ptr)             ((KBDKEYINFO FAR *)ptr)
  73.  
  74.  
  75.