Merge lp:~gerard-/wizardpen/unstuck into lp:wizardpen
- unstuck
- Merge into trunk
Proposed by
Gerard Krol
Status: | Merged |
---|---|
Merged at revision: | not available |
Proposed branch: | lp:~gerard-/wizardpen/unstuck |
Merge into: | lp:wizardpen |
Diff against target: |
1218 lines (+457/-463) 2 files modified
src/wizardpen.c (+402/-408) src/wizardpen.h (+55/-55) |
To merge this branch: | bzr merge lp:~gerard-/wizardpen/unstuck |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Martin Owens | Approve | ||
Review via email: mp+21781@code.launchpad.net |
Commit message
Description of the change
Includes compatibility for the new API (xorg-x11-
Works fine for me with a Trust TB6300 (UC-LOGIC Tablet WP8060U), debian testing, AMD64
To post a comment you must log in.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'src/wizardpen.c' | |||
2 | --- src/wizardpen.c 2009-07-17 19:56:32 +0000 | |||
3 | +++ src/wizardpen.c 2010-03-20 19:15:26 +0000 | |||
4 | @@ -29,7 +29,7 @@ | |||
5 | 29 | 29 | ||
6 | 30 | #define _WIZARDPEN_C_ | 30 | #define _WIZARDPEN_C_ |
7 | 31 | /***************************************************************************** | 31 | /***************************************************************************** |
9 | 32 | * Standard Headers | 32 | * Standard Headers |
10 | 33 | ****************************************************************************/ | 33 | ****************************************************************************/ |
11 | 34 | 34 | ||
12 | 35 | #ifdef LINUX_INPUT | 35 | #ifdef LINUX_INPUT |
13 | @@ -71,16 +71,16 @@ | |||
14 | 71 | #endif | 71 | #endif |
15 | 72 | 72 | ||
16 | 73 | /***************************************************************************** | 73 | /***************************************************************************** |
18 | 74 | * Local Headers | 74 | * Local Headers |
19 | 75 | ****************************************************************************/ | 75 | ****************************************************************************/ |
20 | 76 | #include "wizardpen.h" | 76 | #include "wizardpen.h" |
21 | 77 | 77 | ||
22 | 78 | /***************************************************************************** | 78 | /***************************************************************************** |
24 | 79 | * Variables without includable headers | 79 | * Variables without includable headers |
25 | 80 | ****************************************************************************/ | 80 | ****************************************************************************/ |
26 | 81 | 81 | ||
27 | 82 | /***************************************************************************** | 82 | /***************************************************************************** |
29 | 83 | * Local Variables | 83 | * Local Variables |
30 | 84 | ****************************************************************************/ | 84 | ****************************************************************************/ |
31 | 85 | 85 | ||
32 | 86 | float rz; | 86 | float rz; |
33 | @@ -103,79 +103,79 @@ | |||
34 | 103 | 103 | ||
35 | 104 | _X_EXPORT InputDriverRec WIZARDPEN = | 104 | _X_EXPORT InputDriverRec WIZARDPEN = |
36 | 105 | { | 105 | { |
44 | 106 | 6, | 106 | 6, |
45 | 107 | "wizardpen", | 107 | "wizardpen", |
46 | 108 | NULL, | 108 | NULL, |
47 | 109 | WizardPenPreInit, | 109 | WizardPenPreInit, |
48 | 110 | NULL, | 110 | NULL, |
49 | 111 | NULL, | 111 | NULL, |
50 | 112 | 0 | 112 | 0 |
51 | 113 | }; | 113 | }; |
52 | 114 | 114 | ||
53 | 115 | #ifdef XFree86LOADER | 115 | #ifdef XFree86LOADER |
54 | 116 | static XF86ModuleVersionInfo VersionRec = | 116 | static XF86ModuleVersionInfo VersionRec = |
55 | 117 | { | 117 | { |
66 | 118 | "wizardpen", | 118 | "wizardpen", |
67 | 119 | MODULEVENDORSTRING, | 119 | MODULEVENDORSTRING, |
68 | 120 | MODINFOSTRING1, | 120 | MODINFOSTRING1, |
69 | 121 | MODINFOSTRING2, | 121 | MODINFOSTRING2, |
70 | 122 | XORG_VERSION_CURRENT, | 122 | XORG_VERSION_CURRENT, |
71 | 123 | PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL, | 123 | PACKAGE_VERSION_MAJOR, PACKAGE_VERSION_MINOR, PACKAGE_VERSION_PATCHLEVEL, |
72 | 124 | ABI_CLASS_XINPUT, | 124 | ABI_CLASS_XINPUT, |
73 | 125 | ABI_XINPUT_VERSION, | 125 | ABI_XINPUT_VERSION, |
74 | 126 | MOD_CLASS_XINPUT, | 126 | MOD_CLASS_XINPUT, |
75 | 127 | {0, 0, 0, 0} | 127 | {0, 0, 0, 0} |
76 | 128 | }; | 128 | }; |
77 | 129 | 129 | ||
78 | 130 | 130 | ||
79 | 131 | _X_EXPORT XF86ModuleData wizardpenModuleData = { | 131 | _X_EXPORT XF86ModuleData wizardpenModuleData = { |
83 | 132 | &VersionRec, | 132 | &VersionRec, |
84 | 133 | SetupProc, | 133 | SetupProc, |
85 | 134 | TearDownProc | 134 | TearDownProc |
86 | 135 | }; | 135 | }; |
87 | 136 | 136 | ||
88 | 137 | /***************************************************************************** | 137 | /***************************************************************************** |
90 | 138 | * Function Definitions | 138 | * Function Definitions |
91 | 139 | ****************************************************************************/ | 139 | ****************************************************************************/ |
92 | 140 | 140 | ||
93 | 141 | static pointer | 141 | static pointer |
98 | 142 | SetupProc( pointer module, | 142 | SetupProc( pointer module, |
99 | 143 | pointer options, | 143 | pointer options, |
100 | 144 | int *errmaj, | 144 | int *errmaj, |
101 | 145 | int *errmin ) | 145 | int *errmin ) |
102 | 146 | { | 146 | { |
105 | 147 | xf86AddInputDriver(&WIZARDPEN, module, 0); | 147 | xf86AddInputDriver(&WIZARDPEN, module, 0); |
106 | 148 | return module; | 148 | return module; |
107 | 149 | } | 149 | } |
108 | 150 | 150 | ||
109 | 151 | static void | 151 | static void |
110 | 152 | TearDownProc( pointer p ) | 152 | TearDownProc( pointer p ) |
111 | 153 | { | 153 | { |
112 | 154 | #if 0 | 154 | #if 0 |
123 | 155 | LocalDevicePtr local = (LocalDevicePtr) p; | 155 | LocalDevicePtr local = (LocalDevicePtr) p; |
124 | 156 | AceCadPrivatePtr priv = (AceCadPrivatePtr) local->private; | 156 | AceCadPrivatePtr priv = (AceCadPrivatePtr) local->private; |
125 | 157 | 157 | ||
126 | 158 | DeviceOff (local->dev); | 158 | DeviceOff (local->dev); |
127 | 159 | 159 | ||
128 | 160 | xf86CloseSerial (local->fd); | 160 | xf86CloseSerial (local->fd); |
129 | 161 | XisbFree (priv->buffer); | 161 | XisbFree (priv->buffer); |
130 | 162 | xfree (priv); | 162 | xfree (priv); |
131 | 163 | xfree (local->name); | 163 | xfree (local->name); |
132 | 164 | xfree (local); | 164 | xfree (local); |
133 | 165 | #endif | 165 | #endif |
134 | 166 | } | 166 | } |
135 | 167 | #endif | 167 | #endif |
136 | 168 | 168 | ||
137 | 169 | static const char *default_options[] = | 169 | static const char *default_options[] = |
138 | 170 | { | 170 | { |
147 | 171 | "BaudRate", "9600", | 171 | "BaudRate", "9600", |
148 | 172 | "StopBits", "1", | 172 | "StopBits", "1", |
149 | 173 | "DataBits", "8", | 173 | "DataBits", "8", |
150 | 174 | "Parity", "Odd", | 174 | "Parity", "Odd", |
151 | 175 | "Vmin", "1", | 175 | "Vmin", "1", |
152 | 176 | "Vtime", "10", | 176 | "Vtime", "10", |
153 | 177 | "FlowControl", "Xoff", | 177 | "FlowControl", "Xoff", |
154 | 178 | NULL | 178 | NULL |
155 | 179 | }; | 179 | }; |
156 | 180 | 180 | ||
157 | 181 | #ifdef LINUX_INPUT | 181 | #ifdef LINUX_INPUT |
158 | @@ -212,7 +212,7 @@ | |||
159 | 212 | cmp_at = 256; | 212 | cmp_at = 256; |
160 | 213 | ioctl(fd, EVIOCGNAME(sizeof(name)), name); | 213 | ioctl(fd, EVIOCGNAME(sizeof(name)), name); |
161 | 214 | name[cmp_at] = '\0'; | 214 | name[cmp_at] = '\0'; |
163 | 215 | if (xf86NameCmp(name, wizardpen_name) == 0) | 215 | if (xf86NameCmp(name, wizardpen_name) == 0) |
164 | 216 | return TRUE; | 216 | return TRUE; |
165 | 217 | return FALSE; | 217 | return FALSE; |
166 | 218 | } | 218 | } |
167 | @@ -253,7 +253,7 @@ | |||
168 | 253 | xf86MsgVerb(X_INFO, verb, "%s: probing event devices for WizardPen tablets\n", local->name); | 253 | xf86MsgVerb(X_INFO, verb, "%s: probing event devices for WizardPen tablets\n", local->name); |
169 | 254 | for (i = 0; ; i++) { | 254 | for (i = 0; ; i++) { |
170 | 255 | int fd = -1; | 255 | int fd = -1; |
172 | 256 | Bool is_wizardpen; | 256 | Bool is_wizardpen; |
173 | 257 | 257 | ||
174 | 258 | np = SET_EVENT_NUM(fname, i); | 258 | np = SET_EVENT_NUM(fname, i); |
175 | 259 | if (np < 0 || np >= EV_DEV_NAME_MAXLEN) { | 259 | if (np < 0 || np >= EV_DEV_NAME_MAXLEN) { |
176 | @@ -334,98 +334,98 @@ | |||
177 | 334 | /* deprecated box settings, Z axis */ | 334 | /* deprecated box settings, Z axis */ |
178 | 335 | s = xf86FindOptionValue(local->options, "ClickPressureLevel"); | 335 | s = xf86FindOptionValue(local->options, "ClickPressureLevel"); |
179 | 336 | if (s && strlen(s) > 0) { | 336 | if (s && strlen(s) > 0) { |
184 | 337 | xf86Msg(X_WARNING, "%s: Option \"ClickPressureLevel\" " | 337 | xf86Msg(X_WARNING, "%s: Option \"ClickPressureLevel\" " |
185 | 338 | "is DEPRECATED, please use \"TopZ\"\n", local->name); | 338 | "is DEPRECATED, please use \"TopZ\"\n", local->name); |
186 | 339 | priv->topZ = atoi(s); | 339 | priv->topZ = atoi(s); |
187 | 340 | xf86Msg(X_CONFIG, "%s: TopZ = %d\n", local->name, priv->topZ); | 340 | xf86Msg(X_CONFIG, "%s: TopZ = %d\n", local->name, priv->topZ); |
188 | 341 | } | 341 | } |
189 | 342 | /* end of deprecated box settings, Z axis */ | 342 | /* end of deprecated box settings, Z axis */ |
190 | 343 | 343 | ||
191 | 344 | /* box settings */ | 344 | /* box settings */ |
192 | 345 | s = xf86FindOptionValue(local->options, "TopX"); | 345 | s = xf86FindOptionValue(local->options, "TopX"); |
193 | 346 | if (s && strlen(s) > 0) { | 346 | if (s && strlen(s) > 0) { |
196 | 347 | priv->topX = atoi(s); | 347 | priv->topX = atoi(s); |
197 | 348 | xf86Msg(X_CONFIG, "%s: TopX = %d\n", local->name, priv->topX); | 348 | xf86Msg(X_CONFIG, "%s: TopX = %d\n", local->name, priv->topX); |
198 | 349 | } | 349 | } |
199 | 350 | 350 | ||
200 | 351 | s = xf86FindOptionValue(local->options, "TopY"); | 351 | s = xf86FindOptionValue(local->options, "TopY"); |
201 | 352 | if (s && strlen(s) > 0) { | 352 | if (s && strlen(s) > 0) { |
204 | 353 | priv->topY = atoi(s); | 353 | priv->topY = atoi(s); |
205 | 354 | xf86Msg(X_CONFIG, "%s: TopY = %d\n", local->name, priv->topY); | 354 | xf86Msg(X_CONFIG, "%s: TopY = %d\n", local->name, priv->topY); |
206 | 355 | } | 355 | } |
207 | 356 | 356 | ||
208 | 357 | s = xf86FindOptionValue(local->options, "TopZ"); | 357 | s = xf86FindOptionValue(local->options, "TopZ"); |
209 | 358 | if (s && strlen(s) > 0) { | 358 | if (s && strlen(s) > 0) { |
212 | 359 | priv->topZ = atoi(s); | 359 | priv->topZ = atoi(s); |
213 | 360 | xf86Msg(X_CONFIG, "%s: TopZ = %d\n", local->name, priv->topZ); | 360 | xf86Msg(X_CONFIG, "%s: TopZ = %d\n", local->name, priv->topZ); |
214 | 361 | } | 361 | } |
215 | 362 | 362 | ||
216 | 363 | s = xf86FindOptionValue(local->options, "BottomX"); | 363 | s = xf86FindOptionValue(local->options, "BottomX"); |
217 | 364 | if (s && strlen(s) > 0) { | 364 | if (s && strlen(s) > 0) { |
220 | 365 | priv->bottomX = atoi(s); | 365 | priv->bottomX = atoi(s); |
221 | 366 | xf86Msg(X_CONFIG, "%s: BottomX = %d\n", local->name, priv->bottomX); | 366 | xf86Msg(X_CONFIG, "%s: BottomX = %d\n", local->name, priv->bottomX); |
222 | 367 | } | 367 | } |
223 | 368 | 368 | ||
224 | 369 | s = xf86FindOptionValue(local->options, "BottomY"); | 369 | s = xf86FindOptionValue(local->options, "BottomY"); |
225 | 370 | if (s && strlen(s) > 0) { | 370 | if (s && strlen(s) > 0) { |
228 | 371 | priv->bottomY = atoi(s); | 371 | priv->bottomY = atoi(s); |
229 | 372 | xf86Msg(X_CONFIG, "%s: BottomY = %d\n", local->name, priv->bottomY); | 372 | xf86Msg(X_CONFIG, "%s: BottomY = %d\n", local->name, priv->bottomY); |
230 | 373 | } | 373 | } |
231 | 374 | 374 | ||
232 | 375 | s = xf86FindOptionValue(local->options, "BottomZ"); | 375 | s = xf86FindOptionValue(local->options, "BottomZ"); |
233 | 376 | if (s && strlen(s) > 0) { | 376 | if (s && strlen(s) > 0) { |
236 | 377 | priv->bottomZ = atoi(s); | 377 | priv->bottomZ = atoi(s); |
237 | 378 | xf86Msg(X_CONFIG, "%s: BottomZ = %d\n", local->name, priv->bottomZ); | 378 | xf86Msg(X_CONFIG, "%s: BottomZ = %d\n", local->name, priv->bottomZ); |
238 | 379 | } | 379 | } |
239 | 380 | 380 | ||
240 | 381 | s = xf86FindOptionValue(local->options, "ScreenX"); | 381 | s = xf86FindOptionValue(local->options, "ScreenX"); |
241 | 382 | if (s && strlen(s) > 0) { | 382 | if (s && strlen(s) > 0) { |
244 | 383 | screenmaxx = atoi(s); | 383 | screenmaxx = atoi(s); |
245 | 384 | xf86Msg(X_CONFIG, "%s: ScreenX = %d\n", local->name, screenmaxx); | 384 | xf86Msg(X_CONFIG, "%s: ScreenX = %d\n", local->name, screenmaxx); |
246 | 385 | }else | 385 | }else |
249 | 386 | screenmaxx = screenInfo.screens[0]->width; | 386 | screenmaxx = screenInfo.screens[0]->width; |
250 | 387 | 387 | ||
251 | 388 | s = xf86FindOptionValue(local->options, "ScreenY"); | 388 | s = xf86FindOptionValue(local->options, "ScreenY"); |
252 | 389 | if (s && strlen(s) > 0) { | 389 | if (s && strlen(s) > 0) { |
255 | 390 | screenmaxy = atoi(s); | 390 | screenmaxy = atoi(s); |
256 | 391 | xf86Msg(X_CONFIG, "%s: ScreenY = %d\n", local->name, screenmaxy); | 391 | xf86Msg(X_CONFIG, "%s: ScreenY = %d\n", local->name, screenmaxy); |
257 | 392 | }else | 392 | }else |
259 | 393 | screenmaxy = screenInfo.screens[0]->height; | 393 | screenmaxy = screenInfo.screens[0]->height; |
260 | 394 | 394 | ||
261 | 395 | s = xf86FindOptionValue(local->options, "debugyn"); | 395 | s = xf86FindOptionValue(local->options, "debugyn"); |
262 | 396 | if (s && strlen(s) > 0) { | 396 | if (s && strlen(s) > 0) { |
265 | 397 | debugyn = atoi(s); | 397 | debugyn = atoi(s); |
266 | 398 | xf86Msg(X_CONFIG, "%s: debugyn = %d\n", local->name, debugyn); | 398 | xf86Msg(X_CONFIG, "%s: debugyn = %d\n", local->name, debugyn); |
267 | 399 | } | 399 | } |
268 | 400 | 400 | ||
269 | 401 | s = xf86FindOptionValue(local->options, "MouseSpeed"); | 401 | s = xf86FindOptionValue(local->options, "MouseSpeed"); |
270 | 402 | if (s && strlen(s) > 0) { | 402 | if (s && strlen(s) > 0) { |
273 | 403 | mousespeed = atoi(s); | 403 | mousespeed = atoi(s); |
274 | 404 | xf86Msg(X_CONFIG, "%s: MouseSpeed = %d\n", local->name, mousespeed); | 404 | xf86Msg(X_CONFIG, "%s: MouseSpeed = %d\n", local->name, mousespeed); |
275 | 405 | } | 405 | } |
277 | 406 | 406 | ||
278 | 407 | s = xf86FindOptionValue(local->options, "MouseAccel"); | 407 | s = xf86FindOptionValue(local->options, "MouseAccel"); |
279 | 408 | if (s && strlen(s) > 0) { | 408 | if (s && strlen(s) > 0) { |
282 | 409 | mouseaccel = atoi(s); | 409 | mouseaccel = atoi(s); |
283 | 410 | xf86Msg(X_CONFIG, "%s: MouseAccel = %d\n", local->name, mouseaccel); | 410 | xf86Msg(X_CONFIG, "%s: MouseAccel = %d\n", local->name, mouseaccel); |
284 | 411 | } | 411 | } |
285 | 412 | 412 | ||
286 | 413 | s = xf86FindOptionValue(local->options, "Rotate90"); | 413 | s = xf86FindOptionValue(local->options, "Rotate90"); |
287 | 414 | if (s && strlen(s) > 0) { | 414 | if (s && strlen(s) > 0) { |
300 | 415 | int rotate; | 415 | int rotate; |
301 | 416 | rotate90 = atoi(s); | 416 | rotate90 = atoi(s); |
302 | 417 | xf86Msg(X_CONFIG, "%s: Rotate90 = %d\n", local->name, rotate90); | 417 | xf86Msg(X_CONFIG, "%s: Rotate90 = %d\n", local->name, rotate90); |
303 | 418 | if(rotate90){ | 418 | if(rotate90){ |
304 | 419 | int temp; | 419 | int temp; |
305 | 420 | temp = priv->bottomY; | 420 | temp = priv->bottomY; |
306 | 421 | priv->bottomY = priv->bottomX; | 421 | priv->bottomY = priv->bottomX; |
307 | 422 | priv->bottomX = temp; | 422 | priv->bottomX = temp; |
308 | 423 | temp = priv->topY; | 423 | temp = priv->topY; |
309 | 424 | priv->topY = priv->topX; | 424 | priv->topY = priv->topX; |
310 | 425 | priv->topX = temp; | 425 | priv->topX = temp; |
311 | 426 | } | 426 | } |
312 | 427 | } | 427 | } |
314 | 428 | 428 | ||
315 | 429 | /* end of box settings */ | 429 | /* end of box settings */ |
316 | 430 | 430 | ||
317 | 431 | // increment setting | 431 | // increment setting |
318 | @@ -631,14 +631,25 @@ | |||
319 | 631 | LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate; | 631 | LocalDevicePtr local = (LocalDevicePtr) dev->public.devicePrivate; |
320 | 632 | WizardPenPrivatePtr priv = (WizardPenPrivatePtr) (local->private); | 632 | WizardPenPrivatePtr priv = (WizardPenPrivatePtr) (local->private); |
321 | 633 | priv->wizardpenOldX = 0; | 633 | priv->wizardpenOldX = 0; |
325 | 634 | priv->wizardpenOldY = 0; | 634 | priv->wizardpenOldY = 0; |
326 | 635 | priv->wizardpenOldZ = 0; | 635 | priv->wizardpenOldZ = 0; |
327 | 636 | unsigned char map[] = | 636 | unsigned char map[] = |
328 | 637 | {0, 1, 2, 3, 4, 5}; | 637 | {0, 1, 2, 3, 4, 5}; |
329 | 638 | xf86MsgVerb(X_INFO, 4, "%s Init\n", local->name); | 638 | xf86MsgVerb(X_INFO, 4, "%s Init\n", local->name); |
330 | 639 | 639 | ||
331 | 640 | #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 | ||
332 | 641 | Atom label=0; | ||
333 | 642 | Atom atoms[MAX_VALUATORS] = { 0 }; | ||
334 | 643 | #endif | ||
335 | 644 | |||
336 | 640 | /* 3 buttons changed to SIX */ | 645 | /* 3 buttons changed to SIX */ |
338 | 641 | if (InitButtonClassDeviceStruct (dev, 6, map) == FALSE) | 646 | if (InitButtonClassDeviceStruct( |
339 | 647 | dev, | ||
340 | 648 | 6, | ||
341 | 649 | #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 | ||
342 | 650 | atoms, | ||
343 | 651 | #endif | ||
344 | 652 | map) == FALSE) | ||
345 | 642 | { | 653 | { |
346 | 643 | xf86Msg(X_ERROR, "%s: unable to allocate ButtonClassDeviceStruct\n", local->name); | 654 | xf86Msg(X_ERROR, "%s: unable to allocate ButtonClassDeviceStruct\n", local->name); |
347 | 644 | return !Success; | 655 | return !Success; |
348 | @@ -657,52 +668,58 @@ | |||
349 | 657 | 668 | ||
350 | 658 | 669 | ||
351 | 659 | /* 3 axes */ | 670 | /* 3 axes */ |
353 | 660 | if (InitValuatorClassDeviceStruct (dev, 3, | 671 | if (InitValuatorClassDeviceStruct(dev, 3, |
354 | 672 | #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 | ||
355 | 673 | atoms, | ||
356 | 674 | #endif | ||
357 | 661 | #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 | 675 | #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 3 |
359 | 662 | xf86GetMotionEvents, | 676 | xf86GetMotionEvents, |
360 | 663 | #endif | 677 | #endif |
364 | 664 | local->history_size, | 678 | local->history_size, |
365 | 665 | ((priv->flags & ABSOLUTE_FLAG)? Absolute: Relative)|OutOfProximity) | 679 | ((priv->flags & ABSOLUTE_FLAG)? Absolute: Relative)|OutOfProximity) == FALSE) |
363 | 666 | == FALSE) | ||
366 | 667 | { | 680 | { |
367 | 668 | xf86Msg(X_ERROR, "%s: unable to allocate ValuatorClassDeviceStruct\n", local->name); | 681 | xf86Msg(X_ERROR, "%s: unable to allocate ValuatorClassDeviceStruct\n", local->name); |
368 | 669 | return !Success; | 682 | return !Success; |
369 | 670 | } | 683 | } |
370 | 671 | else | 684 | else |
371 | 672 | { | 685 | { |
372 | 673 | |||
373 | 674 | InitValuatorAxisStruct(dev, | 686 | InitValuatorAxisStruct(dev, |
374 | 675 | 0, | 687 | 0, |
381 | 676 | 0, /* min val */ | 688 | #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 |
382 | 677 | /*screenInfo.screens[0]->width,*/ /* max val */ | 689 | label, |
383 | 678 | screenmaxx, /* max val */ | 690 | #endif |
384 | 679 | 1000, /* resolution */ | 691 | 0, /* min val */ |
385 | 680 | 0, /* min_res */ | 692 | screenmaxx, /* max val */ |
386 | 681 | 1000); /* max_res */ | 693 | 1000, /* resolution */ |
387 | 694 | 0, /* min_res */ | ||
388 | 695 | 1000); /* max_res */ | ||
389 | 682 | InitValuatorAxisStruct(dev, | 696 | InitValuatorAxisStruct(dev, |
390 | 683 | 1, | 697 | 1, |
397 | 684 | 0, /* min val */ | 698 | #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 |
398 | 685 | /*screenInfo.screens[0]->height,*/ /* max val */ | 699 | label, |
399 | 686 | screenmaxy, /* max val */ | 700 | #endif |
400 | 687 | 1000, /* resolution */ | 701 | 0, /* min val */ |
401 | 688 | 0, /* min_res */ | 702 | screenmaxy, /* max val */ |
402 | 689 | 1000); /* max_res */ | 703 | 1000, /* resolution */ |
403 | 704 | 0, /* min_res */ | ||
404 | 705 | 1000); /* max_res */ | ||
405 | 690 | InitValuatorAxisStruct(dev, | 706 | InitValuatorAxisStruct(dev, |
406 | 691 | 2, | 707 | 2, |
420 | 692 | 0, /* min val */ | 708 | #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 7 |
421 | 693 | /*priv->bottomZ,*/ /* max val */ | 709 | label, |
422 | 694 | 1023, | 710 | #endif |
423 | 695 | 1000, /* resolution */ | 711 | 0, /* min val */ |
424 | 696 | 0, /* min_res */ | 712 | 1023, /* max val */ |
425 | 697 | 1000); /* max_res */ | 713 | 1000, /* resolution */ |
426 | 698 | 714 | 0, /* min_res */ | |
427 | 699 | if(rotate90){ | 715 | 1000); /* max_res */ |
415 | 700 | int tempval; | ||
416 | 701 | tempval = screenmaxx; | ||
417 | 702 | screenmaxx = screenmaxy; | ||
418 | 703 | screenmaxy = tempval; | ||
419 | 704 | } | ||
428 | 705 | 716 | ||
429 | 717 | if (rotate90) { | ||
430 | 718 | int tempval; | ||
431 | 719 | tempval = screenmaxx; | ||
432 | 720 | screenmaxx = screenmaxy; | ||
433 | 721 | screenmaxy = tempval; | ||
434 | 722 | } | ||
435 | 706 | } | 723 | } |
436 | 707 | 724 | ||
437 | 708 | if (InitProximityClassDeviceStruct (dev) == FALSE) | 725 | if (InitProximityClassDeviceStruct (dev) == FALSE) |
438 | @@ -738,7 +755,7 @@ | |||
439 | 738 | } | 755 | } |
440 | 739 | 756 | ||
441 | 740 | #ifdef LINUX_INPUT | 757 | #ifdef LINUX_INPUT |
443 | 741 | #define set_bit(byte,nb,bit) (bit ? byte | (1<<nb) : byte & (~(1<<nb))) | 758 | #define set_bit(byte,nb,bit) (bit ? byte | (1<<nb) : byte & (~(1<<nb))) |
444 | 742 | static void | 759 | static void |
445 | 743 | USBReadInput (LocalDevicePtr local) | 760 | USBReadInput (LocalDevicePtr local) |
446 | 744 | { | 761 | { |
447 | @@ -778,312 +795,289 @@ | |||
448 | 778 | return; | 795 | return; |
449 | 779 | } else { | 796 | } else { |
450 | 780 | if (!avail) { | 797 | if (!avail) { |
452 | 781 | // If the device wasn't available last time we checked | 798 | // If the device wasn't available last time we checked |
453 | 782 | xf86Msg(X_INFO, "%s: device %s is available again\n", local->name, xf86FindOptionValue(local->options, "Device")); | 799 | xf86Msg(X_INFO, "%s: device %s is available again\n", local->name, xf86FindOptionValue(local->options, "Device")); |
454 | 783 | priv->flags |= AVAIL_FLAG; | 800 | priv->flags |= AVAIL_FLAG; |
455 | 784 | } | 801 | } |
456 | 785 | } | 802 | } |
457 | 786 | 803 | ||
458 | 787 | for (event = (struct input_event *)eventbuf; | 804 | for (event = (struct input_event *)eventbuf; |
463 | 788 | event < (struct input_event *)(eventbuf+len); event++) | 805 | event < (struct input_event *)(eventbuf+len); |
464 | 789 | { | 806 | event++) |
465 | 790 | switch (event->type) { | 807 | { |
466 | 791 | case EV_SYN:// 2.6.x | 808 | switch (event->type) { |
467 | 809 | case EV_SYN:// 2.6.x | ||
468 | 792 | if (event->code != SYN_REPORT && event->code != 0) | 810 | if (event->code != SYN_REPORT && event->code != 0) |
469 | 793 | xf86Msg(X_ERROR, "%s: unknown EV_SYN code %d\n", local->name, event->code); | 811 | xf86Msg(X_ERROR, "%s: unknown EV_SYN code %d\n", local->name, event->code); |
470 | 794 | break; | 812 | break; |
567 | 795 | case EV_REL: | 813 | case EV_REL: |
568 | 796 | if(debugyn) | 814 | if(debugyn) |
569 | 797 | xf86Msg(X_ERROR, "EV_REL! %s: event type/code/value %d/%d/%d\n", local->name, event->type, event->code, event->value); | 815 | xf86Msg(X_ERROR, "EV_REL! %s: event type/code/value %d/%d/%d\n", local->name, event->type, event->code, event->value); |
570 | 798 | int xaccel, yaccel; | 816 | int xaccel, yaccel; |
571 | 799 | 817 | switch (event->code) { | |
572 | 800 | switch(event->code){ | 818 | case REL_X: |
573 | 801 | case REL_X: | 819 | xaccel = 1; |
574 | 802 | xaccel = 1; | 820 | if(mouseaccel) { |
575 | 803 | if(mouseaccel){ | 821 | if(abs(event->value) > 2) { |
576 | 804 | if(abs(event->value) > 2){ | 822 | xaccel = 2; |
577 | 805 | xaccel = 2; | 823 | } else if(abs(event->value) > 4) { |
578 | 806 | }else if(abs(event->value) > 4){ | 824 | xaccel = 3; |
579 | 807 | xaccel = 3; | 825 | } else if(abs(event->value) > 6) { |
580 | 808 | }else if(abs(event->value) > 6){ | 826 | xaccel = 4; |
581 | 809 | xaccel = 4; | 827 | } |
582 | 810 | } | 828 | } |
583 | 811 | } | 829 | x = x + (xaccel * mousespeed * event->value); |
584 | 812 | x = x + (xaccel * mousespeed * event->value); | 830 | if (x < priv->topX) { |
585 | 813 | if(x < priv->topX){ | 831 | x = 1 + priv->topX; |
586 | 814 | x = 1 + priv->topX; | 832 | } |
587 | 815 | } | 833 | if (x > priv->bottomX) { |
588 | 816 | if( x > priv->bottomX){ | 834 | x = priv->bottomX; |
589 | 817 | x = priv->bottomX; | 835 | } |
590 | 818 | } | 836 | break; |
591 | 819 | break; | 837 | case REL_Y: |
592 | 820 | case REL_Y: | 838 | yaccel = 1; |
593 | 821 | yaccel = 1; | 839 | if(mouseaccel){ |
594 | 822 | if(mouseaccel){ | 840 | if (abs(event->value) > 2) { |
595 | 823 | if(abs(event->value) > 2){ | 841 | yaccel = 2; |
596 | 824 | yaccel = 2; | 842 | } else if(abs(event->value) > 4) { |
597 | 825 | }else if(abs(event->value) > 4){ | 843 | yaccel = 3; |
598 | 826 | yaccel = 3; | 844 | } else if(abs(event->value) > 6) { |
599 | 827 | }else if(abs(event->value) > 6){ | 845 | yaccel = 4; |
600 | 828 | yaccel = 4; | 846 | } |
601 | 829 | } | 847 | } |
602 | 830 | } | 848 | y = y + (yaccel * mousespeed * event->value); |
603 | 831 | y = y + (yaccel * mousespeed * event->value); | 849 | if (y < priv->topY) { |
604 | 832 | if(y < priv->topY){ | 850 | y = 1 + priv->topY; |
605 | 833 | y = 1 + priv->topY; | 851 | } |
606 | 834 | } | 852 | if (y > priv->bottomY) { |
607 | 835 | if( y > priv->bottomY){ | 853 | y = priv->bottomY; |
608 | 836 | y = priv->bottomY; | 854 | } |
609 | 837 | } | 855 | break; |
610 | 838 | break; | 856 | case REL_WHEEL: |
611 | 839 | case REL_WHEEL: | 857 | if (event->value < 0) { |
612 | 840 | if (event->value < 0){ | 858 | buttons = set_bit(buttons,4,1); |
613 | 841 | buttons = set_bit(buttons,4,1); | 859 | delta = buttons ^ priv->wizardpenOldButtons; |
614 | 842 | delta = buttons ^ priv->wizardpenOldButtons; | 860 | while (delta) { |
615 | 843 | while (delta) { | 861 | id = ffs(delta); |
616 | 844 | id = ffs(delta); | 862 | delta &= ~(1 << (id-1)); |
617 | 845 | delta &= ~(1 << (id-1)); | 863 | if(rotate90) |
618 | 846 | if(rotate90) | 864 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_y, screenmaxx - report_x,report_z); |
619 | 847 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_y, screenmaxx - report_x,report_z); | 865 | else |
620 | 848 | else | 866 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_x, report_y,report_z); |
621 | 849 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_x, report_y,report_z); | 867 | } |
622 | 850 | } | 868 | priv->wizardpenOldButtons = buttons; |
623 | 851 | priv->wizardpenOldButtons = buttons; | 869 | buttons = set_bit(buttons,4,0); |
624 | 852 | buttons = set_bit(buttons,4,0); | 870 | delta = buttons ^ priv->wizardpenOldButtons; |
625 | 853 | delta = buttons ^ priv->wizardpenOldButtons; | 871 | while (delta) |
626 | 854 | while (delta) | 872 | { |
627 | 855 | { | 873 | id = ffs(delta); |
628 | 856 | id = ffs(delta); | 874 | delta &= ~(1 << (id-1)); |
629 | 857 | delta &= ~(1 << (id-1)); | 875 | if(rotate90) |
630 | 858 | if(rotate90) | 876 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_y, screenmaxx - report_x,report_z); |
631 | 859 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_y, screenmaxx - report_x,report_z); | 877 | else |
632 | 860 | else | 878 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_x, report_y,report_z); |
633 | 861 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_x, report_y,report_z); | 879 | } |
634 | 862 | } | 880 | } |
635 | 863 | } | 881 | if (event->value > 0) { |
636 | 864 | if (event->value > 0){ | 882 | buttons = set_bit(buttons,3,1); |
637 | 865 | buttons = set_bit(buttons,3,1); | 883 | delta = buttons ^ priv->wizardpenOldButtons; |
638 | 866 | delta = buttons ^ priv->wizardpenOldButtons; | 884 | while (delta) { |
639 | 867 | while (delta) { | 885 | id = ffs(delta); |
640 | 868 | id = ffs(delta); | 886 | delta &= ~(1 << (id-1)); |
641 | 869 | delta &= ~(1 << (id-1)); | 887 | if(rotate90) |
642 | 870 | if(rotate90) | 888 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_y, screenmaxx - report_x,report_z); |
643 | 871 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_y, screenmaxx - report_x,report_z); | 889 | else |
644 | 872 | else | 890 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_x, report_y,report_z); |
645 | 873 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_x, report_y,report_z); | 891 | } |
646 | 874 | } | 892 | priv->wizardpenOldButtons = buttons; |
647 | 875 | priv->wizardpenOldButtons = buttons; | 893 | buttons = set_bit(buttons,3,0); |
648 | 876 | buttons = set_bit(buttons,3,0); | 894 | delta = buttons ^ priv->wizardpenOldButtons; |
649 | 877 | delta = buttons ^ priv->wizardpenOldButtons; | 895 | while (delta) |
650 | 878 | while (delta) | 896 | { |
651 | 879 | { | 897 | id = ffs(delta); |
652 | 880 | id = ffs(delta); | 898 | delta &= ~(1 << (id-1)); |
653 | 881 | delta &= ~(1 << (id-1)); | 899 | if(rotate90) |
654 | 882 | if(rotate90) | 900 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_y, screenmaxx - report_x,report_z); |
655 | 883 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_y, screenmaxx - report_x,report_z); | 901 | else |
656 | 884 | else | 902 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_x, report_y,report_z); |
657 | 885 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_x, report_y,report_z); | 903 | } |
658 | 886 | } | 904 | } |
659 | 887 | } | 905 | break; |
660 | 888 | break; | 906 | } |
661 | 889 | } | 907 | break; |
566 | 890 | break; | ||
662 | 891 | case EV_ABS: | 908 | case EV_ABS: |
663 | 892 | switch (event->code) { | 909 | switch (event->code) { |
664 | 893 | case ABS_X: | 910 | case ABS_X: |
675 | 894 | x = event->value; | 911 | x = event->value; |
676 | 895 | if(debugyn) | 912 | if(debugyn) |
677 | 896 | xf86Msg(X_CONFIG, "ABS_X x is %d\n", x); | 913 | xf86Msg(X_CONFIG, "ABS_X x is %d\n", x); |
678 | 897 | break; | 914 | break; |
679 | 898 | case ABS_Z: | 915 | case ABS_Z: |
680 | 899 | x = event->value; | 916 | x = event->value; |
681 | 900 | if(debugyn) | 917 | if(debugyn) |
682 | 901 | xf86Msg(X_CONFIG, "ABS_Z x is %d\n", x); | 918 | xf86Msg(X_CONFIG, "ABS_Z x is %d\n", x); |
683 | 902 | break; | 919 | break; |
684 | 903 | case ABS_RX: | 920 | case ABS_RX: |
685 | 904 | y = event->value; | 921 | y = event->value; |
689 | 905 | if(debugyn) | 922 | if(debugyn) |
690 | 906 | xf86Msg(X_CONFIG, "ABS_RX y is %d\n", y); | 923 | xf86Msg(X_CONFIG, "ABS_RX y is %d\n", y); |
691 | 907 | break; | 924 | break; |
692 | 908 | case ABS_Y: | 925 | case ABS_Y: |
693 | 909 | y = event->value; | 926 | y = event->value; |
697 | 910 | if(debugyn) | 927 | if(debugyn) |
698 | 911 | xf86Msg(X_CONFIG, "ABS_Y y is %d\n", y); | 928 | xf86Msg(X_CONFIG, "ABS_Y y is %d\n", y); |
699 | 912 | break; | 929 | break; |
700 | 913 | 930 | ||
701 | 914 | case ABS_PRESSURE: | 931 | case ABS_PRESSURE: |
719 | 915 | /* mpa send button events if pressure | 932 | /* mpa send button events if pressure |
720 | 916 | crosses topZ threshold */ | 933 | crosses topZ threshold */ |
721 | 917 | oldz = z; | 934 | oldz = z; |
722 | 918 | z = event->value; | 935 | z = event->value; |
723 | 919 | if ( z <= priv->topZ && oldz > priv->topZ){ | 936 | if (z <= priv->topZ && oldz > priv->topZ) { |
724 | 920 | buttons = set_bit(buttons,0,0); | 937 | buttons = set_bit(buttons,0,0); |
725 | 921 | if(debugyn) | 938 | if(debugyn) |
726 | 922 | xf86Msg(X_CONFIG, "setting PEN UP event\n"); | 939 | xf86Msg(X_CONFIG, "setting PEN UP event\n"); |
727 | 923 | } | 940 | } |
728 | 924 | if ( oldz <= priv->topZ && z > priv->topZ ){ | 941 | if ( oldz <= priv->topZ && z > priv->topZ ) { |
729 | 925 | buttons = set_bit(buttons,0,1); | 942 | buttons = set_bit(buttons,0,1); |
730 | 926 | if(debugyn) | 943 | if(debugyn) |
731 | 927 | xf86Msg(X_CONFIG, "setting PEN DOWN event\n"); | 944 | xf86Msg(X_CONFIG, "setting PEN DOWN event\n"); |
732 | 928 | } | 945 | } |
733 | 929 | if(debugyn) | 946 | if(debugyn) |
734 | 930 | xf86Msg(X_CONFIG, "ABS_PRESSURE z is %d\n", z); | 947 | xf86Msg(X_CONFIG, "ABS_PRESSURE z is %d\n", z); |
735 | 931 | break; | 948 | break; |
736 | 932 | 949 | ||
737 | 933 | case ABS_MISC: | 950 | case ABS_MISC: |
738 | 934 | break; | 951 | break; |
739 | 935 | 952 | ||
740 | 936 | } | 953 | } |
742 | 937 | break; // EV_ABS | 954 | break; // EV_ABS |
743 | 938 | 955 | ||
744 | 939 | case EV_KEY: | 956 | case EV_KEY: |
745 | 940 | switch (event->code) { | 957 | switch (event->code) { |
746 | 941 | case BTN_TOOL_PEN: | 958 | case BTN_TOOL_PEN: |
747 | 942 | prox = event->value; | 959 | prox = event->value; |
750 | 943 | if(debugyn) | 960 | if(debugyn) |
751 | 944 | xf86Msg(X_CONFIG, "BTN_TOOL_PEN prox is %d\n", prox); | 961 | xf86Msg(X_CONFIG, "BTN_TOOL_PEN prox is %d\n", prox); |
752 | 945 | break; | 962 | break; |
753 | 946 | 963 | ||
754 | 947 | case BTN_LEFT: | 964 | case BTN_LEFT: |
759 | 948 | buttons = set_bit(buttons,0,event->value); | 965 | buttons = set_bit(buttons,0,event->value); |
760 | 949 | if(debugyn) | 966 | if(debugyn) |
761 | 950 | xf86Msg(X_CONFIG, "NEW BTN_LEFT event is %d\n", event->value); | 967 | xf86Msg(X_CONFIG, "NEW BTN_LEFT event is %d\n", event->value); |
762 | 951 | case BTN_SIDE: | 968 | // NO BREAK |
763 | 969 | case BTN_SIDE: | ||
764 | 952 | /* mpa stop sending original pen up/down button | 970 | /* mpa stop sending original pen up/down button |
769 | 953 | events in favor of button code above */ | 971 | events in favor of button code above */ |
770 | 954 | /* buttons = set_bit(buttons,0,event->value);*/ | 972 | /* buttons = set_bit(buttons,0,event->value);*/ |
771 | 955 | if(debugyn) | 973 | if(debugyn) |
772 | 956 | xf86Msg(X_CONFIG, "ignored BTN_SIDE event is %d\n", event->value); | 974 | xf86Msg(X_CONFIG, "ignored BTN_SIDE event is %d\n", event->value); |
773 | 957 | break; | 975 | break; |
774 | 958 | 976 | ||
779 | 959 | case BTN_EXTRA: | 977 | case BTN_EXTRA: |
780 | 960 | if(debugyn) | 978 | if(debugyn) |
781 | 961 | xf86Msg(X_CONFIG, "NEW BTN_EXTRA event is %d\n", event->value); | 979 | xf86Msg(X_CONFIG, "NEW BTN_EXTRA event is %d\n", event->value); |
782 | 962 | case BTN_MIDDLE: | 980 | // NO BREAK |
783 | 981 | case BTN_MIDDLE: | ||
784 | 963 | buttons = set_bit(buttons,1,event->value); | 982 | buttons = set_bit(buttons,1,event->value); |
787 | 964 | if(debugyn) | 983 | if(debugyn) |
788 | 965 | xf86Msg(X_CONFIG, "BTN_MIDDLE event is %d\n", event->value); | 984 | xf86Msg(X_CONFIG, "BTN_MIDDLE event is %d\n", event->value); |
789 | 966 | break; | 985 | break; |
790 | 967 | 986 | ||
794 | 968 | case BTN_FORWARD: | 987 | case BTN_FORWARD: |
795 | 969 | if(debugyn) | 988 | if(debugyn) |
796 | 970 | xf86Msg(X_CONFIG, "BTN_FORWARD event is %d\n", event->value); | 989 | xf86Msg(X_CONFIG, "BTN_FORWARD event is %d\n", event->value); |
797 | 990 | // NO BREAK | ||
798 | 971 | case BTN_RIGHT: | 991 | case BTN_RIGHT: |
799 | 972 | buttons = set_bit(buttons,2,event->value); | 992 | buttons = set_bit(buttons,2,event->value); |
802 | 973 | if(debugyn) | 993 | if(debugyn) |
803 | 974 | xf86Msg(X_CONFIG, "BTN_RIGHT event is %d\n", event->value); | 994 | xf86Msg(X_CONFIG, "BTN_RIGHT event is %d\n", event->value); |
804 | 975 | break; | 995 | break; |
805 | 976 | } | 996 | } |
809 | 977 | break; // EV_KEY | 997 | break; // EV_KEY |
810 | 978 | case EV_MSC: | 998 | case EV_MSC: |
811 | 979 | break; | 999 | break; |
812 | 980 | default: | 1000 | default: |
813 | 981 | xf86Msg(X_ERROR, "%s: unknown event type/code/value %d/%d/%d\n", local->name, event->type, event->code, event->value); | 1001 | xf86Msg(X_ERROR, "%s: unknown event type/code/value %d/%d/%d\n", local->name, event->type, event->code, event->value); |
814 | 982 | } /* switch event->type */ | 1002 | } /* switch event->type */ |
815 | 983 | 1003 | ||
816 | 984 | /* mpa If pressure is below threshold, set pressure and reported | 1004 | /* mpa If pressure is below threshold, set pressure and reported |
840 | 985 | pressure to 0 */ | 1005 | pressure to 0 */ |
841 | 986 | if (z <= priv->topZ){ | 1006 | if (z <= priv->topZ) { |
842 | 987 | report_z = 0; | 1007 | report_z = 0; |
843 | 988 | /*z = 0;*/ | 1008 | } else if(z >= priv->bottomZ) { |
844 | 989 | }else if(z >= priv->bottomZ){ | 1009 | report_z = 1023; |
845 | 990 | /*z = priv->bottomZ;*/ | 1010 | } else { /* mpa Otherwise scale down by min pressure val */ |
846 | 991 | /*report_z = priv->bottomZ - priv->topZ;*/ | 1011 | report_z = z - priv->topZ; |
847 | 992 | report_z = 1023; | 1012 | rz = report_z; |
848 | 993 | }else{ /* mpa Otherwise scale down by min pressure val */ | 1013 | report_z = 1023.0 * (rz / (priv->bottomZ - priv->topZ)); |
849 | 994 | report_z = z - priv->topZ; | 1014 | } |
850 | 995 | rz = report_z; | 1015 | |
851 | 996 | report_z = 1023.0 * (rz / (priv->bottomZ - priv->topZ)); | 1016 | if (x>priv->topX && x<priv->bottomX) |
852 | 997 | } | 1017 | report_x = (x-priv->topX) * screenmaxx / (priv->bottomX-priv->topX); |
853 | 998 | /* mpa now scale back up so we again report a range of 0 to 1023 */ | 1018 | else{ |
854 | 999 | /*merged with above if/then/else | 1019 | if(x<priv->topX) |
855 | 1000 | if(report_z >= (priv->bottomZ - priv->topZ)){ | 1020 | report_x = 0; |
856 | 1001 | report_z = 1023; | 1021 | else |
857 | 1002 | }else if (report_z){ | 1022 | report_x = screenmaxx; |
858 | 1003 | rz = report_z; | 1023 | } |
859 | 1004 | report_z = 1023.0 * (rz / (priv->bottomZ - priv->topZ)); | 1024 | if (y>priv->topY && y<priv->bottomY) |
860 | 1005 | } | 1025 | report_y = (y-priv->topY) * screenmaxy / (priv->bottomY-priv->topY); |
861 | 1006 | */ | 1026 | else { |
862 | 1007 | 1027 | if(y<priv->topY) | |
863 | 1028 | report_y = 0; | ||
864 | 1029 | else | ||
865 | 1030 | report_y = screenmaxy; | ||
866 | 1031 | } | ||
867 | 1032 | |||
868 | 1033 | if (rotate90) { | ||
869 | 1034 | int tempval; | ||
870 | 1035 | if (report_y < 0) | ||
871 | 1036 | report_y = 0; | ||
872 | 1037 | if (report_x < 0) | ||
873 | 1038 | report_x = 0; | ||
874 | 1039 | tempval = report_x; | ||
875 | 1040 | report_x = (screenmaxy - report_y); | ||
876 | 1041 | if (report_x > 1278) | ||
877 | 1042 | report_x = 1278; | ||
878 | 1043 | report_y = tempval; | ||
879 | 1044 | } | ||
880 | 1045 | |||
881 | 1046 | // We ALWAYS send button events right after we notice them | ||
882 | 1047 | // The pen might get stuck in pressed down state otherwise | ||
883 | 1048 | if (priv->wizardpenOldButtons != buttons) | ||
884 | 1049 | { | ||
885 | 1050 | int delta = buttons ^ priv->wizardpenOldButtons; | ||
886 | 1051 | while (delta) | ||
887 | 1052 | { | ||
888 | 1053 | int id = ffs(delta); | ||
889 | 1054 | delta &= ~(1 << (id-1)); | ||
890 | 1055 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_x, report_y, report_z); | ||
891 | 1056 | } | ||
892 | 1057 | } | ||
893 | 1058 | priv->wizardpenOldButtons = buttons; | ||
894 | 1059 | |||
895 | 1008 | /* Linux Kernel 2.6.x sends EV_SYN/SYN_REPORT as an event terminator, | 1060 | /* Linux Kernel 2.6.x sends EV_SYN/SYN_REPORT as an event terminator, |
896 | 1009 | * whereas 2.4.x sends EV_ABS/ABS_MISC. We have to support both. | 1061 | * whereas 2.4.x sends EV_ABS/ABS_MISC. We have to support both. |
897 | 1010 | */ | 1062 | */ |
934 | 1011 | if (!( (event->type == EV_SYN && event->code == SYN_REPORT) || | 1063 | if ((event->type == EV_SYN && event->code == SYN_REPORT) || |
935 | 1012 | (event->type == EV_ABS && event->code == ABS_MISC) | 1064 | (event->type == EV_ABS && event->code == ABS_MISC)) |
900 | 1013 | )) { | ||
901 | 1014 | continue; | ||
902 | 1015 | } | ||
903 | 1016 | if(x>priv->topX && x<priv->bottomX) | ||
904 | 1017 | /*report_x = (x-priv->topX) * screenInfo.screens[0]->width / (priv->bottomX-priv->topX);*/ | ||
905 | 1018 | report_x = (x-priv->topX) * screenmaxx / (priv->bottomX-priv->topX); | ||
906 | 1019 | else{ | ||
907 | 1020 | if(x<priv->topX) | ||
908 | 1021 | report_x = 0; | ||
909 | 1022 | else | ||
910 | 1023 | report_x = screenmaxx; /*screenInfo.screens[0]->width;*/ | ||
911 | 1024 | } | ||
912 | 1025 | if(y>priv->topY && y<priv->bottomY) | ||
913 | 1026 | /*report_y = (y-priv->topY) * screenInfo.screens[0]->height / (priv->bottomY-priv->topY);*/ | ||
914 | 1027 | report_y = (y-priv->topY) * screenmaxy / (priv->bottomY-priv->topY); | ||
915 | 1028 | else{ | ||
916 | 1029 | if(y<priv->topY) | ||
917 | 1030 | report_y = 0; | ||
918 | 1031 | else | ||
919 | 1032 | report_y = screenmaxy; /*screenInfo.screens[0]->height;*/ | ||
920 | 1033 | } | ||
921 | 1034 | if(rotate90){ | ||
922 | 1035 | int tempval; | ||
923 | 1036 | if (report_y < 0) | ||
924 | 1037 | report_y = 0; | ||
925 | 1038 | if (report_x < 0) | ||
926 | 1039 | report_x = 0; | ||
927 | 1040 | tempval = report_x; | ||
928 | 1041 | report_x = (screenmaxy - report_y); | ||
929 | 1042 | if (report_x > 1278) | ||
930 | 1043 | report_x = 1278; | ||
931 | 1044 | report_y = tempval; | ||
932 | 1045 | } | ||
933 | 1046 | if (1) | ||
936 | 1047 | { | 1065 | { |
937 | 1048 | if (!(priv->wizardpenOldProximity)) | 1066 | if (!(priv->wizardpenOldProximity)) |
938 | 1049 | if (!is_core_pointer) | 1067 | if (!is_core_pointer) |
939 | 1050 | { | 1068 | { |
943 | 1051 | /* mpa send value of report_z rather than z */ | 1069 | xf86PostProximityEvent(local->dev, 1, 0, 3 , |
944 | 1052 | xf86PostProximityEvent(local->dev, 1, 0, 3 , | 1070 | report_x, report_y, report_z); |
942 | 1053 | report_x, report_y, report_z); | ||
945 | 1054 | } | 1071 | } |
946 | 1055 | 1072 | ||
947 | 1056 | |||
948 | 1057 | /* mpa send value of report_z rather than z */ | ||
949 | 1058 | xf86PostMotionEvent(local->dev, 1, 0, 3, report_x, report_y, report_z); | 1073 | xf86PostMotionEvent(local->dev, 1, 0, 3, report_x, report_y, report_z); |
950 | 1059 | if (priv->wizardpenOldButtons != buttons) | ||
951 | 1060 | { | ||
952 | 1061 | int delta = buttons ^ priv->wizardpenOldButtons; | ||
953 | 1062 | while (delta) | ||
954 | 1063 | { | ||
955 | 1064 | int id = ffs(delta); | ||
956 | 1065 | delta &= ~(1 << (id-1)); | ||
957 | 1066 | xf86PostButtonEvent(local->dev, 1, id, (buttons&(1<<(id-1))), 0, 3, report_x, report_y,report_z); /*mpa send report_z instead of z*/ | ||
958 | 1067 | } | ||
959 | 1068 | } | ||
960 | 1069 | } | ||
961 | 1070 | else | ||
962 | 1071 | { | ||
963 | 1072 | if (!is_core_pointer) | ||
964 | 1073 | if (priv->wizardpenOldProximity) | ||
965 | 1074 | { | ||
966 | 1075 | xf86PostProximityEvent(local->dev, 0, 0, 3, report_x,report_y,report_z); | ||
967 | 1076 | } | ||
968 | 1077 | priv->wizardpenOldProximity = 0; | ||
969 | 1078 | } | ||
970 | 1079 | 1074 | ||
976 | 1080 | priv->wizardpenOldButtons = buttons; | 1075 | priv->wizardpenOldX = x; |
977 | 1081 | priv->wizardpenOldX = x; | 1076 | priv->wizardpenOldY = y; |
978 | 1082 | priv->wizardpenOldY = y; | 1077 | priv->wizardpenOldZ = z; |
979 | 1083 | priv->wizardpenOldZ = z; | 1078 | priv->wizardpenOldProximity = prox; |
980 | 1084 | priv->wizardpenOldProximity = prox; | 1079 | } |
981 | 1085 | } | 1080 | } |
982 | 1086 | /*xf86Msg(X_INFO, "ACECAD Tablet Sortie Read Input\n");*/ | ||
983 | 1087 | } | 1081 | } |
984 | 1088 | #endif | 1082 | #endif |
985 | 1089 | 1083 | ||
986 | @@ -1102,24 +1096,24 @@ | |||
987 | 1102 | int v0, int v1, int v2, int v3, int v4, int v5, int *x, int *y) | 1096 | int v0, int v1, int v2, int v3, int v4, int v5, int *x, int *y) |
988 | 1103 | { | 1097 | { |
989 | 1104 | WizardPenPrivatePtr priv = (WizardPenPrivatePtr)(local->private); | 1098 | WizardPenPrivatePtr priv = (WizardPenPrivatePtr)(local->private); |
1008 | 1105 | if(v0>priv->topX && v0<priv->bottomX) | 1099 | if(v0>priv->topX && v0<priv->bottomX) |
1009 | 1106 | /**x = (v0-priv->topX) * screenInfo.screens[0]->width / (priv->bottomX-priv->topX);*/ | 1100 | /**x = (v0-priv->topX) * screenInfo.screens[0]->width / (priv->bottomX-priv->topX);*/ |
1010 | 1107 | *x = (v0-priv->topX) * screenmaxx / (priv->bottomX-priv->topX); | 1101 | *x = (v0-priv->topX) * screenmaxx / (priv->bottomX-priv->topX); |
1011 | 1108 | else{ | 1102 | else{ |
1012 | 1109 | if(v0<priv->topX) | 1103 | if(v0<priv->topX) |
1013 | 1110 | *x = priv->topX; | 1104 | *x = priv->topX; |
1014 | 1111 | else | 1105 | else |
1015 | 1112 | *x = priv->bottomX; | 1106 | *x = priv->bottomX; |
1016 | 1113 | } | 1107 | } |
1017 | 1114 | if(v1>priv->topY && v1<priv->bottomY) | 1108 | if(v1>priv->topY && v1<priv->bottomY) |
1018 | 1115 | /**y = (v1-priv->topY) * screenInfo.screens[0]->width / (priv->bottomY-priv->topY);*/ | 1109 | /**y = (v1-priv->topY) * screenInfo.screens[0]->width / (priv->bottomY-priv->topY);*/ |
1019 | 1116 | *y = (v1-priv->topY) * screenmaxy / (priv->bottomY-priv->topY); | 1110 | *y = (v1-priv->topY) * screenmaxy / (priv->bottomY-priv->topY); |
1020 | 1117 | else{ | 1111 | else{ |
1021 | 1118 | if(v1<priv->topY) | 1112 | if(v1<priv->topY) |
1022 | 1119 | *y = priv->topY; | 1113 | *y = priv->topY; |
1023 | 1120 | else | 1114 | else |
1024 | 1121 | *y = priv->bottomY; | 1115 | *y = priv->bottomY; |
1025 | 1122 | } | 1116 | } |
1026 | 1123 | return TRUE; | 1117 | return TRUE; |
1027 | 1124 | } | 1118 | } |
1028 | 1125 | 1119 | ||
1029 | @@ -1185,7 +1179,7 @@ | |||
1030 | 1185 | 1179 | ||
1031 | 1186 | #define BITS_PER_LONG (sizeof(long) * 8) | 1180 | #define BITS_PER_LONG (sizeof(long) * 8) |
1032 | 1187 | #define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1) | 1181 | #define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1) |
1034 | 1188 | #define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1) | 1182 | #define test_bit(bit, array) ((array[LONG(bit)] >> OFF(bit)) & 1) |
1035 | 1189 | #define OFF(x) ((x)%BITS_PER_LONG) | 1183 | #define OFF(x) ((x)%BITS_PER_LONG) |
1036 | 1190 | #define LONG(x) ((x)/BITS_PER_LONG) | 1184 | #define LONG(x) ((x)/BITS_PER_LONG) |
1037 | 1191 | 1185 | ||
1038 | @@ -1193,11 +1187,11 @@ | |||
1039 | 1193 | static Bool | 1187 | static Bool |
1040 | 1194 | USBQueryHardware (LocalDevicePtr local) | 1188 | USBQueryHardware (LocalDevicePtr local) |
1041 | 1195 | { | 1189 | { |
1047 | 1196 | WizardPenPrivatePtr priv = (WizardPenPrivatePtr) local->private; | 1190 | WizardPenPrivatePtr priv = (WizardPenPrivatePtr) local->private; |
1048 | 1197 | unsigned long bit[EV_MAX][NBITS(KEY_MAX)]; | 1191 | unsigned long bit[EV_MAX][NBITS(KEY_MAX)]; |
1049 | 1198 | int i, j; | 1192 | int i, j; |
1050 | 1199 | int abs[5]; | 1193 | int abs[5]; |
1051 | 1200 | char name[256] = "Unknown"; | 1194 | char name[256] = "Unknown"; |
1052 | 1201 | 1195 | ||
1053 | 1202 | ioctl(local->fd, EVIOCGNAME(sizeof(name)), name); | 1196 | ioctl(local->fd, EVIOCGNAME(sizeof(name)), name); |
1054 | 1203 | xf86MsgVerb(X_PROBED, 4, "Kernel Input device name: \"%s\"\n", name); | 1197 | xf86MsgVerb(X_PROBED, 4, "Kernel Input device name: \"%s\"\n", name); |
1055 | @@ -1215,17 +1209,17 @@ | |||
1056 | 1215 | switch (j) { | 1209 | switch (j) { |
1057 | 1216 | case ABS_X: | 1210 | case ABS_X: |
1058 | 1217 | if(!priv->bottomX) | 1211 | if(!priv->bottomX) |
1060 | 1218 | priv->bottomX = abs[2]; | 1212 | priv->bottomX = abs[2]; |
1061 | 1219 | break; | 1213 | break; |
1062 | 1220 | 1214 | ||
1063 | 1221 | case ABS_Y: | 1215 | case ABS_Y: |
1066 | 1222 | if(!priv->bottomY) | 1216 | if(!priv->bottomY) |
1067 | 1223 | priv->bottomY = abs[2]; | 1217 | priv->bottomY = abs[2]; |
1068 | 1224 | break; | 1218 | break; |
1069 | 1225 | 1219 | ||
1070 | 1226 | case ABS_PRESSURE: | 1220 | case ABS_PRESSURE: |
1073 | 1227 | if(!priv->bottomZ) | 1221 | if(!priv->bottomZ) |
1074 | 1228 | priv->bottomZ = abs[2]; | 1222 | priv->bottomZ = abs[2]; |
1075 | 1229 | break; | 1223 | break; |
1076 | 1230 | } | 1224 | } |
1077 | 1231 | } | 1225 | } |
1078 | 1232 | 1226 | ||
1079 | === modified file 'src/wizardpen.h' | |||
1080 | --- src/wizardpen.h 2009-06-24 19:51:16 +0000 | |||
1081 | +++ src/wizardpen.h 2010-03-20 19:15:26 +0000 | |||
1082 | @@ -1,8 +1,8 @@ | |||
1084 | 1 | /* | 1 | /* |
1085 | 2 | * Copyright (c) 2001 Edouard TISSERANT <tissered@esstin.u-nancy.fr> | 2 | * Copyright (c) 2001 Edouard TISSERANT <tissered@esstin.u-nancy.fr> |
1086 | 3 | * Parts inspired from Shane Watts <shane@bofh.asn.au> Xfree 3 Acecad Driver | 3 | * Parts inspired from Shane Watts <shane@bofh.asn.au> Xfree 3 Acecad Driver |
1087 | 4 | * Thanks to Emily, from AceCad, For giving me documents. | 4 | * Thanks to Emily, from AceCad, For giving me documents. |
1089 | 5 | * | 5 | * |
1090 | 6 | * Permission is hereby granted, free of charge, to any person obtaining a | 6 | * Permission is hereby granted, free of charge, to any person obtaining a |
1091 | 7 | * copy of this software and associated documentation files (the "Software"), | 7 | * copy of this software and associated documentation files (the "Software"), |
1092 | 8 | * to deal in the Software without restriction, including without limitation | 8 | * to deal in the Software without restriction, including without limitation |
1093 | @@ -29,37 +29,37 @@ | |||
1094 | 29 | #define _WIZARDPEN_H_ | 29 | #define _WIZARDPEN_H_ |
1095 | 30 | 30 | ||
1096 | 31 | /****************************************************************************** | 31 | /****************************************************************************** |
1099 | 32 | * Definitions | 32 | * Definitions |
1100 | 33 | * structs, typedefs, #defines, enums | 33 | * structs, typedefs, #defines, enums |
1101 | 34 | *****************************************************************************/ | 34 | *****************************************************************************/ |
1130 | 35 | #define WIZARDPEN_PACKET_SIZE 7 | 35 | #define WIZARDPEN_PACKET_SIZE 7 |
1131 | 36 | 36 | ||
1132 | 37 | #define WIZARDPEN_CONFIG "a" /* Send configuration (max coords) */ | 37 | #define WIZARDPEN_CONFIG "a" /* Send configuration (max coords) */ |
1133 | 38 | 38 | ||
1134 | 39 | #define WIZARDPEN_ABSOLUTE 'F' /* Absolute mode */ | 39 | #define WIZARDPEN_ABSOLUTE 'F' /* Absolute mode */ |
1135 | 40 | #define WIZARDPEN_RELATIVE 'E' /* Relative mode */ | 40 | #define WIZARDPEN_RELATIVE 'E' /* Relative mode */ |
1136 | 41 | 41 | ||
1137 | 42 | #define WIZARDPEN_UPPER_ORIGIN "b" /* Origin upper left */ | 42 | #define WIZARDPEN_UPPER_ORIGIN "b" /* Origin upper left */ |
1138 | 43 | 43 | ||
1139 | 44 | #define WIZARDPEN_PROMPT_MODE "B" /* Prompt mode */ | 44 | #define WIZARDPEN_PROMPT_MODE "B" /* Prompt mode */ |
1140 | 45 | #define WIZARDPEN_STREAM_MODE "@" /* Stream mode */ | 45 | #define WIZARDPEN_STREAM_MODE "@" /* Stream mode */ |
1141 | 46 | #define WIZARDPEN_INCREMENT 'I' /* Set increment */ | 46 | #define WIZARDPEN_INCREMENT 'I' /* Set increment */ |
1142 | 47 | #define WIZARDPEN_BINARY_FMT "zb" /* Binary reporting */ | 47 | #define WIZARDPEN_BINARY_FMT "zb" /* Binary reporting */ |
1143 | 48 | 48 | ||
1144 | 49 | #define WIZARDPEN_PROMPT "P" /* Prompt for current position */ | 49 | #define WIZARDPEN_PROMPT "P" /* Prompt for current position */ |
1145 | 50 | 50 | ||
1146 | 51 | #define PHASING_BIT 0x80 | 51 | #define PHASING_BIT 0x80 |
1147 | 52 | #define PROXIMITY_BIT 0x40 | 52 | #define PROXIMITY_BIT 0x40 |
1148 | 53 | #define TABID_BIT 0x20 | 53 | #define TABID_BIT 0x20 |
1149 | 54 | #define XSIGN_BIT 0x10 | 54 | #define XSIGN_BIT 0x10 |
1150 | 55 | #define YSIGN_BIT 0x08 | 55 | #define YSIGN_BIT 0x08 |
1151 | 56 | #define BUTTON_BITS 0x07 | 56 | #define BUTTON_BITS 0x07 |
1152 | 57 | #define COORD_BITS 0x7f | 57 | #define COORD_BITS 0x7f |
1153 | 58 | 58 | ||
1154 | 59 | #define ABSOLUTE_FLAG 1 | 59 | #define ABSOLUTE_FLAG 1 |
1155 | 60 | #define USB_FLAG 2 | 60 | #define USB_FLAG 2 |
1156 | 61 | #define AUTODEV_FLAG 4 | 61 | #define AUTODEV_FLAG 4 |
1157 | 62 | #define AVAIL_FLAG 8 | 62 | #define AVAIL_FLAG 8 |
1158 | 63 | 63 | ||
1159 | 64 | #define NOTAVAIL ((errno == ENODEV) || (errno == ENXIO) || (errno == ENOENT)) | 64 | #define NOTAVAIL ((errno == ENODEV) || (errno == ENXIO) || (errno == ENOENT)) |
1160 | 65 | 65 | ||
1161 | @@ -69,34 +69,34 @@ | |||
1162 | 69 | 69 | ||
1163 | 70 | static const char * wizardpen_initstr = WIZARDPEN_BINARY_FMT WIZARDPEN_STREAM_MODE; | 70 | static const char * wizardpen_initstr = WIZARDPEN_BINARY_FMT WIZARDPEN_STREAM_MODE; |
1164 | 71 | 71 | ||
1166 | 72 | typedef struct | 72 | typedef struct |
1167 | 73 | { | 73 | { |
1189 | 74 | XISBuffer *buffer; | 74 | XISBuffer *buffer; |
1190 | 75 | int wizardpenInc; /* increment between transmits */ | 75 | int wizardpenInc; /* increment between transmits */ |
1191 | 76 | int wizardpenOldX; /* previous X position */ | 76 | int wizardpenOldX; /* previous X position */ |
1192 | 77 | int wizardpenOldY; /* previous Y position */ | 77 | int wizardpenOldY; /* previous Y position */ |
1193 | 78 | int wizardpenOldZ; /* previous Z position */ | 78 | int wizardpenOldZ; /* previous Z position */ |
1194 | 79 | int wizardpenOldProximity; /* previous proximity */ | 79 | int wizardpenOldProximity; /* previous proximity */ |
1195 | 80 | int wizardpenOldButtons; /* previous buttons state */ | 80 | int wizardpenOldButtons; /* previous buttons state */ |
1196 | 81 | int wizardpenMaxX; /* max X value */ | 81 | int wizardpenMaxX; /* max X value */ |
1197 | 82 | int wizardpenMaxY; /* max Y value */ | 82 | int wizardpenMaxY; /* max Y value */ |
1198 | 83 | int wizardpenMaxZ; /* max Y value */ | 83 | int wizardpenMaxZ; /* max Y value */ |
1199 | 84 | char wizardpenReportSpeed; /* report speed */ | 84 | char wizardpenReportSpeed; /* report speed */ |
1200 | 85 | int flags; /* various flags */ | 85 | int flags; /* various flags */ |
1201 | 86 | int packeti; /* number of bytes read */ | 86 | int packeti; /* number of bytes read */ |
1202 | 87 | int PacketSize; /* number of bytes read */ | 87 | int PacketSize; /* number of bytes read */ |
1203 | 88 | unsigned char packet[WIZARDPEN_PACKET_SIZE]; /* data read on the device */ | 88 | unsigned char packet[WIZARDPEN_PACKET_SIZE]; /* data read on the device */ |
1204 | 89 | int topZ; | 89 | int topZ; |
1205 | 90 | int bottomZ; | 90 | int bottomZ; |
1206 | 91 | int topX; | 91 | int topX; |
1207 | 92 | int topY; | 92 | int topY; |
1208 | 93 | int bottomX; | 93 | int bottomX; |
1209 | 94 | int bottomY; | 94 | int bottomY; |
1210 | 95 | } WizardPenPrivateRec, *WizardPenPrivatePtr; | 95 | } WizardPenPrivateRec, *WizardPenPrivatePtr; |
1211 | 96 | 96 | ||
1212 | 97 | 97 | ||
1213 | 98 | /****************************************************************************** | 98 | /****************************************************************************** |
1215 | 99 | * Declarations | 99 | * Declarations |
1216 | 100 | *****************************************************************************/ | 100 | *****************************************************************************/ |
1217 | 101 | #ifdef XFree86LOADER | 101 | #ifdef XFree86LOADER |
1218 | 102 | static MODULESETUPPROTO( SetupProc ); | 102 | static MODULESETUPPROTO( SetupProc ); |
Merged