00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016 #define MOUSE_MICROSOFT 0
00017 #define MOUSE_MOUSESYSTEMS 1
00018 #define MOUSE_MMSERIES 2
00019 #define MOUSE_LOGITECH 3
00020 #define MOUSE_BUSMOUSE 4
00021 #define MOUSE_PS2 5
00022 #define MOUSE_LOGIMAN 6
00023 #define MOUSE_GPM 7
00024 #define MOUSE_SPACEBALL 8
00025 #define MOUSE_NONE 9
00026 #define MOUSE_INTELLIMOUSE 10
00027 #define MOUSE_IMPS2 11
00028 #define MOUSE_PNP 12
00029 #define MOUSE_WACOM_GRAPHIRE 13
00030 #define MOUSE_DRMOUSE4DS 14
00031 #define MOUSE_EXPPS2 15
00032 #define MOUSE_LAST MOUSE_EXPPS2
00033
00034 #define MOUSE_ORIENTATION_VERTICAL 0
00035 #define MOUSE_ORIENTATION_HORIZONTAL 1
00036
00037 #define MOUSE_ACCEL_TYPE_NORMAL 1
00038 #define MOUSE_ACCEL_TYPE_POWER 2
00039
00040 #define DEFAULT_ACCEL_THRESH 5
00041 #define DEFAULT_ACCEL_POWER 1.2
00042 #define DEFAULT_ACCEL_OFFSET 1
00043 #define DEFAULT_ACCEL_MULT 10
00044 #define DEFAULT_MAXDELTA 0
00045 #define DEFAULT_ACCEL_MAXDELTA 0
00046 #define DEFAULT_ACCEL_TYPE 0
00047
00048 #define DEFAULT_WHEEL_STEPS 18
00049 #define DEFAULT_WHEEL_DELTA (360 / DEFAULT_WHEEL_STEPS)
00050
00051 #define MOUSE_CHG_DTR 0x80000000
00052 #define MOUSE_DTR_HIGH 0x40000000
00053 #define MOUSE_CHG_RTS 0x20000000
00054 #define MOUSE_RTS_HIGH 0x10000000
00055
00056 #define MOUSE_TYPE_MASK 0xffff
00057
00058 #define MOUSE_XDIM 1
00059 #define MOUSE_YDIM 2
00060 #define MOUSE_ZDIM 4
00061 #define MOUSE_RXDIM 8
00062 #define MOUSE_RYDIM 16
00063 #define MOUSE_RZDIM 32
00064 #define MOUSE_2DIM 3
00065 #define MOUSE_3DIM 7
00066 #define MOUSE_6DIM 63
00067
00068 static int mouse_init_return_fd (char *dev, int type, int samplerate);
00069 static void mouse_close (void);
00070 static int mouse_update (void);
00071
00072 static void mouse_setposition_6d (int x, int y, int z, int rx, int ry, int rz, int dim_mask);
00073 static void mouse_setrange_6d (int x1, int x2, int y1, int y2, int z1, int z2, int rx1, int rx2, int ry1, int ry2, int rz1, int rz2, int dim_mask);
00074 static void mouse_setscale (int s);
00075
00076 static void mouse_getposition_6d (int *x, int *y, int *z, int *rx, int *ry, int *rz, int *btns);