#include <SDLInterface.h>
Inheritance diagram for SDLInterface:


Public Member Functions | |
| ~SDLInterface () | |
| virtual int | start () |
| Enter the main loop of the interface. | |
| virtual void | flush () |
| Make all drawings visible on-screen (i.e. flush any buffers). | |
| virtual void | repaint () |
| Mark the scene as needing repainting. | |
| virtual void | setIdleCallback (void(*func)(void)) |
| Set the idle callback function. | |
| virtual void | setPaintCallback (void(*func)(void)) |
| Set the paint callback function. | |
| virtual void | setKeyboardCallback (void(*func)(int key, int x, int y, bool special, bool down, unsigned int modifiers)) |
| Set the keyboard callback function. | |
| virtual void | setRawEventCallback (void(*func)(void *event)) |
| Set the raw event callback function. | |
| virtual void | addTimerCallback (void(*func)(int value), int time_ms, int val) |
| Add a timer callback. | |
| virtual void | setWindowSize (int width, int height) |
| Change the size of the current window. | |
| virtual void | setFullScreen (bool fullScreen) |
| Set the fullscreen mode. | |
| virtual bool | getFullScreen (void) |
| Check if the application is currently in fullscreen or windowed mode. | |
| virtual void | setMouseEventCallback (void(*func)(int x, int y, MouseButtonType button, bool down)) |
| virtual void | setMouseMotionCallback (void(*func)(int x, int y)) |
| Set the mouse motion callback function. | |
| virtual int | getTime () |
| Get a timestamp that is incremented with one every ms. | |
| virtual int | getWindowWidth () |
| Get width of current window. | |
| virtual int | getWindowHeight () |
| Get height of current window. | |
| virtual const char * | name () |
| Return the name of this interface type. | |
Protected Member Functions | |
| virtual int | init (int argc, const char *argv[], int width, int height) |
Private Attributes | |
| bool | needsRepaint |
| bool | full_screen |
| SDLInterface::~SDLInterface | ( | ) |
| virtual void SDLInterface::addTimerCallback | ( | void(*)(int value) | func, | |
| int | time_ms, | |||
| int | val | |||
| ) | [virtual] |
Add a timer callback.
| func | a function to call when the timer expires, NULL for none. | |
| time_ms | The time in ms until the timer fires. | |
| val | An optional value to pass to the timer function. |
Implements Interface.
| virtual void SDLInterface::flush | ( | ) | [virtual] |
| virtual bool SDLInterface::getFullScreen | ( | void | ) | [inline, virtual] |
Check if the application is currently in fullscreen or windowed mode.
Implements Interface.
| virtual int SDLInterface::getTime | ( | ) | [virtual] |
Get a timestamp that is incremented with one every ms.
The time at which getTime returns 0 is undefined.
Implements Interface.
| virtual int SDLInterface::getWindowHeight | ( | ) | [virtual] |
| virtual int SDLInterface::getWindowWidth | ( | ) | [virtual] |
| virtual int SDLInterface::init | ( | int | argc, | |
| const char * | argv[], | |||
| int | width, | |||
| int | height | |||
| ) | [protected, virtual] |
Implements Interface.
| virtual const char* SDLInterface::name | ( | ) | [inline, virtual] |
| virtual void SDLInterface::repaint | ( | ) | [virtual] |
| virtual void SDLInterface::setFullScreen | ( | bool | fullScreen | ) | [virtual] |
Set the fullscreen mode.
| fullScreen | If true switch to full screen mode, if false switch to window mode. |
Implements Interface.
| virtual void SDLInterface::setIdleCallback | ( | void(*)(void) | func | ) | [virtual] |
Set the idle callback function.
| func | a function to call when no other events are pending, NULL for none. |
Implements Interface.
| virtual void SDLInterface::setKeyboardCallback | ( | void(*)(int key, int x, int y, bool special, bool down, unsigned int modifiers) | func | ) | [virtual] |
Set the keyboard callback function.
| func | a function to call when a keyboard event is detected, NULL for none. |
Implements Interface.
| virtual void SDLInterface::setMouseEventCallback | ( | void(*)(int x, int y, MouseButtonType button, bool down) | func | ) | [virtual] |
| virtual void SDLInterface::setMouseMotionCallback | ( | void(*)(int x, int y) | func | ) | [virtual] |
Set the mouse motion callback function.
| func | a function to call when mouse moves, NULL for none. |
Implements Interface.
| virtual void SDLInterface::setPaintCallback | ( | void(*)(void) | func | ) | [virtual] |
Set the paint callback function.
| func | a function to call to draw the scene, NULL for none. |
Implements Interface.
| virtual void SDLInterface::setRawEventCallback | ( | void(*)(void *event) | func | ) | [virtual] |
Set the raw event callback function.
| func | a function to call for each new event, NULL for none. |
Implements Interface.
| virtual void SDLInterface::setWindowSize | ( | int | width, | |
| int | height | |||
| ) | [virtual] |
| virtual int SDLInterface::start | ( | ) | [virtual] |
bool SDLInterface::full_screen [private] |
bool SDLInterface::needsRepaint [private] |
1.4.7