{
  "header": "SDL_surface.h",
  "opaque_types": [
    {
      "name": "SDL_Surface"
    }
  ],
  "typedefs": [],
  "function_pointers": [],
  "c_type_aliases": [],
  "enums": [
    {
      "name": "SDL_ScaleMode",
      "values": [
        {
          "name": "SDL_SCALEMODE_NEAREST",
          "comment": "nearest pixel sampling"
        },
        {
          "name": "SDL_SCALEMODE_LINEAR",
          "comment": "linear filtering"
        }
      ]
    },
    {
      "name": "SDL_FlipMode",
      "values": [
        {
          "name": "SDL_FLIP_NONE",
          "comment": "Do not flip"
        },
        {
          "name": "SDL_FLIP_HORIZONTAL",
          "comment": "flip horizontally"
        },
        {
          "name": "SDL_FLIP_VERTICAL",
          "comment": "flip vertically"
        }
      ]
    }
  ],
  "structs": [],
  "unions": [],
  "flags": [
    {
      "name": "SDL_SurfaceFlags",
      "underlying_type": "Uint32",
      "values": [
        {
          "name": "SDL_SURFACE_PREALLOCATED",
          "value": "(1u << 0)",
          "comment": "Surface uses preallocated pixel memory"
        },
        {
          "name": "SDL_SURFACE_LOCK_NEEDED",
          "value": "(1u << 1)",
          "comment": "Surface needs to be locked to access pixels"
        },
        {
          "name": "SDL_SURFACE_LOCKED",
          "value": "(1u << 2)",
          "comment": "Surface is currently locked"
        },
        {
          "name": "SDL_SURFACE_SIMD_ALIGNED",
          "value": "(1u << 3)",
          "comment": "Surface uses pixel memory allocated with SDL_aligned_alloc()"
        }
      ]
    }
  ],
  "functions": [
    {
      "name": "SDL_CreateSurface",
      "return_type": "SDL_Surface *",
      "parameters": [
        {
          "name": "width",
          "type": "int"
        },
        {
          "name": "height",
          "type": "int"
        },
        {
          "name": "format",
          "type": "SDL_PixelFormat"
        }
      ]
    },
    {
      "name": "SDL_CreateSurfaceFrom",
      "return_type": "SDL_Surface *",
      "parameters": [
        {
          "name": "width",
          "type": "int"
        },
        {
          "name": "height",
          "type": "int"
        },
        {
          "name": "format",
          "type": "SDL_PixelFormat"
        },
        {
          "name": "pixels",
          "type": "void *"
        },
        {
          "name": "pitch",
          "type": "int"
        }
      ]
    },
    {
      "name": "SDL_DestroySurface",
      "return_type": "void",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        }
      ]
    },
    {
      "name": "SDL_GetSurfaceProperties",
      "return_type": "SDL_PropertiesID",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        }
      ]
    },
    {
      "name": "SDL_SetSurfaceColorspace",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "colorspace",
          "type": "SDL_Colorspace"
        }
      ]
    },
    {
      "name": "SDL_GetSurfaceColorspace",
      "return_type": "SDL_Colorspace",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        }
      ]
    },
    {
      "name": "SDL_CreateSurfacePalette",
      "return_type": "SDL_Palette *",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        }
      ]
    },
    {
      "name": "SDL_SetSurfacePalette",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "palette",
          "type": "SDL_Palette *"
        }
      ]
    },
    {
      "name": "SDL_GetSurfacePalette",
      "return_type": "SDL_Palette *",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        }
      ]
    },
    {
      "name": "SDL_AddSurfaceAlternateImage",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "image",
          "type": "SDL_Surface *"
        }
      ]
    },
    {
      "name": "SDL_SurfaceHasAlternateImages",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        }
      ]
    },
    {
      "name": "SDL_GetSurfaceImages",
      "return_type": "SDL_Surface **",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "count",
          "type": "int *"
        }
      ]
    },
    {
      "name": "SDL_RemoveSurfaceAlternateImages",
      "return_type": "void",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        }
      ]
    },
    {
      "name": "SDL_LockSurface",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        }
      ]
    },
    {
      "name": "SDL_UnlockSurface",
      "return_type": "void",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        }
      ]
    },
    {
      "name": "SDL_LoadBMP_IO",
      "return_type": "SDL_Surface *",
      "parameters": [
        {
          "name": "src",
          "type": "SDL_IOStream *"
        },
        {
          "name": "closeio",
          "type": "bool"
        }
      ]
    },
    {
      "name": "SDL_LoadBMP",
      "return_type": "SDL_Surface *",
      "parameters": [
        {
          "name": "file",
          "type": "const char *"
        }
      ]
    },
    {
      "name": "SDL_SaveBMP_IO",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "dst",
          "type": "SDL_IOStream *"
        },
        {
          "name": "closeio",
          "type": "bool"
        }
      ]
    },
    {
      "name": "SDL_SaveBMP",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "file",
          "type": "const char *"
        }
      ]
    },
    {
      "name": "SDL_SetSurfaceRLE",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "enabled",
          "type": "bool"
        }
      ]
    },
    {
      "name": "SDL_SurfaceHasRLE",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        }
      ]
    },
    {
      "name": "SDL_SetSurfaceColorKey",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "enabled",
          "type": "bool"
        },
        {
          "name": "key",
          "type": "Uint32"
        }
      ]
    },
    {
      "name": "SDL_SurfaceHasColorKey",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        }
      ]
    },
    {
      "name": "SDL_GetSurfaceColorKey",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "key",
          "type": "Uint32 *"
        }
      ]
    },
    {
      "name": "SDL_SetSurfaceColorMod",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "r",
          "type": "Uint8"
        },
        {
          "name": "g",
          "type": "Uint8"
        },
        {
          "name": "b",
          "type": "Uint8"
        }
      ]
    },
    {
      "name": "SDL_GetSurfaceColorMod",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "r",
          "type": "Uint8 *"
        },
        {
          "name": "g",
          "type": "Uint8 *"
        },
        {
          "name": "b",
          "type": "Uint8 *"
        }
      ]
    },
    {
      "name": "SDL_SetSurfaceAlphaMod",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "alpha",
          "type": "Uint8"
        }
      ]
    },
    {
      "name": "SDL_GetSurfaceAlphaMod",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "alpha",
          "type": "Uint8 *"
        }
      ]
    },
    {
      "name": "SDL_SetSurfaceBlendMode",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "blendMode",
          "type": "SDL_BlendMode"
        }
      ]
    },
    {
      "name": "SDL_GetSurfaceBlendMode",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "blendMode",
          "type": "SDL_BlendMode *"
        }
      ]
    },
    {
      "name": "SDL_SetSurfaceClipRect",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "rect",
          "type": "const SDL_Rect *"
        }
      ]
    },
    {
      "name": "SDL_GetSurfaceClipRect",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "rect",
          "type": "SDL_Rect *"
        }
      ]
    },
    {
      "name": "SDL_FlipSurface",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "flip",
          "type": "SDL_FlipMode"
        }
      ]
    },
    {
      "name": "SDL_DuplicateSurface",
      "return_type": "SDL_Surface *",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        }
      ]
    },
    {
      "name": "SDL_ScaleSurface",
      "return_type": "SDL_Surface *",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "width",
          "type": "int"
        },
        {
          "name": "height",
          "type": "int"
        },
        {
          "name": "scaleMode",
          "type": "SDL_ScaleMode"
        }
      ]
    },
    {
      "name": "SDL_ConvertSurface",
      "return_type": "SDL_Surface *",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "format",
          "type": "SDL_PixelFormat"
        }
      ]
    },
    {
      "name": "SDL_ConvertSurfaceAndColorspace",
      "return_type": "SDL_Surface *",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "format",
          "type": "SDL_PixelFormat"
        },
        {
          "name": "palette",
          "type": "SDL_Palette *"
        },
        {
          "name": "colorspace",
          "type": "SDL_Colorspace"
        },
        {
          "name": "props",
          "type": "SDL_PropertiesID"
        }
      ]
    },
    {
      "name": "SDL_ConvertPixels",
      "return_type": "bool",
      "parameters": [
        {
          "name": "width",
          "type": "int"
        },
        {
          "name": "height",
          "type": "int"
        },
        {
          "name": "src_format",
          "type": "SDL_PixelFormat"
        },
        {
          "name": "src",
          "type": "const void *"
        },
        {
          "name": "src_pitch",
          "type": "int"
        },
        {
          "name": "dst_format",
          "type": "SDL_PixelFormat"
        },
        {
          "name": "dst",
          "type": "void *"
        },
        {
          "name": "dst_pitch",
          "type": "int"
        }
      ]
    },
    {
      "name": "SDL_ConvertPixelsAndColorspace",
      "return_type": "bool",
      "parameters": [
        {
          "name": "width",
          "type": "int"
        },
        {
          "name": "height",
          "type": "int"
        },
        {
          "name": "src_format",
          "type": "SDL_PixelFormat"
        },
        {
          "name": "src_colorspace",
          "type": "SDL_Colorspace"
        },
        {
          "name": "src_properties",
          "type": "SDL_PropertiesID"
        },
        {
          "name": "src",
          "type": "const void *"
        },
        {
          "name": "src_pitch",
          "type": "int"
        },
        {
          "name": "dst_format",
          "type": "SDL_PixelFormat"
        },
        {
          "name": "dst_colorspace",
          "type": "SDL_Colorspace"
        },
        {
          "name": "dst_properties",
          "type": "SDL_PropertiesID"
        },
        {
          "name": "dst",
          "type": "void *"
        },
        {
          "name": "dst_pitch",
          "type": "int"
        }
      ]
    },
    {
      "name": "SDL_PremultiplyAlpha",
      "return_type": "bool",
      "parameters": [
        {
          "name": "width",
          "type": "int"
        },
        {
          "name": "height",
          "type": "int"
        },
        {
          "name": "src_format",
          "type": "SDL_PixelFormat"
        },
        {
          "name": "src",
          "type": "const void *"
        },
        {
          "name": "src_pitch",
          "type": "int"
        },
        {
          "name": "dst_format",
          "type": "SDL_PixelFormat"
        },
        {
          "name": "dst",
          "type": "void *"
        },
        {
          "name": "dst_pitch",
          "type": "int"
        },
        {
          "name": "linear",
          "type": "bool"
        }
      ]
    },
    {
      "name": "SDL_PremultiplySurfaceAlpha",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "linear",
          "type": "bool"
        }
      ]
    },
    {
      "name": "SDL_ClearSurface",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "r",
          "type": "float"
        },
        {
          "name": "g",
          "type": "float"
        },
        {
          "name": "b",
          "type": "float"
        },
        {
          "name": "a",
          "type": "float"
        }
      ]
    },
    {
      "name": "SDL_FillSurfaceRect",
      "return_type": "bool",
      "parameters": [
        {
          "name": "dst",
          "type": "SDL_Surface *"
        },
        {
          "name": "rect",
          "type": "const SDL_Rect *"
        },
        {
          "name": "color",
          "type": "Uint32"
        }
      ]
    },
    {
      "name": "SDL_FillSurfaceRects",
      "return_type": "bool",
      "parameters": [
        {
          "name": "dst",
          "type": "SDL_Surface *"
        },
        {
          "name": "rects",
          "type": "const SDL_Rect *"
        },
        {
          "name": "count",
          "type": "int"
        },
        {
          "name": "color",
          "type": "Uint32"
        }
      ]
    },
    {
      "name": "SDL_BlitSurface",
      "return_type": "bool",
      "parameters": [
        {
          "name": "src",
          "type": "SDL_Surface *"
        },
        {
          "name": "srcrect",
          "type": "const SDL_Rect *"
        },
        {
          "name": "dst",
          "type": "SDL_Surface *"
        },
        {
          "name": "dstrect",
          "type": "const SDL_Rect *"
        }
      ]
    },
    {
      "name": "SDL_BlitSurfaceUnchecked",
      "return_type": "bool",
      "parameters": [
        {
          "name": "src",
          "type": "SDL_Surface *"
        },
        {
          "name": "srcrect",
          "type": "const SDL_Rect *"
        },
        {
          "name": "dst",
          "type": "SDL_Surface *"
        },
        {
          "name": "dstrect",
          "type": "const SDL_Rect *"
        }
      ]
    },
    {
      "name": "SDL_BlitSurfaceScaled",
      "return_type": "bool",
      "parameters": [
        {
          "name": "src",
          "type": "SDL_Surface *"
        },
        {
          "name": "srcrect",
          "type": "const SDL_Rect *"
        },
        {
          "name": "dst",
          "type": "SDL_Surface *"
        },
        {
          "name": "dstrect",
          "type": "const SDL_Rect *"
        },
        {
          "name": "scaleMode",
          "type": "SDL_ScaleMode"
        }
      ]
    },
    {
      "name": "SDL_BlitSurfaceUncheckedScaled",
      "return_type": "bool",
      "parameters": [
        {
          "name": "src",
          "type": "SDL_Surface *"
        },
        {
          "name": "srcrect",
          "type": "const SDL_Rect *"
        },
        {
          "name": "dst",
          "type": "SDL_Surface *"
        },
        {
          "name": "dstrect",
          "type": "const SDL_Rect *"
        },
        {
          "name": "scaleMode",
          "type": "SDL_ScaleMode"
        }
      ]
    },
    {
      "name": "SDL_BlitSurfaceTiled",
      "return_type": "bool",
      "parameters": [
        {
          "name": "src",
          "type": "SDL_Surface *"
        },
        {
          "name": "srcrect",
          "type": "const SDL_Rect *"
        },
        {
          "name": "dst",
          "type": "SDL_Surface *"
        },
        {
          "name": "dstrect",
          "type": "const SDL_Rect *"
        }
      ]
    },
    {
      "name": "SDL_BlitSurfaceTiledWithScale",
      "return_type": "bool",
      "parameters": [
        {
          "name": "src",
          "type": "SDL_Surface *"
        },
        {
          "name": "srcrect",
          "type": "const SDL_Rect *"
        },
        {
          "name": "scale",
          "type": "float"
        },
        {
          "name": "scaleMode",
          "type": "SDL_ScaleMode"
        },
        {
          "name": "dst",
          "type": "SDL_Surface *"
        },
        {
          "name": "dstrect",
          "type": "const SDL_Rect *"
        }
      ]
    },
    {
      "name": "SDL_BlitSurface9Grid",
      "return_type": "bool",
      "parameters": [
        {
          "name": "src",
          "type": "SDL_Surface *"
        },
        {
          "name": "srcrect",
          "type": "const SDL_Rect *"
        },
        {
          "name": "left_width",
          "type": "int"
        },
        {
          "name": "right_width",
          "type": "int"
        },
        {
          "name": "top_height",
          "type": "int"
        },
        {
          "name": "bottom_height",
          "type": "int"
        },
        {
          "name": "scale",
          "type": "float"
        },
        {
          "name": "scaleMode",
          "type": "SDL_ScaleMode"
        },
        {
          "name": "dst",
          "type": "SDL_Surface *"
        },
        {
          "name": "dstrect",
          "type": "const SDL_Rect *"
        }
      ]
    },
    {
      "name": "SDL_MapSurfaceRGB",
      "return_type": "Uint32",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "r",
          "type": "Uint8"
        },
        {
          "name": "g",
          "type": "Uint8"
        },
        {
          "name": "b",
          "type": "Uint8"
        }
      ]
    },
    {
      "name": "SDL_MapSurfaceRGBA",
      "return_type": "Uint32",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "r",
          "type": "Uint8"
        },
        {
          "name": "g",
          "type": "Uint8"
        },
        {
          "name": "b",
          "type": "Uint8"
        },
        {
          "name": "a",
          "type": "Uint8"
        }
      ]
    },
    {
      "name": "SDL_ReadSurfacePixel",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "x",
          "type": "int"
        },
        {
          "name": "y",
          "type": "int"
        },
        {
          "name": "r",
          "type": "Uint8 *"
        },
        {
          "name": "g",
          "type": "Uint8 *"
        },
        {
          "name": "b",
          "type": "Uint8 *"
        },
        {
          "name": "a",
          "type": "Uint8 *"
        }
      ]
    },
    {
      "name": "SDL_ReadSurfacePixelFloat",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "x",
          "type": "int"
        },
        {
          "name": "y",
          "type": "int"
        },
        {
          "name": "r",
          "type": "float *"
        },
        {
          "name": "g",
          "type": "float *"
        },
        {
          "name": "b",
          "type": "float *"
        },
        {
          "name": "a",
          "type": "float *"
        }
      ]
    },
    {
      "name": "SDL_WriteSurfacePixel",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "x",
          "type": "int"
        },
        {
          "name": "y",
          "type": "int"
        },
        {
          "name": "r",
          "type": "Uint8"
        },
        {
          "name": "g",
          "type": "Uint8"
        },
        {
          "name": "b",
          "type": "Uint8"
        },
        {
          "name": "a",
          "type": "Uint8"
        }
      ]
    },
    {
      "name": "SDL_WriteSurfacePixelFloat",
      "return_type": "bool",
      "parameters": [
        {
          "name": "surface",
          "type": "SDL_Surface *"
        },
        {
          "name": "x",
          "type": "int"
        },
        {
          "name": "y",
          "type": "int"
        },
        {
          "name": "r",
          "type": "float"
        },
        {
          "name": "g",
          "type": "float"
        },
        {
          "name": "b",
          "type": "float"
        },
        {
          "name": "a",
          "type": "float"
        }
      ]
    }
  ]
}