use the pandora's vsync ioctl when available
[sdl_omap.git] / docs / html / sdljoyhatevent.html
... / ...
CommitLineData
1<HTML
2><HEAD
3><TITLE
4>SDL_JoyHatEvent</TITLE
5><META
6NAME="GENERATOR"
7CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
8"><LINK
9REL="HOME"
10TITLE="SDL Library Documentation"
11HREF="index.html"><LINK
12REL="UP"
13TITLE="SDL Event Structures."
14HREF="eventstructures.html"><LINK
15REL="PREVIOUS"
16TITLE="SDL_JoyButtonEvent"
17HREF="sdljoybuttonevent.html"><LINK
18REL="NEXT"
19TITLE="SDL_JoyBallEvent"
20HREF="sdljoyballevent.html"></HEAD
21><BODY
22CLASS="REFENTRY"
23BGCOLOR="#FFF8DC"
24TEXT="#000000"
25LINK="#0000ee"
26VLINK="#551a8b"
27ALINK="#ff0000"
28><DIV
29CLASS="NAVHEADER"
30><TABLE
31SUMMARY="Header navigation table"
32WIDTH="100%"
33BORDER="0"
34CELLPADDING="0"
35CELLSPACING="0"
36><TR
37><TH
38COLSPAN="3"
39ALIGN="center"
40>SDL Library Documentation</TH
41></TR
42><TR
43><TD
44WIDTH="10%"
45ALIGN="left"
46VALIGN="bottom"
47><A
48HREF="sdljoybuttonevent.html"
49ACCESSKEY="P"
50>Prev</A
51></TD
52><TD
53WIDTH="80%"
54ALIGN="center"
55VALIGN="bottom"
56></TD
57><TD
58WIDTH="10%"
59ALIGN="right"
60VALIGN="bottom"
61><A
62HREF="sdljoyballevent.html"
63ACCESSKEY="N"
64>Next</A
65></TD
66></TR
67></TABLE
68><HR
69ALIGN="LEFT"
70WIDTH="100%"></DIV
71><H1
72><A
73NAME="SDLJOYHATEVENT"
74></A
75>SDL_JoyHatEvent</H1
76><DIV
77CLASS="REFNAMEDIV"
78><A
79NAME="AEN4320"
80></A
81><H2
82>Name</H2
83>SDL_JoyHatEvent&nbsp;--&nbsp;Joystick hat position change event structure</DIV
84><DIV
85CLASS="REFSECT1"
86><A
87NAME="AEN4323"
88></A
89><H2
90>Structure Definition</H2
91><PRE
92CLASS="PROGRAMLISTING"
93>typedef struct{
94 Uint8 type;
95 Uint8 which;
96 Uint8 hat;
97 Uint8 value;
98} SDL_JoyHatEvent;</PRE
99></DIV
100><DIV
101CLASS="REFSECT1"
102><A
103NAME="AEN4326"
104></A
105><H2
106>Structure Data</H2
107><DIV
108CLASS="INFORMALTABLE"
109><A
110NAME="AEN4328"
111></A
112><P
113></P
114><TABLE
115BORDER="0"
116CLASS="CALSTABLE"
117><TBODY
118><TR
119><TD
120ALIGN="LEFT"
121VALIGN="TOP"
122><TT
123CLASS="STRUCTFIELD"
124><I
125>type</I
126></TT
127></TD
128><TD
129ALIGN="LEFT"
130VALIGN="TOP"
131><TT
132CLASS="LITERAL"
133>SDL_JOY</TT
134></TD
135></TR
136><TR
137><TD
138ALIGN="LEFT"
139VALIGN="TOP"
140><TT
141CLASS="STRUCTFIELD"
142><I
143>which</I
144></TT
145></TD
146><TD
147ALIGN="LEFT"
148VALIGN="TOP"
149>Joystick device index</TD
150></TR
151><TR
152><TD
153ALIGN="LEFT"
154VALIGN="TOP"
155><TT
156CLASS="STRUCTFIELD"
157><I
158>hat</I
159></TT
160></TD
161><TD
162ALIGN="LEFT"
163VALIGN="TOP"
164>Joystick hat index</TD
165></TR
166><TR
167><TD
168ALIGN="LEFT"
169VALIGN="TOP"
170><TT
171CLASS="STRUCTFIELD"
172><I
173>value</I
174></TT
175></TD
176><TD
177ALIGN="LEFT"
178VALIGN="TOP"
179>Hat position</TD
180></TR
181></TBODY
182></TABLE
183><P
184></P
185></DIV
186></DIV
187><DIV
188CLASS="REFSECT1"
189><A
190NAME="AEN4348"
191></A
192><H2
193>Description</H2
194><P
195><SPAN
196CLASS="STRUCTNAME"
197>SDL_JoyHatEvent</SPAN
198> is a member of the <A
199HREF="sdlevent.html"
200><SPAN
201CLASS="STRUCTNAME"
202>SDL_Event</SPAN
203></A
204> union and is used when an event of type <TT
205CLASS="LITERAL"
206>SDL_JOYHATMOTION</TT
207> is reported.</P
208><P
209>A <TT
210CLASS="LITERAL"
211>SDL_JOYHATMOTION</TT
212> event occurs when ever a user moves a hat on the joystick. The field <TT
213CLASS="STRUCTFIELD"
214><I
215>which</I
216></TT
217> is the index of the joystick that reported the event and <TT
218CLASS="STRUCTFIELD"
219><I
220>hat</I
221></TT
222> is the index of the hat (for a more detailed exlaination see the <A
223HREF="joystick.html"
224>Joystick section</A
225>). <TT
226CLASS="STRUCTFIELD"
227><I
228>value</I
229></TT
230> is the current position of the hat. It is a logically OR'd combination of the following values (whose meanings should be pretty obvious:) :</P
231><P
232></P
233><TABLE
234BORDER="0"
235><TBODY
236><TR
237><TD
238><TT
239CLASS="LITERAL"
240>SDL_HAT_CENTERED</TT
241></TD
242></TR
243><TR
244><TD
245><TT
246CLASS="LITERAL"
247>SDL_HAT_UP</TT
248></TD
249></TR
250><TR
251><TD
252><TT
253CLASS="LITERAL"
254>SDL_HAT_RIGHT</TT
255></TD
256></TR
257><TR
258><TD
259><TT
260CLASS="LITERAL"
261>SDL_HAT_DOWN</TT
262></TD
263></TR
264><TR
265><TD
266><TT
267CLASS="LITERAL"
268>SDL_HAT_LEFT</TT
269></TD
270></TR
271></TBODY
272></TABLE
273><P
274></P
275><P
276>The following defines are also provided:</P
277><P
278></P
279><TABLE
280BORDER="0"
281><TBODY
282><TR
283><TD
284><TT
285CLASS="LITERAL"
286>SDL_HAT_RIGHTUP</TT
287></TD
288></TR
289><TR
290><TD
291><TT
292CLASS="LITERAL"
293>SDL_HAT_RIGHTDOWN</TT
294></TD
295></TR
296><TR
297><TD
298><TT
299CLASS="LITERAL"
300>SDL_HAT_LEFTUP</TT
301></TD
302></TR
303><TR
304><TD
305><TT
306CLASS="LITERAL"
307>SDL_HAT_LEFTDOWN</TT
308></TD
309></TR
310></TBODY
311></TABLE
312><P
313></P
314></DIV
315><DIV
316CLASS="REFSECT1"
317><A
318NAME="AEN4382"
319></A
320><H2
321>See Also</H2
322><P
323><A
324HREF="sdlevent.html"
325><SPAN
326CLASS="STRUCTNAME"
327>SDL_Event</SPAN
328></A
329>,
330<A
331HREF="joystick.html"
332>Joystick Functions</A
333>,
334<A
335HREF="sdljoystickeventstate.html"
336><TT
337CLASS="FUNCTION"
338>SDL_JoystickEventState</TT
339></A
340>,
341<A
342HREF="sdljoystickgetball.html"
343><TT
344CLASS="FUNCTION"
345>SDL_JoystickGetHat</TT
346></A
347></P
348></DIV
349><DIV
350CLASS="NAVFOOTER"
351><HR
352ALIGN="LEFT"
353WIDTH="100%"><TABLE
354SUMMARY="Footer navigation table"
355WIDTH="100%"
356BORDER="0"
357CELLPADDING="0"
358CELLSPACING="0"
359><TR
360><TD
361WIDTH="33%"
362ALIGN="left"
363VALIGN="top"
364><A
365HREF="sdljoybuttonevent.html"
366ACCESSKEY="P"
367>Prev</A
368></TD
369><TD
370WIDTH="34%"
371ALIGN="center"
372VALIGN="top"
373><A
374HREF="index.html"
375ACCESSKEY="H"
376>Home</A
377></TD
378><TD
379WIDTH="33%"
380ALIGN="right"
381VALIGN="top"
382><A
383HREF="sdljoyballevent.html"
384ACCESSKEY="N"
385>Next</A
386></TD
387></TR
388><TR
389><TD
390WIDTH="33%"
391ALIGN="left"
392VALIGN="top"
393>SDL_JoyButtonEvent</TD
394><TD
395WIDTH="34%"
396ALIGN="center"
397VALIGN="top"
398><A
399HREF="eventstructures.html"
400ACCESSKEY="U"
401>Up</A
402></TD
403><TD
404WIDTH="33%"
405ALIGN="right"
406VALIGN="top"
407>SDL_JoyBallEvent</TD
408></TR
409></TABLE
410></DIV
411></BODY
412></HTML
413>