~jderose/ubuntu/raring/xserver-xorg-input-synaptics/clickpad

« back to all changes in this revision

Viewing changes to test/fake-symbols.c

  • Committer: Package Import Robot
  • Author(s): Cyril Brulebois, Julien Cristau, Cyril Brulebois
  • Date: 2012-05-20 16:50:18 UTC
  • mfrom: (0.4.9)
  • mto: (61.1.1 quantal)
  • mto: This revision was merged to the branch mainline in revision 60.
  • Revision ID: package-import@ubuntu.com-20120520165018-ap60y9jh84nv75vp
Tags: 1.6.1-1
[ Julien Cristau ]
* The mtdev build-dep is linux-only (closes: #672572).  Thanks, Pino
  Toscano!

[ Cyril Brulebois ]
* New upstream release, from the 1.6 branch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#include "fake-symbols.h"
2
2
 
3
3
_X_EXPORT
4
 
int xf86ReadSerial (int fd, void *buf, int count)
5
 
{
6
 
    return 0;
7
 
}
8
 
 
9
 
 
10
 
_X_EXPORT int
11
 
xf86WriteSerial (int fd, const void *buf, int count)
12
 
{
13
 
    return 0;
14
 
}
15
 
 
16
 
_X_EXPORT int
17
 
xf86CloseSerial (int fd)
18
 
{
19
 
    return 0;
20
 
}
21
 
 
22
 
_X_EXPORT int
23
 
xf86WaitForInput (int fd, int timeout)
24
 
{
25
 
    return 0;
26
 
}
27
 
 
28
 
_X_EXPORT int
29
 
xf86OpenSerial (OPTTYPE options)
30
 
{
31
 
    return 0;
32
 
}
33
 
 
34
 
_X_EXPORT int
35
 
xf86SetSerialSpeed (int fd, int speed)
 
4
    int
 
5
xf86ReadSerial(int fd, void *buf, int count)
 
6
{
 
7
    return 0;
 
8
}
 
9
 
 
10
_X_EXPORT int
 
11
xf86WriteSerial(int fd, const void *buf, int count)
 
12
{
 
13
    return 0;
 
14
}
 
15
 
 
16
_X_EXPORT int
 
17
xf86CloseSerial(int fd)
 
18
{
 
19
    return 0;
 
20
}
 
21
 
 
22
_X_EXPORT int
 
23
xf86WaitForInput(int fd, int timeout)
 
24
{
 
25
    return 0;
 
26
}
 
27
 
 
28
_X_EXPORT int
 
29
xf86OpenSerial(OPTTYPE options)
 
30
{
 
31
    return 0;
 
32
}
 
33
 
 
34
_X_EXPORT int
 
35
xf86SetSerialSpeed(int fd, int speed)
36
36
{
37
37
    return 0;
38
38
}
60
60
{
61
61
    return NULL;
62
62
}
 
63
 
63
64
_X_EXPORT CONST char *
64
65
xf86FindOptionValue(OPTTYPE options, const char *name)
65
66
{
115
116
}
116
117
 
117
118
_X_EXPORT int
118
 
xf86ScaleAxis(int       Cx,
119
 
              int       to_max,
120
 
              int       to_min,
121
 
              int       from_max,
122
 
              int       from_min )
 
119
xf86ScaleAxis(int Cx, int to_max, int to_min, int from_max, int from_min)
123
120
{
124
121
    int X;
125
122
    int64_t to_width = to_max - to_min;
126
123
    int64_t from_width = from_max - from_min;
127
124
 
128
125
    if (from_width) {
129
 
        X = (int)(((to_width * (Cx - from_min)) / from_width) + to_min);
 
126
        X = (int) (((to_width * (Cx - from_min)) / from_width) + to_min);
130
127
    }
131
128
    else {
132
 
        X = 0;
133
 
        /*ErrorF ("Divide by Zero in xf86ScaleAxis\n");*/
 
129
        X = 0;
 
130
        /*ErrorF ("Divide by Zero in xf86ScaleAxis\n"); */
134
131
    }
135
132
 
136
133
    if (X > to_max)
137
 
        X = to_max;
 
134
        X = to_max;
138
135
    if (X < to_min)
139
 
        X = to_min;
 
136
        X = to_min;
140
137
 
141
138
    return X;
142
139
}
143
140
 
144
 
 
145
141
_X_EXPORT void
146
142
DeleteInputDeviceRequest(DeviceIntPtr pDev)
147
143
{
148
144
    return;
149
145
}
150
146
 
151
 
 
152
147
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
153
148
_X_EXPORT void
154
 
FreeInputAttributes(InputAttributes *attrs)
 
149
FreeInputAttributes(InputAttributes * attrs)
155
150
{
156
151
    return;
157
152
}
158
153
#endif
159
154
 
160
155
_X_EXPORT void
161
 
xf86PostButtonEvent(DeviceIntPtr        device,
162
 
                    int                 is_absolute,
163
 
                    int                 button,
164
 
                    int                 is_down,
165
 
                    int                 first_valuator,
166
 
                    int                 num_valuators,
167
 
                    ...)
 
156
xf86PostButtonEvent(DeviceIntPtr device,
 
157
                    int is_absolute,
 
158
                    int button,
 
159
                    int is_down, int first_valuator, int num_valuators, ...)
168
160
{
169
161
    return;
170
162
}
171
163
 
172
164
_X_EXPORT int
173
 
Xasprintf(char ** ret, const char * format, ...)
 
165
Xasprintf(char **ret, const char *format, ...)
174
166
{
175
167
    return 0;
176
168
}
177
169
 
178
 
 
179
170
_X_EXPORT int
180
171
XISetDevicePropertyDeletable(DeviceIntPtr dev, Atom property, Bool deletable)
181
172
{
182
173
    return 0;
183
174
}
184
175
 
185
 
 
186
176
_X_EXPORT InputInfoPtr
187
177
xf86FirstLocalDevice(void)
188
178
{
189
179
    return NULL;
190
180
}
191
181
 
192
 
 
193
182
_X_EXPORT void
194
183
xf86DeleteInput(InputInfoPtr pInp, int flags)
195
184
{
203
192
}
204
193
 
205
194
_X_EXPORT Bool
206
 
InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom* labels,
 
195
InitButtonClassDeviceStruct(DeviceIntPtr dev, int numButtons, Atom *labels,
207
196
                            CARD8 *map)
208
197
{
209
198
    return FALSE;
210
199
}
211
200
 
212
201
_X_EXPORT void
213
 
InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval, int maxval,
214
 
                       int resolution, int min_res, int max_res, int mode)
 
