home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c040 / 1.ddi / SAMPLES / MOUSE.H$ / MOUSE.bin
Encoding:
Text File  |  1989-12-03  |  1.1 KB  |  42 lines

  1. /* Include file for mouse calls. */
  2.  
  3. /* Mouse events */
  4. #define LEFT_DOWN   0x01        /* 0000 0010 Left button pressed    */
  5. #define RIGHT_DOWN  0x02        /* 0000 1000 Right button pressed   */
  6. #define MIDDLE_DOWN 0x04        /* 0010 0000 Middle button pressed  */
  7.  
  8. /* Mouse event structure */
  9. typedef struct _EVENT
  10. {
  11.     short     x, y;
  12.     unsigned  fsBtn;
  13. } EVENT;
  14.  
  15. /* Mouse pointer shape union containing structures for graphics and text */
  16. typedef union _PTRSHAPE
  17. {
  18.     struct
  19.     {
  20.         unsigned char atScreen;
  21.         unsigned char chScreen;
  22.         unsigned char atCursor;
  23.         unsigned char chCursor;
  24.     } t;
  25.     struct
  26.     {
  27.         unsigned xHot, yHot;
  28.         unsigned afsPtr[32];
  29.     } g;
  30. } PTRSHAPE;
  31.  
  32. /* Values for SetPtrVis function */
  33. typedef enum _PTRVIS { SHOW = 1, HIDE } PTRVIS;
  34.  
  35. /* Public mouse functions */
  36. int MouseInit( void );
  37. int GetMouseEvent( EVENT _far *pEvent );
  38. int GetPtrPos( EVENT _far *pEvent );
  39. int SetPtrPos( short x, short y );
  40. int SetPtrVis( PTRVIS pv );
  41. int SetPtrShape( PTRSHAPE _far *ps );
  42.