Wiki Page Content

Differences between revisions 8 and 10 (spanning 2 versions)
Revision 8 as of 2010-09-03 00:42:56
Size: 1439
Editor: SheenaSmith
Comment: update formatting - categories
Revision 10 as of 2011-01-12 17:41:14
Size: 1321
Editor: SheenaSmith
Comment: update content - w/ Sam; remove draft
Deletions are marked like this. Additions are marked like this.
Line 5: Line 5:
||<tablewidth="100%" style="color: #FF0000;" :> DRAFT||
Line 9: Line 8:
'''Include File(s):''' [[http://hg.libsdl.org/SDL/file/68dfd6df47da/include/SDL_events.h|SDL_events.h]] '''Include File(s):''' [[http://hg.libsdl.org/SDL/file/tip/include/SDL_events.h|SDL_events.h]]
Line 21: Line 20:
Internally, SDL stores all the events waiting to be handled in an event queue. Using functions like [[SDL_PollEvent]](), [[SDL_PeepEvents]]() and [[SDL_WaitEvent]]() you can observe and handle waiting input events. Internally, SDL stores all the events waiting to be handled in an event queue.  Using functions like [[SDL_PollEvent]](), [[SDL_PeepEvents]]() and [[SDL_WaitEvent]]() you can observe and handle waiting input events.
Line 23: Line 22:
The key to event handling in SDL is the [[SDL_Event]] union. The event queue itself is composed of a series of [[SDL_Event]] unions, one for each waiting event. [[SDL_Event]] unions are read from the queue with the [[SDL_PollEvent]]() function and it is then up to the application to process the information stored with them. The event queue itself is composed of a series of [[SDL_Event]] structures, one for each waiting event. [[SDL_Event]] structures are read from the queue with the [[SDL_PollEvent]]() function and it is then up to the application to process the information stored with them.

Event Handling

Include File(s): SDL_events.h

Introduction

Event handling allows your application to receive input from the user. Event handling is initialized (along with video) with a call to:

Internally, SDL stores all the events waiting to be handled in an event queue. Using functions like SDL_PollEvent(), SDL_PeepEvents() and SDL_WaitEvent() you can observe and handle waiting input events.

The event queue itself is composed of a series of SDL_Event structures, one for each waiting event. SDL_Event structures are read from the queue with the SDL_PollEvent() function and it is then up to the application to process the information stored with them.

Enumerations

Structures

Functions


CategoryCategory

None: CategoryEvents (last edited 2014-03-10 18:53:46 by nairou)

(Page Info.)
Feedback
Please include your contact information if you'd like to receive a reply.
Submit