202
InitValuatorAxisStruct(DeviceIntPtr dev, int axnum, Atom label, int minval,
 
203
                       int maxval, int resolution, int min_res, int max_res,
 
204
                       int mode)
215
205
{
216
206
    return;
217
207
}
218
208
 
219
209
_X_EXPORT void
220
 
xf86PostKeyboardEvent(DeviceIntPtr      device,
221
 
                      unsigned int      key_code,
222
 
                      int               is_down)
 
210
xf86PostKeyboardEvent(DeviceIntPtr device, unsigned int key_code, int is_down)
223
211
{
224
212
    return;
225
213
}
231
219
}
232
220
 
233
221
_X_EXPORT void
234
 
xf86PostButtonEventP(DeviceIntPtr       device,
235
 
                     int                is_absolute,
236
 
                     int                button,
237
 
                     int                is_down,
238
 
                     int                first_valuator,
239
 
                     int                num_valuators,
 
222
xf86PostButtonEventP(DeviceIntPtr device,
 
223
                     int is_absolute,
 
224
                     int button,
 
225
                     int is_down, int first_valuator, int num_valuators,
240
226
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
241
227
                     const
242
228
#endif
243
 
                           int          *valuators)
 
229
                     int *valuators)
244
230
{
245
231
    return;
246
232
}
252
238
}
253
239
 
254
240
_X_EXPORT int
255
 
XIChangeDeviceProperty (DeviceIntPtr dev, Atom property, Atom type,
256
 
                        int format, int mode, unsigned long len,
257
 
                        OPTTYPE value, Bool sendevent)
 
241
XIChangeDeviceProperty(DeviceIntPtr dev, Atom property, Atom type,
 
242
                       int format, int mode, unsigned long len,
 
243
                       OPTTYPE value, Bool sendevent)
258
244
{
259
245
    return 0;
260
246
}
261
247
 
262
248
_X_EXPORT CARD32
263
 
GetTimeInMillis (void)
 
249
GetTimeInMillis(void)
264
250
{
265
251
    return 0;
266
252
}
267
253
 
268
 
 
269
254
_X_EXPORT int
270
 
