docs/man3/SDL_PollEvent.3
changeset 3352 6dc250ebdd80
parent 3351 8e0182c236d8
child 3353 6b14223dd5c7
     1.1 --- a/docs/man3/SDL_PollEvent.3	Wed Oct 07 06:11:53 2009 +0000
     1.2 +++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.3 @@ -1,44 +0,0 @@
     1.4 -.TH "SDL_PollEvent" "3" "Tue 11 Sep 2001, 22:59" "SDL" "SDL API Reference" 
     1.5 -.SH "NAME"
     1.6 -SDL_PollEvent \- Polls for currently pending events\&.
     1.7 -.SH "SYNOPSIS"
     1.8 -.PP
     1.9 -\fB#include "SDL\&.h"
    1.10 -.sp
    1.11 -\fBint \fBSDL_PollEvent\fP\fR(\fBSDL_Event *event\fR);
    1.12 -.SH "DESCRIPTION"
    1.13 -.PP
    1.14 -Polls for currently pending events, and returns \fB1\fR if there are any pending events, or \fB0\fR if there are none available\&. 
    1.15 -.PP
    1.16 -If \fBevent\fR is not \fBNULL\fP, the next event is removed from the queue and stored in that area\&.
    1.17 -.SH "EXAMPLES"
    1.18 -.PP
    1.19 -.PP
    1.20 -.nf
    1.21 -\f(CWSDL_Event event; /* Event structure */
    1.22 -
    1.23 -\&.
    1.24 -\&.
    1.25 -\&.
    1.26 -/* Check for events */
    1.27 -while(SDL_PollEvent(&event)){  /* Loop until there are no events left on the queue */
    1.28 -  switch(event\&.type){  /* Process the appropiate event type */
    1.29 -    case SDL_KEYDOWN:  /* Handle a KEYDOWN event */         
    1.30 -      printf("Oh! Key press
    1.31 -");
    1.32 -      break;
    1.33 -    case SDL_MOUSEMOTION:
    1.34 -      \&.
    1.35 -      \&.
    1.36 -      \&.
    1.37 -    default: /* Report an unhandled event */
    1.38 -      printf("I don\&'t know what this event is!
    1.39 -");
    1.40 -  }
    1.41 -}\fR
    1.42 -.fi
    1.43 -.PP
    1.44 -.SH "SEE ALSO"
    1.45 -.PP
    1.46 -\fI\fBSDL_Event\fR\fR, \fI\fBSDL_WaitEvent\fP\fR, \fI\fBSDL_PeepEvents\fP\fR
    1.47 -...\" created by instant / docbook-to-man, Tue 11 Sep 2001, 22:59