~ubuntu-branches/ubuntu/oneiric/soqt/oneiric

« back to all changes in this revision

Viewing changes to build/msvc6/src/Inventor/Qt/devices/spwinput_win32.h

  • Committer: Bazaar Package Importer
  • Author(s): Steve M. Robbins
  • Date: 2006-02-06 22:34:00 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20060206223400-g69m5soqa4zh0gkc
Tags: 1.3.0-3
debian/control: update libsoqt-dev depends.  Closes: #351700.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*----------------------------------------------------------------------
 
2
 * (C) 1998-2001 3Dconnexion. All rights reserved. 
 
3
 * Permission to use, copy, modify, and distribute this software for all
 
4
 * purposes and without fees is hereby grated provided that this copyright
 
5
 * notice appears in all copies.  Permission to modify this software is granted
 
6
 * and 3Dconnexion will support such modifications only is said modifications are
 
7
 * approved by 3Dconnexion.
 
8
 *
 
9
 */
 
10
 
 
11
#ifndef SPWINPUT_WIN32_H
 
12
#define SPWINPUT_WIN32_H
 
13
 
 
14
#ifdef HAVE_CONFIG_H
 
15
#include <config.h>
 
16
#endif /* HAVE_CONFIG_H */
 
17
 
 
18
#include <Inventor/Qt/devices/spwinput.h>
 
19
 
 
20
#ifndef HAVE_WIN32_API
 
21
#error "Do not include this file unless HAVE_WIN32_API is set."
 
22
#endif /* !HAVE_WIN32_API */
 
23
 
 
24
#include <tchar.h>
 
25
 
 
26
/* some enumerated types used in spwinput_win32.cpp */
 
27
enum InitResult 
 
28
   {
 
29
   NOT_LOADED, 
 
30
   FAILED, 
 
31
   LOADED
 
32
   };
 
33
 
 
34
enum ErrorCode 
 
35
   {
 
36
   NO_DLL_ERROR=0,
 
37
   DLL_LOAD_FAILURE,
 
38
   DLL_FUNCTION_LOAD_FAILURE,
 
39
   DLL_VAR_LOAD_FAILURE
 
40
   };
 
41
 
 
42
enum SpwRetVal             /* Error return values.                           */
 
43
   {
 
44
   SPW_NO_ERROR,           /* No error.                                      */
 
45
   SPW_ERROR,              /* Error -- function failed.                      */
 
46
   SI_BAD_HANDLE,          /* Invalid SpaceWare handle.                      */
 
47
   SI_BAD_ID,              /* Invalid device ID.                             */
 
48
   SI_BAD_VALUE,           /* Invalid argument value.                        */
 
49
   SI_IS_EVENT,            /* Event is a SpaceWare event.                    */
 
50
   SI_SKIP_EVENT,          /* Skip this SpaceWare event.                     */
 
51
   SI_NOT_EVENT,           /* Event is not a SpaceWare event.                */
 
52
   SI_NO_DRIVER,           /* SpaceWare driver is not running.               */
 
53
   SI_NO_RESPONSE,         /* SpaceWare driver is not responding.            */
 
54
   SI_UNSUPPORTED,         /* The function is unsupported by this version.   */
 
55
   SI_UNINITIALIZED,       /* SpaceWare input library is uninitialized.      */
 
56
   SI_WRONG_DRIVER,        /* Driver is incorrect for this SpaceWare version.*/
 
57
   SI_INTERNAL_ERROR,      /* Internal SpaceWare error.                      */
 
58
   SI_BAD_PROTOCOL,        /* The transport protocol is unknown.             */
 
59
   SI_OUT_OF_MEMORY,       /* Unable to malloc space required.               */
 
60
   SPW_DLL_LOAD_ERROR,     /* Could not load siapp dlls                      */
 
61
   SI_NOT_OPEN,            /* Spaceball device not open                      */
 
62
   SI_ITEM_NOT_FOUND       /* Item not found                                 */
 
63
   };
 
