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