home *** CD-ROM | disk | FTP | other *** search
- /*
- * mouse.h
- *
- * Mouse driver library for Turbo-C
- * Public Domain (p) March 1990 By Rodney Loos
- */
-
- #define ON 1
- #define OFF 0
-
- #define LEFT 0 /* left button */
- #define RIGHT 1 /* right button */
- #define CENTER 2 /* center button */
-
- typedef struct {
- unsigned buttons; /* button status */
- unsigned cury; /* last column pos */
- unsigned curx; /* last row position */
- unsigned count; /* button event count */
- unsigned display; /* cursor status 1=ON 0=OFF */
- } M_POS;
-
- typedef struct {
- int m1, m2, m3, m4;
- } Param;
-
- #ifdef MAIN
- #else
- extern M_POS *__Mptr;
- extern Param *__Mpar;
- #endif
-
- /*
- * Prototypes
- */
-
- int m_init(void);
-
- M_POS *m_press(int button);
- M_POS *m_release(int button);
- M_POS *m_status(void);
-
- void mouse(Param *mptr);
- void m_display(int on_off);
- void m_locate(int x, int y);
- void m_text_cursor(int cursor_type, int cursor_attr1, int cursor_attr2);
- void m_graph_cursor(int x_hot, int y_hot, void far *cmask);
- void m_conditional(int ux, int uy, int lx, int ly);
- void m_window(int left, int top, int right, int bottom);
- void m_light_pen(int on_off);
- void m_motion(int *x, int *y);
- void m_event(unsigned mask, void (far * func)(void));
- void m_ratio(int x, int y);
- void m_speed(int x);