64
 
 
65
static enum SpwRetVal *pDllSpwRetVal;
 
66
 
 
67
/* some macros */
 
68
#define SPW_FALSE   (0)
 
69
#define SPW_TRUE    (!SPW_FALSE)
 
70
 
 
71
#define SPW_MAX(a,b)   (((a)>(b))?(a):(b))
 
72
#define SPW_MIN(a,b)   (((a)<(b))?(a):(b))
 
73
 
 
74
#define SPW_ABS(a)   (((a)<0)?(-(a)):(a))
 
75
 
 
76
#define SPW_SIGN(a)  ((a)>=0?1:-1)
 
77
 
 
78
#define SPW_BIND(min,n,max)   (SPW_MIN((max),SPW_MAX((min),(n))))
 
79
 
 
80
#define SPW_NUM_ELEMENTS_IN(a)   (sizeof(a)/sizeof((a)[0]))
 
81
 
 
82
#define SPW_PI   3.14159265358979324f
 
83
 
 
84
#define SPW_DEG_TO_RAD(d)   ((d)*SPW_PI/180.0f)
 
85
#define SPW_RAD_TO_DEG(r)   ((r)*180.0f/SPW_PI)
 
86
 
 
87
#define SPW_LENGTH_OF(a)   (sizeof(a)/sizeof((a)[0]))
 
88
 
 
89
#define SPW_END_OF(a)   (&(a)[SPW_LENGTH_OF(a)-1])
 
90
 
 
91
#define SPW_SQ(a)   ((a)*(a))
 
92
 
 
93
#define SPW_ABSDIFF(a, b) (fabs((double) (a) - (b)))
 
94
 
 
95
/* the accepted datatypes for spacetec products */
 
96
 
 
97
#define tchar_t                         _TCHAR
 
98
#define char_t                          char
 
99
#define uint32_t                        unsigned long
 
100
#define sint32_t                        long
 
101
#define boolean_t                       unsigned char  
 
102
#define void_t                          void
 
103
#define window_handle_t         HWND
 
104
 
 
105
 
 
106
typedef long               SPWint32;
 
107
typedef short              SPWint16;
 
108
typedef char               SPWint8;
 
109
typedef int                SPWbool;
 
110
typedef unsigned long      SPWuint32;
 
111
typedef unsigned short     SPWuint16;
 
112
typedef unsigned char      SPWuint8;
 
113
typedef _TCHAR             SPWchar;
 
114
typedef _TCHAR*            SPWstring;
 
115
typedef float              SPWfloat32;
 
116
typedef double             SPWfloat64;
 
117
 
 
118
/*
 
119
 * UI modes 
 
120
 */
 
121
#define SI_UI_ALL_CONTROLS    0xffffffffL
 
122
#define SI_UI_NO_CONTROLS     0x00000000L
 
123
 
 
124
/*
 
125
 *  These UI modes are left here for legacy applications.
 
126
 */
 
127
#define SI_UI_FILTERS         0x00000001L
 
128
#define SI_UI_FUNC_BUTTONS    0x00000002L
 
129
#define SI_UI_RESET_BUTTONS   0x00000004L
 
130
#define SI_UI_SENSITIVITY     0x00000008L
 
131
#define SI_UI_TUNING          0x00000010L
 
132
#define SI_UI_DIALOG_POPUP    0x00000020L
 
133
 
 
134
/*
 
135
 * Device types and classes 
 
136
 */
 
137
typedef enum
 
