home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 7 / 07.iso / c / c100 / 1.ddi / MOUSE.ZIP / MOUSE.H < prev    next >
Encoding:
C/C++ Source or Header  |  1990-07-11  |  1.3 KB  |  55 lines

  1. /*
  2.  *    mouse.h
  3.  *
  4.  *    Mouse driver library for Turbo-C
  5.  *    Public Domain (p) March 1990 By Rodney Loos
  6.  */
  7.  
  8. #define ON    1
  9. #define OFF    0
  10.  
  11. #define LEFT    0        /* left button               */
  12. #define RIGHT    1        /* right button              */
  13. #define CENTER    2        /* center button             */
  14.  
  15. typedef struct {
  16.     unsigned buttons;    /* button status             */
  17.     unsigned cury;        /* last column pos           */
  18.     unsigned curx;        /* last row position         */
  19.     unsigned count;        /* button event count        */
  20.     unsigned display;    /* cursor status 1=ON 0=OFF  */
  21. } M_POS;
  22.  
  23. typedef struct  {
  24.     int    m1, m2, m3, m4;
  25. } Param;
  26.  
  27. #ifdef MAIN
  28. #else
  29. extern    M_POS    *__Mptr;
  30. extern    Param    *__Mpar;
  31. #endif
  32.  
  33. /*
  34.  *    Prototypes
  35.  */
  36.  
  37. int    m_init(void);
  38.  
  39. M_POS    *m_press(int button);
  40. M_POS    *m_release(int button);
  41. M_POS    *m_status(void);
  42.  
  43. void    mouse(Param *mptr);
  44. void    m_display(int on_off);
  45. void    m_locate(int x, int y);
  46. void    m_text_cursor(int cursor_type, int cursor_attr1, int cursor_attr2);
  47. void    m_graph_cursor(int x_hot, int y_hot, void far *cmask);
  48. void    m_conditional(int ux, int uy, int lx, int ly);
  49. void    m_window(int left, int top, int right, int bottom);
  50. void    m_light_pen(int on_off);
  51. void    m_motion(int *x, int *y);
  52. void    m_event(unsigned mask, void (far * func)(void));
  53. void    m_ratio(int x, int y);
  54. void    m_speed(int x);
  55.