home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / DEMO / RIM22 / MACROS / MOUSE.H < prev    next >
Text File  |  1993-11-17  |  3KB  |  103 lines

  1. /*
  2. ** mouse.h
  3. **
  4. **
  5. */
  6.  
  7. #ifndef MOUSE_H_INCLUDED
  8.     #define MOUSE_H_INCLUDED
  9.  
  10.  
  11.     typedef struct _mou_info MOUSEINFO, *PMOUSEINFO;
  12.     struct _mou_info {
  13.         USHORT    usEvent;            /* type of mouse event                              */
  14.         USHORT    usButtonState;    /* state of mouse buttons at time of event */
  15.         USHORT    usShiftState;    /* state of shift keys at time of event     */
  16.         USHORT    x, y;                 /* position of mouse in window in pixels    */
  17.     };
  18.  
  19.     /* Mouse events (usEvent member of MOUSEINFO) */
  20.   #if WINDOWS
  21.     #define WM_MOUSEMOVE            0x0200
  22.     #define WM_BUTTON1DOWN        0x0201
  23.     #define WM_BUTTON1UP            0x0202
  24.     #define WM_BUTTON1DBLCLK    0x0203
  25.     #define WM_BUTTON2DOWN        0x0204
  26.     #define WM_BUTTON2UP            0x0205
  27.     #define WM_BUTTON2DBLCLK    0x0206
  28.     #define WM_BUTTON3DOWN        0x0207
  29.     #define WM_BUTTON3UP            0x0208
  30.     #define WM_BUTTON3DBLCLK    0x0209
  31.  
  32.     // none of these are defined in Win32 - the numbers are above WM_USER though.
  33.     #define WM_BUTTON1CLICK        0x0413
  34.     #define WM_BUTTON2CLICK        0x0416
  35.     #define WM_BUTTON3CLICK        0x0419
  36.     #define WM_BEGINDRAG            0x0420
  37.     #define WM_ENDDRAG            0x0421
  38.     #define WM_SINGLESELECT        0x0422
  39.     #define WM_OPEN                0x0423
  40.     #define WM_CONTEXTMENU        0x0424
  41.     #define WM_BEGINSELECT        0x0427
  42.     #define WM_ENDSELECT            0x0428
  43.  
  44.     /*
  45.     ** Button state (usButtonState member)
  46.     **        bit is set if button is down
  47.     */
  48.     #define MOU_BUTTON1            0x0001
  49.     #define MOU_BUTTON2            0x0002
  50.     #define MOU_BUTTON3            0x0004
  51.  
  52.     /*
  53.     ** State of shift keys at time of msg
  54.     **        bit is set if shift key is down
  55.     */
  56.     #define CTRL_DOWN                0x0001
  57.     #define SHIFT_DOWN            0x0004
  58.     #define ALT_DOWN                0x0010
  59.   #else
  60.     #define WM_MOUSEMOVE            0x0070
  61.     #define WM_BUTTON1DOWN        0x0071
  62.     #define WM_BUTTON1UP            0x0072
  63.     #define WM_BUTTON1DBLCLK    0x0073
  64.     #define WM_BUTTON2DOWN        0x0074
  65.     #define WM_BUTTON2UP            0x0075
  66.     #define WM_BUTTON2DBLCLK    0x0076
  67.     #define WM_BUTTON3DOWN        0x0077
  68.     #define WM_BUTTON3UP            0x0078
  69.     #define WM_BUTTON3DBLCLK    0x0079
  70.     #define WM_BUTTON1CLICK        0x0413
  71.     #define WM_BUTTON2CLICK        0x0416
  72.     #define WM_BUTTON3CLICK        0x0419
  73.     #define WM_BEGINDRAG            0x0420
  74.     #define WM_ENDDRAG            0x0421
  75.     #define WM_SINGLESELECT        0x0422
  76.     #define WM_OPEN                0x0423
  77.     #define WM_CONTEXTMENU        0x0424
  78.     #define WM_BEGINSELECT        0x0427
  79.     #define WM_ENDSELECT            0x0428
  80.  
  81.     /*
  82.     ** Button state (usButtonState member)
  83.     **        bit is set if button is down
  84.     */
  85.     #define MOU_BUTTON1            0x0001
  86.     #define MOU_BUTTON2            0x0002
  87.     #define MOU_BUTTON3            0x0004
  88.  
  89.     /*
  90.     ** State of shift keys at time of msg
  91.     **        bit is set if shift key is down
  92.     */
  93.     #define CTRL_DOWN                0x0001
  94.     #define SHIFT_DOWN            0x0004
  95.     #define ALT_DOWN                0x0010
  96.   #endif /* WINDOWS */
  97. #endif    /* MOUSE_H_INCLUDED */
  98.  
  99.  
  100. /*
  101. ** End header: mouse.h
  102. */
  103.