138
   {
 
139
   SI_ALL_TYPES           = -1,
 
140
   SI_UNKNOWN_DEVICE      =  0,
 
141
   SI_SPACEBALL_2003      =  1,
 
142
   SI_SPACEBALL_3003      =  2,
 
143
   SI_SPACE_CONTROLLER    =  3,
 
144
   SI_AVENGER             =  4,
 
145
   SI_SPACEORB_360        =  5,
 
146
   SI_NAVIGATOR           =  6,
 
147
   SI_SPACEBALL_2003A     =  7,
 
148
   SI_SPACEBALL_2003B     =  8,
 
149
   SI_SPACEBALL_2003C     =  9,
 
150
   SI_SPACEBALL_3003A     =  10,
 
151
   SI_SPACEBALL_3003B     =  11,
 
152
   SI_SPACEBALL_3003C     =  12,
 
153
   SI_SPACEBALL_4000      =  13,
 
154
   SI_SPACEMOUSE_CLASSIC  =  14, 
 
155
   SI_SPACEMOUSE_PLUS     =  15,
 
156
   SI_SPACEMOUSE_XT       =  16,
 
157
   SI_PUCKMAN             =  17,
 
158
   SI_CADMAN              =  18,
 
159
   SI_NUM_DEV_TYPES  /* Leave this last, add before it */
 
160
   } SiDevType;
 
161
 
 
162
/*
 
163
 *  These defintions of device classes are left in for legacy applications.
 
164
 */
 
165
#define SI_HIGH_END           63
 
166
#define SI_MED_END            62
 
167
#define SI_LOW_END            61
 
168
 
 
169
/*
 
170
 * Data retrieval mode, only SI_EVENT is currently supported.
 
171
 */
 
172
#define SI_EVENT              0x0001
 
173
#define SI_POLL               0x0002
 
174
 
 
175
/*
 
176
 * Get event flags
 
177
 */
 
178
#define SI_AVERAGE_EVENTS     0x0001
 
179
 
 
180
/*
 
181
 * This is an INTERNAL flag used by the polling mechanism, user applications
 
182
 * should NOT send this flag.
 
183
 */
 
184
#define SI_POLLED_REQUEST     0x0100 
 
185
 
 
186
/*
 
187
 * SpaceWare event types
 
188
 */
 
189
typedef enum
 
190
   {
 
191
   SI_BUTTON_EVENT = 1,
 
192
   SI_MOTION_EVENT,
 
193
   SI_COMBO_EVENT, /* Not implemented */
 
194
   SI_ZERO_EVENT,
 
195
   SI_EXCEPTION_EVENT,
 
196
   SI_OUT_OF_BAND,
 
197
   SI_ORIENTATION_EVENT,
 
198
   SI_KEYBOARD_EVENT,
 
199
   SI_LPFK_EVENT
 
200
   } SiEventType;
 
201
 
 
202
/*
 
203
 * Data modes
 
204
 */
 
205
#define SI_MODE_NORMALIZE     0x0001
 
206
#define SI_MODE_COMPRESS      0x0002
 
207
#define SI_MODE_SENSITIVITY   0x0004
 
208
#define SI_MODE_TUNING        0x0008
 
209
 
 
210
/*
 
211
 * Motion data offsets
 
212
 */
 
213
#define SI_TX                 0              /* Translation X value */
 
214
#define SI_TY                 1              /* Translation Y value */
 
215
#define SI_TZ                 2              /* Translation Z value */
 
216
#define SI_RX                 3              /* Rotation X value */
 
217
#define SI_RY                 4              /* Rotation Y value */
 
218
#define SI_RZ                 5              /* Rotation Z value */
 
219
 
 
220
/*
 
221
 * Reserved buttons
 
222
 */
 
223
 
 
224
#define SI_RESET_BIT          0x00000001L
 
225
#define SI_PICK_BIT           0x80000000L
 
226
#define SI_DIALOG_BIT         0x40000000L
 
227
 
 
228
#define SI_RESET_BUTTON       0
 
229
#define SI_PICK_BUTTON        31
 
230
#define SI_DIALOG_BUTTON      30
 
231
 
 
232
/*
 
233
 * Miscellaneous
 
234
 */
 
235
#define SI_END_ARGS           0
 
236
#define SI_NO_HANDLE          ((SiHdl) NULL)
 
237
#define SI_ALL_HANDLES        ((SiHdl) NULL)
 
