00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __SDK_WACOM_H__
00016 #define __SDK_WACOM_H__
00017
00018
00019 #define WACOM_NAME "wacom"
00020 #define WACOM_TYPE "TABLET"
00021
00022
00023
00024
00025
00026 #define WACOM_NUM_BUTTONS 16
00027 #define WAC_POINTER_BUTTON 1
00028 #define WAC_BARREL_BUTTON 3
00029 #define WAC_ERASER_BUTTON 2
00030 #define WAC_CHORDED_BUTTON 2
00031
00032
00033
00034
00035 #define WAC_PUCK1_BUTTON 1
00036 #define WAC_PUCK2_BUTTON 0
00037 #define WAC_PUCK3_BUTTON 3
00038 #define WAC_PUCK4_BUTTON 2
00039
00040
00041
00042
00043
00044
00045 #define WACOM_NUM_VALUATORS 16
00046
00047
00048
00049
00050 #define WAC_XCOORD_I 0
00051 #define WAC_YCOORD_I 1
00052 #define WAC_PRESSURE_I 2
00053 #define WAC_BUTTON_I 3
00054 #define WAC_TRANSDUCER_I 4
00055 #define WAC_XTILT_I 5
00056 #define WAC_YTILT_I 6
00057 #define WAC_ZCOORD_I 7
00058 #define WAC_HEIGHT_I WAC_ZCOORD_I
00059
00060
00061
00062
00063 #define WAC_2XCOORD_I 8
00064 #define WAC_2YCOORD_I 9
00065
00066
00067
00068
00069 #define WAC_TAN_PRESSURE_I 10
00070 #define WAC_ROTATION_I 11
00071 #define WAC_SERIAL_NUM_I 12
00072
00073
00074
00075
00076 #define WAC_2SERIAL_NUM_I 13
00077 #define WAC_2TRANSDUCER_I 14
00078 #define WAC_2BUTTON_I 15
00079
00080
00081
00082
00083
00084
00085
00086 #define WAC_FIRST_MSK 0x0000ffff
00087 #define WAC_SECOND_MSK 0xffff0000
00088 #define WAC_SECOND_OFFSET 16
00089
00090 #define WAC_2PRESSURE_I WAC_PRESSURE_I
00091 #define WAC_2XTILT_I WAC_XTILT_I
00092 #define WAC_2YTILT_I WAC_YTILT_I
00093 #define WAC_2ZCOORD_I WAC_ZCOORD_I
00094 #define WAC_2HEIGHT_I WAC_2ZCOORD_I
00095 #define WAC_2TAN_PRESSURE_I WAC_TAN_PRESSURE_I
00096 #define WAC_2ROTATION_I WAC_ROTATION_I
00097
00098
00099
00100
00101 #define WACOM_NUM_PTR_AXIS 2
00102 #define WAC_XPTR_I 0
00103 #define WAC_YPTR_I 1
00104
00105
00106
00107
00108
00109 #define WAC_BTN_STYLUS_MSK 0x001f
00110 #define WAC_BTN_PUCK_MSK 0x1f00
00111 #define WAC_MENU_ITEM_MSK 0x001f0000
00112 #define WAC_STYLUS_OFFSET 0
00113 #define WAC_PUCK_OFFSET 8
00114 #define WAC_MENU_OFFSET 16
00115 #define WAC_STYLUS_BUTTONS(x) (((x)&WAC_BTN_STYLUS_MSK)>>WAC_STYLUS_OFFSET)
00116 #define WAC_PUCK_BUTTONS(x) (((x)&WAC_BTN_PUCK_MSK)>>WAC_PUCK_OFFSET)
00117 #define WAC_MENU_BUTTONS(x) (((x)&WAC_MENU_ITEM_MSK)>>WAC_MENU_OFFSET)
00118
00119 #define WACOM_NUM_MENU_BUTTONS 30
00120
00121
00122
00123
00124 #define WAC_TRANSDUCER_ID_MSK 0xfff00
00125 #define WAC_TRANSDUCER_MSK 0x7
00126 #define WAC_PUCK_ID 0x0
00127 #define WAC_STYLUS_ID 0x1
00128 #define WAC_ERASER_ID 0x2
00129 #define WAC_MENU_ID 0x10
00130 #define WAC_TRANSDUCER_PROX_MSK 0x8
00131 #define WAC_TRANSDUCER_ID(x) (((x) & WAC_TRANSDUCER_ID_MSK) >> 8)
00132
00133
00134
00135
00136 #define WAC_STYLUS_BUTTON_ID(x) ((x)>>1)
00137 #define WAC_STYLUS_BUTTON_STATE(x) ((x)&0x1)
00138
00139 #define WAC_ROT_INTG_MSK 0xffc0
00140 #define WAC_ROT_FRAC_MSK 0x003f
00141 #define WAC_ROT_INTG_OFFSET 6
00142 #define WAC_ROT_FRAC_OFFSET 0
00143 #define WAC_ROTATION_INTG(x) (((x)&WAC_ROT_INTG_MSK)>>WAC_ROT_INTG_OFFSET)
00144 #define WAC_ROTATION_FRAC(x) (((x)&WAC_ROT_FRAC_MSK)>>WAC_ROT_FRAC_OFFSET)
00145
00146
00147
00148 #define WAC_CURSOR_ROTATION(x) ((x)*0.2)
00149
00150
00151
00152
00153 #define WACOM_STYLUS_NAME "stylus"
00154 #define WACOM_ERASER_NAME "eraser"
00155 #define WACOM_CURSOR_NAME "cursor"
00156
00157 #define WACOM_STYLUS_NUM_VALUATORS 6
00158 #define WACOM_ERASER_NUM_VALUATORS 6
00159 #define WACOM_CURSOR_NUM_VALUATORS 6
00160
00161 #define WACOM_XCOORD_I 0
00162 #define WACOM_YCOORD_I 1
00163 #define WACOM_PRESSURE_I 2
00164 #define WACOM_XTILT_I 3
00165 #define WACOM_YTILT_I 4
00166 #define WACOM_ROTATION_I WACOM_XTILT_I
00167 #define WACOM_WHEEL_I 5
00168
00169 #define WACOM_STYLUS_BUTTON_ID(x) ((x)>>2)
00170 #define WACOM_STYLUS_BUTTON_STATE(x) (((x)>>1)&0x1)
00171
00172
00173
00174 #define WACOM_CURSOR_ROTATION(x) ((x)*0.4)
00175
00176
00177 #define WACOM_BUTTONS_UP 0
00178
00179
00180 #define WACOM_BOTTOM_BUTTON_DOWN 1
00181 #define WACOM_TOP_BUTTON_DOWN 2
00182
00183
00184 #define WACOM_TOP_LEFT_BUTTON_DOWN 2
00185 #define WACOM_TOP_MIDDLE_BUTTON_DOWN 4
00186 #define WACOM_TOP_RIGHT_BUTTON_DOWN 8
00187 #define WACOM_BOTTOM_RIGHT_BUTTON_DOWN 16
00188 #define WACOM_BOTTOM_LEFT_BUTTON_DOWN 32
00189
00190 #endif