include/SDL_video.h
branchSDL-1.3
changeset 1683 396a35389351
parent 1682 7ae8018b2e5d
child 1706 1577404809f0
     1.1 --- a/include/SDL_video.h	Fri Jun 16 06:00:31 2006 +0000
     1.2 +++ b/include/SDL_video.h	Sat Jun 17 06:45:14 2006 +0000
     1.3 @@ -252,6 +252,9 @@
     1.4      int pitch;                  /* Read-only */
     1.5      void *pixels;               /* Read-write */
     1.6  
     1.7 +    /* texture associated with the surface, if any */
     1.8 +    SDL_TextureID textureID;
     1.9 +
    1.10      /* information needed for surfaces requiring locks */
    1.11      int locked;
    1.12      void *lock_data;
    1.13 @@ -1067,25 +1070,6 @@
    1.14                                               Uint16 * blue);
    1.15  
    1.16  /*
    1.17 - * Sets a portion of the colormap for the given 8-bit surface.  If 'surface'
    1.18 - * is not a palettized surface, this function does nothing, returning 0.
    1.19 - * If all of the colors were set as passed to SDL_SetColors(), it will
    1.20 - * return 1.  If not all the color entries were set exactly as given,
    1.21 - * it will return 0, and you should look at the surface palette to
    1.22 - * determine the actual color palette.
    1.23 - *
    1.24 - * When 'surface' is the surface associated with the current display, the
    1.25 - * display colormap will be updated with the requested colors.  If 
    1.26 - * SDL_HWPALETTE was set in SDL_SetVideoMode() flags, SDL_SetColors()
    1.27 - * will always return 1, and the palette is guaranteed to be set the way
    1.28 - * you desire, even if the window colormap has to be warped or run under
    1.29 - * emulation.
    1.30 - */
    1.31 -extern DECLSPEC int SDLCALL SDL_SetColors(SDL_Surface * surface,
    1.32 -                                          const SDL_Color * colors,
    1.33 -                                          int firstcolor, int ncolors);
    1.34 -
    1.35 -/*
    1.36   * Maps an RGB triple to an opaque pixel value for a given pixel format
    1.37   */
    1.38  extern DECLSPEC Uint32 SDLCALL SDL_MapRGB
    1.39 @@ -1138,6 +1122,18 @@
    1.40  SDL_CreateRGBSurfaceFromTexture(SDL_TextureID textureID);
    1.41  extern DECLSPEC void SDLCALL SDL_FreeSurface(SDL_Surface * surface);
    1.42  
    1.43 +/**
    1.44 + * \fn int SDL_SetSurfacePalette(SDL_Surface *surface, SDL_Palette *palette)
    1.45 + *
    1.46 + * \brief Set the palette used by a surface.
    1.47 + *
    1.48 + * \return 0, or -1 if the surface format doesn't use a palette.
    1.49 + *
    1.50 + * \note A single palette can be shared with many surfaces.
    1.51 + */
    1.52 +extern DECLSPEC int SDLCALL SDL_SetSurfacePalette(SDL_Surface * surface,
    1.53 +                                                  SDL_Palette * palette);
    1.54 +
    1.55  /*
    1.56   * SDL_LockSurface() sets up a surface for directly accessing the pixels.
    1.57   * Between calls to SDL_LockSurface()/SDL_UnlockSurface(), you can write