Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PG_EventSupplier Class Reference

Inheritance diagram for PG_EventSupplier:

Inheritance graph
[legend]
List of all members.

Detailed Description

Interface for classes that supply SDL_Events to Paragui.

Author:
Martin Bickel
Paragui works with SDL_Events to obtain input and operating system events. Instead of getting them directly from SDL it uses this interface, allowing the application to preprocess SDL_events or obtain them from an application specific event source.


Public Member Functions

virtual ~PG_EventSupplier ()
virtual bool PollEvent (SDL_Event *event)=0
 Polls for currently pending events, and returns true if there are any pending events, or false if there are none available.
virtual bool PeepEvent (SDL_Event *event)=0
 Checks if an event is in the queue.
virtual int WaitEvent (SDL_Event *event)=0
 Waits indefinitely for the next available event.
virtual int GetMouseState (int &x, int &y)=0
 Get the current mouse position.


Constructor & Destructor Documentation

virtual PG_EventSupplier::~PG_EventSupplier  )  [inline, virtual]
 


Member Function Documentation

virtual int PG_EventSupplier::GetMouseState int &  x,
int &  y
[pure virtual]
 

Get the current mouse position.

Parameters:
x current mouse x position
y current mouse y position
Returns:
bitmap of pressed mouse buttons

Implemented in PG_SDLEventSupplier.

virtual bool PG_EventSupplier::PeepEvent SDL_Event *  event  )  [pure virtual]
 

Checks if an event is in the queue.

If there is, it will be copied into the event structure, WITHOUT being removed from the event queue.

Parameters:
event pointer to an event structure
Returns:
true - events are available

Implemented in PG_SDLEventSupplier.

virtual bool PG_EventSupplier::PollEvent SDL_Event *  event  )  [pure virtual]
 

Polls for currently pending events, and returns true if there are any pending events, or false if there are none available.

If event is not NULL, the next event is removed from the queue and stored in that area.

Parameters:
event pointer to an event structure
Returns:
true - events are available

Implemented in PG_SDLEventSupplier.

virtual int PG_EventSupplier::WaitEvent SDL_Event *  event  )  [pure virtual]
 

Waits indefinitely for the next available event.

Parameters:
event pointer to an event structure
Returns:
return 0 if there was an error while waiting for events

Implemented in PG_SDLEventSupplier.


Generated on Tue Jun 24 02:25:38 2008 for ParaGUI by  doxygen 1.4.2