src/video/SDL_sysvideo.h
changeset 4782 b6930aefd008
parent 3701 fb905d5674cc
child 4807 c9eb95f29770
     1.1 --- a/src/video/SDL_sysvideo.h	Mon Jun 21 23:08:10 2010 -0400
     1.2 +++ b/src/video/SDL_sysvideo.h	Wed Jun 30 16:19:44 2010 -0400
     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,33 @@
    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 SDL_WINDOW_SHOWN flag, for use once the user gives the window a shape. */
    1.40 +    Uint32 usershownflag;
    1.41 +    
    1.42 +    /* The cutoff value for alpha-channel binarization.  When alpha is greater-than-or-equal-to this value in the shape
    1.43 +       image, the corresponding pixel of the actual window will be considered part of the window's shape. */
    1.44 +    Uint8 alphacutoff;
    1.45 +    
    1.46 +    /* Has this window been assigned a shape? */
    1.47 +    SDL_bool hasshape;
    1.48 +    
    1.49 +    void *driverdata;
    1.50 +};
    1.51 +
    1.52 +/* Define the SDL shape driver structure */
    1.53 +struct SDL_ShapeDriver
    1.54 +{
    1.55 +    SDL_WindowShaper *(*CreateShaper)(SDL_Window * window);
    1.56 +    int (*SetWindowShape)(SDL_WindowShaper *shaper,SDL_Surface *shape,SDL_WindowShapeMode *shapeMode);
    1.57 +    int (*ResizeWindowShape)(SDL_Window *window);
    1.58 +};
    1.59 +
    1.60  /* Define the SDL window structure, corresponding to toplevel windows */
    1.61  struct SDL_Window
    1.62  {
    1.63 @@ -150,6 +176,8 @@
    1.64      SDL_Renderer *renderer;
    1.65  
    1.66      SDL_DisplayMode fullscreen_mode;
    1.67 +    
    1.68 +    SDL_WindowShaper *shaper;
    1.69  
    1.70      void *userdata;
    1.71      void *driverdata;
    1.72 @@ -270,6 +298,12 @@
    1.73      void (*RestoreWindow) (_THIS, SDL_Window * window);
    1.74      void (*SetWindowGrab) (_THIS, SDL_Window * window);
    1.75      void (*DestroyWindow) (_THIS, SDL_Window * window);
    1.76 +    
    1.77 +    /* * * */
    1.78 +    /*
    1.79 +     * Shaped-window functions
    1.80 +     */
    1.81 +    SDL_ShapeDriver shape_driver;
    1.82  
    1.83      /* Get some platform dependent window information */
    1.84        SDL_bool(*GetWindowWMInfo) (_THIS, SDL_Window * window,