src/video/SDL_sysvideo.h
changeset 4862 7b1d35d98294
parent 4763 518d1679d2d0
parent 4851 5624fb0190b5
child 4929 aa8888658021
     1.1 --- a/src/video/SDL_sysvideo.h	Sun Aug 22 12:39:56 2010 -0700
     1.2 +++ b/src/video/SDL_sysvideo.h	Sun Aug 22 13:45:56 2010 -0700
     1.3 @@ -26,11 +26,14 @@
     1.4  
     1.5  #include "SDL_mouse.h"
     1.6  #include "SDL_keysym.h"
     1.7 +#include "SDL_shape.h"
     1.8  
     1.9  /* The SDL video driver */
    1.10  
    1.11  typedef struct SDL_Renderer SDL_Renderer;
    1.12  typedef struct SDL_RenderDriver SDL_RenderDriver;
    1.13 +typedef struct SDL_WindowShaper SDL_WindowShaper;
    1.14 +typedef struct SDL_ShapeDriver SDL_ShapeDriver;
    1.15  typedef struct SDL_VideoDisplay SDL_VideoDisplay;
    1.16  typedef struct SDL_VideoDevice SDL_VideoDevice;
    1.17  
    1.18 @@ -97,10 +100,6 @@
    1.19                              int count);
    1.20      int (*RenderFillRects) (SDL_Renderer * renderer, const SDL_Rect ** rects,
    1.21                              int count);
    1.22 -    int (*RenderDrawEllipse) (SDL_Renderer * renderer, int x, int y,
    1.23 -                              int w, int h);
    1.24 -    int (*RenderFillEllipse) (SDL_Renderer * renderer, int x, int y,
    1.25 -                              int w, int h);
    1.26      int (*RenderCopy) (SDL_Renderer * renderer, SDL_Texture * texture,
    1.27                         const SDL_Rect * srcrect, const SDL_Rect * dstrect);
    1.28      int (*RenderReadPixels) (SDL_Renderer * renderer, const SDL_Rect * rect,
    1.29 @@ -136,6 +135,32 @@
    1.30      SDL_RendererInfo info;
    1.31  };
    1.32  
    1.33 +/* Define the SDL window-shaper structure */
    1.34 +struct SDL_WindowShaper
    1.35 +{   
    1.36 +    /* The window associated with the shaper */
    1.37 +    SDL_Window *window;
    1.38 +    
    1.39 +    /* The user's specified coordinates for the window, for once we give it a shape. */
    1.40 +    Uint32 userx,usery;
    1.41 +    
    1.42 +    /* The parameters for shape calculation. */
    1.43 +    SDL_WindowShapeMode mode;
    1.44 +    
    1.45 +    /* Has this window been assigned a shape? */
    1.46 +    SDL_bool hasshape;
    1.47 +    
    1.48 +    void *driverdata;
    1.49 +};
    1.50 +
    1.51 +/* Define the SDL shape driver structure */
    1.52 +struct SDL_ShapeDriver
    1.53 +{
    1.54 +    SDL_WindowShaper *(*CreateShaper)(SDL_Window * window);
    1.55 +    int (*SetWindowShape)(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shape_mode);
    1.56 +    int (*ResizeWindowShape)(SDL_Window *window);
    1.57 +};
    1.58 +
    1.59  /* Define the SDL window structure, corresponding to toplevel windows */
    1.60  struct SDL_Window
    1.61  {
    1.62 @@ -150,6 +175,8 @@
    1.63      SDL_Renderer *renderer;
    1.64  
    1.65      SDL_DisplayMode fullscreen_mode;
    1.66 +    
    1.67 +    SDL_WindowShaper *shaper;
    1.68  
    1.69      void *userdata;
    1.70      void *driverdata;
    1.71 @@ -270,6 +297,12 @@
    1.72      void (*RestoreWindow) (_THIS, SDL_Window * window);
    1.73      void (*SetWindowGrab) (_THIS, SDL_Window * window);
    1.74      void (*DestroyWindow) (_THIS, SDL_Window * window);
    1.75 +    
    1.76 +    /* * * */
    1.77 +    /*
    1.78 +     * Shaped-window functions
    1.79 +     */
    1.80 +    SDL_ShapeDriver shape_driver;
    1.81  
    1.82      /* Get some platform dependent window information */
    1.83        SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window,