diff -r ffa851df0825 -r 2fb8b9db1c86 symbian-qemu-0.9.1-12/libsdl-trunk/docs/html/sdlpollevent.html --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/symbian-qemu-0.9.1-12/libsdl-trunk/docs/html/sdlpollevent.html Fri Jul 31 15:01:17 2009 +0100 @@ -0,0 +1,269 @@ +
Polls for currently pending events, and returns 1 +if there are any pending events, or 0 if there +are none available.
If event is not NULL, the next +event is removed from the queue and stored in that area.
SDL_Event event; /* Event structure */
+
+.
+.
+.
+/* Check for events */
+while(SDL_PollEvent(&event)){ /* Loop until there are no events left on the queue */
+ switch(event.type){ /* Process the appropiate event type */
+ case SDL_KEYDOWN: /* Handle a KEYDOWN event */
+ printf("Oh! Key press\n");
+ break;
+ case SDL_MOUSEMOTION:
+ .
+ .
+ .
+ default: /* Report an unhandled event */
+ printf("I don't know what this event is!\n");
+ }
+}