238
#define SI_ANY_HANDLE         ((SiHdl) NULL)
 
239
#define SI_NO_TRANSCTL        ((SiTransCtl) NULL)
 
240
#define SI_NO_MASK            ((SiTypeMask *) NULL)
 
241
#define SI_ANY_DEVICE         -1
 
242
#define SI_NO_DEVICE          -1
 
243
#define SI_NO_TYPE            -1
 
244
#define SI_NO_LIST            -1
 
245
#define SI_NO_BUTTON          -1
 
246
#define SI_STRSIZE            128
 
247
#define SI_MAXBUF             128
 
248
#define SI_KEY_MAXBUF         5120
 
249
 
 
250
typedef int SiDevID;          /* Device ID */
 
251
typedef void *SiHdl;          /* SpaceWare handle */
 
252
typedef void *SiTransCtl;     /* SpaceWare transport control handle */
 
253
 
 
254
typedef struct                /* Open data */
 
255
   {
 
256
 
 
257
   HWND hWnd;               /* Window handle for SpaceWare messages.        */
 
258
   SiTransCtl transCtl;     /* SpaceWare transport control handle. Reserved */
 
259
                            /* for the s80 transport mechanism.             */
 
260
   DWORD processID;         /* The process ID for this application.         */
 
261
   char exeFile[MAX_PATH];  /* The executable name of the process.          */
 
262
   SPWint32 libFlag;        /* Library version flag.                        */
 
263
   } SiOpenData;
 
264
 
 
265
typedef struct                /* Get event Data */
 
266
   {
 
267
 
 
268
   UINT msg;
 
269
   WPARAM wParam;
 
270
   LPARAM lParam;
 
271
   } SiGetEventData;
 
272
 
 
273
typedef struct                /* Device type mask */
 
274
   {
 
275
   unsigned char mask[8];
 
276
   } SiTypeMask;
 
277
 
 
278
typedef struct                /* Device port information */
 
279
   {
 
280
   SiDevID devID;             /* Device ID */
 
281
   int devType;               /* Device type */
 
282
   int devClass;              /* Device class */
 
283
   char devName[SI_STRSIZE];  /* Device name */
 
284
   char portName[SI_STRSIZE]; /* Port name */
 
285
   } SiDevPort;
 
286
 
 
287
typedef struct                /* Device information */
 
288
   {
 
289
   char firmware[SI_STRSIZE]; /* Firmware version */
 
290
   int devType;               /* Device type */
 
291
   int numButtons;            /* Number of buttons */
 
292
   int numDegrees;            /* Number of degrees of freedom */
 
293
   SPWbool canBeep;           /* Device beeps */
 
294
   int majorVersion;          /* Major version number */
 
295
   int minorVersion;          /* Minor version number */
 
296
   } SiDevInfo;
 
297
 
 
298
typedef struct                /* Version information */
 
299
   {
 
300
   int major;                 /* Major version number */
 
301
   int minor;                 /* Minor version number */
 
302
   int build;                 /* Build number */
 
303
   char version[SI_STRSIZE];  /* Version string */
 
304
   char date[SI_STRSIZE];     /* Date string */
 
305
   } SiVerInfo;
 
306
 
 
307
typedef struct                /* Sensitivity parameters */
 
308
   {
 
309
   char dummy;
 
310
   } SiSensitivity;
 
311
 
 
312
typedef struct                /* Tuning parameters */
 
313
   {
 
314
   char dummy;
 
315
   } SiTuning;
 
316
 
 
317
typedef struct
 
318
   {
 
319
   SPWuint8 code;                 /* Out of band message code */
 
320
   SPWuint8 message[SI_MAXBUF-1]; /* The actual message       */
 
321
   } SiSpwOOB;
 
322
 
 
323
typedef struct
 
324
   {
 
325
   SPWuint8 string[SI_KEY_MAXBUF];  /* String for keyboard data */
 
326
   } SiKeyboardData;
 
327
 
 
328
typedef struct
 
