src/video/SDL_sysvideo.h
changeset 2753 0969758c8809
parent 2742 b86247d21929
child 2859 99210400e8b9
     1.1 --- a/src/video/SDL_sysvideo.h	Mon Sep 15 04:31:30 2008 +0000
     1.2 +++ b/src/video/SDL_sysvideo.h	Mon Sep 15 04:32:36 2008 +0000
     1.3 @@ -37,95 +37,99 @@
     1.4  typedef struct SDL_VideoDevice SDL_VideoDevice;
     1.5  
     1.6  /* Define the SDL texture structure */
     1.7 -struct SDL_Texture {
     1.8 -	Uint32          id;
     1.9 +struct SDL_Texture
    1.10 +{
    1.11 +    Uint32 id;
    1.12  
    1.13 -	Uint32          format;	/**< The pixel format of the texture */
    1.14 -	int             access;	/**< SDL_TextureAccess */
    1.15 -	int             w;	/**< The width of the texture */
    1.16 -	int             h;	/**< The height of the texture */
    1.17 -	int             modMode;/**< The texture modulation mode */
    1.18 -	int             blendMode;	/**< The texture blend mode */
    1.19 -	int             scaleMode;	/**< The texture scale mode */
    1.20 -	Uint8           r, g, b, a;	/**< Texture modulation values */
    1.21 +    Uint32 format;              /**< The pixel format of the texture */
    1.22 +    int access;                 /**< SDL_TextureAccess */
    1.23 +    int w;                      /**< The width of the texture */
    1.24 +    int h;                      /**< The height of the texture */
    1.25 +    int modMode;                /**< The texture modulation mode */
    1.26 +    int blendMode;                      /**< The texture blend mode */
    1.27 +    int scaleMode;                      /**< The texture scale mode */
    1.28 +    Uint8 r, g, b, a;                   /**< Texture modulation values */
    1.29  
    1.30 -	SDL_Renderer   *renderer;
    1.31 +    SDL_Renderer *renderer;
    1.32  
    1.33 -	void           *driverdata;	/**< Driver specific texture representation */
    1.34 +    void *driverdata;                   /**< Driver specific texture representation */
    1.35  
    1.36 -	SDL_Texture    *next;
    1.37 +    SDL_Texture *next;
    1.38  };
    1.39  
    1.40  /* Define the SDL renderer structure */
    1.41 -struct SDL_Renderer {
    1.42 -	int             (*ActivateRenderer) (SDL_Renderer * renderer);
    1.43 -	int             (*DisplayModeChanged) (SDL_Renderer * renderer);
    1.44 -	int             (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
    1.45 -	int             (*QueryTexturePixels) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.46 -				                 void **pixels, int *pitch);
    1.47 -	int             (*SetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.48 -		                   const SDL_Color * colors, int firstcolor,
    1.49 -					                      int ncolors);
    1.50 -	int             (*GetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.51 -			                 SDL_Color * colors, int firstcolor,
    1.52 -					                      int ncolors);
    1.53 -	int             (*SetTextureColorMod) (SDL_Renderer * renderer,
    1.54 -				                     SDL_Texture * texture);
    1.55 -	int             (*SetTextureAlphaMod) (SDL_Renderer * renderer,
    1.56 -				                     SDL_Texture * texture);
    1.57 -	int             (*SetTextureBlendMode) (SDL_Renderer * renderer,
    1.58 -				                     SDL_Texture * texture);
    1.59 -	int             (*SetTextureScaleMode) (SDL_Renderer * renderer,
    1.60 -				                     SDL_Texture * texture);
    1.61 -	int             (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.62 -		                  const SDL_Rect * rect, const void *pixels,
    1.63 -					                  int pitch);
    1.64 -	int             (*LockTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.65 -	                const SDL_Rect * rect, int markDirty, void **pixels,
    1.66 -					                int *pitch);
    1.67 -	void            (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
    1.68 -	void            (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.69 -		                      int numrects, const SDL_Rect * rects);
    1.70 -	int             (*RenderFill) (SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b,
    1.71 -			                    Uint8 a, const SDL_Rect * rect);
    1.72 -	int             (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.73 -	                const SDL_Rect * srcrect, const SDL_Rect * dstrect);
    1.74 -	void            (*RenderPresent) (SDL_Renderer * renderer);
    1.75 -	void            (*DestroyTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
    1.76 +struct SDL_Renderer
    1.77 +{
    1.78 +    int (*ActivateRenderer) (SDL_Renderer * renderer);
    1.79 +    int (*DisplayModeChanged) (SDL_Renderer * renderer);
    1.80 +    int (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
    1.81 +    int (*QueryTexturePixels) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.82 +                               void **pixels, int *pitch);
    1.83 +    int (*SetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.84 +                              const SDL_Color * colors, int firstcolor,
    1.85 +                              int ncolors);
    1.86 +    int (*GetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.87 +                              SDL_Color * colors, int firstcolor,
    1.88 +                              int ncolors);
    1.89 +    int (*SetTextureColorMod) (SDL_Renderer * renderer,
    1.90 +                               SDL_Texture * texture);
    1.91 +    int (*SetTextureAlphaMod) (SDL_Renderer * renderer,
    1.92 +                               SDL_Texture * texture);
    1.93 +    int (*SetTextureBlendMode) (SDL_Renderer * renderer,
    1.94 +                                SDL_Texture * texture);
    1.95 +    int (*SetTextureScaleMode) (SDL_Renderer * renderer,
    1.96 +                                SDL_Texture * texture);
    1.97 +    int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.98 +                          const SDL_Rect * rect, const void *pixels,
    1.99 +                          int pitch);
   1.100 +    int (*LockTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
   1.101 +                        const SDL_Rect * rect, int markDirty, void **pixels,
   1.102 +                        int *pitch);
   1.103 +    void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
   1.104 +    void (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
   1.105 +                          int numrects, const SDL_Rect * rects);
   1.106 +    int (*RenderFill) (SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b,
   1.107 +                       Uint8 a, const SDL_Rect * rect);
   1.108 +    int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture,
   1.109 +                       const SDL_Rect * srcrect, const SDL_Rect * dstrect);
   1.110 +    void (*RenderPresent) (SDL_Renderer * renderer);
   1.111 +    void (*DestroyTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
   1.112  
   1.113 -	void            (*DestroyRenderer) (SDL_Renderer * renderer);
   1.114 +    void (*DestroyRenderer) (SDL_Renderer * renderer);
   1.115  
   1.116 -	/* The current renderer info */
   1.117 -	SDL_RendererInfo info;
   1.118 +    /* The current renderer info */
   1.119 +    SDL_RendererInfo info;
   1.120  
   1.121 -	/* The window associated with the renderer */
   1.122 -	SDL_WindowID    window;
   1.123 +    /* The window associated with the renderer */
   1.124 +    SDL_WindowID window;
   1.125  
   1.126 -	void           *driverdata;
   1.127 +    void *driverdata;
   1.128  };
   1.129  
   1.130  /* Define the SDL render driver structure */
   1.131 -struct SDL_RenderDriver {
   1.132 -	SDL_Renderer   *(*CreateRenderer) (SDL_Window * window, Uint32 flags);
   1.133 +struct SDL_RenderDriver
   1.134 +{
   1.135 +    SDL_Renderer *(*CreateRenderer) (SDL_Window * window, Uint32 flags);
   1.136  
   1.137 -	/* Info about the renderer capabilities */
   1.138 -	SDL_RendererInfo info;
   1.139 +    /* Info about the renderer capabilities */
   1.140 +    SDL_RendererInfo info;
   1.141  };
   1.142  
   1.143  /* Define the SDL window structure, corresponding to toplevel windows */
   1.144 -struct SDL_Window {
   1.145 -	Uint32          id;
   1.146 +struct SDL_Window
   1.147 +{
   1.148 +    Uint32 id;
   1.149  
   1.150 -	char           *title;
   1.151 -	int             x, y;
   1.152 -	int             w, h;
   1.153 -	Uint32          flags;
   1.154 +    char *title;
   1.155 +    int x, y;
   1.156 +    int w, h;
   1.157 +    Uint32 flags;
   1.158  
   1.159 -	int             display;
   1.160 -	SDL_Renderer   *renderer;
   1.161 +    int display;
   1.162 +    SDL_Renderer *renderer;
   1.163  
   1.164 -	void           *userdata;
   1.165 -	void           *driverdata;
   1.166 +    void *userdata;
   1.167 +    void *driverdata;
   1.168  };
   1.169  #define FULLSCREEN_VISIBLE(W) \
   1.170      (((W)->flags & SDL_WINDOW_FULLSCREEN) && \
   1.171 @@ -136,177 +140,181 @@
   1.172   * Define the SDL display structure This corresponds to physical monitors
   1.173   * attached to the system.
   1.174   */
   1.175 -struct SDL_VideoDisplay {
   1.176 -	int             max_display_modes;
   1.177 -	int             num_display_modes;
   1.178 -	SDL_DisplayMode *display_modes;
   1.179 -	SDL_DisplayMode desktop_mode;
   1.180 -	SDL_DisplayMode current_mode;
   1.181 -	SDL_DisplayMode fullscreen_mode;
   1.182 -	SDL_Palette    *palette;
   1.183 +struct SDL_VideoDisplay
   1.184 +{
   1.185 +    int max_display_modes;
   1.186 +    int num_display_modes;
   1.187 +    SDL_DisplayMode *display_modes;
   1.188 +    SDL_DisplayMode desktop_mode;
   1.189 +    SDL_DisplayMode current_mode;
   1.190 +    SDL_DisplayMode fullscreen_mode;
   1.191 +    SDL_Palette *palette;
   1.192  
   1.193 -	Uint16         *gamma;
   1.194 -	Uint16         *saved_gamma;	/* (just offset into gamma) */
   1.195 +    Uint16 *gamma;
   1.196 +    Uint16 *saved_gamma;        /* (just offset into gamma) */
   1.197  
   1.198 -	int             num_render_drivers;
   1.199 -	SDL_RenderDriver *render_drivers;
   1.200 +    int num_render_drivers;
   1.201 +    SDL_RenderDriver *render_drivers;
   1.202  
   1.203 -	int             num_windows;
   1.204 -	SDL_Window     *windows;
   1.205 +    int num_windows;
   1.206 +    SDL_Window *windows;
   1.207  
   1.208 -	SDL_Renderer   *current_renderer;
   1.209 +    SDL_Renderer *current_renderer;
   1.210  
   1.211 -	/* The hash list of textures */
   1.212 -	SDL_Texture    *textures[64];
   1.213 +    /* The hash list of textures */
   1.214 +    SDL_Texture *textures[64];
   1.215  
   1.216 -	SDL_VideoDevice *device;
   1.217 +    SDL_VideoDevice *device;
   1.218  
   1.219 -	void           *driverdata;
   1.220 +    void *driverdata;
   1.221  };
   1.222  
   1.223  /* Define the SDL video driver structure */
   1.224  #define _THIS	SDL_VideoDevice *_this
   1.225  
   1.226 -struct SDL_VideoDevice {
   1.227 -	/* * * */
   1.228 -	/* The name of this video driver */
   1.229 -	const char     *name;
   1.230 +struct SDL_VideoDevice
   1.231 +{
   1.232 +    /* * * */
   1.233 +    /* The name of this video driver */
   1.234 +    const char *name;
   1.235  
   1.236 -	/* * * */
   1.237 -	/* Initialization/Query functions */
   1.238 +    /* * * */
   1.239 +    /* Initialization/Query functions */
   1.240  
   1.241 -	/*
   1.242 -	 * Initialize the native video subsystem, filling in the list of
   1.243 -	 * displays for this driver, returning 0 or -1 if there's an error.
   1.244 -	 */
   1.245 -	int             (*VideoInit) (_THIS);
   1.246 +    /*
   1.247 +     * Initialize the native video subsystem, filling in the list of
   1.248 +     * displays for this driver, returning 0 or -1 if there's an error.
   1.249 +     */
   1.250 +    int (*VideoInit) (_THIS);
   1.251  
   1.252 -	/*
   1.253 -	 * Reverse the effects VideoInit() -- called if VideoInit() fails or
   1.254 -	 * if the application is shutting down the video subsystem.
   1.255 -	 */
   1.256 -	void            (*VideoQuit) (_THIS);
   1.257 +    /*
   1.258 +     * Reverse the effects VideoInit() -- called if VideoInit() fails or
   1.259 +     * if the application is shutting down the video subsystem.
   1.260 +     */
   1.261 +    void (*VideoQuit) (_THIS);
   1.262  
   1.263 -	/* * * */
   1.264 -	/*
   1.265 -	 * Display functions
   1.266 -	 */
   1.267 +    /* * * */
   1.268 +    /*
   1.269 +     * Display functions
   1.270 +     */
   1.271  
   1.272 -	/*
   1.273 -	 * Get a list of the available display modes. e.g.
   1.274 -	 * SDL_AddDisplayMode(_this->current_display, mode)
   1.275 -	 */
   1.276 -	void            (*GetDisplayModes) (_THIS);
   1.277 +    /*
   1.278 +     * Get a list of the available display modes. e.g.
   1.279 +     * SDL_AddDisplayMode(_this->current_display, mode)
   1.280 +     */
   1.281 +    void (*GetDisplayModes) (_THIS);
   1.282  
   1.283 -	/*
   1.284 -	 * Setting the display mode is independent of creating windows, so
   1.285 -	 * when the display mode is changed, all existing windows should have
   1.286 -	 * their data updated accordingly, including the display surfaces
   1.287 -	 * associated with them.
   1.288 -	 */
   1.289 -	int             (*SetDisplayMode) (_THIS, SDL_DisplayMode * mode);
   1.290 +    /*
   1.291 +     * Setting the display mode is independent of creating windows, so
   1.292 +     * when the display mode is changed, all existing windows should have
   1.293 +     * their data updated accordingly, including the display surfaces
   1.294 +     * associated with them.
   1.295 +     */
   1.296 +    int (*SetDisplayMode) (_THIS, SDL_DisplayMode * mode);
   1.297  
   1.298 -	/* Set the color entries of the display palette */
   1.299 -	int             (*SetDisplayPalette) (_THIS, SDL_Palette * palette);
   1.300 +    /* Set the color entries of the display palette */
   1.301 +    int (*SetDisplayPalette) (_THIS, SDL_Palette * palette);
   1.302  
   1.303 -	/* Get the color entries of the display palette */
   1.304 -	int             (*GetDisplayPalette) (_THIS, SDL_Palette * palette);
   1.305 +    /* Get the color entries of the display palette */
   1.306 +    int (*GetDisplayPalette) (_THIS, SDL_Palette * palette);
   1.307  
   1.308 -	/* Set the gamma ramp */
   1.309 -	int             (*SetDisplayGammaRamp) (_THIS, Uint16 * ramp);
   1.310 +    /* Set the gamma ramp */
   1.311 +    int (*SetDisplayGammaRamp) (_THIS, Uint16 * ramp);
   1.312  
   1.313 -	/* Get the gamma ramp */
   1.314 -	int             (*GetDisplayGammaRamp) (_THIS, Uint16 * ramp);
   1.315 +    /* Get the gamma ramp */
   1.316 +    int (*GetDisplayGammaRamp) (_THIS, Uint16 * ramp);
   1.317  
   1.318 -	/* * * */
   1.319 -	/*
   1.320 -	 * Window functions
   1.321 -	 */
   1.322 -	int             (*CreateWindow) (_THIS, SDL_Window * window);
   1.323 -	int             (*CreateWindowFrom) (_THIS, SDL_Window * window, const void *data);
   1.324 -	void            (*SetWindowTitle) (_THIS, SDL_Window * window);
   1.325 -	void            (*SetWindowPosition) (_THIS, SDL_Window * window);
   1.326 -	void            (*SetWindowSize) (_THIS, SDL_Window * window);
   1.327 -	void            (*ShowWindow) (_THIS, SDL_Window * window);
   1.328 -	void            (*HideWindow) (_THIS, SDL_Window * window);
   1.329 -	void            (*RaiseWindow) (_THIS, SDL_Window * window);
   1.330 -	void            (*MaximizeWindow) (_THIS, SDL_Window * window);
   1.331 -	void            (*MinimizeWindow) (_THIS, SDL_Window * window);
   1.332 -	void            (*RestoreWindow) (_THIS, SDL_Window * window);
   1.333 -	void            (*SetWindowGrab) (_THIS, SDL_Window * window);
   1.334 -	void            (*DestroyWindow) (_THIS, SDL_Window * window);
   1.335 +    /* * * */
   1.336 +    /*
   1.337 +     * Window functions
   1.338 +     */
   1.339 +    int (*CreateWindow) (_THIS, SDL_Window * window);
   1.340 +    int (*CreateWindowFrom) (_THIS, SDL_Window * window, const void *data);
   1.341 +    void (*SetWindowTitle) (_THIS, SDL_Window * window);
   1.342 +    void (*SetWindowPosition) (_THIS, SDL_Window * window);
   1.343 +    void (*SetWindowSize) (_THIS, SDL_Window * window);
   1.344 +    void (*ShowWindow) (_THIS, SDL_Window * window);
   1.345 +    void (*HideWindow) (_THIS, SDL_Window * window);
   1.346 +    void (*RaiseWindow) (_THIS, SDL_Window * window);
   1.347 +    void (*MaximizeWindow) (_THIS, SDL_Window * window);
   1.348 +    void (*MinimizeWindow) (_THIS, SDL_Window * window);
   1.349 +    void (*RestoreWindow) (_THIS, SDL_Window * window);
   1.350 +    void (*SetWindowGrab) (_THIS, SDL_Window * window);
   1.351 +    void (*DestroyWindow) (_THIS, SDL_Window * window);
   1.352  
   1.353 -	/* Get some platform dependent window information */
   1.354 -	                SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window,
   1.355 -			                       struct SDL_SysWMinfo * info);
   1.356 +    /* Get some platform dependent window information */
   1.357 +      SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window,
   1.358 +                                  struct SDL_SysWMinfo * info);
   1.359  
   1.360 -	/* * * */
   1.361 -	/*
   1.362 -	 * OpenGL support
   1.363 -	 */
   1.364 -	int             (*GL_LoadLibrary) (_THIS, const char *path);
   1.365 -	void           *(*GL_GetProcAddress) (_THIS, const char *proc);
   1.366 -	                SDL_GLContext(*GL_CreateContext) (_THIS, SDL_Window * window);
   1.367 -	int             (*GL_MakeCurrent) (_THIS, SDL_Window * window, SDL_GLContext context);
   1.368 -	int             (*GL_SetSwapInterval) (_THIS, int interval);
   1.369 -	int             (*GL_GetSwapInterval) (_THIS);
   1.370 -	void            (*GL_SwapWindow) (_THIS, SDL_Window * window);
   1.371 -	void            (*GL_DeleteContext) (_THIS, SDL_GLContext context);
   1.372 +    /* * * */
   1.373 +    /*
   1.374 +     * OpenGL support
   1.375 +     */
   1.376 +    int (*GL_LoadLibrary) (_THIS, const char *path);
   1.377 +    void *(*GL_GetProcAddress) (_THIS, const char *proc);
   1.378 +      SDL_GLContext(*GL_CreateContext) (_THIS, SDL_Window * window);
   1.379 +    int (*GL_MakeCurrent) (_THIS, SDL_Window * window, SDL_GLContext context);
   1.380 +    int (*GL_SetSwapInterval) (_THIS, int interval);
   1.381 +    int (*GL_GetSwapInterval) (_THIS);
   1.382 +    void (*GL_SwapWindow) (_THIS, SDL_Window * window);
   1.383 +    void (*GL_DeleteContext) (_THIS, SDL_GLContext context);
   1.384  
   1.385 -	/* * * */
   1.386 -	/*
   1.387 -	 * Event manager functions
   1.388 -	 */
   1.389 -	void            (*PumpEvents) (_THIS);
   1.390 +    /* * * */
   1.391 +    /*
   1.392 +     * Event manager functions
   1.393 +     */
   1.394 +    void (*PumpEvents) (_THIS);
   1.395  
   1.396 -	/* * * */
   1.397 -	/* Data common to all drivers */
   1.398 -	int             num_displays;
   1.399 -	SDL_VideoDisplay *displays;
   1.400 -	int             current_display;
   1.401 -	Uint32          next_object_id;
   1.402 +    /* * * */
   1.403 +    /* Data common to all drivers */
   1.404 +    int num_displays;
   1.405 +    SDL_VideoDisplay *displays;
   1.406 +    int current_display;
   1.407 +    Uint32 next_object_id;
   1.408  
   1.409 -	/* * * */
   1.410 -	/* Data used by the GL drivers */
   1.411 -	struct {
   1.412 -		int             red_size;
   1.413 -		int             green_size;
   1.414 -		int             blue_size;
   1.415 -		int             alpha_size;
   1.416 -		int             depth_size;
   1.417 -		int             buffer_size;
   1.418 -		int             stencil_size;
   1.419 -		int             double_buffer;
   1.420 -		int             accum_red_size;
   1.421 -		int             accum_green_size;
   1.422 -		int             accum_blue_size;
   1.423 -		int             accum_alpha_size;
   1.424 -		int             stereo;
   1.425 -		int             multisamplebuffers;
   1.426 -		int             multisamplesamples;
   1.427 -		int             accelerated;
   1.428 -		int             retained_backing;
   1.429 -		int             driver_loaded;
   1.430 -		char            driver_path[256];
   1.431 -		void           *dll_handle;
   1.432 -	}               gl_config;
   1.433 +    /* * * */
   1.434 +    /* Data used by the GL drivers */
   1.435 +    struct
   1.436 +    {
   1.437 +        int red_size;
   1.438 +        int green_size;
   1.439 +        int blue_size;
   1.440 +        int alpha_size;
   1.441 +        int depth_size;
   1.442 +        int buffer_size;
   1.443 +        int stencil_size;
   1.444 +        int double_buffer;
   1.445 +        int accum_red_size;
   1.446 +        int accum_green_size;
   1.447 +        int accum_blue_size;
   1.448 +        int accum_alpha_size;
   1.449 +        int stereo;
   1.450 +        int multisamplebuffers;
   1.451 +        int multisamplesamples;
   1.452 +        int accelerated;
   1.453 +        int retained_backing;
   1.454 +        int driver_loaded;
   1.455 +        char driver_path[256];
   1.456 +        void *dll_handle;
   1.457 +    } gl_config;
   1.458  
   1.459 -	/* * * */
   1.460 -	/* Data private to this driver */
   1.461 -	void           *driverdata;
   1.462 -	struct SDL_GLDriverData *gl_data;
   1.463 +    /* * * */
   1.464 +    /* Data private to this driver */
   1.465 +    void *driverdata;
   1.466 +    struct SDL_GLDriverData *gl_data;
   1.467  
   1.468 -	/* * * */
   1.469 -	/* The function used to dispose of this structure */
   1.470 -	void            (*free) (_THIS);
   1.471 +    /* * * */
   1.472 +    /* The function used to dispose of this structure */
   1.473 +    void (*free) (_THIS);
   1.474  };
   1.475  
   1.476 -typedef struct VideoBootStrap {
   1.477 -	const char     *name;
   1.478 -	const char     *desc;
   1.479 -	int             (*available) (void);
   1.480 -	SDL_VideoDevice *(*create) (int devindex);
   1.481 -}               VideoBootStrap;
   1.482 +typedef struct VideoBootStrap
   1.483 +{
   1.484 +    const char *name;
   1.485 +    const char *desc;
   1.486 +    int (*available) (void);
   1.487 +    SDL_VideoDevice *(*create) (int devindex);
   1.488 +} VideoBootStrap;
   1.489  
   1.490  #if SDL_VIDEO_DRIVER_COCOA
   1.491  extern VideoBootStrap COCOA_bootstrap;
   1.492 @@ -381,26 +389,24 @@
   1.493  #define SDL_CurrentDisplay	(_this->displays[_this->current_display])
   1.494  
   1.495  extern SDL_VideoDevice *SDL_GetVideoDevice();
   1.496 -extern int      SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
   1.497 -extern int      SDL_AddVideoDisplay(const SDL_VideoDisplay * display);
   1.498 -extern SDL_bool 
   1.499 -SDL_AddDisplayMode(int displayIndex,
   1.500 -		   const SDL_DisplayMode * mode);
   1.501 -extern void 
   1.502 -SDL_AddRenderDriver(int displayIndex,
   1.503 -		    const SDL_RenderDriver * driver);
   1.504 +extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
   1.505 +extern int SDL_AddVideoDisplay(const SDL_VideoDisplay * display);
   1.506 +extern SDL_bool
   1.507 +SDL_AddDisplayMode(int displayIndex, const SDL_DisplayMode * mode);
   1.508 +extern void
   1.509 +SDL_AddRenderDriver(int displayIndex, const SDL_RenderDriver * driver);
   1.510  
   1.511 -extern int      SDL_RecreateWindow(SDL_Window * window, Uint32 flags);
   1.512 +extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags);
   1.513  extern SDL_Window *SDL_GetWindowFromID(SDL_WindowID windowID);
   1.514  extern SDL_VideoDisplay *SDL_GetDisplayFromWindow(SDL_Window * window);
   1.515  
   1.516 -extern void     SDL_OnWindowShown(SDL_Window * window);
   1.517 -extern void     SDL_OnWindowHidden(SDL_Window * window);
   1.518 -extern void     SDL_OnWindowResized(SDL_Window * window);
   1.519 -extern void     SDL_OnWindowFocusGained(SDL_Window * window);
   1.520 -extern void     SDL_OnWindowFocusLost(SDL_Window * window);
   1.521 +extern void SDL_OnWindowShown(SDL_Window * window);
   1.522 +extern void SDL_OnWindowHidden(SDL_Window * window);
   1.523 +extern void SDL_OnWindowResized(SDL_Window * window);
   1.524 +extern void SDL_OnWindowFocusGained(SDL_Window * window);
   1.525 +extern void SDL_OnWindowFocusLost(SDL_Window * window);
   1.526  extern SDL_WindowID SDL_GetFocusWindow(void);
   1.527  
   1.528 -#endif				/* _SDL_sysvideo_h */
   1.529 +#endif /* _SDL_sysvideo_h */
   1.530  
   1.531  /* vi: set ts=4 sw=4 expandtab: */