1gii_event(3)                          GGI                         gii_event(3)
2
3
4

NAME

6       gii_event, gii_any_event, gii_event_type, gii_event_mask : LibGII event
7       structures
8

SYNOPSIS

10       #include <ggi/events.h>
11
12       typedef union gii_event {
13
14           uint8_t                 size;
15
16           gii_any_event           any;
17           gii_cmd_event           cmd;
18           gii_expose_event        expose;
19           gii_val_event           val;
20           gii_key_event           key;
21           gii_pmove_event         pmove;
22           gii_pbutton_event       pbutton;
23       } gii_event;
24
25       #define COMMON_DATA  \
26       uint8_t   size;           /* size of event in bytes       */\
27       uint8_t   type;           /* type of this event           */\
28       int16_t   error;          /* error (for replies)          */\
29       uint32_t  origin;         /* origin device (etc)          */\
30       uint32_t  target;         /* target device (etc)          */\
31       struct  timeval time     /* timestamp                    */
32
33       typedef struct {
34
35           COMMON_DATA;
36
37       } gii_any_event;
38
39

DESCRIPTION

41       Events are of type gii_event. It is an union of all of  the  structures
42       for each specific type of event.
43

STRUCTURE MEMBERS

45       All  of  the  event structures contains housekeeping information at the
46       beginning, as defined by COMMON_DATA.
47
48       Thus, by analyzing the contents of any.type, you can determine what the
49       given  event  is,  and  select  the appropriate member of the gii_event
50       union to access to get at the event
51
52       The common fields found in any event structure are:
53
54       size   Specifies the size of the given event (in bytes).
55
56
57       type   An enumeration of the possible types of LibGII events (see  next
58              section).
59
60
61       error  Mainly  there to round things up to a 32-bit boundary, but could
62              be used to signal an error in a send-reply sequence.
63
64
65       origin A device handle: it distinguishes one input device from another.
66              Other than that there's no real meaning to the number.
67
68
69       target Also  a  device handle, but for distinguishes input devices when
70              sending events to an input device via giiEventSend(3).
71
72
73       time   Indicates when the event in question  has  been  generated.  See
74              gettimeofday(2) for more info on the timeval structure.
75
76

EVENT TYPES

78       The  different  types  of  events are defined as an enumeration of type
79       gii_event_type. The possible values are:
80
81       ·   evNothing          : event is not valid.
82
83       ·   evCommand          : report command or do action.
84
85       ·   evInformation      : notification of new information.
86
87       ·   evExposure         : exposure event.
88
89       ·   evKeyPress         : a key has been pressed.
90
91       ·   evKeyRelease       : a key has been released.
92
93       ·   evKeyRepeat        : automatically repeated keypress.
94
95       ·   evPtrRelative      : pointer movement reported in relative  coordi‐
96           nates.
97
98       ·   evPtrAbsolute       : pointer movement reported in absolute coordi‐
99           nates.
100
101       ·   evPtrButtonPress   : a pointer button has been pressed.
102
103       ·   evPtrButtonRelease : a pointer button has been released.
104
105       ·   evValRelative      : valuator change reported as a relative value.
106
107       ·   evValAbsolute      : valuator change reported as an absolute value.
108

EVENT MASKS

110       gii_event_mask is passed to various event handling functions  to  indi‐
111       cate which types of events the program is interested in. The list below
112       sums the available event masks:
113
114       ·   emCommand        : evCommand
115
116       ·   emInformation    : evInformation
117
118       ·   emExpose         : evExpose
119
120       ·   emKeyPress       : evKeyPress
121
122       ·   emKeyRelease     : evKeyRelease
123
124       ·   emKeyRepeat      : evKeyRepeat
125
126       ·   emKey            : Any of evKeyPress, evKeyRelease or evKeyRepeat
127
128       ·   emPtrRelative    : evPtrRelative
129
130       ·   emPtrAbsolute    : evPtrAbsolute
131
132       ·   emPtrButtonPress : evPtrButtonPress
133
134       ·   emButtonRelease  : evButtonRelease
135
136       ·   emPtrMove        : Any of evPtrRelative or evPtrAbsolute
137
138       ·   emPtrButton      : Any of evPtrButtonPress or evPtrButtonRelease
139
140       ·   emPointer        : All pointer events
141
142       ·   emValRelative    : evValRelative
143
144       ·   emValAbsolute    : evValAbsolute
145
146       ·   emValuator       : Any of evValRelative or evValAbsolute
147
148       ·   emAll            : Any event type
149
150       ·   emNothing        : Matches no event type
151

SEE ALSO

153       gii_key_event(3),       gii_pmove_event(3),       gii_pbutton_event(3),
154       gii_cmd_event(3), gii_val_event(3), gii_expose_event(3)
155
156
157
158libgii-1.0.x                      2006-12-30                      gii_event(3)
Impressum