329
   {
 
330
   SPWuint32 lpfk;            /* LPFK number to send */
 
331
   } SiLpfkData;
 
332
 
 
333
typedef enum
 
334
   {
 
335
   SI_LEFT = 0,
 
336
   SI_RIGHT
 
337
   } SiOrientation;
 
338
 
 
339
typedef struct                /* Bitmasks of button states */
 
340
   {
 
341
   SPWuint32 last;            /* Buttons pressed as of last event */
 
342
   SPWuint32 current;         /* Buttons pressed as of this event */
 
343
   SPWuint32 pressed;         /* Buttons pressed this event */
 
344
   SPWuint32 released;        /* Buttons released this event */
 
345
   } SiButtonData;
 
346
 
 
347
typedef struct                /* SpaceWare data */
 
348
   {
 
349
   SiButtonData bData;        /* Button data */
 
350
   long mData[6];             /* Motion data (index via SI_TX, etc) */
 
351
   long period;               /* Period (milliseconds) */
 
352
   } SiSpwData;
 
353
 
 
354
typedef struct                /* SpaceWare event */
 
355
   {
 
356
   int type;                  /* Event type */
 
357
   union
 
358
      {
 
359
      SiSpwData spwData;           /* Button, motion, or combo data        */
 
360
      SiSpwOOB spwOOB;             /* Out of band message                  */
 
361
      SiOrientation spwOrientation;/* Which hand orientation is the device */
 
362
      char exData[SI_MAXBUF];      /* Exception data                       */
 
363
      SiKeyboardData spwKeyData;   /* String for keyboard data             */
 
364
      SiLpfkData spwLpfkData;      /* LPFK data                            */
 
365
      } u;
 
366
   } SiSpwEvent;
 
367
 
 
368
typedef struct                /* Event handler (for SiDispatch) */
 
369
   {
 
370
   int (*func) (SiOpenData *, SiGetEventData *, SiSpwEvent *, void *);
 
371
   void *data;
 
372
   } SiEventHandler;
 
373
 
 
374
typedef struct                /* SpaceWare event handlers */
 
375
   {
 
376
   SiEventHandler button;     /* Button event handler */
 
377
   SiEventHandler motion;     /* Motion event handler */
 
378
   SiEventHandler combo;      /* Combo event handler */
 
379
   SiEventHandler zero;       /* Zero event handler */
 
380
   SiEventHandler exception;  /* Exception event handler */
 
381
   } SiSpwHandlers;
 
382
 
 
383
 
 
384
enum SpwRetVal SiAndTypeMask (SiTypeMask *pTMaskA, SiTypeMask *pTMaskB);
 
385
 
 
386
 
 
387
 
 
388
/* interface specifications define parameter passing to DLL functions */
 
389
#ifdef __cplusplus
 
