include/SDL_compat.h
branchSDL-1.3
changeset 1675 d33dcfc3fde7
parent 1670 eef792d31de8
child 1682 7ae8018b2e5d
     1.1 --- a/include/SDL_compat.h	Sun Jun 11 05:27:10 2006 +0000
     1.2 +++ b/include/SDL_compat.h	Sun Jun 11 07:30:16 2006 +0000
     1.3 @@ -79,6 +79,37 @@
     1.4      SDL_PixelFormat *vfmt;
     1.5  } SDL_VideoInfo;
     1.6  
     1.7 +/* The most common video overlay formats.
     1.8 +   For an explanation of these pixel formats, see:
     1.9 +   http://www.webartz.com/fourcc/indexyuv.htm
    1.10 +
    1.11 +   For information on the relationship between color spaces, see:
    1.12 +   http://www.neuro.sfc.keio.ac.jp/~aly/polygon/info/color-space-faq.html
    1.13 + */
    1.14 +#define SDL_YV12_OVERLAY  0x32315659    /* Planar mode: Y + V + U  (3 planes) */
    1.15 +#define SDL_IYUV_OVERLAY  0x56555949    /* Planar mode: Y + U + V  (3 planes) */
    1.16 +#define SDL_YUY2_OVERLAY  0x32595559    /* Packed mode: Y0+U0+Y1+V0 (1 plane) */
    1.17 +#define SDL_UYVY_OVERLAY  0x59565955    /* Packed mode: U0+Y0+V0+Y1 (1 plane) */
    1.18 +#define SDL_YVYU_OVERLAY  0x55595659    /* Packed mode: Y0+V0+Y1+U0 (1 plane) */
    1.19 +
    1.20 +/* The YUV hardware video overlay */
    1.21 +typedef struct SDL_Overlay
    1.22 +{
    1.23 +    Uint32 format;              /* Read-only */
    1.24 +    int w, h;                   /* Read-only */
    1.25 +    int planes;                 /* Read-only */
    1.26 +    Uint16 *pitches;            /* Read-only */
    1.27 +    Uint8 **pixels;             /* Read-write */
    1.28 +
    1.29 +    /* Hardware-specific surface info */
    1.30 +    struct private_yuvhwfuncs *hwfuncs;
    1.31 +    struct private_yuvhwdata *hwdata;
    1.32 +
    1.33 +    /* Special flags */
    1.34 +    Uint32 hw_overlay:1;        /* Flag: This overlay hardware accelerated? */
    1.35 +    Uint32 UnusedBits:31;
    1.36 +} SDL_Overlay;
    1.37 +
    1.38  typedef enum
    1.39  {
    1.40      SDL_GRAB_QUERY = -1,
    1.41 @@ -114,7 +145,6 @@
    1.42  extern DECLSPEC int SDLCALL SDL_WM_IconifyWindow(void);
    1.43  extern DECLSPEC int SDLCALL SDL_WM_ToggleFullScreen(SDL_Surface * surface);
    1.44  extern DECLSPEC SDL_GrabMode SDLCALL SDL_WM_GrabInput(SDL_GrabMode mode);
    1.45 -extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void);
    1.46  extern DECLSPEC int SDLCALL SDL_SetPalette(SDL_Surface * surface, int flags,
    1.47                                             SDL_Color * colors,
    1.48                                             int firstcolor, int ncolors);
    1.49 @@ -122,6 +152,18 @@
    1.50                                                  SDL_Color * colors,
    1.51                                                  int firstcolor, int ncolors);
    1.52  extern DECLSPEC int SDLCALL SDL_GetWMInfo(SDL_SysWMinfo * info);
    1.53 +extern DECLSPEC Uint8 SDLCALL SDL_GetAppState(void);
    1.54 +extern DECLSPEC void SDLCALL SDL_WarpMouse(Uint16 x, Uint16 y);
    1.55 +extern DECLSPEC SDL_Overlay *SDLCALL SDL_CreateYUVOverlay(int width,
    1.56 +                                                          int height,
    1.57 +                                                          Uint32 format,
    1.58 +                                                          SDL_Surface *
    1.59 +                                                          display);
    1.60 +extern DECLSPEC int SDLCALL SDL_LockYUVOverlay(SDL_Overlay * overlay);
    1.61 +extern DECLSPEC void SDLCALL SDL_UnlockYUVOverlay(SDL_Overlay * overlay);
    1.62 +extern DECLSPEC int SDLCALL SDL_DisplayYUVOverlay(SDL_Overlay * overlay,
    1.63 +                                                  SDL_Rect * dstrect);
    1.64 +extern DECLSPEC void SDLCALL SDL_FreeYUVOverlay(SDL_Overlay * overlay);
    1.65  
    1.66  /* Ends C function definitions when using C++ */
    1.67  #ifdef __cplusplus
    1.68 @@ -134,4 +176,3 @@
    1.69  #endif /* _SDL_compat_h */
    1.70  
    1.71  /* vi: set ts=4 sw=4 expandtab: */
    1.72 -extern DECLSPEC void SDLCALL SDL_WarpMouse(Uint16 x, Uint16 y);