home *** CD-ROM | disk | FTP | other *** search
/ Power Programming / powerprogramming1994.iso / progtool / irit / drawfuns.arc / MOUSEDRV.H < prev    next >
C/C++ Source or Header  |  1989-07-29  |  2KB  |  54 lines

  1. /**************************************************************************
  2. * This is the function prototype declaration for the mousedrv module:      *
  3. *                                      *
  4. * W A R N I N G : This module assumes mouse driver was installed using    *
  5. * one of the following program: mouse.com or mouse.sys.              *
  6. *                                      *
  7. * This module can be compiled in any model (tiny..huge)              *
  8. *                                      *
  9. * The following routines are available:                      *
  10. * 1. MouseDetect() - returns TRUE if mouse detected in system.          *
  11. * 2. MouseInit() - must be called first before any other call.          *
  12. * 3. MouseShowCorsur() - show mouse cursor.                  *
  13. * 4. MouseHideCorsur() - hide mouse cursor.                  *
  14. * 5. MouseQueryBuffer() - returns event ring buffer status.          *
  15. * 6. MouseQueryDataBuffer() - returns event ring buffer data status.      *
  16. * 7. MouseGetBuffer() - returns next event from ring buffer.          *
  17. * 8. MouseFlushBuffer() - clear all data currently in buffer.          *
  18. * 9. MouseClose() - must be called last before application program dies.  *
  19. *                                      *
  20. * Note that as the mouse driver is used asyncronically (i.e. interrupts)  *
  21. * fail to call MouseInit() at the begining or even worse, call          *
  22. * MouseClose() in the end is an invitation for total system disaster!      *
  23. *                                      *
  24. *                        Gershon Elber    Aug. 88      *
  25. **************************************************************************/
  26.  
  27. #ifndef  MOUSE_DRV_H                    /* Define only once */
  28. #define  MOUSE_DRV_H
  29.  
  30. #define  BUFFER_SIZE 256             /* Size of mouse events buffer */
  31.  
  32. #ifndef  TRUE
  33. #define  TRUE    -1
  34. #define  FALSE  0
  35. #endif   TRUE
  36.  
  37. /* And finally the external routines prototypes: */
  38.  
  39. int  MouseDetect(void);
  40. char *MouseInit(void);
  41. void MouseClose(void);
  42. int  MouseQueryBuffer(void);
  43. int  MouseQueryDataBuffer(int *X, int *Y, int *Buttons, int *OverRunError);
  44. int  MouseGetBuffer(int *X, int *Y, int *Buttons);
  45. void MouseFlushBuffer(void);
  46. void MouseShowCursor(void);
  47. void MouseHideCursor(void);
  48. void MouseSetPosition(int X, int Y);
  49.  
  50. /* Two external integers defined Mouse Range (start from 0) : */
  51. extern int MSMouseXmax, MSMouseYmax;
  52.  
  53. #endif   MOUSE_DRV_H
  54.