1 #include "fake-symbols.h"
2
3 _X_EXPORT
xf86ReadSerial(int fd,void * buf,int count)4 int xf86ReadSerial (int fd, void *buf, int count)
5 {
6 return 0;
7 }
8
9
10 _X_EXPORT int
xf86WriteSerial(int fd,const void * buf,int count)11 xf86WriteSerial (int fd, const void *buf, int count)
12 {
13 return 0;
14 }
15
16 _X_EXPORT int
xf86CloseSerial(int fd)17 xf86CloseSerial (int fd)
18 {
19 return 0;
20 }
21
22 _X_EXPORT int
xf86WaitForInput(int fd,int timeout)23 xf86WaitForInput (int fd, int timeout)
24 {
25 return 0;
26 }
27
28 _X_EXPORT int
xf86OpenSerial(OPTTYPE options)29 xf86OpenSerial (OPTTYPE options)
30 {
31 return 0;
32 }
33
34 _X_EXPORT int
xf86SetSerialSpeed(int fd,int speed)35 xf86SetSerialSpeed (int fd, int speed)
36 {
37 return 0;
38 }
39
40 _X_EXPORT OPTTYPE
xf86ReplaceIntOption(OPTTYPE optlist,const char * name,const int val)41 xf86ReplaceIntOption(OPTTYPE optlist, const char *name, const int val)
42 {
43 return NULL;
44 }
45
46 _X_EXPORT char *
xf86SetStrOption(OPTTYPE optlist,const char * name,CONST char * deflt)47 xf86SetStrOption(OPTTYPE optlist, const char *name, CONST char *deflt)
48 {
49 return NULL;
50 }
51
52 _X_EXPORT int
xf86SetBoolOption(OPTTYPE optlist,const char * name,int deflt)53 xf86SetBoolOption(OPTTYPE optlist, const char *name, int deflt)
54 {
55 return 0;
56 }
57
58 _X_EXPORT OPTTYPE
xf86AddNewOption(OPTTYPE head,const char * name,const char * val)59 xf86AddNewOption(OPTTYPE head, const char *name, const char *val)
60 {
61 return NULL;
62 }
63
64 _X_EXPORT void
xf86OptionListFree(OPTTYPE opt)65 xf86OptionListFree(OPTTYPE opt)
66 {
67 return;
68 }
69
70 _X_EXPORT CONST char *
xf86FindOptionValue(OPTTYPE options,const char * name)71 xf86FindOptionValue(OPTTYPE options, const char *name)
72 {
73 return NULL;
74 }
75
76 _X_EXPORT char *
xf86OptionName(OPTTYPE opt)77 xf86OptionName(OPTTYPE opt)
78 {
79 return NULL;
80 }
81
82 _X_EXPORT char *
xf86OptionValue(OPTTYPE opt)83 xf86OptionValue(OPTTYPE opt)
84 {
85 return NULL;
86 }
87
88 _X_EXPORT int
xf86NameCmp(const char * s1,const char * s2)89 xf86NameCmp(const char *s1, const char *s2)
90 {
91 return strcasecmp(s1, s2);
92 }
93
94 _X_EXPORT char *
95 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) > 18
xf86CheckStrOption(OPTTYPE optlist,const char * name,CONST char * deflt)96 xf86CheckStrOption(OPTTYPE optlist, const char *name, CONST char *deflt)
97 #else
98 xf86CheckStrOption(OPTTYPE optlist, const char *name, char *deflt)
99 #endif
100 {
101 return NULL;
102 }
103
104 _X_EXPORT int
xf86CheckBoolOption(OPTTYPE list,const char * name,int deflt)105 xf86CheckBoolOption(OPTTYPE list, const char *name, int deflt)
106 {
107 return 0;
108 }
109
110 _X_EXPORT void
xf86AddEnabledDevice(InputInfoPtr pInfo)111 xf86AddEnabledDevice(InputInfoPtr pInfo)
112 {
113 return;
114 }
115
116 _X_EXPORT void
xf86RemoveEnabledDevice(InputInfoPtr pInfo)117 xf86RemoveEnabledDevice(InputInfoPtr pInfo)
118 {
119 return;
120 }
121
122 _X_EXPORT Atom
XIGetKnownProperty(CONST char * name)123 XIGetKnownProperty(CONST char *name)
124 {
125 return None;
126 }
127
128 _X_EXPORT void
xf86AddInputDriver(InputDriverPtr driver,pointer module,int flags)129 xf86AddInputDriver(InputDriverPtr driver, pointer module, int flags)
130 {
131 return;
132 }
133
134 _X_EXPORT int
xf86ScaleAxis(int Cx,int to_max,int to_min,int from_max,int from_min)135 xf86ScaleAxis(int Cx,
136 int to_max,
137 int to_min,
138 int from_max,
139 int from_min )
140 {
141 int X;
142 int64_t to_width = to_max - to_min;
143 int64_t from_width = from_max - from_min;
144
145 if (from_width) {
146 X = (int)(((to_width * (Cx - from_min)) / from_width) + to_min);
147 }
148 else {
149 X = 0;
150 /*ErrorF ("Divide by Zero in xf86ScaleAxis\n");*/
151 }
152
153 if (X > to_max)
154 X = to_max;
155 if (X < to_min)
156 X = to_min;
157
158 return X;
159 }
160
161
162 _X_EXPORT void
DeleteInputDeviceRequest(DeviceIntPtr pDev)163 DeleteInputDeviceRequest(DeviceIntPtr pDev)
164 {
165 return;
166 }
167
168
169 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
170 _X_EXPORT void
FreeInputAttributes(InputAttributes * attrs)171 FreeInputAttributes(InputAttributes *attrs)
172 {
173 return;
174 }
175 #endif
176
177 _X_EXPORT void
xf86PostButtonEvent(DeviceIntPtr device,int is_absolute,int button,int is_down,int first_valuator,int num_valuators,...)178 xf86PostButtonEvent(DeviceIntPtr device,
179 int is_absolute,
180 int button,
181 int is_down,
182 int first_valuator,
183 int num_valuators,
184 ...)
185 {
186 return;
187 }
188
189 _X_EXPORT int
Xasprintf(char ** ret,const char * format,...)190 Xasprintf(char ** ret, const char * format, ...)
191 {
192 return 0;
193 }
194
195
196 _X_EXPORT int
XISetDevicePropertyDeletable(DeviceIntPtr dev,Atom property,Bool deletable)197 XISetDevicePropertyDeletable(DeviceIntPtr dev, Atom property, Bool deletable)
198 {
199 return 0;
200 }
201
202
203 _X_EXPORT InputInfoPtr
xf86FirstLocalDevice(void)204 xf86FirstLocalDevice(void)
205 {
206 return NULL;
207 }
208
209
210 _X_EXPORT void
xf86DeleteInput(InputInfoPtr pInp,int flags)211 xf86DeleteInput(InputInfoPtr pInp, int flags)
212 {
213 return;
214 }
215
216 _X_EXPORT OPTTYPE
xf86OptionListDuplicate(OPTTYPE options)217 xf86OptionListDuplicate(OPTTYPE options)
218 {
219 return NULL;
220 }
221
222 _X_EXPORT Bool
InitButtonClassDeviceStruct(DeviceIntPtr dev,int numButtons,Atom * labels,CARD8 * map)223 InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom* labels,
224 CARD8 *map)
225 {
226 return FALSE;
227 }
228
229
230 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) > 14
231 _X_EXPORT Bool
InitValuatorAxisStruct(DeviceIntPtr dev,int axnum,Atom label,int minval,int maxval,int resolution,int min_res,int max_res,int mode)232 InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label,
233 int minval, int maxval, int resolution,
234 int min_res, int max_res, int mode)
235 {
236 return TRUE;
237 }
238 #elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) > 12
239 _X_EXPORT void
InitValuatorAxisStruct(DeviceIntPtr dev,int axnum,Atom label,int minval,int maxval,int resolution,int min_res,int max_res,int mode)240 InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label,
241 int minval, int maxval, int resolution,
242 int min_res, int max_res, int mode)
243 {
244 return;
245 }
246 #else
247 _X_EXPORT void
InitValuatorAxisStruct(DeviceIntPtr dev,int axnum,Atom label,int minval,int maxval,int resolution,int min_res,int max_res)248 InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label,
249 int minval, int maxval, int resolution,
250 int min_res, int max_res)
251 {
252 return;
253 }
254 #endif
255
256 _X_EXPORT void
xf86PostKeyboardEvent(DeviceIntPtr device,unsigned int key_code,int is_down)257 xf86PostKeyboardEvent(DeviceIntPtr device,
258 unsigned int key_code,
259 int is_down)
260 {
261 return;
262 }
263
264 _X_EXPORT int
xf86SetIntOption(OPTTYPE optlist,const char * name,int deflt)265 xf86SetIntOption(OPTTYPE optlist, const char *name, int deflt)
266 {
267 return 0;
268 }
269
270 _X_EXPORT void
xf86PostButtonEventP(DeviceIntPtr device,int is_absolute,int button,int is_down,int first_valuator,int num_valuators,const int * valuators)271 xf86PostButtonEventP(DeviceIntPtr device,
272 int is_absolute,
273 int button,
274 int is_down,
275 int first_valuator,
276 int num_valuators,
277 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
278 const
279 #endif
280 int *valuators)
281 {
282 return;
283 }
284
285 _X_EXPORT Bool
InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev,PtrCtrlProcPtr controlProc)286 InitPtrFeedbackClassDeviceStruct(DeviceIntPtr dev, PtrCtrlProcPtr controlProc)
287 {
288 return FALSE;
289 }
290
291 _X_EXPORT int
XIChangeDeviceProperty(DeviceIntPtr dev,Atom property,Atom type,int format,int mode,unsigned long len,const void * value,Bool sendevent)292 XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
293 int format, int mode, unsigned long len,
294 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 16
295 const void *
296 #elif GET_ABI_MAJOR(ABI_XINPUT_VERSION) > 12
297 const pointer
298 #else
299 pointer
300 #endif
301 value, Bool sendevent)
302 {
303 return 0;
304 }
305
306 _X_EXPORT CARD32
GetTimeInMillis(void)307 GetTimeInMillis (void)
308 {
309 return 0;
310 }
311
312
313 _X_EXPORT int
NewInputDeviceRequest(InputOption * options,InputAttributes * attrs,DeviceIntPtr * pdev)314 NewInputDeviceRequest (InputOption *options,
315 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
316 InputAttributes *attrs,
317 #endif
318 DeviceIntPtr *pdev)
319 {
320 return 0;
321 }
322
323
324 _X_EXPORT Bool
InitLedFeedbackClassDeviceStruct(DeviceIntPtr dev,LedCtrlProcPtr controlProc)325 InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc)
326 {
327 return FALSE;
328 }
329
330
331 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
332 _X_EXPORT InputAttributes*
DuplicateInputAttributes(InputAttributes * attrs)333 DuplicateInputAttributes(InputAttributes *attrs)
334 {
335 return NULL;
336 }
337 #endif
338
339 _X_EXPORT int
ValidAtom(Atom atom)340 ValidAtom(Atom atom)
341 {
342 return None;
343 }
344
345 _X_EXPORT Bool
InitKeyboardDeviceStruct(DeviceIntPtr dev,XkbRMLVOSet * rmlvo,BellProcPtr bell_func,KbdCtrlProcPtr ctrl_func)346 InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet *rmlvo,
347 BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func)
348 {
349 return FALSE;
350 }
351
352 _X_EXPORT long
XIRegisterPropertyHandler(DeviceIntPtr dev,int (* SetProperty)(DeviceIntPtr dev,Atom property,XIPropertyValuePtr prop,BOOL checkonly),int (* GetProperty)(DeviceIntPtr dev,Atom property),int (* DelProperty)(DeviceIntPtr dev,Atom property))353 XIRegisterPropertyHandler(DeviceIntPtr dev,
354 int (*SetProperty) (DeviceIntPtr dev,
355 Atom property,
356 XIPropertyValuePtr prop,
357 BOOL checkonly),
358 int (*GetProperty) (DeviceIntPtr dev,
359 Atom property),
360 int (*DelProperty) (DeviceIntPtr dev,
361 Atom property))
362 {
363 return 0;
364 }
365
366 _X_EXPORT int
InitProximityClassDeviceStruct(DeviceIntPtr dev)367 InitProximityClassDeviceStruct(DeviceIntPtr dev)
368 {
369 return 0;
370 }
371
372 _X_EXPORT void
LogMessageVerbSigSafe(MessageType type,int verb,const char * format,...)373 LogMessageVerbSigSafe(MessageType type, int verb, const char *format, ...)
374 {
375 return;
376 }
377
378 _X_EXPORT void
xf86MsgVerb(MessageType type,int verb,const char * format,...)379 xf86MsgVerb(MessageType type, int verb, const char *format, ...)
380 {
381 return;
382 }
383
384 _X_EXPORT void
xf86Msg(MessageType type,const char * format,...)385 xf86Msg(MessageType type, const char *format, ...)
386 {
387 return;
388 }
389
390 _X_EXPORT void
xf86PostMotionEventP(DeviceIntPtr device,int is_absolute,int first_valuator,int num_valuators,const int * valuators)391 xf86PostMotionEventP(DeviceIntPtr device,
392 int is_absolute,
393 int first_valuator,
394 int num_valuators,
395 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
396 const
397 #endif
398 int *valuators)
399 {
400 return;
401 }
402
403
404 _X_EXPORT Bool
InitValuatorClassDeviceStruct(DeviceIntPtr dev,int numAxes,Atom * labels,int numMotionEvents,int mode)405 InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels,
406 int numMotionEvents, int mode)
407 {
408 return FALSE;
409 }
410
411
412 _X_EXPORT OPTTYPE
xf86ReplaceStrOption(OPTTYPE optlist,const char * name,const char * val)413 xf86ReplaceStrOption(OPTTYPE optlist, const char *name, const char* val)
414 {
415 return NULL;
416 }
417
418
419 _X_EXPORT OPTTYPE
xf86NextOption(OPTTYPE list)420 xf86NextOption(OPTTYPE list)
421 {
422 return NULL;
423 }
424
425
426 _X_EXPORT int
XIGetDeviceProperty(DeviceIntPtr dev,Atom property,XIPropertyValuePtr * value)427 XIGetDeviceProperty (DeviceIntPtr dev, Atom property, XIPropertyValuePtr *value)
428 {
429 return 0;
430 }
431
432
433 _X_EXPORT Atom
MakeAtom(const char * string,unsigned len,Bool makeit)434 MakeAtom(const char *string, unsigned len, Bool makeit)
435 {
436 return None;
437 }
438
439
440 _X_EXPORT int
GetMotionHistorySize(void)441 GetMotionHistorySize(void)
442 {
443 return 0;
444 }
445
446
447 _X_EXPORT void
xf86PostProximityEventP(DeviceIntPtr device,int is_in,int first_valuator,int num_valuators,const int * valuators)448 xf86PostProximityEventP(DeviceIntPtr device,
449 int is_in,
450 int first_valuator,
451 int num_valuators,
452 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
453 const
454 #endif
455 int *valuators)
456 {
457 return;
458 }
459
460
461 _X_EXPORT Bool
InitFocusClassDeviceStruct(DeviceIntPtr dev)462 InitFocusClassDeviceStruct(DeviceIntPtr dev)
463 {
464 return FALSE;
465 }
466
467 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 12
468 void
xf86ProcessCommonOptions(InputInfoPtr pInfo,pointer list)469 xf86ProcessCommonOptions(InputInfoPtr pInfo, pointer list)
470 {
471 }
472
473 void
xf86CollectInputOptions(InputInfoPtr pInfo,const char ** defaultOpts,pointer extraOpts)474 xf86CollectInputOptions(InputInfoPtr pInfo,
475 const char **defaultOpts,
476 pointer extraOpts)
477 {
478 }
479
xf86AllocateInput(InputDriverPtr drv,int flags)480 InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags)
481 {
482 return NULL;
483 }
484
485 #endif
486
487 ClientPtr serverClient;
488
QueueWorkProc(Bool (* function)(ClientPtr,pointer),ClientPtr client,pointer closure)489 Bool QueueWorkProc (
490 Bool (*function)(ClientPtr /* pClient */, pointer /* closure */),
491 ClientPtr client, pointer closure)
492 {
493 return FALSE;
494 }
495
496
497 OsTimerPtr
TimerSet(OsTimerPtr timer,int flags,CARD32 millis,OsTimerCallback func,pointer arg)498 TimerSet(OsTimerPtr timer, int flags, CARD32 millis,
499 OsTimerCallback func, pointer arg)
500 {
501 return NULL;
502 }
503
TimerFree(OsTimerPtr timer)504 void TimerFree(OsTimerPtr timer)
505 {
506 }
507
TimerCancel(OsTimerPtr timer)508 void TimerCancel(OsTimerPtr timer)
509 {
510 }
511
512 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) < 24
513 int
xf86BlockSIGIO(void)514 xf86BlockSIGIO (void)
515 {
516 return 0;
517 }
518
519 void
xf86UnblockSIGIO(int wasset)520 xf86UnblockSIGIO (int wasset)
521 {
522 }
523 #else
input_lock(void)524 void input_lock (void)
525 {
526 }
527
input_unlock(void)528 void input_unlock (void)
529 {
530 }
531 #endif
532
533 /* This is not the same as the X server one, but it'll do for the tests */
534 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 14
535 #define InputOption InputOption_custom
536 typedef struct _InputOption {
537 struct _InputOption *next;
538 char *key;
539 char *value;
540 } InputOption;
541
542 InputOption*
input_option_new(InputOption * list,const char * key,const char * value)543 input_option_new(InputOption *list, const char *key, const char *value)
544 {
545 InputOption *new;
546
547 new = calloc(1, sizeof(InputOption));
548 new->key = strdup(key);
549 new->value = strdup(value);
550 new->next = list;
551 return new;
552 }
553
554 void
input_option_free_list(InputOption ** opts)555 input_option_free_list(InputOption **opts)
556 {
557 InputOption *tmp = *opts;
558 while(*opts)
559 {
560 tmp = (*opts)->next;
561 free((*opts)->key);
562 free((*opts)->value);
563 free((*opts));
564 *opts = tmp;
565 }
566 }
567 #undef InputOption
568 #endif
569
570 #if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 16
571 _X_EXPORT Bool
InitTouchClassDeviceStruct(DeviceIntPtr device,unsigned int max_touches,unsigned int mode,unsigned int numAxes)572 InitTouchClassDeviceStruct(DeviceIntPtr device, unsigned int max_touches,
573 unsigned int mode, unsigned int numAxes) {
574 return TRUE;
575 }
576
valuator_mask_new(int num_valuators)577 _X_EXPORT ValuatorMask *valuator_mask_new(int num_valuators) {
578 return NULL;
579 }
580
valuator_mask_set(ValuatorMask * mask,int valuator,int data)581 _X_EXPORT void valuator_mask_set(ValuatorMask *mask, int valuator, int data) {
582 return;
583 }
584
xf86PostTouchEvent(DeviceIntPtr dev,uint32_t touchid,uint16_t type,uint32_t flags,const ValuatorMask * mask)585 _X_EXPORT void xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid, uint16_t type,
586 uint32_t flags, const ValuatorMask *mask) {
587 return;
588 }
589 #endif
590
591 _X_EXPORT void
xf86PrintChipsets(const char * drvname,const char * drvmsg,SymTabPtr chips)592 xf86PrintChipsets(const char *drvname, const char *drvmsg, SymTabPtr chips)
593 {
594 }
595