#include <Platform.h>
Public Member Functions | |
~Platform () | |
int | enterMessagePump () |
Static Public Member Functions | |
static Platform * | create (Game *game) |
static void | swapBuffers () |
static void | touchEventInternal (Touch::TouchEvent evt, int x, int y, unsigned int contactIndex, bool actuallyMouse=false) |
static void | keyEventInternal (Keyboard::KeyEvent evt, int key) |
static bool | mouseEventInternal (Mouse::MouseEvent evt, int x, int y, int wheelDelta) |
static void | gestureSwipeEventInternal (int x, int y, int direction) |
static void | gesturePinchEventInternal (int x, int y, float scale) |
static void | gestureTapEventInternal (int x, int y) |
static void | gestureLongTapEventInternal (int x, int y, float duration) |
static void | gestureDragEventInternal (int x, int y) |
static void | gestureDropEventInternal (int x, int y) |
static void | resizeEventInternal (unsigned int width, unsigned int height) |
static void | gamepadEventConnectedInternal (GamepadHandle handle, unsigned int buttonCount, unsigned int joystickCount, unsigned int triggerCount, const char *name) |
static void | gamepadEventDisconnectedInternal (GamepadHandle handle) |
static void | gamepadButtonPressedEventInternal (GamepadHandle handle, Gamepad::ButtonMapping mapping) |
static void | gamepadButtonReleasedEventInternal (GamepadHandle handle, Gamepad::ButtonMapping button) |
static void | gamepadTriggerChangedEventInternal (GamepadHandle handle, unsigned int index, float value) |
static void | gamepadJoystickChangedEventInternal (GamepadHandle handle, unsigned int index, float x, float y) |
static void | pollGamepadState (Gamepad *gamepad) |
static std::string | displayFileDialog (size_t mode, const char *title, const char *filterDescription, const char *filterExtensions, const char *initialDirectory) |
static void | shutdownInternal () |
Defines a platform abstraction.
This class has only a few public methods for creating a platform
Destructor.
static Platform* gameplay::Platform::create | ( | Game * | game | ) | [static] |
Creates a platform for the specified game which it will interact with.
game | The game to create a platform for. |
static std::string gameplay::Platform::displayFileDialog | ( | size_t | mode, |
const char * | title, | ||
const char * | filterDescription, | ||
const char * | filterExtensions, | ||
const char * | initialDirectory | ||
) | [static] |
Displays an open or save dialog using the native platform dialog system.
mode | The mode of the dialog. (Ex. OPEN or SAVE) |
title | The title of the dialog. (Ex. Select File or Save File) |
filterDescription | The file filter description. (Ex. Image Files) |
filterExtensions | The semi-colon delimited list of filtered file extensions. (Ex. png;jpg;bmp) |
initialDirectory | The initial directory to open or save files from. (Ex. "res") If NULL this will use the executable directory. |
Begins processing the platform messages.
This method handles all OS window messages and drives the game loop. It normally does not return until the application is closed.
If a attachToWindow is passed to Platform::create the message pump will instead attach to or allow the attachToWindow to drive the game loop on the platform.
static void gameplay::Platform::gamepadButtonPressedEventInternal | ( | GamepadHandle | handle, |
Gamepad::ButtonMapping | mapping | ||
) | [static] |
Internal method used only from static code in various platform implementation.
static void gameplay::Platform::gamepadButtonReleasedEventInternal | ( | GamepadHandle | handle, |
Gamepad::ButtonMapping | button | ||
) | [static] |
Internal method used only from static code in various platform implementation.
static void gameplay::Platform::gamepadEventConnectedInternal | ( | GamepadHandle | handle, |
unsigned int | buttonCount, | ||
unsigned int | joystickCount, | ||
unsigned int | triggerCount, | ||
const char * | name | ||
) | [static] |
Internal method used only from static code in various platform implementation.
static void gameplay::Platform::gamepadEventDisconnectedInternal | ( | GamepadHandle | handle | ) | [static] |
Internal method used only from static code in various platform implementation.
static void gameplay::Platform::gamepadJoystickChangedEventInternal | ( | GamepadHandle | handle, |
unsigned int | index, | ||
float | x, | ||
float | y | ||
) | [static] |
Internal method used only from static code in various platform implementation.
static void gameplay::Platform::gamepadTriggerChangedEventInternal | ( | GamepadHandle | handle, |
unsigned int | index, | ||
float | value | ||
) | [static] |
Internal method used only from static code in various platform implementation.
static void gameplay::Platform::gestureDragEventInternal | ( | int | x, |
int | y | ||
) | [static] |
Internal method used only from static code in various platform implementation.
static void gameplay::Platform::gestureDropEventInternal | ( | int | x, |
int | y | ||
) | [static] |
Internal method used only from static code in various platform implementation.
static void gameplay::Platform::gestureLongTapEventInternal | ( | int | x, |
int | y, | ||
float | duration | ||
) | [static] |
Internal method used only from static code in various platform implementation.
static void gameplay::Platform::gesturePinchEventInternal | ( | int | x, |
int | y, | ||
float | scale | ||
) | [static] |
Internal method used only from static code in various platform implementation.
static void gameplay::Platform::gestureSwipeEventInternal | ( | int | x, |
int | y, | ||
int | direction | ||
) | [static] |
Internal method used only from static code in various platform implementation.
static void gameplay::Platform::gestureTapEventInternal | ( | int | x, |
int | y | ||
) | [static] |
Internal method used only from static code in various platform implementation.
static void gameplay::Platform::keyEventInternal | ( | Keyboard::KeyEvent | evt, |
int | key | ||
) | [static] |
Internal method used only from static code in various platform implementation.
static bool gameplay::Platform::mouseEventInternal | ( | Mouse::MouseEvent | evt, |
int | x, | ||
int | y, | ||
int | wheelDelta | ||
) | [static] |
Internal method used only from static code in various platform implementation.
static void gameplay::Platform::pollGamepadState | ( | Gamepad * | gamepad | ) | [static] |
Internal method used to poll the platform for the updated Gamepad states such as buttons, joytick and trigger values.
Some platforms require to poll the gamepad system to get deltas.
gamepad | The gamepad to be returned with the latest polled values populated. |
static void gameplay::Platform::resizeEventInternal | ( | unsigned int | width, |
unsigned int | height | ||
) | [static] |
Internal method used only from static code in various platform implementation.
static void gameplay::Platform::shutdownInternal | ( | ) | [static] |
Internal method used only from static code in various platform implementation.
static void gameplay::Platform::swapBuffers | ( | ) | [static] |
Swaps the frame buffer on the device.
static void gameplay::Platform::touchEventInternal | ( | Touch::TouchEvent | evt, |
int | x, | ||
int | y, | ||
unsigned int | contactIndex, | ||
bool | actuallyMouse = false |
||
) | [static] |
Internal method used only from static code in various platform implementation.