openblt

a hobby OS from the late 90s
git clone http://frotz.net/git/openblt.git
Log | Files | Refs | LICENSE

SerialMouse.h (346B)


      1 #ifndef _SERIAL_MOUSE_H
      2 #define _SERIAL_MOUSE_H
      3 
      4 struct mouse_data_packet;
      5 
      6 const int MAIN_BUTTON = 1;
      7 const int SECONDARY_BUTTON = 2;
      8 
      9 class SerialMouse {
     10 public:
     11 
     12 	SerialMouse(int xmax, int ymax);
     13 	void GetPos(int *out_x, int *out_y, int *out_buttons);
     14 
     15 private:
     16 
     17 	unsigned char SerialRead();
     18 
     19 	int fXPos, fYPos;
     20 	int fXMax, fYMax;
     21 };
     22 
     23 
     24 #endif