NewInputDeviceRequest (InputOption *options,
 
255
NewInputDeviceRequest(InputOption *options,
271
256
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
272
 
                       InputAttributes *attrs,
 
257
                      InputAttributes * attrs,
273
258
#endif
274
 
                       DeviceIntPtr *pdev)
 
259
                      DeviceIntPtr *pdev)
275
260
{
276
261
    return 0;
277
262
}
278
263
 
279
 
 
280
264
_X_EXPORT Bool
281
 
InitLedFeedbackClassDeviceStruct (DeviceIntPtr dev, LedCtrlProcPtr controlProc)
 
265
InitLedFeedbackClassDeviceStruct(DeviceIntPtr dev, LedCtrlProcPtr controlProc)
282
266
{
283
267
    return FALSE;
284
268
}
285
269
 
286
 
 
287
270
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 11
288
 
_X_EXPORT InputAttributes*
289
 
DuplicateInputAttributes(InputAttributes *attrs)
 
271
_X_EXPORT InputAttributes *
 
272
DuplicateInputAttributes(InputAttributes * attrs)
290
273
{
291
274
    return NULL;
292
275
}
299
282
}
300
283
 
301
284
_X_EXPORT Bool
302
 
InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet *rmlvo,
 
285
InitKeyboardDeviceStruct(DeviceIntPtr dev, XkbRMLVOSet * rmlvo,
303
286
                         BellProcPtr bell_func, KbdCtrlProcPtr ctrl_func)
304
287
{
305
288
    return FALSE;
306
289
}
307
290
 
308
291
_X_EXPORT long
309
 