390
extern "C" {
 
391
#endif
 
392
 
 
393
typedef enum SpwRetVal (WINAPI *PFNSI_INIT) (void);
 
394
typedef void (WINAPI *PFNSI_TERMINATE) (void);
 
395
typedef void (WINAPI *PFNSI_OPENWININIT) (SiOpenData *pData, HWND hWnd);
 
396
typedef int (WINAPI *PFNSI_GETNUMDEVICES) (void);
 
397
typedef SiDevID (WINAPI *PFNSI_GETDEVICEID) (SiHdl hdl);
 
398
typedef int (WINAPI *PFNSI_DISPATCH) (SiHdl hdl, SiGetEventData *pData,
 
399
                SiSpwEvent *pEvent, SiSpwHandlers *pDHandlers);
 
400
typedef SiHdl (WINAPI *PFNSI_OPEN) (char *pAppName, SiDevID devID, SiTypeMask *pTMask, int mode, 
 
401
              SiOpenData *pData);
 
402
typedef enum SpwRetVal (WINAPI *PFNSI_CLOSE) (SiHdl hdl);
 
403
typedef SPWbool (WINAPI *PFNSI_ISSPACEWAREEVENT) (SiGetEventData *pData, SiHdl *pHdl);
 
404
typedef void (WINAPI *PFNSI_GETEVENTWININIT) (SiGetEventData *pData, UINT msg, WPARAM wParam, LPARAM lParam);
 
405
typedef enum SpwRetVal (WINAPI *PFNSI_GETEVENT) (SiHdl hdl, int flags, SiGetEventData *pData, 
 
406
                           SiSpwEvent *pEvent);
 
407
typedef enum SpwRetVal (WINAPI *PFNSI_BEEP) (SiHdl hdl, char *pString);
 
408
typedef enum SpwRetVal (WINAPI *PFNSI_REZERO) (SiHdl hdl);
 
409
typedef enum SpwRetVal (WINAPI *PFNSI_GRABDEVICE) (SiHdl hdl, SPWbool exclusive);
 
410
typedef enum SpwRetVal (WINAPI *PFNSI_RELEASEDEVICE) (SiHdl hdl);
 
411
typedef int (WINAPI *PFNSI_BUTTONPRESSED) (SiSpwEvent *pEvent);
 
412
typedef int (WINAPI *PFNSI_BUTTONRELEASED) (SiSpwEvent *pEvent);
 
413
typedef enum SpwRetVal (WINAPI *PFNSI_SETUIMODE) (SiHdl hdl, SPWuint32 mode);
 
414
typedef enum SpwRetVal (WINAPI *PFNSI_SETTYPEMASK) (SiTypeMask *pTMask, int type1, ...);
 
415
typedef enum SpwRetVal (WINAPI *PFNSI_GETDEVICEPORT) (SiDevID devID, SiDevPort *pPort);
 
416
typedef enum SpwRetVal (WINAPI *PFNSI_GETDRIVERINFO) (SiVerInfo *pInfo);
 
417
typedef void (WINAPI *PFNSI_GETLIBRARYINFO) (SiVerInfo *pInfo);
 
418
typedef enum SpwRetVal (WINAPI *PFNSI_GETDEVICEINFO) (SiHdl hdl, SiDevInfo *pInfo);
 
419
typedef char* (WINAPI *PFNSPW_ERRORSTRING) (enum SpwRetVal val);
 
420
typedef SiDevID (WINAPI *PFNSI_DEVICEINDEX) (int idx);
 
421
 
 
422
#ifdef __cplusplus
 
423
}
 
424
#endif
 
425
 
 
426
/* function pointers to functions in DLL */
 
427
static PFNSI_INIT              pfnSiInit;
 
428
static PFNSI_TERMINATE         pfnSiTerminate;
 
429
static PFNSI_OPENWININIT       pfnSiOpenWinInit;
 
430
static PFNSI_GETNUMDEVICES     pfnSiGetNumDevices;
 
431
static PFNSI_GETDEVICEID       pfnSiGetDeviceID;
 
432
static PFNSI_DISPATCH          pfnSiDispatch;
 
433
static PFNSI_OPEN              pfnSiOpen;
 
434
static PFNSI_CLOSE             pfnSiClose;
 
435
static PFNSI_DEVICEINDEX       pfnSiDeviceIndex;
 
436
static PFNSI_GETEVENTWININIT   pfnSiGetEventWinInit;
 
437
static PFNSI_GETEVENT          pfnSiGetEvent;
 
438
static PFNSI_ISSPACEWAREEVENT  pfnSiIsSpaceWareEvent;
 
439
static PFNSI_BEEP              pfnSiBeep;
 
440
static PFNSI_REZERO            pfnSiRezero;
 
441
static PFNSI_GRABDEVICE        pfnSiGrabDevice;
 
442
static PFNSI_RELEASEDEVICE     pfnSiReleaseDevice;
 
443
static PFNSI_BUTTONPRESSED     pfnSiButtonPressed;
 
444
static PFNSI_BUTTONRELEASED    pfnSiButtonReleased;
 
