Changed API for shaped windows to make it much, much simpler. A shaped window's shape mask is now accessed as a render target, which means we can get at it with blit and draw functions, as well as (most likely) OpenGL.
authorEli Gottlieb <eligottlieb@gmail.com>
Tue, 25 May 2010 00:23:41 -0400
changeset 47684435e014eacc
parent 4767 dc3fd9b7fcbc
child 4769 83f9b95da263
Changed API for shaped windows to make it much, much simpler. A shaped window's shape mask is now accessed as a render target, which means we can get at it with blit and draw functions, as well as (most likely) OpenGL.
include/SDL_shape.h
     1.1 --- a/include/SDL_shape.h	Sun May 23 01:27:09 2010 -0400
     1.2 +++ b/include/SDL_shape.h	Tue May 25 00:23:41 2010 -0400
     1.3 @@ -43,13 +43,9 @@
     1.4   *  
     1.5   *  \sa SDL_DestroyWindow()
     1.6   */
     1.7 -extern DECLSPEC SDL_Shaped_Window * SDLCALL SDL_CreateShapedWindow(const char *title,unsigned int x,unsigned int y,unsigned int w,unsigned int h,Uint32 flags);
     1.8 +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.9  
    1.10 -extern DECLSPEC SDL_Surface * SDLCALL SDL_LockWindowShape(const SDL_Shaped_Window *window);
    1.11 -extern DECLSPEC void SDLCALL SDL_UnlockWindowShape(const SDL_Shaped_Window *window);
    1.12 -extern DECLSPEC int SDLCALL SDL_PresentWindowShape(const SDL_Shaped_Window *window);
    1.13 -
    1.14 -extern DECLSPEC SDL_Window * SDLCALL SDL_LockShapedWindow(const SDL_Shaped_Window *window);
    1.15 -extern DECLSPEC void SDLCALL SDL_UnlockShapedWindow(const SDL_Shaped_Window *window);
    1.16 +extern DECLSPE SDL_bool SDLCALL SDL_WindowIsShaped(const SDL_Window *window);
    1.17 +extern DECLSPEC int SDLCALL SDL_SelectShapeRenderer(const SDL_Window *window);
    1.18  
    1.19  extern DECLSPEC void SDLCALL SDL_DestroyShapedWindow(const SDL_Shaped_Window *window);