home *** CD-ROM | disk | FTP | other *** search
/ Power-Programmierung / CD2.mdf / c / library / dos / window / omega2 / ommouse.hpp < prev    next >
Encoding:
C/C++ Source or Header  |  1992-04-25  |  2.1 KB  |  64 lines

  1. //
  2. // *************************************************************************
  3. // *                                                                       *
  4. // *    OMEGA C++ Windowing Class Library                                  *
  5. // *    =================================                                  *
  6. // *                                                                       *
  7. // *    Copyright 1991,92 Tom Clancy                                       *
  8. // *    Submitted to the public domain, April 1992                         *
  9. // *                                                                       *
  10. // *************************************************************************
  11. // *                                                                       *
  12. // *    Mouse Class Object                                                 *
  13. // *                                                                       *
  14. // *************************************************************************
  15. //
  16.  
  17.  
  18. #ifndef _OMMOUSE
  19. #define _OMMOUSE
  20. #endif
  21.  
  22. enum mouse_events {
  23.   mButton0=500,
  24.   mButton1,
  25.   mButton2,
  26. };
  27.  
  28.  
  29. int  installmousedriver();
  30. void initmouse();
  31.  
  32. class mouse {
  33.  
  34.   int mx, my, mb, omx, omy, omb;
  35.  
  36. public:
  37.  
  38.   mouse(void);   // constructor
  39.   ~mouse(void);  // destructor
  40.  
  41.  
  42.   int  mouseinstalled(void);
  43.   void resetmouse(void);
  44.   void showmouse(void);
  45.   void hidemouse();
  46.   void mouse_exclusion(int x, int y, int x2, int y2);
  47.   int  myint();
  48.   int  mousex() {getmouse(mx, my, mb); return mx;}
  49.   int  mousey() {getmouse(mx, my, mb); return my;}
  50.   int  mouseb() {getmouse(mx, my, mb); return mb;}
  51.   virtual void getmouse(int &x, int &y, int &button);
  52.   void setmouse(int x, int y);
  53.  
  54.   void getbuttonpress(int button, int &stat, int &presses, int &xpress, int &ypress);
  55.   void getbuttonrelease(int button, int &status, int &presses, int &xrelease, int &yrelease);
  56.   void hmouselimit(int min, int max);
  57.   void vmouselimit(int min, int max);
  58.   void settextcursor(int cursorselect, int screenmask, int cursormask);
  59.   void setmickeyratio(int xmickey, int ymickey);
  60. };
  61.  
  62.  
  63.  
  64.