445
static PFNSI_SETUIMODE         pfnSiSetUiMode;
 
446
static PFNSI_SETTYPEMASK       pfnSiSetypeMask;
 
447
static PFNSI_GETDEVICEPORT     pfnSiGetDevicePort;
 
448
static PFNSI_GETDRIVERINFO     pfnSiGetDriverInfo;
 
449
static PFNSI_GETLIBRARYINFO    pfnSiGetLibraryInfo;
 
450
static PFNSI_GETDEVICEINFO     pfnSiGetDeviceInfo;
 
451
static PFNSPW_ERRORSTRING      pfnSpwErrorString;
 
452
 
 
453
#ifdef __cplusplus
 
454
extern "C" {
 
455
#endif
 
456
/* externally used functions */
 
457
int SiGetPortList (SiDevPort **ppPort);
 
458
void SiFreePortList (SiDevPort *pPort);
 
459
void SiTune2003 (SiSpwEvent *pEvent);
 
460
void SiTuneSC (SiSpwEvent *pEvent);
 
461
 
 
462
enum SpwRetVal SiInitialize(void);
 
463
void           SiTerminate(void);
 
464
int            SiGetNumDevices (void);
 
465
SiDevID        SiDeviceIndex (int idx);
 
466
int            SiDispatch (SiHdl hdl, SiGetEventData *pData,
 
467
                           SiSpwEvent *pEvent, SiSpwHandlers *pDHandlers);
 
468
void           SiOpenWinInit (SiOpenData *pData, HWND hWnd);
 
469
SiHdl          SiOpen (char *pAppName, SiDevID devID, SiTypeMask *pTMask, int mode, 
 
470
                       SiOpenData *pData);
 
471
enum SpwRetVal SiClose (SiHdl hdl);
 
472
void           SiGetEventWinInit (SiGetEventData *pData,
 
473
                                  UINT msg, WPARAM wParam, LPARAM lParam);
 
474
enum SpwRetVal SiGetEvent (SiHdl hdl, int flags, SiGetEventData *pData, 
 
475
                           SiSpwEvent *pEvent);
 
476
enum SpwRetVal SiBeep (SiHdl hdl, char *string);
 
477
enum SpwRetVal SiRezero (SiHdl hdl);
 
478
enum SpwRetVal SiGrabDevice (SiHdl hdl, SPWbool exclusive);
 
479
enum SpwRetVal SiReleaseDevice (SiHdl hdl);
 
480
int            SiButtonPressed (SiSpwEvent *pEvent);
 
481
int            SiButtonReleased (SiSpwEvent *pEvent);
 
482
enum SpwRetVal SiSetUiMode (SiHdl hdl, SPWuint32 mode);
 
483
enum SpwRetVal SiSetTypeMask (SiTypeMask *pTMask, int type1, ...);
 
484
enum           SpwRetVal SiGetDevicePort (SiDevID devID, SiDevPort *pPort);
 
485
enum           SpwRetVal SiGetDriverInfo (SiVerInfo *pInfo);
 
486
void           SiGetLibraryInfo (SiVerInfo *pInfo);
 
487
enum           SpwRetVal SiGetDeviceInfo (SiHdl hdl, SiDevInfo *pInfo);
 
488
char * SpwErrorString (enum SpwRetVal val);
 
489
 
 
490
#ifdef __cplusplus
 
491
}
 
492
#endif
 
493
 
 
494
 
 
495
#ifdef __cplusplus
 
496
extern "C" {
 
497
#endif
 
498
  
 
499
int SPW_CheckForSpaceballWin32(void * win);
 
500
int SPW_TranslateEventWin32(MSG * msg, SPW_InputEvent * sbEvent);
 
501
void SPW_disableSpaceBallWin32(void);
 
502
int SPW_SpaceBallExistsWin32(void);
 
503
 
 
504
#ifdef __cplusplus
 
505
}
 
506
#endif
 
507
 
 
508
#endif /* #ifndef SIAPP_H */
 
509