arsa
2.7
|
Go to the source code of this file.
Classes | |
struct | SDLTest_CommonState |
Macros | |
#define | DEFAULT_WINDOW_WIDTH 640 |
#define | DEFAULT_WINDOW_HEIGHT 480 |
#define | VERBOSE_VIDEO 0x00000001 |
#define | VERBOSE_MODES 0x00000002 |
#define | VERBOSE_RENDER 0x00000004 |
#define | VERBOSE_EVENT 0x00000008 |
#define | VERBOSE_AUDIO 0x00000010 |
Functions | |
SDLTest_CommonState * | SDLTest_CommonCreateState (char **argv, Uint32 flags) |
Parse command line parameters and create common state. More... | |
int | SDLTest_CommonArg (SDLTest_CommonState *state, int index) |
Process one common argument. More... | |
void | SDLTest_CommonLogUsage (SDLTest_CommonState *state, const char *argv0, const char **options) |
Logs command line usage info. More... | |
SDL_bool | SDLTest_CommonInit (SDLTest_CommonState *state) |
Open test window. More... | |
SDL_bool | SDLTest_CommonDefaultArgs (SDLTest_CommonState *state, const int argc, char **argv) |
Easy argument handling when test app doesn't need any custom args. More... | |
void | SDLTest_CommonEvent (SDLTest_CommonState *state, SDL_Event *event, int *done) |
Common event handler for test windows. More... | |
void | SDLTest_CommonQuit (SDLTest_CommonState *state) |
Close test window. More... | |
Include file for SDL test framework.
This code is a part of the SDL2_test library, not the main SDL library.
Definition in file SDL_test_common.h.
#define DEFAULT_WINDOW_HEIGHT 480 |
Definition at line 42 of file SDL_test_common.h.
#define DEFAULT_WINDOW_WIDTH 640 |
Definition at line 41 of file SDL_test_common.h.
#define VERBOSE_AUDIO 0x00000010 |
Definition at line 49 of file SDL_test_common.h.
#define VERBOSE_EVENT 0x00000008 |
Definition at line 48 of file SDL_test_common.h.
#define VERBOSE_MODES 0x00000002 |
Definition at line 46 of file SDL_test_common.h.
#define VERBOSE_RENDER 0x00000004 |
Definition at line 47 of file SDL_test_common.h.
#define VERBOSE_VIDEO 0x00000001 |
Definition at line 45 of file SDL_test_common.h.
int SDLTest_CommonArg | ( | SDLTest_CommonState * | state, |
int | index | ||
) |
Process one common argument.
state | The common state describing the test window to create. |
index | The index of the argument to process in argv[]. |
SDLTest_CommonState* SDLTest_CommonCreateState | ( | char ** | argv, |
Uint32 | flags | ||
) |
Parse command line parameters and create common state.
argv | Array of command line parameters |
flags | Flags indicating which subsystem to initialize (i.e. SDL_INIT_VIDEO | SDL_INIT_AUDIO) |
SDL_bool SDLTest_CommonDefaultArgs | ( | SDLTest_CommonState * | state, |
const int | argc, | ||
char ** | argv | ||
) |
Easy argument handling when test app doesn't need any custom args.
state | The common state describing the test window to create. |
argc | argc, as supplied to SDL_main |
argv | argv, as supplied to SDL_main |
void SDLTest_CommonEvent | ( | SDLTest_CommonState * | state, |
SDL_Event * | event, | ||
int * | done | ||
) |
Common event handler for test windows.
state | The common state used to create test window. |
event | The event to handle. |
done | Flag indicating we are done. |
SDL_bool SDLTest_CommonInit | ( | SDLTest_CommonState * | state | ) |
Open test window.
state | The common state describing the test window to create. |
void SDLTest_CommonLogUsage | ( | SDLTest_CommonState * | state, |
const char * | argv0, | ||
const char ** | options | ||
) |
Logs command line usage info.
This logs the appropriate command line options for the subsystems in use plus other common options, and then any application-specific options. This uses the SDL_Log() function and splits up output to be friendly to 80-character-wide terminals.
state | The common state describing the test window for the app. |
argv0 | argv[0], as passed to main/SDL_main. |
options | an array of strings for application specific options. The last element of the array should be NULL. |
void SDLTest_CommonQuit | ( | SDLTest_CommonState * | state | ) |
Close test window.
state | The common state used to create test window. |