forked from coin3d/sogui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathspwinput.h.in
53 lines (44 loc) · 1.91 KB
/
spwinput.h.in
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef COIN_SPWINPUT_H
#define COIN_SPWINPUT_H
/* @configure_input@ */
/*----------------------------------------------------------------------
* (C) 1999 Spacetec IMC Corporation ("Spacetec").
*
* Permission to use, copy, modify, and distribute this software for all
* purposes and without fees is hereby granted provided that this copyright
* notice appears in all copies. Permission to modify this software is granted
* and Spacetec will support such modifications only if said modifications are
* approved by Spacetec.
*
*/
#define SPW_INPUT_MAJOR 7
#define SPW_INPUT_MINOR 6
#define SPW_INPUT_UPDATE 0
#define SPW_INPUT_BUILD 1
#define SPW_INPUT_VERSION "7.6.0.1"
#define SPW_INPUT_DATE _T("January 18, 1999")
#define SPW_MAXBUF 80
typedef enum {
SPW_InputMotionEvent=1, /* Event type is a motion event */
SPW_InputButtonPressEvent=2, /* Event type is a button press event */
SPW_InputButtonReleaseEvent=3 /* Event type is a button release event */
} SPW_InputEventType;
typedef struct {
unsigned int old; /* The last state of the buttons */
unsigned int current; /* The current state of the buttons */
unsigned int pressed; /* Which buttons were pressed */
unsigned int released; /* Which buttons were released */
} SPW_InputButtonTable;
typedef struct {
short int type; /* The type of event */
float fData[7]; /* The float Spaceball data */
short int sData[7]; /* The integer Spaceball data */
int buttonNumber; /* The button number for this event */
SPW_InputButtonTable buttonState; /* The state of the buttons */
char string[SPW_MAXBUF]; /* Extra data area */
} SPW_InputEvent;
/* These two methods should only be used under X */
int SPW_CheckForSpaceballX11(void * display, int winid, char * product);
int SPW_TranslateEventX11(void * display, void * xevent, SPW_InputEvent * sbEvent);
/* FIXME: add two similar methods for WIN32. pederb, 20001114 */
#endif /* COIN_SPWINPUT_H */