test/common.h
author Sam Lantinga <slouken@libsdl.org>
Mon, 24 Jul 2006 05:03:02 +0000
changeset 1933 7ee5297340f7
parent 1914 051df511279c
child 3194 c18c03927a77
permissions -rw-r--r--
Implemented Cocoa window support
slouken@1914
     1
slouken@1914
     2
/* A simple test program framework */
slouken@1914
     3
slouken@1914
     4
#include "SDL.h"
slouken@1914
     5
slouken@1914
     6
#define VERBOSE_VIDEO   0x00000001
slouken@1914
     7
#define VERBOSE_MODES   0x00000002
slouken@1914
     8
#define VERBOSE_RENDER  0x00000004
slouken@1914
     9
#define VERBOSE_EVENT   0x00000008
slouken@1914
    10
#define VERBOSE_AUDIO   0x00000010
slouken@1914
    11
slouken@1914
    12
typedef struct
slouken@1914
    13
{
slouken@1914
    14
    /* SDL init flags */
slouken@1914
    15
    char **argv;
slouken@1914
    16
    Uint32 flags;
slouken@1914
    17
    Uint32 verbose;
slouken@1914
    18
slouken@1914
    19
    /* Video info */
slouken@1914
    20
    const char *videodriver;
slouken@1914
    21
    int display;
slouken@1914
    22
    const char *window_title;
slouken@1914
    23
    Uint32 window_flags;
slouken@1914
    24
    int window_x;
slouken@1914
    25
    int window_y;
slouken@1914
    26
    int window_w;
slouken@1914
    27
    int window_h;
slouken@1914
    28
    int depth;
slouken@1914
    29
    int refresh_rate;
slouken@1914
    30
    int num_windows;
slouken@1914
    31
    SDL_WindowID *windows;
slouken@1914
    32
slouken@1914
    33
    /* Renderer info */
slouken@1914
    34
    const char *renderdriver;
slouken@1914
    35
    Uint32 render_flags;
slouken@1933
    36
    SDL_bool skip_renderer;
slouken@1914
    37
slouken@1914
    38
    /* Audio info */
slouken@1914
    39
    const char *audiodriver;
slouken@1914
    40
    SDL_AudioSpec audiospec;
slouken@1914
    41
} CommonState;
slouken@1914
    42
slouken@1914
    43
extern CommonState *CommonCreateState(char **argv, Uint32 flags);
slouken@1914
    44
extern int CommonArg(CommonState * state, int index);
slouken@1914
    45
extern const char *CommonUsage(CommonState * state);
slouken@1914
    46
extern SDL_bool CommonInit(CommonState * state);
slouken@1914
    47
extern void CommonEvent(CommonState * state, SDL_Event * event, int *done);
slouken@1914
    48
extern void CommonQuit(CommonState * state);