src/video/SDL_sysvideo.h
changeset 2742 b86247d21929
parent 2735 204be4fc2726
child 2753 0969758c8809
     1.1 --- a/src/video/SDL_sysvideo.h	Tue Sep 02 02:44:45 2008 +0000
     1.2 +++ b/src/video/SDL_sysvideo.h	Tue Sep 02 19:53:56 2008 +0000
     1.3 @@ -37,274 +37,276 @@
     1.4  typedef struct SDL_VideoDevice SDL_VideoDevice;
     1.5  
     1.6  /* Define the SDL texture structure */
     1.7 -struct SDL_Texture
     1.8 -{
     1.9 -    Uint32 id;
    1.10 +struct SDL_Texture {
    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 -{
    1.43 -    int (*ActivateRenderer) (SDL_Renderer * renderer);
    1.44 -    int (*DisplayModeChanged) (SDL_Renderer * renderer);
    1.45 -    int (*CreateTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
    1.46 -    int (*QueryTexturePixels) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.47 -                               void **pixels, int *pitch);
    1.48 -    int (*SetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.49 -                              const SDL_Color * colors, int firstcolor,
    1.50 -                              int ncolors);
    1.51 -    int (*GetTexturePalette) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.52 -                              SDL_Color * colors, int firstcolor,
    1.53 -                              int ncolors);
    1.54 -    int (*SetTextureColorMod) (SDL_Renderer * renderer,
    1.55 -                               SDL_Texture * texture);
    1.56 -    int (*SetTextureAlphaMod) (SDL_Renderer * renderer,
    1.57 -                               SDL_Texture * texture);
    1.58 -    int (*SetTextureBlendMode) (SDL_Renderer * renderer,
    1.59 -                                SDL_Texture * texture);
    1.60 -    int (*SetTextureScaleMode) (SDL_Renderer * renderer,
    1.61 -                                SDL_Texture * texture);
    1.62 -    int (*UpdateTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.63 -                          const SDL_Rect * rect, const void *pixels,
    1.64 -                          int pitch);
    1.65 -    int (*LockTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.66 -                        const SDL_Rect * rect, int markDirty, void **pixels,
    1.67 -                        int *pitch);
    1.68 -    void (*UnlockTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
    1.69 -    void (*DirtyTexture) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.70 -                          int numrects, const SDL_Rect * rects);
    1.71 -    int (*RenderFill) (SDL_Renderer * renderer, Uint8 r, Uint8 g, Uint8 b,
    1.72 -                       Uint8 a, const SDL_Rect * rect);
    1.73 -    int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.74 -                       const SDL_Rect * srcrect, const SDL_Rect * dstrect);
    1.75 -    void (*RenderPresent) (SDL_Renderer * renderer);
    1.76 -    void (*DestroyTexture) (SDL_Renderer * renderer, SDL_Texture * texture);
    1.77 +struct SDL_Renderer {
    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 -{
   1.133 -    SDL_Renderer *(*CreateRenderer) (SDL_Window * window, Uint32 flags);
   1.134 +struct SDL_RenderDriver {
   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 -{
   1.146 -    Uint32 id;
   1.147 +struct SDL_Window {
   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       ((W)->flags & SDL_WINDOW_SHOWN) && \
   1.172       !((W)->flags & SDL_WINDOW_MINIMIZED))
   1.173  
   1.174 -/* Define the SDL display structure
   1.175 -   This corresponds to physical monitors attached to the system.
   1.176 +/*
   1.177 + * Define the SDL display structure This corresponds to physical monitors
   1.178 + * attached to the system.
   1.179   */
   1.180 -struct SDL_VideoDisplay
   1.181 -{
   1.182 -    int max_display_modes;
   1.183 -    int num_display_modes;
   1.184 -    SDL_DisplayMode *display_modes;
   1.185 -    SDL_DisplayMode desktop_mode;
   1.186 -    SDL_DisplayMode current_mode;
   1.187 -    SDL_DisplayMode fullscreen_mode;
   1.188 -    SDL_Palette *palette;
   1.189 +struct SDL_VideoDisplay {
   1.190 +	int             max_display_modes;
   1.191 +	int             num_display_modes;
   1.192 +	SDL_DisplayMode *display_modes;
   1.193 +	SDL_DisplayMode desktop_mode;
   1.194 +	SDL_DisplayMode current_mode;
   1.195 +	SDL_DisplayMode fullscreen_mode;
   1.196 +	SDL_Palette    *palette;
   1.197  
   1.198 -    Uint16 *gamma;
   1.199 -    Uint16 *saved_gamma;        /* (just offset into gamma) */
   1.200 +	Uint16         *gamma;
   1.201 +	Uint16         *saved_gamma;	/* (just offset into gamma) */
   1.202  
   1.203 -    int num_render_drivers;
   1.204 -    SDL_RenderDriver *render_drivers;
   1.205 +	int             num_render_drivers;
   1.206 +	SDL_RenderDriver *render_drivers;
   1.207  
   1.208 -    int num_windows;
   1.209 -    SDL_Window *windows;
   1.210 +	int             num_windows;
   1.211 +	SDL_Window     *windows;
   1.212  
   1.213 -    SDL_Renderer *current_renderer;
   1.214 +	SDL_Renderer   *current_renderer;
   1.215  
   1.216 -    /* The hash list of textures */
   1.217 -    SDL_Texture *textures[64];
   1.218 +	/* The hash list of textures */
   1.219 +	SDL_Texture    *textures[64];
   1.220  
   1.221 -    SDL_VideoDevice *device;
   1.222 +	SDL_VideoDevice *device;
   1.223  
   1.224 -    void *driverdata;
   1.225 +	void           *driverdata;
   1.226  };
   1.227  
   1.228  /* Define the SDL video driver structure */
   1.229  #define _THIS	SDL_VideoDevice *_this
   1.230  
   1.231 -struct SDL_VideoDevice
   1.232 -{
   1.233 -    /* * * */
   1.234 -    /* The name of this video driver */
   1.235 -    const char *name;
   1.236 +struct SDL_VideoDevice {
   1.237 +	/* * * */
   1.238 +	/* The name of this video driver */
   1.239 +	const char     *name;
   1.240  
   1.241 -    /* * * */
   1.242 -    /* Initialization/Query functions */
   1.243 +	/* * * */
   1.244 +	/* Initialization/Query functions */
   1.245  
   1.246 -    /* Initialize the native video subsystem, filling in the list
   1.247 -       of displays for this driver, returning 0 or -1 if there's an error.
   1.248 -     */
   1.249 -    int (*VideoInit) (_THIS);
   1.250 +	/*
   1.251 +	 * Initialize the native video subsystem, filling in the list of
   1.252 +	 * displays for this driver, returning 0 or -1 if there's an error.
   1.253 +	 */
   1.254 +	int             (*VideoInit) (_THIS);
   1.255  
   1.256 -    /* Reverse the effects VideoInit() -- called if VideoInit() fails
   1.257 -       or if the application is shutting down the video subsystem.
   1.258 -     */
   1.259 -    void (*VideoQuit) (_THIS);
   1.260 +	/*
   1.261 +	 * Reverse the effects VideoInit() -- called if VideoInit() fails or
   1.262 +	 * if the application is shutting down the video subsystem.
   1.263 +	 */
   1.264 +	void            (*VideoQuit) (_THIS);
   1.265  
   1.266 -    /* * * */
   1.267 -    /* Display functions
   1.268 -     */
   1.269 +	/* * * */
   1.270 +	/*
   1.271 +	 * Display functions
   1.272 +	 */
   1.273  
   1.274 -    /* Get a list of the available display modes.
   1.275 -     * e.g.  SDL_AddDisplayMode(_this->current_display, mode)
   1.276 -     */
   1.277 -    void (*GetDisplayModes) (_THIS);
   1.278 +	/*
   1.279 +	 * Get a list of the available display modes. e.g.
   1.280 +	 * SDL_AddDisplayMode(_this->current_display, mode)
   1.281 +	 */
   1.282 +	void            (*GetDisplayModes) (_THIS);
   1.283  
   1.284 -    /* Setting the display mode is independent of creating windows,
   1.285 -     * so when the display mode is changed, all existing windows
   1.286 -     * should have their data updated accordingly, including the
   1.287 -     * display surfaces 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 -    /* Window functions
   1.320 -     */
   1.321 -    int (*CreateWindow) (_THIS, SDL_Window * window);
   1.322 -    int (*CreateWindowFrom) (_THIS, SDL_Window * window, const void *data);
   1.323 -    void (*SetWindowTitle) (_THIS, SDL_Window * window);
   1.324 -    void (*SetWindowPosition) (_THIS, SDL_Window * window);
   1.325 -    void (*SetWindowSize) (_THIS, SDL_Window * window);
   1.326 -    void (*ShowWindow) (_THIS, SDL_Window * window);
   1.327 -    void (*HideWindow) (_THIS, SDL_Window * window);
   1.328 -    void (*RaiseWindow) (_THIS, SDL_Window * window);
   1.329 -    void (*MaximizeWindow) (_THIS, SDL_Window * window);
   1.330 -    void (*MinimizeWindow) (_THIS, SDL_Window * window);
   1.331 -    void (*RestoreWindow) (_THIS, SDL_Window * window);
   1.332 -    void (*SetWindowGrab) (_THIS, SDL_Window * window);
   1.333 -    void (*DestroyWindow) (_THIS, SDL_Window * window);
   1.334 +	/* * * */
   1.335 +	/*
   1.336 +	 * Window functions
   1.337 +	 */
   1.338 +	int             (*CreateWindow) (_THIS, SDL_Window * window);
   1.339 +	int             (*CreateWindowFrom) (_THIS, SDL_Window * window, const void *data);
   1.340 +	void            (*SetWindowTitle) (_THIS, SDL_Window * window);
   1.341 +	void            (*SetWindowPosition) (_THIS, SDL_Window * window);
   1.342 +	void            (*SetWindowSize) (_THIS, SDL_Window * window);
   1.343 +	void            (*ShowWindow) (_THIS, SDL_Window * window);
   1.344 +	void            (*HideWindow) (_THIS, SDL_Window * window);
   1.345 +	void            (*RaiseWindow) (_THIS, SDL_Window * window);
   1.346 +	void            (*MaximizeWindow) (_THIS, SDL_Window * window);
   1.347 +	void            (*MinimizeWindow) (_THIS, SDL_Window * window);
   1.348 +	void            (*RestoreWindow) (_THIS, SDL_Window * window);
   1.349 +	void            (*SetWindowGrab) (_THIS, SDL_Window * window);
   1.350 +	void            (*DestroyWindow) (_THIS, SDL_Window * window);
   1.351  
   1.352 -    /* Get some platform dependent window information */
   1.353 -      SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window,
   1.354 -                                  struct SDL_SysWMinfo * info);
   1.355 +	/* Get some platform dependent window information */
   1.356 +	                SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window,
   1.357 +			                       struct SDL_SysWMinfo * info);
   1.358  
   1.359 -    /* * * */
   1.360 -    /* OpenGL support
   1.361 -     */
   1.362 -    int (*GL_LoadLibrary) (_THIS, const char *path);
   1.363 -    void *(*GL_GetProcAddress) (_THIS, const char *proc);
   1.364 -      SDL_GLContext(*GL_CreateContext) (_THIS, SDL_Window * window);
   1.365 -    int (*GL_MakeCurrent) (_THIS, SDL_Window * window, SDL_GLContext context);
   1.366 -    int (*GL_SetSwapInterval) (_THIS, int interval);
   1.367 -    int (*GL_GetSwapInterval) (_THIS);
   1.368 -    void (*GL_SwapWindow) (_THIS, SDL_Window * window);
   1.369 -    void (*GL_DeleteContext) (_THIS, SDL_GLContext context);
   1.370 +	/* * * */
   1.371 +	/*
   1.372 +	 * OpenGL support
   1.373 +	 */
   1.374 +	int             (*GL_LoadLibrary) (_THIS, const char *path);
   1.375 +	void           *(*GL_GetProcAddress) (_THIS, const char *proc);
   1.376 +	                SDL_GLContext(*GL_CreateContext) (_THIS, SDL_Window * window);
   1.377 +	int             (*GL_MakeCurrent) (_THIS, SDL_Window * window, SDL_GLContext context);
   1.378 +	int             (*GL_SetSwapInterval) (_THIS, int interval);
   1.379 +	int             (*GL_GetSwapInterval) (_THIS);
   1.380 +	void            (*GL_SwapWindow) (_THIS, SDL_Window * window);
   1.381 +	void            (*GL_DeleteContext) (_THIS, SDL_GLContext context);
   1.382  
   1.383 -    /* * * */
   1.384 -    /* Event manager functions
   1.385 -     */
   1.386 -    void (*PumpEvents) (_THIS);
   1.387 +	/* * * */
   1.388 +	/*
   1.389 +	 * Event manager functions
   1.390 +	 */
   1.391 +	void            (*PumpEvents) (_THIS);
   1.392  
   1.393 -    /* * * */
   1.394 -    /* Data common to all drivers */
   1.395 -    int num_displays;
   1.396 -    SDL_VideoDisplay *displays;
   1.397 -    int current_display;
   1.398 -    Uint32 next_object_id;
   1.399 +	/* * * */
   1.400 +	/* Data common to all drivers */
   1.401 +	int             num_displays;
   1.402 +	SDL_VideoDisplay *displays;
   1.403 +	int             current_display;
   1.404 +	Uint32          next_object_id;
   1.405  
   1.406 -    /* * * */
   1.407 -    /* Data used by the GL drivers */
   1.408 -    struct
   1.409 -    {
   1.410 -        int red_size;
   1.411 -        int green_size;
   1.412 -        int blue_size;
   1.413 -        int alpha_size;
   1.414 -        int depth_size;
   1.415 -        int buffer_size;
   1.416 -        int stencil_size;
   1.417 -        int double_buffer;
   1.418 -        int accum_red_size;
   1.419 -        int accum_green_size;
   1.420 -        int accum_blue_size;
   1.421 -        int accum_alpha_size;
   1.422 -        int stereo;
   1.423 -        int multisamplebuffers;
   1.424 -        int multisamplesamples;
   1.425 -        int accelerated;
   1.426 -        int driver_loaded;
   1.427 -        char driver_path[256];
   1.428 -        void *dll_handle;
   1.429 -    } gl_config;
   1.430 +	/* * * */
   1.431 +	/* Data used by the GL drivers */
   1.432 +	struct {
   1.433 +		int             red_size;
   1.434 +		int             green_size;
   1.435 +		int             blue_size;
   1.436 +		int             alpha_size;
   1.437 +		int             depth_size;
   1.438 +		int             buffer_size;
   1.439 +		int             stencil_size;
   1.440 +		int             double_buffer;
   1.441 +		int             accum_red_size;
   1.442 +		int             accum_green_size;
   1.443 +		int             accum_blue_size;
   1.444 +		int             accum_alpha_size;
   1.445 +		int             stereo;
   1.446 +		int             multisamplebuffers;
   1.447 +		int             multisamplesamples;
   1.448 +		int             accelerated;
   1.449 +		int             retained_backing;
   1.450 +		int             driver_loaded;
   1.451 +		char            driver_path[256];
   1.452 +		void           *dll_handle;
   1.453 +	}               gl_config;
   1.454  
   1.455 -    /* * * */
   1.456 -    /* Data private to this driver */
   1.457 -    void *driverdata;
   1.458 -    struct SDL_GLDriverData *gl_data;
   1.459 +	/* * * */
   1.460 +	/* Data private to this driver */
   1.461 +	void           *driverdata;
   1.462 +	struct SDL_GLDriverData *gl_data;
   1.463  
   1.464 -    /* * * */
   1.465 -    /* The function used to dispose of this structure */
   1.466 -    void (*free) (_THIS);
   1.467 +	/* * * */
   1.468 +	/* The function used to dispose of this structure */
   1.469 +	void            (*free) (_THIS);
   1.470  };
   1.471  
   1.472 -typedef struct VideoBootStrap
   1.473 -{
   1.474 -    const char *name;
   1.475 -    const char *desc;
   1.476 -    int (*available) (void);
   1.477 -    SDL_VideoDevice *(*create) (int devindex);
   1.478 -} VideoBootStrap;
   1.479 +typedef struct VideoBootStrap {
   1.480 +	const char     *name;
   1.481 +	const char     *desc;
   1.482 +	int             (*available) (void);
   1.483 +	SDL_VideoDevice *(*create) (int devindex);
   1.484 +}               VideoBootStrap;
   1.485  
   1.486  #if SDL_VIDEO_DRIVER_COCOA
   1.487  extern VideoBootStrap COCOA_bootstrap;
   1.488 @@ -366,6 +368,9 @@
   1.489  #if SDL_VIDEO_DRIVER_OS2FS
   1.490  extern VideoBootStrap OS2FSLib_bootstrap;
   1.491  #endif
   1.492 +#if SDL_VIDEO_DRIVER_UIKIT
   1.493 +extern VideoBootStrap UIKIT_bootstrap;
   1.494 +#endif
   1.495  #if SDL_VIDEO_DRIVER_DUMMY
   1.496  extern VideoBootStrap DUMMY_bootstrap;
   1.497  #endif
   1.498 @@ -376,24 +381,26 @@
   1.499  #define SDL_CurrentDisplay	(_this->displays[_this->current_display])
   1.500  
   1.501  extern SDL_VideoDevice *SDL_GetVideoDevice();
   1.502 -extern int SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
   1.503 -extern int SDL_AddVideoDisplay(const SDL_VideoDisplay * display);
   1.504 -extern SDL_bool SDL_AddDisplayMode(int displayIndex,
   1.505 -                                   const SDL_DisplayMode * mode);
   1.506 -extern void SDL_AddRenderDriver(int displayIndex,
   1.507 -                                const SDL_RenderDriver * driver);
   1.508 +extern int      SDL_AddBasicVideoDisplay(const SDL_DisplayMode * desktop_mode);
   1.509 +extern int      SDL_AddVideoDisplay(const SDL_VideoDisplay * display);
   1.510 +extern SDL_bool 
   1.511 +SDL_AddDisplayMode(int displayIndex,
   1.512 +		   const SDL_DisplayMode * mode);
   1.513 +extern void 
   1.514 +SDL_AddRenderDriver(int displayIndex,
   1.515 +		    const SDL_RenderDriver * driver);
   1.516  
   1.517 -extern int SDL_RecreateWindow(SDL_Window * window, Uint32 flags);
   1.518 +extern int      SDL_RecreateWindow(SDL_Window * window, Uint32 flags);
   1.519  extern SDL_Window *SDL_GetWindowFromID(SDL_WindowID windowID);
   1.520  extern SDL_VideoDisplay *SDL_GetDisplayFromWindow(SDL_Window * window);
   1.521  
   1.522 -extern void SDL_OnWindowShown(SDL_Window * window);
   1.523 -extern void SDL_OnWindowHidden(SDL_Window * window);
   1.524 -extern void SDL_OnWindowResized(SDL_Window * window);
   1.525 -extern void SDL_OnWindowFocusGained(SDL_Window * window);
   1.526 -extern void SDL_OnWindowFocusLost(SDL_Window * window);
   1.527 +extern void     SDL_OnWindowShown(SDL_Window * window);
   1.528 +extern void     SDL_OnWindowHidden(SDL_Window * window);
   1.529 +extern void     SDL_OnWindowResized(SDL_Window * window);
   1.530 +extern void     SDL_OnWindowFocusGained(SDL_Window * window);
   1.531 +extern void     SDL_OnWindowFocusLost(SDL_Window * window);
   1.532  extern SDL_WindowID SDL_GetFocusWindow(void);
   1.533  
   1.534 -#endif /* _SDL_sysvideo_h */
   1.535 +#endif				/* _SDL_sysvideo_h */
   1.536  
   1.537  /* vi: set ts=4 sw=4 expandtab: */