Commits

Leonard Ritter committed 60fb5c7

initial check-in

Comments (0)

Files changed (56)

+syntax: glob
+
+.sconsign.dblite
+.settings
+*.pyc
+*.blend1
+*.blend2
+*.avi
+*.glc
+*.mp4
+*.p3d
+debug.txt
+__pycache__
+*.orig
+*.bgeconf
+.project
+.pydevproject
+
+syntax: regexp
+
+
+Except when otherwise stated (look for LICENSE files in directories or
+information at the beginning of each file) all software and
+documentation is licensed as follows: 
+
+    The MIT License
+
+    Permission is hereby granted, free of charge, to any person 
+    obtaining a copy of this software and associated documentation 
+    files (the "Software"), to deal in the Software without 
+    restriction, including without limitation the rights to use, 
+    copy, modify, merge, publish, distribute, sublicense, and/or 
+    sell copies of the Software, and to permit persons to whom the 
+    Software is furnished to do so, subject to the following conditions:
+
+    The above copyright notice and this permission notice shall be included 
+    in all copies or substantial portions of the Software.
+
+    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 
+    OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 
+    FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 
+    THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 
+    LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 
+    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 
+    DEALINGS IN THE SOFTWARE.
+

predefs/sdl.pypredef

+def SDL_ReadLE16(*argv):
+    """SDL_ReadLE16"""
+
+def SDL_LowerBlit(*argv):
+    """SDL_LowerBlit"""
+
+def SDL_GetPixelFormatName(*argv):
+    """SDL_GetPixelFormatName"""
+
+def SDL_UnionRect(*argv):
+    """SDL_UnionRect"""
+
+def SDL_GetClosestDisplayMode(*argv):
+    """SDL_GetClosestDisplayMode"""
+
+def SDL_SetSurfaceAlphaMod(*argv):
+    """SDL_SetSurfaceAlphaMod"""
+
+def SDL_RaiseWindow(*argv):
+    """SDL_RaiseWindow"""
+
+def SDL_MapRGB(*argv):
+    """SDL_MapRGB"""
+
+def SDL_GetRGBA(*argv):
+    """SDL_GetRGBA"""
+
+SDL_INIT_AUDIO = int
+def SDL_SetSurfaceBlendMode(*argv):
+    """SDL_SetSurfaceBlendMode"""
+
+def SDL_SetWindowPosition(*argv):
+    """SDL_SetWindowPosition"""
+
+def SDL_AllocPalette(*argv):
+    """SDL_AllocPalette"""
+
+def SDL_RWFromFile(*argv):
+    """SDL_RWFromFile"""
+
+def SDL_FillRect(*argv):
+    """SDL_FillRect"""
+
+def SDL_GL_DeleteContext(*argv):
+    """SDL_GL_DeleteContext"""
+
+def SDL_SetPaletteColors(*argv):
+    """SDL_SetPaletteColors"""
+
+def SDL_GetDisplayMode(*argv):
+    """SDL_GetDisplayMode"""
+
+SDL_WINDOWPOS_CENTERED_MASK = int
+def SDL_SetSurfacePalette(*argv):
+    """SDL_SetSurfacePalette"""
+
+def SDL_CreateWindowFrom(*argv):
+    """SDL_CreateWindowFrom"""
+
+def SDL_GL_GetAttribute(*argv):
+    """SDL_GL_GetAttribute"""
+
+def SDL_DisableScreenSaver(*argv):
+    """SDL_DisableScreenSaver"""
+
+SDL_INIT_EVERYTHING = int
+def SDL_AllocFormat(*argv):
+    """SDL_AllocFormat"""
+
+def SDL_GL_SetAttribute(*argv):
+    """SDL_GL_SetAttribute"""
+
+def SDL_GetWindowDisplay(*argv):
+    """SDL_GetWindowDisplay"""
+
+def SDL_FillRects(*argv):
+    """SDL_FillRects"""
+
+SDL_INIT_TIMER = int
+def SDL_PixelFormatEnumToMasks(*argv):
+    """SDL_PixelFormatEnumToMasks"""
+
+SDL_BlitScaled = int
+def SDL_SetWindowSize(*argv):
+    """SDL_SetWindowSize"""
+
+def SDL_GL_UnloadLibrary(*argv):
+    """SDL_GL_UnloadLibrary"""
+
+def SDL_SetSurfaceColorMod(*argv):
+    """SDL_SetSurfaceColorMod"""
+
+def SDL_QuitSubSystem(*argv):
+    """SDL_QuitSubSystem"""
+
+SDL_TRUE = int
+SDL_FALSE = int
+def SDL_IsScreenSaverEnabled(*argv):
+    """SDL_IsScreenSaverEnabled"""
+
+def SDL_GetError(*argv):
+    """SDL_GetError"""
+
+def SDL_GetWindowData(*argv):
+    """SDL_GetWindowData"""
+
+def SDL_ReadBE32(*argv):
+    """SDL_ReadBE32"""
+
+def SDL_UpdateWindowSurfaceRects(*argv):
+    """SDL_UpdateWindowSurfaceRects"""
+
+def SDL_GetSurfaceAlphaMod(*argv):
+    """SDL_GetSurfaceAlphaMod"""
+
+def SDL_GL_CreateContext(*argv):
+    """SDL_GL_CreateContext"""
+
+def SDL_CreateRGBSurface(*argv):
+    """SDL_CreateRGBSurface"""
+
+def SDL_WriteLE16(*argv):
+    """SDL_WriteLE16"""
+
+def SDL_Error(*argv):
+    """SDL_Error"""
+
+def SDL_GetDisplayBounds(*argv):
+    """SDL_GetDisplayBounds"""
+
+def SDL_UpdateWindowSurface(*argv):
+    """SDL_UpdateWindowSurface"""
+
+def SDL_EnclosePoints(*argv):
+    """SDL_EnclosePoints"""
+
+SDL_RLEACCEL = int
+SDL_GL_CONTEXT_RESET_ISOLATION_FLAG = int
+SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG = int
+SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = int
+SDL_GL_CONTEXT_DEBUG_FLAG = int
+def SDL_ConvertPixels(*argv):
+    """SDL_ConvertPixels"""
+
+def SDL_ShowWindow(*argv):
+    """SDL_ShowWindow"""
+
+def SDL_GL_LoadLibrary(*argv):
+    """SDL_GL_LoadLibrary"""
+
+def SDL_Init(*argv):
+    """SDL_Init"""
+
+def SDL_FreePalette(*argv):
+    """SDL_FreePalette"""
+
+def SDL_UpperBlit(*argv):
+    """SDL_UpperBlit"""
+
+SDL_DONTFREE = int
+def SDL_VideoInit(*argv):
+    """SDL_VideoInit"""
+
+def SDL_MapRGBA(*argv):
+    """SDL_MapRGBA"""
+
+def SDL_MasksToPixelFormatEnum(*argv):
+    """SDL_MasksToPixelFormatEnum"""
+
+def SDL_GetWindowPixelFormat(*argv):
+    """SDL_GetWindowPixelFormat"""
+
+def SDL_ReadLE32(*argv):
+    """SDL_ReadLE32"""
+
+def SDL_EnableScreenSaver(*argv):
+    """SDL_EnableScreenSaver"""
+
+SDL_INIT_JOYSTICK = int
+def SDL_GetCurrentDisplayMode(*argv):
+    """SDL_GetCurrentDisplayMode"""
+
+def SDL_GetClipRect(*argv):
+    """SDL_GetClipRect"""
+
+def SDL_SetError(*argv):
+    """SDL_SetError"""
+
+def SDL_IntersectRect(*argv):
+    """SDL_IntersectRect"""
+
+def SDL_GetWindowFlags(*argv):
+    """SDL_GetWindowFlags"""
+
+def SDL_WriteLE64(*argv):
+    """SDL_WriteLE64"""
+
+def SDL_SetWindowFullscreen(*argv):
+    """SDL_SetWindowFullscreen"""
+
+def SDL_ConvertSurfaceFormat(*argv):
+    """SDL_ConvertSurfaceFormat"""
+
+def SDL_GetSurfaceBlendMode(*argv):
+    """SDL_GetSurfaceBlendMode"""
+
+def SDL_FreeFormat(*argv):
+    """SDL_FreeFormat"""
+
+SDL_WINDOWPOS_UNDEFINED = int
+def SDL_InitSubSystem(*argv):
+    """SDL_InitSubSystem"""
+
+def SDL_SetWindowIcon(*argv):
+    """SDL_SetWindowIcon"""
+
+def SDL_SetClipRect(*argv):
+    """SDL_SetClipRect"""
+
+def SDL_RestoreWindow(*argv):
+    """SDL_RestoreWindow"""
+
+SDL_PREALLOC = int
+def SDL_RWFromConstMem(*argv):
+    """SDL_RWFromConstMem"""
+
+def SDL_SetWindowGammaRamp(*argv):
+    """SDL_SetWindowGammaRamp"""
+
+def SDL_AllocRW(*argv):
+    """SDL_AllocRW"""
+
+SDL_INIT_HAPTIC = int
+def SDL_HideWindow(*argv):
+    """SDL_HideWindow"""
+
+def SDL_GetRGB(*argv):
+    """SDL_GetRGB"""
+
+def SDL_GetNumVideoDisplays(*argv):
+    """SDL_GetNumVideoDisplays"""
+
+SDL_INIT_NOPARACHUTE = int
+def SDL_LoadBMP_RW(*argv):
+    """SDL_LoadBMP_RW"""
+
+def SDL_FreeSurface(*argv):
+    """SDL_FreeSurface"""
+
+def SDL_GL_SetSwapInterval(*argv):
+    """SDL_GL_SetSwapInterval"""
+
+def SDL_GetWindowGammaRamp(*argv):
+    """SDL_GetWindowGammaRamp"""
+
+def SDL_GetWindowSize(*argv):
+    """SDL_GetWindowSize"""
+
+def SDL_Quit(*argv):
+    """SDL_Quit"""
+
+def SDL_GL_GetProcAddress(*argv):
+    """SDL_GL_GetProcAddress"""
+
+def SDL_IntersectRectAndLine(*argv):
+    """SDL_IntersectRectAndLine"""
+
+def SDL_RWFromMem(*argv):
+    """SDL_RWFromMem"""
+
+SDL_WINDOWPOS_CENTERED = int
+def SDL_GetWindowGrab(*argv):
+    """SDL_GetWindowGrab"""
+
+def SDL_GL_ExtensionSupported(*argv):
+    """SDL_GL_ExtensionSupported"""
+
+def SDL_GetCurrentVideoDriver(*argv):
+    """SDL_GetCurrentVideoDriver"""
+
+SDL_BLENDMODE_MOD = int
+SDL_BLENDMODE_ADD = int
+SDL_BLENDMODE_BLEND = int
+SDL_BLENDMODE_NONE = int
+def SDL_FreeRW(*argv):
+    """SDL_FreeRW"""
+
+def SDL_ReadLE64(*argv):
+    """SDL_ReadLE64"""
+
+def SDL_GetNumDisplayModes(*argv):
+    """SDL_GetNumDisplayModes"""
+
+def SDL_CreateWindow(*argv):
+    """SDL_CreateWindow"""
+
+def SDL_UnlockSurface(*argv):
+    """SDL_UnlockSurface"""
+
+def SDL_SetColorKey(*argv):
+    """SDL_SetColorKey"""
+
+def SDL_WriteBE16(*argv):
+    """SDL_WriteBE16"""
+
+def SDL_SetWindowBrightness(*argv):
+    """SDL_SetWindowBrightness"""
+
+def SDL_GL_SwapWindow(*argv):
+    """SDL_GL_SwapWindow"""
+
+def SDL_GetSurfaceColorMod(*argv):
+    """SDL_GetSurfaceColorMod"""
+
+def SDL_GetWindowTitle(*argv):
+    """SDL_GetWindowTitle"""
+
+SDL_WINDOWPOS_UNDEFINED_MASK = int
+def SDL_ReadBE64(*argv):
+    """SDL_ReadBE64"""
+
+def SDL_RWFromFP(*argv):
+    """SDL_RWFromFP"""
+
+SDL_GL_CONTEXT_PROFILE_ES = int
+SDL_GL_CONTEXT_PROFILE_COMPATIBILITY = int
+SDL_GL_CONTEXT_PROFILE_CORE = int
+def SDL_MinimizeWindow(*argv):
+    """SDL_MinimizeWindow"""
+
+def SDL_GetWindowSurface(*argv):
+    """SDL_GetWindowSurface"""
+
+def SDL_SetWindowTitle(*argv):
+    """SDL_SetWindowTitle"""
+
+def SDL_LockSurface(*argv):
+    """SDL_LockSurface"""
+
+def SDL_LowerBlitScaled(*argv):
+    """SDL_LowerBlitScaled"""
+
+def SDL_GetWindowFromID(*argv):
+    """SDL_GetWindowFromID"""
+
+def SDL_CreateRGBSurfaceFrom(*argv):
+    """SDL_CreateRGBSurfaceFrom"""
+
+def SDL_GL_GetSwapInterval(*argv):
+    """SDL_GL_GetSwapInterval"""
+
+def SDL_GetWindowID(*argv):
+    """SDL_GetWindowID"""
+
+def SDL_WriteLE32(*argv):
+    """SDL_WriteLE32"""
+
+SDL_INIT_VIDEO = int
+def SDL_GetColorKey(*argv):
+    """SDL_GetColorKey"""
+
+def SDL_WriteBE32(*argv):
+    """SDL_WriteBE32"""
+
+def SDL_DestroyWindow(*argv):
+    """SDL_DestroyWindow"""
+
+SDL_WINDOW_FOREIGN = int
+SDL_WINDOW_MOUSE_FOCUS = int
+SDL_WINDOW_INPUT_FOCUS = int
+SDL_WINDOW_INPUT_GRABBED = int
+SDL_WINDOW_MAXIMIZED = int
+SDL_WINDOW_MINIMIZED = int
+SDL_WINDOW_RESIZABLE = int
+SDL_WINDOW_BORDERLESS = int
+SDL_WINDOW_HIDDEN = int
+SDL_WINDOW_SHOWN = int
+SDL_WINDOW_OPENGL = int
+SDL_WINDOW_FULLSCREEN = int
+def SDL_SaveBMP_RW(*argv):
+    """SDL_SaveBMP_RW"""
+
+def SDL_GetVideoDriver(*argv):
+    """SDL_GetVideoDriver"""
+
+def SDL_GL_MakeCurrent(*argv):
+    """SDL_GL_MakeCurrent"""
+
+def SDL_GetWindowBrightness(*argv):
+    """SDL_GetWindowBrightness"""
+
+def SDL_VideoQuit(*argv):
+    """SDL_VideoQuit"""
+
+SDL_ALPHA_OPAQUE = int
+def SDL_GetWindowPosition(*argv):
+    """SDL_GetWindowPosition"""
+
+def SDL_SetWindowDisplayMode(*argv):
+    """SDL_SetWindowDisplayMode"""
+
+def SDL_SetWindowData(*argv):
+    """SDL_SetWindowData"""
+
+SDL_GL_SHARE_WITH_CURRENT_CONTEXT = int
+SDL_GL_CONTEXT_PROFILE_MASK = int
+SDL_GL_CONTEXT_FLAGS = int
+SDL_GL_CONTEXT_EGL = int
+SDL_GL_CONTEXT_MINOR_VERSION = int
+SDL_GL_CONTEXT_MAJOR_VERSION = int
+SDL_GL_RETAINED_BACKING = int
+SDL_GL_ACCELERATED_VISUAL = int
+SDL_GL_MULTISAMPLESAMPLES = int
+SDL_GL_MULTISAMPLEBUFFERS = int
+SDL_GL_STEREO = int
+SDL_GL_ACCUM_ALPHA_SIZE = int
+SDL_GL_ACCUM_BLUE_SIZE = int
+SDL_GL_ACCUM_GREEN_SIZE = int
+SDL_GL_ACCUM_RED_SIZE = int
+SDL_GL_STENCIL_SIZE = int
+SDL_GL_DEPTH_SIZE = int
+SDL_GL_DOUBLEBUFFER = int
+SDL_GL_BUFFER_SIZE = int
+SDL_GL_ALPHA_SIZE = int
+SDL_GL_BLUE_SIZE = int
+SDL_GL_GREEN_SIZE = int
+SDL_GL_RED_SIZE = int
+def SDL_ClearError(*argv):
+    """SDL_ClearError"""
+
+def SDL_ConvertSurface(*argv):
+    """SDL_ConvertSurface"""
+
+def SDL_GetDesktopDisplayMode(*argv):
+    """SDL_GetDesktopDisplayMode"""
+
+def SDL_MaximizeWindow(*argv):
+    """SDL_MaximizeWindow"""
+
+SDL_SWSURFACE = int
+def SDL_SoftStretch(*argv):
+    """SDL_SoftStretch"""
+
+def SDL_WriteBE64(*argv):
+    """SDL_WriteBE64"""
+
+def SDL_GetNumVideoDrivers(*argv):
+    """SDL_GetNumVideoDrivers"""
+
+def SDL_SetWindowGrab(*argv):
+    """SDL_SetWindowGrab"""
+
+SDL_WINDOWEVENT_CLOSE = int
+SDL_WINDOWEVENT_FOCUS_LOST = int
+SDL_WINDOWEVENT_FOCUS_GAINED = int
+SDL_WINDOWEVENT_LEAVE = int
+SDL_WINDOWEVENT_ENTER = int
+SDL_WINDOWEVENT_RESTORED = int
+SDL_WINDOWEVENT_MAXIMIZED = int
+SDL_WINDOWEVENT_MINIMIZED = int
+SDL_WINDOWEVENT_SIZE_CHANGED = int
+SDL_WINDOWEVENT_RESIZED = int
+SDL_WINDOWEVENT_MOVED = int
+SDL_WINDOWEVENT_EXPOSED = int
+SDL_WINDOWEVENT_HIDDEN = int
+SDL_WINDOWEVENT_SHOWN = int
+SDL_WINDOWEVENT_NONE = int
+def SDL_UpperBlitScaled(*argv):
+    """SDL_UpperBlitScaled"""
+
+def SDL_GetWindowDisplayMode(*argv):
+    """SDL_GetWindowDisplayMode"""
+
+SDL_ALPHA_TRANSPARENT = int
+def SDL_WasInit(*argv):
+    """SDL_WasInit"""
+
+def SDL_SetPixelFormatPalette(*argv):
+    """SDL_SetPixelFormatPalette"""
+
+def SDL_ReadBE16(*argv):
+    """SDL_ReadBE16"""
+
+def SDL_SetSurfaceRLE(*argv):
+    """SDL_SetSurfaceRLE"""
+
+def SDL_CalculateGammaRamp(*argv):
+    """SDL_CalculateGammaRamp"""
+
+SDL_LASTERROR = int
+SDL_UNSUPPORTED = int
+SDL_EFSEEK = int
+SDL_EFWRITE = int
+SDL_EFREAD = int
+SDL_ENOMEM = int
+def SDL_HasIntersection(*argv):
+    """SDL_HasIntersection"""
+
+SDL_BlitSurface = int
+from __future__ import (print_function, division, absolute_import)
+
+from ._sdl import *
+
+################################################################################
+
+def SDL_Init(*args):
+    result = _SDL_Init(*args)
+    SDL_ClearError()
+    return result
+
+def SDL_GetError():
+    return _ffi.string(_SDL_GetError()) 
+
+################################################################################
+
+# this file is auto-generated by sdl.builder. do not edit.
+from cffi import FFI
+
+__all__ = [
+'SDLError',
+'_ffi',
+"SDL_ReadLE16",
+"SDL_LowerBlit",
+"SDL_GetPixelFormatName",
+"SDL_UnionRect",
+"SDL_GetClosestDisplayMode",
+"SDL_SetSurfaceAlphaMod",
+"SDL_RaiseWindow",
+"SDL_MapRGB",
+"SDL_GetRGBA",
+"SDL_INIT_AUDIO",
+"SDL_SetSurfaceBlendMode",
+"SDL_SetWindowPosition",
+"SDL_AllocPalette",
+"SDL_RWFromFile",
+"SDL_FillRect",
+"SDL_GL_DeleteContext",
+"SDL_SetPaletteColors",
+"SDL_GetDisplayMode",
+"SDL_WINDOWPOS_CENTERED_MASK",
+"SDL_SetSurfacePalette",
+"SDL_CreateWindowFrom",
+"SDL_GL_GetAttribute",
+"SDL_DisableScreenSaver",
+"SDL_INIT_EVERYTHING",
+"SDL_AllocFormat",
+"SDL_GL_SetAttribute",
+"SDL_GetWindowDisplay",
+"SDL_FillRects",
+"SDL_INIT_TIMER",
+"SDL_PixelFormatEnumToMasks",
+"SDL_BlitScaled",
+"SDL_SetWindowSize",
+"SDL_GL_UnloadLibrary",
+"SDL_SetSurfaceColorMod",
+"SDL_QuitSubSystem",
+"SDL_TRUE",
+"SDL_FALSE",
+"SDL_IsScreenSaverEnabled",
+"_SDL_GetError",
+"SDL_GetWindowData",
+"SDL_ReadBE32",
+"SDL_UpdateWindowSurfaceRects",
+"SDL_GetSurfaceAlphaMod",
+"SDL_GL_CreateContext",
+"SDL_CreateRGBSurface",
+"SDL_WriteLE16",
+"SDL_Error",
+"SDL_GetDisplayBounds",
+"SDL_UpdateWindowSurface",
+"SDL_EnclosePoints",
+"SDL_RLEACCEL",
+"SDL_GL_CONTEXT_RESET_ISOLATION_FLAG",
+"SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG",
+"SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG",
+"SDL_GL_CONTEXT_DEBUG_FLAG",
+"SDL_ConvertPixels",
+"SDL_ShowWindow",
+"SDL_GL_LoadLibrary",
+"_SDL_Init",
+"SDL_FreePalette",
+"SDL_UpperBlit",
+"SDL_DONTFREE",
+"SDL_VideoInit",
+"SDL_MapRGBA",
+"SDL_MasksToPixelFormatEnum",
+"SDL_GetWindowPixelFormat",
+"SDL_ReadLE32",
+"SDL_EnableScreenSaver",
+"SDL_INIT_JOYSTICK",
+"SDL_GetCurrentDisplayMode",
+"SDL_GetClipRect",
+"SDL_SetError",
+"SDL_IntersectRect",
+"SDL_GetWindowFlags",
+"SDL_WriteLE64",
+"SDL_SetWindowFullscreen",
+"SDL_ConvertSurfaceFormat",
+"SDL_GetSurfaceBlendMode",
+"SDL_FreeFormat",
+"SDL_WINDOWPOS_UNDEFINED",
+"SDL_InitSubSystem",
+"SDL_SetWindowIcon",
+"SDL_SetClipRect",
+"SDL_RestoreWindow",
+"SDL_PREALLOC",
+"SDL_RWFromConstMem",
+"SDL_SetWindowGammaRamp",
+"SDL_AllocRW",
+"SDL_INIT_HAPTIC",
+"SDL_HideWindow",
+"SDL_GetRGB",
+"SDL_GetNumVideoDisplays",
+"SDL_INIT_NOPARACHUTE",
+"SDL_LoadBMP_RW",
+"SDL_FreeSurface",
+"SDL_GL_SetSwapInterval",
+"SDL_GetWindowGammaRamp",
+"SDL_GetWindowSize",
+"SDL_Quit",
+"SDL_GL_GetProcAddress",
+"SDL_IntersectRectAndLine",
+"SDL_RWFromMem",
+"SDL_WINDOWPOS_CENTERED",
+"SDL_GetWindowGrab",
+"SDL_GL_ExtensionSupported",
+"SDL_GetCurrentVideoDriver",
+"SDL_BLENDMODE_MOD",
+"SDL_BLENDMODE_ADD",
+"SDL_BLENDMODE_BLEND",
+"SDL_BLENDMODE_NONE",
+"SDL_FreeRW",
+"SDL_ReadLE64",
+"SDL_GetNumDisplayModes",
+"SDL_CreateWindow",
+"SDL_UnlockSurface",
+"SDL_SetColorKey",
+"SDL_WriteBE16",
+"SDL_SetWindowBrightness",
+"SDL_GL_SwapWindow",
+"SDL_GetSurfaceColorMod",
+"SDL_GetWindowTitle",
+"SDL_WINDOWPOS_UNDEFINED_MASK",
+"SDL_ReadBE64",
+"SDL_RWFromFP",
+"SDL_GL_CONTEXT_PROFILE_ES",
+"SDL_GL_CONTEXT_PROFILE_COMPATIBILITY",
+"SDL_GL_CONTEXT_PROFILE_CORE",
+"SDL_MinimizeWindow",
+"SDL_GetWindowSurface",
+"SDL_SetWindowTitle",
+"SDL_LockSurface",
+"SDL_LowerBlitScaled",
+"SDL_GetWindowFromID",
+"SDL_CreateRGBSurfaceFrom",
+"SDL_GL_GetSwapInterval",
+"SDL_GetWindowID",
+"SDL_WriteLE32",
+"SDL_INIT_VIDEO",
+"SDL_GetColorKey",
+"SDL_WriteBE32",
+"SDL_DestroyWindow",
+"SDL_WINDOW_FOREIGN",
+"SDL_WINDOW_MOUSE_FOCUS",
+"SDL_WINDOW_INPUT_FOCUS",
+"SDL_WINDOW_INPUT_GRABBED",
+"SDL_WINDOW_MAXIMIZED",
+"SDL_WINDOW_MINIMIZED",
+"SDL_WINDOW_RESIZABLE",
+"SDL_WINDOW_BORDERLESS",
+"SDL_WINDOW_HIDDEN",
+"SDL_WINDOW_SHOWN",
+"SDL_WINDOW_OPENGL",
+"SDL_WINDOW_FULLSCREEN",
+"SDL_SaveBMP_RW",
+"SDL_GetVideoDriver",
+"SDL_GL_MakeCurrent",
+"SDL_GetWindowBrightness",
+"SDL_VideoQuit",
+"SDL_ALPHA_OPAQUE",
+"SDL_GetWindowPosition",
+"SDL_SetWindowDisplayMode",
+"SDL_SetWindowData",
+"SDL_GL_SHARE_WITH_CURRENT_CONTEXT",
+"SDL_GL_CONTEXT_PROFILE_MASK",
+"SDL_GL_CONTEXT_FLAGS",
+"SDL_GL_CONTEXT_EGL",
+"SDL_GL_CONTEXT_MINOR_VERSION",
+"SDL_GL_CONTEXT_MAJOR_VERSION",
+"SDL_GL_RETAINED_BACKING",
+"SDL_GL_ACCELERATED_VISUAL",
+"SDL_GL_MULTISAMPLESAMPLES",
+"SDL_GL_MULTISAMPLEBUFFERS",
+"SDL_GL_STEREO",
+"SDL_GL_ACCUM_ALPHA_SIZE",
+"SDL_GL_ACCUM_BLUE_SIZE",
+"SDL_GL_ACCUM_GREEN_SIZE",
+"SDL_GL_ACCUM_RED_SIZE",
+"SDL_GL_STENCIL_SIZE",
+"SDL_GL_DEPTH_SIZE",
+"SDL_GL_DOUBLEBUFFER",
+"SDL_GL_BUFFER_SIZE",
+"SDL_GL_ALPHA_SIZE",
+"SDL_GL_BLUE_SIZE",
+"SDL_GL_GREEN_SIZE",
+"SDL_GL_RED_SIZE",
+"SDL_ClearError",
+"SDL_ConvertSurface",
+"SDL_GetDesktopDisplayMode",
+"SDL_MaximizeWindow",
+"SDL_SWSURFACE",
+"SDL_SoftStretch",
+"SDL_WriteBE64",
+"SDL_GetNumVideoDrivers",
+"SDL_SetWindowGrab",
+"SDL_WINDOWEVENT_CLOSE",
+"SDL_WINDOWEVENT_FOCUS_LOST",
+"SDL_WINDOWEVENT_FOCUS_GAINED",
+"SDL_WINDOWEVENT_LEAVE",
+"SDL_WINDOWEVENT_ENTER",
+"SDL_WINDOWEVENT_RESTORED",
+"SDL_WINDOWEVENT_MAXIMIZED",
+"SDL_WINDOWEVENT_MINIMIZED",
+"SDL_WINDOWEVENT_SIZE_CHANGED",
+"SDL_WINDOWEVENT_RESIZED",
+"SDL_WINDOWEVENT_MOVED",
+"SDL_WINDOWEVENT_EXPOSED",
+"SDL_WINDOWEVENT_HIDDEN",
+"SDL_WINDOWEVENT_SHOWN",
+"SDL_WINDOWEVENT_NONE",
+"SDL_UpperBlitScaled",
+"SDL_GetWindowDisplayMode",
+"SDL_ALPHA_TRANSPARENT",
+"SDL_WasInit",
+"SDL_SetPixelFormatPalette",
+"SDL_ReadBE16",
+"SDL_SetSurfaceRLE",
+"SDL_CalculateGammaRamp",
+"SDL_LASTERROR",
+"SDL_UNSUPPORTED",
+"SDL_EFSEEK",
+"SDL_EFWRITE",
+"SDL_EFREAD",
+"SDL_ENOMEM",
+"SDL_HasIntersection",
+"SDL_BlitSurface",
+
+]
+
+class SDLError(Exception):
+    pass
+
+_ffi = FFI()
+_ffi.cdef("""
+/*
+Simple DirectMedia Layer
+Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
+
+This software is provided 'as-is', without any express or implied
+warranty.  In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software
+in a product, an acknowledgment in the product documentation would be
+appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+*  \file SDL_stdinc.h
+*
+*  This is a general header that includes C language support.
+*/
+
+
+
+/**
+*  The number of elements in an array.
+*/
+
+/**
+*  \name Cast operators
+*
+*  Use proper C++ casts when compiled as C++ to be compatible with the option
+*  -Wold-style-cast of GCC (and -Werror=old-style-cast in GCC 4.2 and above).
+*/
+
+
+/**
+*  \name Basic data types
+*/
+/*@{*/
+
+typedef enum
+{
+SDL_FALSE = 0,
+SDL_TRUE = 1
+} SDL_bool;
+
+/**
+* \brief A signed 8-bit integer type.
+*/
+typedef int8_t Sint8;
+/**
+* \brief An unsigned 8-bit integer type.
+*/
+typedef uint8_t Uint8;
+/**
+* \brief A signed 16-bit integer type.
+*/
+typedef int16_t Sint16;
+/**
+* \brief An unsigned 16-bit integer type.
+*/
+typedef uint16_t Uint16;
+/**
+* \brief A signed 32-bit integer type.
+*/
+typedef int32_t Sint32;
+/**
+* \brief An unsigned 32-bit integer type.
+*/
+typedef uint32_t Uint32;
+
+/**
+* \brief A signed 64-bit integer type.
+*/
+typedef int64_t Sint64;
+/**
+* \brief An unsigned 64-bit integer type.
+*/
+typedef uint64_t Uint64;
+
+/*@}*//*Basic data types*/
+
+
+
+/* vi: set ts=4 sw=4 expandtab: */
+
+/*
+Simple DirectMedia Layer
+Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
+
+This software is provided 'as-is', without any express or implied
+warranty.  In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software
+in a product, an acknowledgment in the product documentation would be
+appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+*  \file SDL_blendmode.h
+*
+*  Header file declaring the SDL_BlendMode enumeration
+*/
+
+
+/**
+*  \brief The blend mode used in SDL_RenderCopy() and drawing operations.
+*/
+typedef enum SDL_BlendMode
+{
+SDL_BLENDMODE_NONE = 0,     /**< No blending */
+SDL_BLENDMODE_BLEND = 1,    /**< dst = (src * A) + (dst * (1-A)) */
+SDL_BLENDMODE_ADD = 2,      /**< dst = (src * A) + dst */
+SDL_BLENDMODE_MOD = 4       /**< dst = src * dst */
+} SDL_BlendMode;
+
+
+#define SDL_ALPHA_TRANSPARENT ...
+#define SDL_ALPHA_OPAQUE ...
+/*
+Simple DirectMedia Layer
+Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
+
+This software is provided 'as-is', without any express or implied
+warranty.  In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software
+in a product, an acknowledgment in the product documentation would be
+appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+*  \file SDL_pixels.h
+*
+*  Header for the enumerated pixel format definitions.
+*/
+
+/**
+*  \name Transparency definitions
+*
+*  These define alpha as the opacity of a surface.
+*/
+/*@{*/
+/*@}*/
+
+/** Pixel type. */
+enum
+{
+SDL_PIXELTYPE_UNKNOWN,
+SDL_PIXELTYPE_INDEX1,
+SDL_PIXELTYPE_INDEX4,
+SDL_PIXELTYPE_INDEX8,
+SDL_PIXELTYPE_PACKED8,
+SDL_PIXELTYPE_PACKED16,
+SDL_PIXELTYPE_PACKED32,
+SDL_PIXELTYPE_ARRAYU8,
+SDL_PIXELTYPE_ARRAYU16,
+SDL_PIXELTYPE_ARRAYU32,
+SDL_PIXELTYPE_ARRAYF16,
+SDL_PIXELTYPE_ARRAYF32
+};
+
+/** Bitmap pixel order, high bit -> low bit. */
+enum
+{
+SDL_BITMAPORDER_NONE,
+SDL_BITMAPORDER_4321,
+SDL_BITMAPORDER_1234
+};
+
+/** Packed component order, high bit -> low bit. */
+enum
+{
+SDL_PACKEDORDER_NONE,
+SDL_PACKEDORDER_XRGB,
+SDL_PACKEDORDER_RGBX,
+SDL_PACKEDORDER_ARGB,
+SDL_PACKEDORDER_RGBA,
+SDL_PACKEDORDER_XBGR,
+SDL_PACKEDORDER_BGRX,
+SDL_PACKEDORDER_ABGR,
+SDL_PACKEDORDER_BGRA
+};
+
+/** Array component order, low byte -> high byte. */
+enum
+{
+SDL_ARRAYORDER_NONE,
+SDL_ARRAYORDER_RGB,
+SDL_ARRAYORDER_RGBA,
+SDL_ARRAYORDER_ARGB,
+SDL_ARRAYORDER_BGR,
+SDL_ARRAYORDER_BGRA,
+SDL_ARRAYORDER_ABGR
+};
+
+/** Packed component layout. */
+enum
+{
+SDL_PACKEDLAYOUT_NONE,
+SDL_PACKEDLAYOUT_332,
+SDL_PACKEDLAYOUT_4444,
+SDL_PACKEDLAYOUT_1555,
+SDL_PACKEDLAYOUT_5551,
+SDL_PACKEDLAYOUT_565,
+SDL_PACKEDLAYOUT_8888,
+SDL_PACKEDLAYOUT_2101010,
+SDL_PACKEDLAYOUT_1010102
+};
+
+
+
+
+
+
+
+/* Note: If you modify this list, update SDL_GetPixelFormatName() */
+
+typedef struct SDL_Color
+{
+Uint8 r;
+Uint8 g;
+Uint8 b;
+Uint8 unused;
+} SDL_Color;
+//#define SDL_Colour SDL_Color
+
+typedef struct SDL_Palette
+{
+int ncolors;
+SDL_Color *colors;
+Uint32 version;
+int refcount;
+} SDL_Palette;
+
+/**
+*  \note Everything in the pixel format structure is read-only.
+*/
+typedef struct SDL_PixelFormat
+{
+Uint32 format;
+SDL_Palette *palette;
+Uint8 BitsPerPixel;
+Uint8 BytesPerPixel;
+Uint8 padding[2];
+Uint32 Rmask;
+Uint32 Gmask;
+Uint32 Bmask;
+Uint32 Amask;
+Uint8 Rloss;
+Uint8 Gloss;
+Uint8 Bloss;
+Uint8 Aloss;
+Uint8 Rshift;
+Uint8 Gshift;
+Uint8 Bshift;
+Uint8 Ashift;
+int refcount;
+struct SDL_PixelFormat *next;
+} SDL_PixelFormat;
+
+/**
+* \brief Get the human readable name of a pixel format
+*/
+extern  const char*  SDL_GetPixelFormatName(Uint32 format);
+
+/**
+*  \brief Convert one of the enumerated pixel formats to a bpp and RGBA masks.
+*
+*  \return SDL_TRUE, or SDL_FALSE if the conversion wasn't possible.
+*
+*  \sa SDL_MasksToPixelFormatEnum()
+*/
+extern  SDL_bool  SDL_PixelFormatEnumToMasks(Uint32 format,
+int *bpp,
+Uint32 * Rmask,
+Uint32 * Gmask,
+Uint32 * Bmask,
+Uint32 * Amask);
+
+/**
+*  \brief Convert a bpp and RGBA masks to an enumerated pixel format.
+*
+*  \return The pixel format, or ::SDL_PIXELFORMAT_UNKNOWN if the conversion
+*          wasn't possible.
+*
+*  \sa SDL_PixelFormatEnumToMasks()
+*/
+extern  Uint32  SDL_MasksToPixelFormatEnum(int bpp,
+Uint32 Rmask,
+Uint32 Gmask,
+Uint32 Bmask,
+Uint32 Amask);
+
+/**
+*  \brief Create an SDL_PixelFormat structure from a pixel format enum.
+*/
+extern  SDL_PixelFormat *  SDL_AllocFormat(Uint32 pixel_format);
+
+/**
+*  \brief Free an SDL_PixelFormat structure.
+*/
+extern  void  SDL_FreeFormat(SDL_PixelFormat *format);
+
+/**
+*  \brief Create a palette structure with the specified number of color
+*         entries.
+*
+*  \return A new palette, or NULL if there wasn't enough memory.
+*
+*  \note The palette entries are initialized to white.
+*
+*  \sa SDL_FreePalette()
+*/
+extern  SDL_Palette * SDL_AllocPalette(int ncolors);
+
+/**
+*  \brief Set the palette for a pixel format structure.
+*/
+extern  int  SDL_SetPixelFormatPalette(SDL_PixelFormat * format,
+SDL_Palette *palette);
+
+/**
+*  \brief Set a range of colors in a palette.
+*
+*  \param palette    The palette to modify.
+*  \param colors     An array of colors to copy into the palette.
+*  \param firstcolor The index of the first palette entry to modify.
+*  \param ncolors    The number of entries to modify.
+*
+*  \return 0 on success, or -1 if not all of the colors could be set.
+*/
+extern  int  SDL_SetPaletteColors(SDL_Palette * palette,
+const SDL_Color * colors,
+int firstcolor, int ncolors);
+
+/**
+*  \brief Free a palette created with SDL_AllocPalette().
+*
+*  \sa SDL_AllocPalette()
+*/
+extern  void  SDL_FreePalette(SDL_Palette * palette);
+
+/**
+*  \brief Maps an RGB triple to an opaque pixel value for a given pixel format.
+*
+*  \sa SDL_MapRGBA
+*/
+extern  Uint32  SDL_MapRGB(const SDL_PixelFormat * format,
+Uint8 r, Uint8 g, Uint8 b);
+
+/**
+*  \brief Maps an RGBA quadruple to a pixel value for a given pixel format.
+*
+*  \sa SDL_MapRGB
+*/
+extern  Uint32  SDL_MapRGBA(const SDL_PixelFormat * format,
+Uint8 r, Uint8 g, Uint8 b,
+Uint8 a);
+
+/**
+*  \brief Get the RGB components from a pixel of the specified format.
+*
+*  \sa SDL_GetRGBA
+*/
+extern  void  SDL_GetRGB(Uint32 pixel,
+const SDL_PixelFormat * format,
+Uint8 * r, Uint8 * g, Uint8 * b);
+
+/**
+*  \brief Get the RGBA components from a pixel of the specified format.
+*
+*  \sa SDL_GetRGB
+*/
+extern  void  SDL_GetRGBA(Uint32 pixel,
+const SDL_PixelFormat * format,
+Uint8 * r, Uint8 * g, Uint8 * b,
+Uint8 * a);
+
+/**
+*  \brief Calculate a 256 entry gamma ramp for a gamma value.
+*/
+extern  void  SDL_CalculateGammaRamp(float gamma, Uint16 * ramp);
+
+
+
+/*
+Simple DirectMedia Layer
+Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
+
+This software is provided 'as-is', without any express or implied
+warranty.  In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software
+in a product, an acknowledgment in the product documentation would be
+appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+*  \file SDL_rect.h
+*
+*  Header file for SDL_rect definition and management functions.
+*/
+
+
+
+/**
+*  \brief  The structure that defines a point
+*
+*  \sa SDL_EnclosePoints
+*/
+typedef struct
+{
+int x;
+int y;
+} SDL_Point;
+
+/**
+*  \brief A rectangle, with the origin at the upper left.
+*
+*  \sa SDL_RectEmpty
+*  \sa SDL_RectEquals
+*  \sa SDL_HasIntersection
+*  \sa SDL_IntersectRect
+*  \sa SDL_UnionRect
+*  \sa SDL_EnclosePoints
+*/
+typedef struct SDL_Rect
+{
+int x, y;
+int w, h;
+} SDL_Rect;
+
+
+/**
+*  \brief Determine whether two rectangles intersect.
+*
+*  \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
+*/
+extern  SDL_bool  SDL_HasIntersection(const SDL_Rect * A,
+const SDL_Rect * B);
+
+/**
+*  \brief Calculate the intersection of two rectangles.
+*
+*  \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
+*/
+extern  SDL_bool  SDL_IntersectRect(const SDL_Rect * A,
+const SDL_Rect * B,
+SDL_Rect * result);
+
+/**
+*  \brief Calculate the union of two rectangles.
+*/
+extern  void  SDL_UnionRect(const SDL_Rect * A,
+const SDL_Rect * B,
+SDL_Rect * result);
+
+/**
+*  \brief Calculate a minimal rectangle enclosing a set of points
+*
+*  \return SDL_TRUE if any points were within the clipping rect
+*/
+extern  SDL_bool  SDL_EnclosePoints(const SDL_Point * points,
+int count,
+const SDL_Rect * clip,
+SDL_Rect * result);
+
+/**
+*  \brief Calculate the intersection of a rectangle and line segment.
+*
+*  \return SDL_TRUE if there is an intersection, SDL_FALSE otherwise.
+*/
+extern  SDL_bool  SDL_IntersectRectAndLine(const SDL_Rect *
+rect, int *X1,
+int *Y1, int *X2,
+int *Y2);
+
+
+#define RW_SEEK_CUR ...
+#define RW_SEEK_END ...
+#define RW_SEEK_SET ...
+/*
+Simple DirectMedia Layer
+Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
+
+This software is provided 'as-is', without any express or implied
+warranty.  In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software
+in a product, an acknowledgment in the product documentation would be
+appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+*  \file SDL_rwops.h
+*
+*  This file provides a general interface for SDL to read and write
+*  data streams.  It can easily be extended to files, memory, etc.
+*/
+
+typedef struct file_p FILE;
+
+/**
+* This is the read/write operation structure -- very basic.
+*/
+typedef struct SDL_RWops
+{
+long ( * seek) (struct SDL_RWops * context, long offset,
+int whence);
+size_t( * read) (struct SDL_RWops * context, void *ptr,
+size_t size, size_t maxnum);
+size_t( * write) (struct SDL_RWops * context, const void *ptr,
+size_t size, size_t num);
+int ( * close) (struct SDL_RWops * context);
+
+Uint32 type;
+
+union
+{
+/*
+struct
+{
+SDL_bool append;
+void *h;
+struct
+{
+void *data;
+size_t size;
+size_t left;
+} buffer;
+} windowsio;
+*/
+
+struct
+{
+SDL_bool autoclose;
+FILE *fp;
+} stdio;
+
+struct
+{
+Uint8 *base;
+Uint8 *here;
+Uint8 *stop;
+} mem;
+struct
+{
+void *data1;
+} unknown;
+} hidden;
+
+} SDL_RWops;
+
+
+/**
+*  \name RWFrom functions
+*
+*  Functions to create SDL_RWops structures from various data streams.
+*/
+/*@{*/
+
+extern  SDL_RWops * SDL_RWFromFile(const char *file,
+const char *mode);
+
+extern  SDL_RWops * SDL_RWFromFP(FILE * fp,
+SDL_bool autoclose);
+
+extern  SDL_RWops * SDL_RWFromMem(void *mem, int size);
+extern  SDL_RWops * SDL_RWFromConstMem(const void *mem,
+int size);
+
+/*@}*//*RWFrom functions*/
+
+
+extern  SDL_RWops * SDL_AllocRW(void);
+extern  void  SDL_FreeRW(SDL_RWops * area);
+
+
+/**
+*  \name Read/write macros
+*
+*  Macros to easily read and write from an SDL_RWops structure.
+*/
+/*@{*/
+/*@}*//*Read/write macros*/
+
+
+/**
+*  \name Read endian functions
+*
+*  Read an item of the specified endianness and return in native format.
+*/
+/*@{*/
+extern  Uint16  SDL_ReadLE16(SDL_RWops * src);
+extern  Uint16  SDL_ReadBE16(SDL_RWops * src);
+extern  Uint32  SDL_ReadLE32(SDL_RWops * src);
+extern  Uint32  SDL_ReadBE32(SDL_RWops * src);
+extern  Uint64  SDL_ReadLE64(SDL_RWops * src);
+extern  Uint64  SDL_ReadBE64(SDL_RWops * src);
+/*@}*//*Read endian functions*/
+
+/**
+*  \name Write endian functions
+*
+*  Write an item of native format to the specified endianness.
+*/
+/*@{*/
+extern  size_t  SDL_WriteLE16(SDL_RWops * dst, Uint16 value);
+extern  size_t  SDL_WriteBE16(SDL_RWops * dst, Uint16 value);
+extern  size_t  SDL_WriteLE32(SDL_RWops * dst, Uint32 value);
+extern  size_t  SDL_WriteBE32(SDL_RWops * dst, Uint32 value);
+extern  size_t  SDL_WriteLE64(SDL_RWops * dst, Uint64 value);
+extern  size_t  SDL_WriteBE64(SDL_RWops * dst, Uint64 value);
+/*@}*//*Write endian functions*/
+
+
+#define SDL_BlitSurface ...
+#define SDL_PREALLOC ...
+#define SDL_DONTFREE ...
+#define SDL_SWSURFACE ...
+#define SDL_RLEACCEL ...
+#define SDL_BlitScaled ...
+/*
+Simple DirectMedia Layer
+Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
+
+This software is provided 'as-is', without any express or implied
+warranty.  In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software
+in a product, an acknowledgment in the product documentation would be
+appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+*  \file SDL_surface.h
+*
+*  Header file for ::SDL_surface definition and management functions.
+*/
+
+
+/**
+*  \name Surface flags
+*
+*  These are the currently supported flags for the ::SDL_surface.
+*
+*  \internal
+*  Used internally (read-only).
+*/
+/*@{*/
+/*@}*//*Surface flags*/
+
+/**
+*  Evaluates to true if the surface needs to be locked before access.
+*/
+
+/**
+* \brief A collection of pixels used in software blitting.
+*
+* \note  This structure should be treated as read-only, except for \c pixels,
+*        which, if not NULL, contains the raw pixel data for the surface.
+*/
+typedef struct SDL_Surface
+{
+Uint32 flags;               /**< Read-only */
+SDL_PixelFormat *format;    /**< Read-only */
+int w, h;                   /**< Read-only */
+int pitch;                  /**< Read-only */
+void *pixels;               /**< Read-write */
+
+/** Application data associated with the surface */
+void *userdata;             /**< Read-write */
+
+/** information needed for surfaces requiring locks */
+int locked;                 /**< Read-only */
+void *lock_data;            /**< Read-only */
+
+/** clipping information */
+SDL_Rect clip_rect;         /**< Read-only */
+
+/** info for fast blit mapping to other surfaces */
+struct SDL_BlitMap *map;    /**< Private */
+
+/** Reference count -- used when freeing surface */
+int refcount;               /**< Read-mostly */
+} SDL_Surface;
+
+/**
+* \brief The type of function used for surface blitting functions.
+*/
+typedef int (*SDL_blit) (struct SDL_Surface * src, SDL_Rect * srcrect,
+struct SDL_Surface * dst, SDL_Rect * dstrect);
+
+/**
+*  Allocate and free an RGB surface.
+*
+*  If the depth is 4 or 8 bits, an empty palette is allocated for the surface.
+*  If the depth is greater than 8 bits, the pixel format is set using the
+*  flags '[RGB]mask'.
+*
+*  If the function runs out of memory, it will return NULL.
+*
+*  \param flags The \c flags are obsolete and should be set to 0.
+*/
+extern  SDL_Surface * SDL_CreateRGBSurface
+(Uint32 flags, int width, int height, int depth,
+Uint32 Rmask, Uint32 Gmask, Uint32 Bmask, Uint32 Amask);
+extern  SDL_Surface * SDL_CreateRGBSurfaceFrom(void *pixels,
+int width,
+int height,
+int depth,
+int pitch,
+Uint32 Rmask,
+Uint32 Gmask,
+Uint32 Bmask,
+Uint32 Amask);
+extern  void  SDL_FreeSurface(SDL_Surface * surface);
+
+/**
+*  \brief Set the palette used by a surface.
+*
+*  \return 0, or -1 if the surface format doesn't use a palette.
+*
+*  \note A single palette can be shared with many surfaces.
+*/
+extern  int  SDL_SetSurfacePalette(SDL_Surface * surface,
+SDL_Palette * palette);
+
+/**
+*  \brief Sets up a surface for directly accessing the pixels.
+*
+*  Between calls to SDL_LockSurface() / SDL_UnlockSurface(), you can write
+*  to and read from \c surface->pixels, using the pixel format stored in
+*  \c surface->format.  Once you are done accessing the surface, you should
+*  use SDL_UnlockSurface() to release it.
+*
+*  Not all surfaces require locking.  If SDL_MUSTLOCK(surface) evaluates
+*  to 0, then you can read and write to the surface at any time, and the
+*  pixel format of the surface will not change.
+*
+*  No operating system or library calls should be made between lock/unlock
+*  pairs, as critical system locks may be held during this time.
+*
+*  SDL_LockSurface() returns 0, or -1 if the surface couldn't be locked.
+*
+*  \sa SDL_UnlockSurface()
+*/
+extern  int  SDL_LockSurface(SDL_Surface * surface);
+/** \sa SDL_LockSurface() */
+extern  void  SDL_UnlockSurface(SDL_Surface * surface);
+
+/**
+*  Load a surface from a seekable SDL data stream (memory or file).
+*
+*  If \c freesrc is non-zero, the stream will be closed after being read.
+*
+*  The new surface should be freed with SDL_FreeSurface().
+*
+*  \return the new surface, or NULL if there was an error.
+*/
+extern  SDL_Surface * SDL_LoadBMP_RW(SDL_RWops * src,
+int freesrc);
+
+/**
+*  Load a surface from a file.
+*
+*  Convenience macro.
+*/
+
+/**
+*  Save a surface to a seekable SDL data stream (memory or file).
+*
+*  If \c freedst is non-zero, the stream will be closed after being written.
+*
+*  \return 0 if successful or -1 if there was an error.
+*/
+extern  int  SDL_SaveBMP_RW
+(SDL_Surface * surface, SDL_RWops * dst, int freedst);
+
+/**
+*  Save a surface to a file.
+*
+*  Convenience macro.
+*/
+
+/**
+*  \brief Sets the RLE acceleration hint for a surface.
+*
+*  \return 0 on success, or -1 if the surface is not valid
+*
+*  \note If RLE is enabled, colorkey and alpha blending blits are much faster,
+*        but the surface must be locked before directly accessing the pixels.
+*/
+extern  int  SDL_SetSurfaceRLE(SDL_Surface * surface,
+int flag);
+
+/**
+*  \brief Sets the color key (transparent pixel) in a blittable surface.
+*
+*  \param surface The surface to update
+*  \param flag Non-zero to enable colorkey and 0 to disable colorkey
+*  \param key The transparent pixel in the native surface format
+*
+*  \return 0 on success, or -1 if the surface is not valid
+*
+*  You can pass SDL_RLEACCEL to enable RLE accelerated blits.
+*/
+extern  int  SDL_SetColorKey(SDL_Surface * surface,
+int flag, Uint32 key);
+
+/**
+*  \brief Gets the color key (transparent pixel) in a blittable surface.
+*
+*  \param surface The surface to update
+*  \param key A pointer filled in with the transparent pixel in the native
+*             surface format
+*
+*  \return 0 on success, or -1 if the surface is not valid or colorkey is not
+*          enabled.
+*/
+extern  int  SDL_GetColorKey(SDL_Surface * surface,
+Uint32 * key);
+
+/**
+*  \brief Set an additional color value used in blit operations.
+*
+*  \param surface The surface to update.
+*  \param r The red color value multiplied into blit operations.
+*  \param g The green color value multiplied into blit operations.
+*  \param b The blue color value multiplied into blit operations.
+*
+*  \return 0 on success, or -1 if the surface is not valid.
+*
+*  \sa SDL_GetSurfaceColorMod()
+*/
+extern  int  SDL_SetSurfaceColorMod(SDL_Surface * surface,
+Uint8 r, Uint8 g, Uint8 b);
+
+
+/**
+*  \brief Get the additional color value used in blit operations.
+*
+*  \param surface The surface to query.
+*  \param r A pointer filled in with the current red color value.
+*  \param g A pointer filled in with the current green color value.
+*  \param b A pointer filled in with the current blue color value.
+*
+*  \return 0 on success, or -1 if the surface is not valid.
+*
+*  \sa SDL_SetSurfaceColorMod()
+*/
+extern  int  SDL_GetSurfaceColorMod(SDL_Surface * surface,
+Uint8 * r, Uint8 * g,
+Uint8 * b);
+
+/**
+*  \brief Set an additional alpha value used in blit operations.
+*
+*  \param surface The surface to update.
+*  \param alpha The alpha value multiplied into blit operations.
+*
+*  \return 0 on success, or -1 if the surface is not valid.
+*
+*  \sa SDL_GetSurfaceAlphaMod()
+*/
+extern  int  SDL_SetSurfaceAlphaMod(SDL_Surface * surface,
+Uint8 alpha);
+
+/**
+*  \brief Get the additional alpha value used in blit operations.
+*
+*  \param surface The surface to query.
+*  \param alpha A pointer filled in with the current alpha value.
+*
+*  \return 0 on success, or -1 if the surface is not valid.
+*
+*  \sa SDL_SetSurfaceAlphaMod()
+*/
+extern  int  SDL_GetSurfaceAlphaMod(SDL_Surface * surface,
+Uint8 * alpha);
+
+/**
+*  \brief Set the blend mode used for blit operations.
+*
+*  \param surface The surface to update.
+*  \param blendMode ::SDL_BlendMode to use for blit blending.
+*
+*  \return 0 on success, or -1 if the parameters are not valid.
+*
+*  \sa SDL_GetSurfaceBlendMode()
+*/
+extern  int  SDL_SetSurfaceBlendMode(SDL_Surface * surface,
+SDL_BlendMode blendMode);
+
+/**
+*  \brief Get the blend mode used for blit operations.
+*
+*  \param surface   The surface to query.
+*  \param blendMode A pointer filled in with the current blend mode.
+*
+*  \return 0 on success, or -1 if the surface is not valid.
+*
+*  \sa SDL_SetSurfaceBlendMode()
+*/
+extern  int  SDL_GetSurfaceBlendMode(SDL_Surface * surface,
+SDL_BlendMode *blendMode);
+
+/**
+*  Sets the clipping rectangle for the destination surface in a blit.
+*
+*  If the clip rectangle is NULL, clipping will be disabled.
+*
+*  If the clip rectangle doesn't intersect the surface, the function will
+*  return SDL_FALSE and blits will be completely clipped.  Otherwise the
+*  function returns SDL_TRUE and blits to the surface will be clipped to
+*  the intersection of the surface area and the clipping rectangle.
+*
+*  Note that blits are automatically clipped to the edges of the source
+*  and destination surfaces.
+*/
+extern  SDL_bool  SDL_SetClipRect(SDL_Surface * surface,
+const SDL_Rect * rect);
+
+/**
+*  Gets the clipping rectangle for the destination surface in a blit.
+*
+*  \c rect must be a pointer to a valid rectangle which will be filled
+*  with the correct values.
+*/
+extern  void  SDL_GetClipRect(SDL_Surface * surface,
+SDL_Rect * rect);
+
+/**
+*  Creates a new surface of the specified format, and then copies and maps
+*  the given surface to it so the blit of the converted surface will be as
+*  fast as possible.  If this function fails, it returns NULL.
+*
+*  The \c flags parameter is passed to SDL_CreateRGBSurface() and has those
+*  semantics.  You can also pass ::SDL_RLEACCEL in the flags parameter and
+*  SDL will try to RLE accelerate colorkey and alpha blits in the resulting
+*  surface.
+*/
+extern  SDL_Surface * SDL_ConvertSurface
+(SDL_Surface * src, SDL_PixelFormat * fmt, Uint32 flags);
+extern  SDL_Surface * SDL_ConvertSurfaceFormat
+(SDL_Surface * src, Uint32 pixel_format, Uint32 flags);
+
+/**
+* \brief Copy a block of pixels of one format to another format
+*
+*  \return 0 on success, or -1 if there was an error
+*/
+extern  int  SDL_ConvertPixels(int width, int height,
+Uint32 src_format,
+const void * src, int src_pitch,
+Uint32 dst_format,
+void * dst, int dst_pitch);
+
+/**
+*  Performs a fast fill of the given rectangle with \c color.
+*
+*  If \c rect is NULL, the whole surface will be filled with \c color.
+*
+*  The color should be a pixel of the format used by the surface, and
+*  can be generated by the SDL_MapRGB() function.
+*
+*  \return 0 on success, or -1 on error.
+*/
+extern  int  SDL_FillRect
+(SDL_Surface * dst, const SDL_Rect * rect, Uint32 color);
+extern  int  SDL_FillRects
+(SDL_Surface * dst, const SDL_Rect * rects, int count, Uint32 color);
+
+/**
+*  Performs a fast blit from the source surface to the destination surface.
+*
+*  This assumes that the source and destination rectangles are
+*  the same size.  If either \c srcrect or \c dstrect are NULL, the entire
+*  surface (\c src or \c dst) is copied.  The final blit rectangles are saved
+*  in \c srcrect and \c dstrect after all clipping is performed.
+*
+*  \return If the blit is successful, it returns 0, otherwise it returns -1.
+*
+*  The blit function should not be called on a locked surface.
+*
+*  The blit semantics for surfaces with and without alpha and colorkey
+*  are defined as follows:
+*  \verbatim
+RGBA->RGB:
+SDL_SRCALPHA set:
+alpha-blend (using alpha-channel).
+SDL_SRCCOLORKEY ignored.
+SDL_SRCALPHA not set:
+copy RGB.
+if SDL_SRCCOLORKEY set, only copy the pixels matching the
+RGB values of the source colour key, ignoring alpha in the
+comparison.
+
+RGB->RGBA:
+SDL_SRCALPHA set:
+alpha-blend (using the source per-surface alpha value);
+set destination alpha to opaque.
+SDL_SRCALPHA not set:
+copy RGB, set destination alpha to source per-surface alpha value.
+both:
+if SDL_SRCCOLORKEY set, only copy the pixels matching the
+source colour key.
+
+RGBA->RGBA:
+SDL_SRCALPHA set:
+alpha-blend (using the source alpha channel) the RGB values;
+leave destination alpha untouched. [Note: is this correct?]
+SDL_SRCCOLORKEY ignored.
+SDL_SRCALPHA not set:
+copy all of RGBA to the destination.
+if SDL_SRCCOLORKEY set, only copy the pixels matching the
+RGB values of the source colour key, ignoring alpha in the
+comparison.
+
+RGB->RGB:
+SDL_SRCALPHA set:
+alpha-blend (using the source per-surface alpha value).
+SDL_SRCALPHA not set:
+copy RGB.
+both:
+if SDL_SRCCOLORKEY set, only copy the pixels matching the
+source colour key.
+\endverbatim
+*
+*  You should call SDL_BlitSurface() unless you know exactly how SDL
+*  blitting works internally and how to use the other blit functions.
+*/
+
+/**
+*  This is the public blit function, SDL_BlitSurface(), and it performs
+*  rectangle validation and clipping before passing it to SDL_LowerBlit()
+*/
+extern  int  SDL_UpperBlit
+(SDL_Surface * src, const SDL_Rect * srcrect,
+SDL_Surface * dst, SDL_Rect * dstrect);
+
+/**
+*  This is a semi-private blit function and it performs low-level surface
+*  blitting only.
+*/
+extern  int  SDL_LowerBlit
+(SDL_Surface * src, SDL_Rect * srcrect,
+SDL_Surface * dst, SDL_Rect * dstrect);
+
+/**
+*  \brief Perform a fast, low quality, stretch blit between two surfaces of the
+*         same pixel format.
+*
+*  \note This function uses a static buffer, and is not thread-safe.
+*/
+extern  int  SDL_SoftStretch(SDL_Surface * src,
+const SDL_Rect * srcrect,
+SDL_Surface * dst,
+const SDL_Rect * dstrect);
+
+
+/**
+*  This is the public scaled blit function, SDL_BlitScaled(), and it performs
+*  rectangle validation and clipping before passing it to SDL_LowerBlitScaled()
+*/
+extern  int  SDL_UpperBlitScaled
+(SDL_Surface * src, const SDL_Rect * srcrect,
+SDL_Surface * dst, SDL_Rect * dstrect);
+
+/**
+*  This is a semi-private blit function and it performs low-level surface
+*  scaled blitting only.
+*/
+extern  int  SDL_LowerBlitScaled
+(SDL_Surface * src, SDL_Rect * srcrect,
+SDL_Surface * dst, SDL_Rect * dstrect);
+
+
+/* vi: set ts=4 sw=4 expandtab: */
+
+/*
+Simple DirectMedia Layer
+Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
+
+This software is provided 'as-is', without any express or implied
+warranty.  In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software
+in a product, an acknowledgment in the product documentation would be
+appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+*  \file SDL_error.h
+*
+*  Simple error message routines for SDL.
+*/
+
+/* Public functions */
+extern  void  SDL_SetError(const char *fmt, ...);
+extern  const char * SDL_GetError(void);
+extern  void  SDL_ClearError(void);
+
+/**
+*  \name Internal error functions
+*
+*  \internal
+*  Private error reporting function - used internally.
+*/
+/*@{*/
+typedef enum
+{
+SDL_ENOMEM,
+SDL_EFREAD,
+SDL_EFWRITE,
+SDL_EFSEEK,
+SDL_UNSUPPORTED,
+SDL_LASTERROR
+} SDL_errorcode;
+extern  void  SDL_Error(SDL_errorcode code);
+/*@}*//*Internal error functions*/
+
+
+#define SDL_WINDOWPOS_UNDEFINED ...
+#define SDL_WINDOWPOS_UNDEFINED_MASK ...
+#define SDL_WINDOWPOS_CENTERED_MASK ...
+#define SDL_WINDOWPOS_CENTERED ...
+/*
+Simple DirectMedia Layer
+Copyright (C) 1997-2012 Sam Lantinga <slouken@libsdl.org>
+
+This software is provided 'as-is', without any express or implied
+warranty.  In no event will the authors be held liable for any damages
+arising from the use of this software.
+
+Permission is granted to anyone to use this software for any purpose,
+including commercial applications, and to alter it and redistribute it
+freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must not
+claim that you wrote the original software. If you use this software
+in a product, an acknowledgment in the product documentation would be
+appreciated but is not required.
+2. Altered source versions must be plainly marked as such, and must not be
+misrepresented as being the original software.
+3. This notice may not be removed or altered from any source distribution.
+*/
+
+/**
+*  \file SDL_video.h
+*
+*  Header file for SDL video functions.
+*/
+
+
+
+/* Set up for C function definitions, even when using C++ */
+
+/**
+*  \brief  The structure that defines a display mode
+*
+*  \sa SDL_GetNumDisplayModes()
+*  \sa SDL_GetDisplayMode()
+*  \sa SDL_GetDesktopDisplayMode()
+*  \sa SDL_GetCurrentDisplayMode()
+*  \sa SDL_GetClosestDisplayMode()
+*  \sa SDL_SetWindowDisplayMode()
+*  \sa SDL_GetWindowDisplayMode()
+*/
+typedef struct
+{
+Uint32 format;              /**< pixel format */
+int w;                      /**< width */
+int h;                      /**< height */
+int refresh_rate;           /**< refresh rate (or zero for unspecified) */
+void *driverdata;           /**< driver-specific data, initialize to 0 */
+} SDL_DisplayMode;
+
+/**
+*  \brief The type used to identify a window
+*
+*  \sa SDL_CreateWindow()
+*  \sa SDL_CreateWindowFrom()
+*  \sa SDL_DestroyWindow()
+*  \sa SDL_GetWindowData()
+*  \sa SDL_GetWindowFlags()
+*  \sa SDL_GetWindowGrab()
+*  \sa SDL_GetWindowPosition()
+*  \sa SDL_GetWindowSize()
+*  \sa SDL_GetWindowTitle()
+*  \sa SDL_HideWindow()
+*  \sa SDL_MaximizeWindow()
+*  \sa SDL_MinimizeWindow()
+*  \sa SDL_RaiseWindow()
+*  \sa SDL_RestoreWindow()
+*  \sa SDL_SetWindowData()
+*  \sa SDL_SetWindowFullscreen()
+*  \sa SDL_SetWindowGrab()
+*  \sa SDL_SetWindowIcon()
+*  \sa SDL_SetWindowPosition()
+*  \sa SDL_SetWindowSize()
+*  \sa SDL_SetWindowTitle()
+*  \sa SDL_ShowWindow()
+*/
+typedef struct SDL_Window SDL_Window;
+
+/**
+*  \brief The flags on a window
+*
+*  \sa SDL_GetWindowFlags()
+*/
+typedef enum SDL_WindowFlags
+{
+SDL_WINDOW_FULLSCREEN = 1,         /**< fullscreen window */
+SDL_WINDOW_OPENGL = 2,             /**< window usable with OpenGL context */
+SDL_WINDOW_SHOWN = 4,              /**< window is visible */
+SDL_WINDOW_HIDDEN = 8,             /**< window is not visible */
+SDL_WINDOW_BORDERLESS = 16,         /**< no window decoration */
+SDL_WINDOW_RESIZABLE = 32,          /**< window can be resized */
+SDL_WINDOW_MINIMIZED = 64,          /**< window is minimized */
+SDL_WINDOW_MAXIMIZED = 128,          /**< window is maximized */
+SDL_WINDOW_INPUT_GRABBED = 256,      /**< window has grabbed input focus */
+SDL_WINDOW_INPUT_FOCUS = 512,        /**< window has input focus */
+SDL_WINDOW_MOUSE_FOCUS = 1024,        /**< window has mouse focus */
+SDL_WINDOW_FOREIGN = 2048             /**< window not created by SDL */
+} SDL_WindowFlags;
+
+/**
+*  \brief Used to indicate that you don't care what the window position is.
+*/
+
+/**
+*  \brief Used to indicate that the window position should be centered.
+*/
+
+/**
+*  \brief Event subtype for window events
+*/
+typedef enum SDL_WindowEventID
+{
+SDL_WINDOWEVENT_NONE,           /**< Never used */
+SDL_WINDOWEVENT_SHOWN,          /**< Window has been shown */
+SDL_WINDOWEVENT_HIDDEN,         /**< Window has been hidden */
+SDL_WINDOWEVENT_EXPOSED,        /**< Window has been exposed and should be
+redrawn */
+SDL_WINDOWEVENT_MOVED,          /**< Window has been moved to data1, data2
+*/
+SDL_WINDOWEVENT_RESIZED,        /**< Window has been resized to data1xdata2 */
+SDL_WINDOWEVENT_SIZE_CHANGED,   /**< The window size has changed, either as a result of an API call or through the system or user changing the window size. */
+SDL_WINDOWEVENT_MINIMIZED,      /**< Window has been minimized */
+SDL_WINDOWEVENT_MAXIMIZED,      /**< Window has been maximized */
+SDL_WINDOWEVENT_RESTORED,       /**< Window has been restored to normal size
+and position */
+SDL_WINDOWEVENT_ENTER,          /**< Window has gained mouse focus */
+SDL_WINDOWEVENT_LEAVE,          /**< Window has lost mouse focus */
+SDL_WINDOWEVENT_FOCUS_GAINED,   /**< Window has gained keyboard focus */
+SDL_WINDOWEVENT_FOCUS_LOST,     /**< Window has lost keyboard focus */
+SDL_WINDOWEVENT_CLOSE           /**< The window manager requests that the
+window be closed */
+} SDL_WindowEventID;
+
+/**
+*  \brief An opaque handle to an OpenGL context.
+*/
+typedef void *SDL_GLContext;
+
+/**
+*  \brief OpenGL configuration attributes
+*/
+typedef enum SDL_GLattr
+{
+SDL_GL_RED_SIZE,
+SDL_GL_GREEN_SIZE,
+SDL_GL_BLUE_SIZE,
+SDL_GL_ALPHA_SIZE,
+SDL_GL_BUFFER_SIZE,
+SDL_GL_DOUBLEBUFFER,
+SDL_GL_DEPTH_SIZE,
+SDL_GL_STENCIL_SIZE,
+SDL_GL_ACCUM_RED_SIZE,
+SDL_GL_ACCUM_GREEN_SIZE,
+SDL_GL_ACCUM_BLUE_SIZE,
+SDL_GL_ACCUM_ALPHA_SIZE,
+SDL_GL_STEREO,
+SDL_GL_MULTISAMPLEBUFFERS,
+SDL_GL_MULTISAMPLESAMPLES,
+SDL_GL_ACCELERATED_VISUAL,
+SDL_GL_RETAINED_BACKING,
+SDL_GL_CONTEXT_MAJOR_VERSION,
+SDL_GL_CONTEXT_MINOR_VERSION,
+SDL_GL_CONTEXT_EGL,
+SDL_GL_CONTEXT_FLAGS,
+SDL_GL_CONTEXT_PROFILE_MASK,
+SDL_GL_SHARE_WITH_CURRENT_CONTEXT
+} SDL_GLattr;
+
+typedef enum SDL_GLprofile
+{
+SDL_GL_CONTEXT_PROFILE_CORE           = 1,
+SDL_GL_CONTEXT_PROFILE_COMPATIBILITY  = 2,
+SDL_GL_CONTEXT_PROFILE_ES             = 4
+} SDL_GLprofile;
+
+typedef enum SDL_GLcontextFlag
+{
+SDL_GL_CONTEXT_DEBUG_FLAG              = 1,
+SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG = 2,
+SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG      = 4,
+SDL_GL_CONTEXT_RESET_ISOLATION_FLAG    = 8
+} SDL_GLcontextFlag;
+
+
+/* Function prototypes */
+
+/**
+*  \brief Get the number of video drivers compiled into SDL
+*
+*  \sa SDL_GetVideoDriver()
+*/
+extern  int  SDL_GetNumVideoDrivers(void);
+
+/**
+*  \brief Get the name of a built in video driver.
+*
+*  \note The video drivers are presented in the order in which they are
+*        normally checked during initialization.
+*