include/SDL_events.h
branchSDL-1.3
changeset 1731 875c3cf1a12c
parent 1724 6c63fc2bd986
equal deleted inserted replaced
1730:e70477157db9 1731:875c3cf1a12c
   387    event is removed from the queue and stored in that area.
   387    event is removed from the queue and stored in that area.
   388  */
   388  */
   389 extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
   389 extern DECLSPEC int SDLCALL SDL_WaitEvent(SDL_Event * event);
   390 
   390 
   391 /* Add an event to the event queue.
   391 /* Add an event to the event queue.
   392    This function returns 0 on success, or -1 if the event queue was full
   392    This function returns 1 on success, 0 if the event was filtered,
   393    or there was some other error.
   393    or -1 if the event queue was full or there was some other error.
   394  */
   394  */
   395 extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
   395 extern DECLSPEC int SDLCALL SDL_PushEvent(SDL_Event * event);
   396 
   396 
   397 /*
   397 /*
   398   This function sets up a filter to process all events before they
   398   This function sets up a filter to process all events before they
   420 extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
   420 extern DECLSPEC void SDLCALL SDL_SetEventFilter(SDL_EventFilter filter,
   421                                                 void *userdata);
   421                                                 void *userdata);
   422 
   422 
   423 /*
   423 /*
   424   Return the current event filter - can be used to "chain" filters.
   424   Return the current event filter - can be used to "chain" filters.
   425   If there is no event filter set, this function returns NULL.
   425   If there is no event filter set, this function returns SDL_FALSE.
   426 */
   426 */
   427 extern DECLSPEC SDL_EventFilter SDLCALL SDL_GetEventFilter(void **userdata);
   427 extern DECLSPEC SDL_bool SDLCALL SDL_GetEventFilter(SDL_EventFilter * filter,
       
   428                                                     void **userdata);
   428 
   429 
   429 /*
   430 /*
   430   Run the filter function on the current event queue, removing any
   431   Run the filter function on the current event queue, removing any
   431   events for which the filter returns 0.
   432   events for which the filter returns 0.
   432 */
   433 */