XIRegisterPropertyHandler(DeviceIntPtr         dev,
 
292
XIRegisterPropertyHandler(DeviceIntPtr dev,
310
293
                          int (*SetProperty) (DeviceIntPtr dev,
311
294
                                              Atom property,
312
295
                                              XIPropertyValuePtr prop,
325
308
    return 0;
326
309
}
327
310
 
328
 
 
329
311
_X_EXPORT void
330
312
xf86Msg(MessageType type, const char *format, ...)
331
313
{
344
326
    return;
345
327
}
346
328
 
347
 
 
348
329
_X_EXPORT void
349
 
xf86PostMotionEventP(DeviceIntPtr       device,
350
 
                    int                 is_absolute,
351
 
                    int                 first_valuator,
352
 
                    int                 num_valuators,
 
330
xf86PostMotionEventP(DeviceIntPtr device,
 
331
                     int is_absolute, int first_valuator, int num_valuators,
353
332
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
354
 
                    const
 
333
                     const
355
334
#endif
356
 
                          int           *valuators)
 
335
                     int *valuators)
357
336
{
358
337
    return;
359
338
}
360
339
 
361
 
 
362
340
_X_EXPORT Bool
363
341
InitValuatorClassDeviceStruct(DeviceIntPtr dev, int numAxes, Atom *labels,
364
342
                              int numMotionEvents, int mode)
366
344
    return FALSE;
367
345
}
368
346
 
369
 
 
370
347
_X_EXPORT OPTTYPE
371
 
xf86ReplaceStrOption(OPTTYPE optlist, const char *name, const char* val)
 
348
xf86ReplaceStrOption(OPTTYPE optlist, const char *name, const char *val)
372
349
{
373
350
    return NULL;
374
351
}
375
352
 
376
 
 
377
353
_X_EXPORT OPTTYPE
378
354
xf86NextOption(OPTTYPE list)
379
355
{
380
356
    return NULL;
381
357
}
382
358
 
383
 
 
384
359
_X_EXPORT int
385
 
XIGetDeviceProperty (DeviceIntPtr dev, Atom property, XIPropertyValuePtr *value)
 
360
XIGetDeviceProperty(DeviceIntPtr dev, Atom property, XIPropertyValuePtr *value)
386
361
{
387
362
    return 0;
388
363
}
389
364
 
390
 
 
391
365
_X_EXPORT Atom
392
366
MakeAtom(const char *string, unsigned len, Bool makeit)
393
367
{
394
368
    return None;
395
369
}
396
370
 
397
 
 
398
371
_X_EXPORT int
399
372
GetMotionHistorySize(void)
400
373
{
401
374
    return 0;
402
375
}
403
376
 
404
 
 
405
377
_X_EXPORT void
406
 
xf86PostProximityEventP(DeviceIntPtr    device,
407
 
                        int             is_in,
408
 
                        int             first_valuator,
409
 
                        int             num_valuators,
 
378
xf86PostProximityEventP(DeviceIntPtr device,
 
379
                        int is_in, int first_valuator, int num_valuators,
410
380
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
411
381
                        const
412
382
#endif
413
 
                           int          *valuators)
 
383
                        int *valuators)
414
384
{
415
385
    return;
416
386
}
417
387
 
418
 
 
419
388
_X_EXPORT Bool
420
389
InitFocusClassDeviceStruct(DeviceIntPtr dev)
421
390
{
430
399
 
431
400
void
432
401
xf86CollectInputOptions(InputInfoPtr pInfo,
433
 
                        const char **defaultOpts,
434
 
                        OPTTYPE extraOpts)
 
402
                        const char **defaultOpts, OPTTYPE extraOpts)
435
403
{
436
404
}
437
405
 
438
 
InputInfoPtr xf86AllocateInput(InputDriverPtr drv, int flags)
 
406
InputInfoPtr
 
407
xf86AllocateInput(InputDriverPtr drv, int flags)
439
408
{
440
409
    return NULL;
441
410
}
444
413
 
445
414
ClientPtr serverClient;
446
415
 
447
 
Bool QueueWorkProc (
448
 
    Bool (*function)(ClientPtr /* pClient */, pointer /* closure */),
449
 
    ClientPtr client, pointer closure)
 
416
Bool
 
417
QueueWorkProc(Bool (*function)
 
418
              (ClientPtr /* pClient */ , pointer /* closure */ ),
 
419
              ClientPtr client, pointer closure)
450
420
{
451
421
    return FALSE;
452
422
}
453
423
 
454
424
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 12
455
 
_X_EXPORT ValuatorMask  *valuator_mask_new(int num_valuators)
 
425
_X_EXPORT ValuatorMask *
 
426
valuator_mask_new(int num_valuators)
456
427
{
457
428
    return NULL;
458
429
}
459
430
 
460
 
_X_EXPORT void valuator_mask_free(ValuatorMask **mask)
461
 
{
462
 
}
463
 
 
464
 
_X_EXPORT int valuator_mask_get(const ValuatorMask *mask, int valuator)
465
 
{
466
 
    return 0;
467
 
}
468
 
 
469
 
_X_EXPORT void valuator_mask_set(ValuatorMask *mask, int valuator, int data)
470
 
{
471
 
}
472
 
 
473
 
extern _X_EXPORT void valuator_mask_unset(ValuatorMask *mask, int bit)
474
 
{
475
 
}
476
 
 
477
 
_X_EXPORT int valuator_mask_num_valuators(const ValuatorMask *mask)
478
 
{
479
 
    return 0;
480
 
}
481
 
 
482
 
_X_EXPORT void valuator_mask_zero(ValuatorMask *mask)
483
 
{
484
 
}
485
 
 
486
 
_X_EXPORT void valuator_mask_copy(ValuatorMask *dest, const ValuatorMask *src)
 
431
_X_EXPORT void
 
432
valuator_mask_free(ValuatorMask **mask)
 
433
{
 
434
}
 
435
 
 
436
_X_EXPORT int
 
437
valuator_mask_get(const ValuatorMask *mask, int valuator)
 
438
{
 
439
    return 0;
 
440
}
 
441
 
 
442
_X_EXPORT void
 
443
valuator_mask_set(ValuatorMask *mask, int valuator, int data)
 
444
{
 
445
}
 
446
 
 
447
extern _X_EXPORT void
 
448
valuator_mask_unset(ValuatorMask *mask, int bit)
 
449
{
 
450
}
 
451
 
 
452
_X_EXPORT int
 
453
valuator_mask_num_valuators(const ValuatorMask *mask)
 
454
{
 
455
    return 0;
 
456
}
 
457
 
 
458
_X_EXPORT void
 
459
valuator_mask_zero(ValuatorMask *mask)
 
460
{
 
461
}
 
462
 
 
463
_X_EXPORT void
 
464
valuator_mask_copy(ValuatorMask *dest, const ValuatorMask *src)
487
465
{
488
466
}
489
467
#endif
490
468
 
491
469
#if GET_ABI_MAJOR(ABI_XINPUT_VERSION) >= 16
492
 
_X_EXPORT void xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid,
493
 
                                  uint16_t type, uint32_t flags,
494
 
                                  const ValuatorMask *mask)
 
470
_X_EXPORT void
 
471
xf86PostTouchEvent(DeviceIntPtr dev, uint32_t touchid,
 
472
                   uint16_t type, uint32_t flags, const ValuatorMask *mask)
495
473
{
496
474
}
497
475
#endif