Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
authorEli Gottlieb <eligottlieb@gmail.com>
Thu, 27 May 2010 16:44:35 -0400
changeset 476983f9b95da263
parent 4768 4435e014eacc
child 4770 cf7976fd3258
Added the standard headers and footers that make SDL_shape.h and SDL_shape.c integrate properly into the build.
include/SDL_shape.h
src/video/SDL_shape.c
     1.1 --- a/include/SDL_shape.h	Tue May 25 00:23:41 2010 -0400
     1.2 +++ b/include/SDL_shape.h	Thu May 27 16:44:35 2010 -0400
     1.3 @@ -20,8 +20,22 @@
     1.4      eligottlieb@gmail.com
     1.5  */
     1.6  
     1.7 -struct SDL_Shaped_Window;
     1.8 -typedef struct SDL_Shaped_Window SDL_Shaped_Window;
     1.9 +#ifndef _SDL_shape_h
    1.10 +#define _SDL_shape_h
    1.11 +
    1.12 +#include "SDL_stdinc.h"
    1.13 +#include "SDL_pixels.h"
    1.14 +#include "SDL_rect.h"
    1.15 +#include "SDL_surface.h"
    1.16 +#include "SDL_video.h"
    1.17 +
    1.18 +#include "begin_code.h"
    1.19 +/* Set up for C function definitions, even when using C++ */
    1.20 +#ifdef __cplusplus
    1.21 +/* *INDENT-OFF* */
    1.22 +extern "C" {
    1.23 +/* *INDENT-ON* */
    1.24 +#endif
    1.25  
    1.26  /**
    1.27   *  \brief Create a shaped window with the specified position, dimensions, and flags.
    1.28 @@ -45,7 +59,15 @@
    1.29   */
    1.30  extern DECLSPEC SDL_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags);
    1.31  
    1.32 -extern DECLSPE SDL_bool SDLCALL SDL_WindowIsShaped(const SDL_Window *window);
    1.33 +extern DECLSPEC SDL_bool SDLCALL SDL_WindowIsShaped(const SDL_Window *window);
    1.34  extern DECLSPEC int SDLCALL SDL_SelectShapeRenderer(const SDL_Window *window);
    1.35  
    1.36 -extern DECLSPEC void SDLCALL SDL_DestroyShapedWindow(const SDL_Shaped_Window *window);
    1.37 +/* Ends C function definitions when using C++ */
    1.38 +#ifdef __cplusplus
    1.39 +/* *INDENT-OFF* */
    1.40 +}
    1.41 +/* *INDENT-ON* */
    1.42 +#endif
    1.43 +#include "close_code.h"
    1.44 +
    1.45 +#endif /* _SDL_shape_h */
     2.1 --- a/src/video/SDL_shape.c	Tue May 25 00:23:41 2010 -0400
     2.2 +++ b/src/video/SDL_shape.c	Thu May 27 16:44:35 2010 -0400
     2.3 @@ -19,28 +19,21 @@
     2.4      Eli Gottlieb
     2.5      eligottlieb@gmail.com
     2.6  */
     2.7 +#include "SDL_config.h"
     2.8  
     2.9 +#include "SDL.h"
    2.10 +#include "SDL_video.h"
    2.11 +#include "SDL_sysvideo.h"
    2.12  #include "SDL_shape.h"
    2.13  
    2.14 -struct SDL_Shaped_Window {
    2.15 -	SDL_Window *window;
    2.16 -	SDL_Surface *shape_mask;
    2.17 -}
    2.18 -
    2.19 -SDL_Shaped_Window * SDLCALL SDL_CreateShapedWindow(const char *title,
    2.20 -						   unsigned int x,unsigned int y,
    2.21 -						   unsigned int w,unsigned int h,
    2.22 -						   Uint32 flags) {
    2.23 -	//TODO: Fill in stub of SDL_CreatedShapedWindow
    2.24 +SDL_Window* SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags) {
    2.25  	return NULL;
    2.26  }
    2.27  
    2.28 -int SDLCALL SDL_PresentShape(const SDL_Shaped_Window *window) {
    2.29 -	//TODO: Fill in stub of SDL_PresentShape
    2.30 +SDL_bool SDL_WindowIsShaped(const SDL_Window *window) {
    2.31 +	return SDL_FALSE;
    2.32 +}
    2.33 +
    2.34 +int SDL_SelectShapeRenderer(const SDL_Window *window) {
    2.35  	return -1;
    2.36  }
    2.37 -
    2.38 -void SDLCALL SDL_DestroyShapedWindow(const SDL_Shaped_Window *window) {
    2.39 -	//TODO: Fill in stub of SDL_DestroyShapedWindow
    2.40 -	return;
    2.41 -}