Commits

Marcus von Appen committed 3906780

- added SDL2_image wrapper sdl2.sdlimage
- minor module import cleanups

  • Participants
  • Parent commits a1522e0

Comments (0)

Files changed (54)

File sdl2/__init__.py

 from ctypes import c_int
 from .stdinc import Uint32
 
+__all__ = ["SDL_INIT_TIMER", "SDL_INIT_AUDIO", "SDL_INIT_VIDEO",
+           "SDL_INIT_JOYSTICK", "SDL_INIT_HAPTIC", "SDL_INIT_GAMECONTROLLER",
+           "SDL_INIT_NOPARACHUTE", "SDL_INIT_EVERYTHING", "SDL_Init",
+           "SDL_InitSubSystem", "SDL_QuitSubSystem", "SDL_WasInit", "SDL_Quit",
+           "version_info"
+           ]
+
 SDL_INIT_TIMER = 0x00000001
 SDL_INIT_AUDIO = 0x00000010
 SDL_INIT_VIDEO = 0x00000020

File sdl2/audio.py

 from .stdinc import Uint8, Uint16, Uint32
 from .rwops import SDL_RWops, SDL_RWFromFile
 
+__all__ = ["SDL_AudioFormat", "SDL_AUDIO_MASK_BITSIZE",
+           "SDL_AUDIO_MASK_DATATYPE", "SDL_AUDIO_MASK_ENDIAN",
+           "SDL_AUDIO_MASK_SIGNED", "SDL_AUDIO_BITSIZE", "SDL_AUDIO_ISFLOAT",
+           "SDL_AUDIO_ISBIGENDIAN", "SDL_AUDIO_ISSIGNED", "SDL_AUDIO_ISINT",
+           "SDL_AUDIO_ISLITTLEENDIAN", "SDL_AUDIO_ISUNSIGNED", "AUDIO_U8",
+           "AUDIO_S8", "AUDIO_U16LSB", "AUDIO_S16LSB", "AUDIO_U16MSB",
+           "AUDIO_S16MSB", "AUDIO_U16", "AUDIO_S16", "AUDIO_S32LSB",
+           "AUDIO_S32MSB", "AUDIO_S32", "AUDIO_F32LSB", "AUDIO_S32MSB",
+           "AUDIO_F32", "AUDIO_U16SYS", "AUDIO_S16SYS", "AUDIO_S32SYS",
+           "AUDIO_F32SYS", "SDL_AUDIO_ALLOW_FREQUENCY_CHANGE",
+           "SDL_AUDIO_ALLOW_FORMAT_CHANGE", "SDL_AUDIO_ALLOW_CHANNELS_CHANGE",
+           "SDL_AUDIO_ALLOW_ANY_CHANGE", "SDL_AudioCallback", "SDL_AudioSpec",
+           "SDL_AudioCVT", "SDL_AudioFilter", "SDL_GetNumAudioDrivers",
+           "SDL_GetAudioDriver", "SDL_AudioInit", "SDL_AudioQuit",
+           "SDL_GetCurrentAudioDriver", "SDL_OpenAudio", "SDL_AudioDeviceID",
+           "SDL_GetNumAudioDevices", "SDL_GetAudioDeviceName",
+           "SDL_OpenAudioDevice", "SDL_AUDIO_STOPPED", "SDL_AUDIO_PLAYING",
+           "SDL_AUDIO_PAUSED", "SDL_AudioStatus", "SDL_GetAudioStatus",
+           "SDL_GetAudioDeviceStatus", "SDL_PauseAudio", "SDL_PauseAudioDevice",
+           "SDL_LoadWAV_RW", "SDL_LoadWAV", "SDL_FreeWAV", "SDL_BuildAudioCVT",
+           "SDL_ConvertAudio", "SDL_MIX_MAXVOLUME", "SDL_MixAudio",
+           "SDL_MixAudioFormat", "SDL_LockAudio", "SDL_LockAudioDevice",
+           "SDL_UnlockAudio", "SDL_UnlockAudioDevice", "SDL_CloseAudio",
+           "SDL_CloseAudioDevice"
+         ]
+
 SDL_AudioFormat = Uint16
 
 SDL_AUDIO_MASK_BITSIZE = 0xFF

File sdl2/blendmode.py

 from ctypes import c_int
 
+__all__ = ["SDL_BLENDMODE_NONE", "SDL_BLENDMODE_BLEND", "SDL_BLENDMODE_ADD",
+           "SDL_BLENDMODE_MOD", "SDL_BlendMode"
+           ]
+
 SDL_BLENDMODE_NONE = 0x00000000
 SDL_BLENDMODE_BLEND = 0x00000001
 SDL_BLENDMODE_ADD = 0x00000002

File sdl2/clipboard.py

 from .dll import _bind
 from .stdinc import SDL_bool
 
+__all__ = ["SDL_SetClipboardText", "SDL_GetClipboardText",
+           "SDL_HasClipboardText"]
+
 SDL_SetClipboardText = _bind("SDL_SetClipboardText", [c_char_p], c_int)
 SDL_GetClipboardText = _bind("SDL_GetClipboardText", None, c_char_p)
 SDL_HasClipboardText = _bind("SDL_HasClipboardText", None, SDL_bool)

File sdl2/cpuinfo.py

 from .dll import _bind
 from .stdinc import SDL_bool
 
+__all__ = ["SDL_CACHELINE_SIZE", "SDL_GetCPUCount", "SDL_GetCPUCacheLineSize",
+           "SDL_HasRDTSC", "SDL_HasAltiVec", "SDL_HasMMX", "SDL_Has3DNow",
+           "SDL_HasSSE", "SDL_HasSSE2", "SDL_HasSSE3", "SDL_HasSSE41",
+           "SDL_HasSSE42"
+           ]
+
 SDL_CACHELINE_SIZE = 128
 SDL_GetCPUCount = _bind("SDL_GetCPUCount", None, c_int)
 SDL_GetCPUCacheLineSize = _bind("SDL_GetCPUCacheLineSize", None, c_int)

File sdl2/endian.py

 import sys
 import array
 
+__all__ = ["SDL_LIL_ENDIAN", "SDL_BIG_ENDIAN", "SDL_BYTEORDER", "SDL_Swap16",
+           "SDL_Swap32", "SDL_Swap64", "SDL_SwapFloat", "SDL_SwapLE16",
+           "SDL_SwapLE32", "SDL_SwapLE64", "SDL_SwapFloatLE", "SDL_SwapBE16",
+           "SDL_SwapBE32", "SDL_SwapBE64", "SDL_SwapFloatBE"
+           ]
+
 SDL_LIL_ENDIAN = 1234
 SDL_BIG_ENDIAN = 4321
 if sys.byteorder == "little":

File sdl2/error.py

 from ctypes import c_char_p, c_int
 from .dll import _bind
 
+__all__ = ["SDL_SetError", "SDL_GetError", "SDL_ClearError", "SDL_ENOMEM",
+           "SDL_EFREAD", "SDL_EFWRITE", "SDL_EFSEEK", "SDL_UNSUPPORTED",
+           "SDL_LASTERROR", "SDL_errorcode", "SDL_Error", "SDL_OutOfMemory",
+           "SDL_Unsupported", "SDL_InvalidParamError"
+           ]
+
 SDL_SetError = _bind("SDL_SetError", [c_char_p], c_int)
 SDL_GetError = _bind("SDL_GetError", None, c_char_p)
 SDL_ClearError = _bind("SDL_ClearError")

File sdl2/events.py

 from .touch import SDL_FingerID, SDL_TouchID
 from .gesture import SDL_GestureID
 
+__all__ = ["SDL_FIRSTEVENT", "SDL_QUIT", "SDL_WINDOWEVENT", "SDL_SYSWMEVENT",
+           "SDL_KEYDOWN", "SDL_KEYUP", "SDL_TEXTEDITING", "SDL_TEXTINPUT",
+           "SDL_MOUSEMOTION", "SDL_MOUSEBUTTONDOWN", "SDL_MOUSEBUTTONUP",
+           "SDL_MOUSEWHEEL", "SDL_JOYAXISMOTION", "SDL_JOYBALLMOTION",
+           "SDL_JOYHATMOTION", "SDL_JOYBUTTONDOWN", "SDL_JOYBUTTONUP",
+           "SDL_JOYDEVICEADDED", "SDL_JOYDEVICEREMOVED",
+           "SDL_CONTROLLERAXISMOTION", "SDL_CONTROLLERBUTTONDOWN",
+           "SDL_CONTROLLERBUTTONUP", "SDL_CONTROLLERDEVICEADDED",
+           "SDL_CONTROLLERDEVICEREMOVED", "SDL_CONTROLLERDEVICEREMAPPED",
+           "SDL_FINGERDOWN", "SDL_FINGERUP", "SDL_FINGERMOTION",
+           "SDL_DOLLARGESTURE", "SDL_DOLLARRECORD", "SDL_MULTIGESTURE",
+           "SDL_CLIPBOARDUPDATE", "SDL_DROPFILE", "SDL_USEREVENT",
+           "SDL_LASTEVENT", "SDL_EventType", "SDL_GenericEvent",
+           "SDL_WindowEvent", "SDL_KeyboardEvent",
+           "SDL_TEXTEDITINGEVENT_TEXT_SIZE", "SDL_TextEditingEvent",
+           "SDL_TEXTINPUTEVENT_TEXT_SIZE", "SDL_TextInputEvent",
+           "SDL_MouseMotionEvent", "SDL_MouseButtonEvent",
+           "SDL_MouseWheelEvent", "SDL_JoyAxisEvent", "SDL_JoyBallEvent",
+           "SDL_JoyHatEvent", "SDL_JoyButtonEvent", "SDL_JoyDeviceEvent",
+           "SDL_ControllerAxisEvent", "SDL_ControllerButtonEvent",
+           "SDL_ControllerDeviceEvent", "SDL_TouchFingerEvent",
+           "SDL_MultiGestureEvent", "SDL_DollarGestureEvent", "SDL_DropEvent",
+           "SDL_QuitEvent", "SDL_UserEvent", "SDL_SysWMmsg", "SDL_SysWMEvent",
+           "SDL_Event", "SDL_PumpEvents", "SDL_ADDEVENT", "SDL_PEEKEVENT",
+           "SDL_GETEVENT", "SDL_eventaction", "SDL_PeepEvents", "SDL_HasEvent",
+           "SDL_HasEvents", "SDL_FlushEvent", "SDL_FlushEvents",
+           "SDL_PollEvent", "SDL_WaitEvent", "SDL_WaitEventTimeout",
+           "SDL_PushEvent", "SDL_EventFilter", "SDL_SetEventFilter",
+           "SDL_GetEventFilter", "SDL_AddEventWatch", "SDL_DelEventWatch",
+           "SDL_FilterEvents", "SDL_QUERY", "SDL_IGNORE", "SDL_DISABLE",
+           "SDL_ENABLE", "SDL_EventState", "SDL_GetEventState",
+           "SDL_RegisterEvents", "SDL_QuitRequested"
+           ]
+
 SDL_FIRSTEVENT = 0
 SDL_QUIT = 0x100
 SDL_WINDOWEVENT = 0x200

File sdl2/gamecontroller.py

 from .stdinc import SDL_bool, Sint16, Uint8
 from .joystick import SDL_JoystickGUID, SDL_Joystick
 
+__all__ = ["SDL_GameController", "SDL_CONTROLLER_BINDTYPE_NONE",
+           "SDL_CONTROLLER_BINDTYPE_BUTTON", "SDL_CONTROLLER_BINDTYPE_AXIS",
+           "SDL_CONTROLLER_BINDTYPE_HAT", "SDL_GameControllerBindType",
+           "SDL_GameControllerButtonBind", "SDL_GameControllerAddMapping",
+           "SDL_GameControllerMappingForGUID", "SDL_GameControllerMapping",
+           "SDL_IsGameController", "SDL_GameControllerNameForIndex",
+           "SDL_GameControllerOpen", "SDL_GameControllerName",
+           "SDL_GameControllerGetAttached", "SDL_GameControllerGetJoystick",
+           "SDL_GameControllerEventState", "SDL_GameControllerUpdate",
+           "SDL_CONTROLLER_AXIS_INVALID", "SDL_CONTROLLER_AXIS_LEFTX",
+           "SDL_CONTROLLER_AXIS_LEFTY", "SDL_CONTROLLER_AXIS_RIGHTX",
+           "SDL_CONTROLLER_AXIS_RIGHTY", "SDL_CONTROLLER_AXIS_TRIGGERLEFT",
+           "SDL_CONTROLLER_AXIS_TRIGGERRIGHT", "SDL_CONTROLLER_AXIS_MAX",
+           "SDL_GameControllerAxis", "SDL_GameControllerGetAxisFromString",
+           "SDL_GameControllerGetStringForAxis",
+           "SDL_GameControllerGetBindForAxis", "SDL_GameControllerGetAxis",
+           "SDL_CONTROLLER_BUTTON_INVALID", "SDL_CONTROLLER_BUTTON_A",
+           "SDL_CONTROLLER_BUTTON_B", "SDL_CONTROLLER_BUTTON_X",
+           "SDL_CONTROLLER_BUTTON_Y", "SDL_CONTROLLER_BUTTON_BACK",
+           "SDL_CONTROLLER_BUTTON_GUIDE", "SDL_CONTROLLER_BUTTON_START",
+           "SDL_CONTROLLER_BUTTON_LEFTSTICK", "SDL_CONTROLLER_BUTTON_RIGHTSTICK",
+           "SDL_CONTROLLER_BUTTON_LEFTSHOULDER",
+           "SDL_CONTROLLER_BUTTON_RIGHTSHOULDER",
+           "SDL_CONTROLLER_BUTTON_DPAD_UP", "SDL_CONTROLLER_BUTTON_DPAD_DOWN",
+           "SDL_CONTROLLER_BUTTON_DPAD_LEFT", "SDL_CONTROLLER_BUTTON_DPAD_RIGHT",
+           "SDL_CONTROLLER_BUTTON_MAX", "SDL_GameControllerButton",
+           "SDL_GameControllerGetButtonFromString",
+           "SDL_GameControllerGetStringForButton",
+           "SDL_GameControllerGetBindForButton", "SDL_GameControllerGetButton",
+           "SDL_GameControllerClose"
+           ]
+
 class SDL_GameController(Structure):
     pass
 

File sdl2/gesture.py

 from .touch import SDL_TouchID
 from .rwops import SDL_RWops
 
+__all__ = ["SDL_GestureID", "SDL_RecordGesture", "SDL_SaveAllDollarTemplates",
+           "SDL_SaveDollarTemplate", "SDL_LoadDollarTemplates"
+           ]
+
 SDL_GestureID = Sint64
 SDL_RecordGesture = _bind("SDL_RecordGesture", [SDL_TouchID], c_int)
 SDL_SaveAllDollarTemplates = _bind("SDL_SaveAllDollarTemplates", [POINTER(SDL_RWops)], c_int)

File sdl2/haptic.py

 from .stdinc import Uint8, Uint16, Uint32, Sint16, Sint32
 from .joystick import SDL_Joystick
 
+__all__ = ["SDL_Haptic", "SDL_HAPTIC_CONSTANT", "SDL_HAPTIC_SINE",
+           "SDL_HAPTIC_SQUARE", "SDL_HAPTIC_TRIANGLE", "SDL_HAPTIC_SAWTOOTHUP",
+           "SDL_HAPTIC_SAWTOOTHDOWN", "SDL_HAPTIC_RAMP", "SDL_HAPTIC_SPRING",
+           "SDL_HAPTIC_DAMPER", "SDL_HAPTIC_INERTIA", "SDL_HAPTIC_FRICTION",
+           "SDL_HAPTIC_CUSTOM", "SDL_HAPTIC_GAIN", "SDL_HAPTIC_AUTOCENTER",
+           "SDL_HAPTIC_STATUS", "SDL_HAPTIC_PAUSE", "SDL_HAPTIC_POLAR",
+           "SDL_HAPTIC_CARTESIAN", "SDL_HAPTIC_SPHERICAL", "SDL_HAPTIC_INFINITY",
+           "SDL_HapticDirection", "SDL_HapticConstant", "SDL_HapticPeriodic",
+           "SDL_HapticCondition", "SDL_HapticRamp", "SDL_HapticCustom",
+           "SDL_HapticEffect", "SDL_NumHaptics", "SDL_HapticName",
+           "SDL_HapticOpen", "SDL_HapticOpened", "SDL_HapticIndex",
+           "SDL_MouseIsHaptic", "SDL_HapticOpenFromMouse",
+           "SDL_JoystickIsHaptic", "SDL_HapticOpenFromJoystick",
+           "SDL_HapticClose", "SDL_HapticNumEffects",
+           "SDL_HapticNumEffectsPlaying", "SDL_HapticQuery", "SDL_HapticNumAxes",
+           "SDL_HapticEffectSupported", "SDL_HapticNewEffect",
+           "SDL_HapticUpdateEffect", "SDL_HapticRunEffect",
+           "SDL_HapticStopEffect", "SDL_HapticDestroyEffect",
+           "SDL_HapticGetEffectStatus", "SDL_HapticSetGain",
+           "SDL_HapticSetAutocenter", "SDL_HapticPause", "SDL_HapticUnpause",
+           "SDL_HapticStopAll", "SDL_HapticRumbleSupported",
+           "SDL_HapticRumbleInit", "SDL_HapticRumblePlay",
+           "SDL_HapticRumbleStop"
+           ]
+
 class SDL_Haptic(Structure):
     pass
 

File sdl2/hints.py

 from .dll import _bind
 from .stdinc import SDL_bool
 
+__all__ = ["SDL_HINT_FRAMEBUFFER_ACCELERATION", "SDL_HINT_RENDER_DRIVER",
+           "SDL_HINT_RENDER_OPENGL_SHADERS", "SDL_HINT_RENDER_SCALE_QUALITY",
+           "SDL_HINT_RENDER_VSYNC", "SDL_HINT_VIDEO_X11_XVIDMODE",
+           "SDL_HINT_VIDEO_X11_XINERAMA", "SDL_HINT_VIDEO_X11_XRANDR",
+           "SDL_HINT_GRAB_KEYBOARD", "SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS",
+           "SDL_HINT_IDLE_TIMER_DISABLED", "SDL_HINT_ORIENTATIONS",
+           "SDL_HINT_XINPUT_ENABLED", "SDL_HINT_GAMECONTROLLERCONFIG",
+           "SDL_HINT_ALLOW_TOPMOST", "SDL_HINT_DEFAULT", "SDL_HINT_NORMAL",
+           "SDL_HINT_OVERRIDE", "SDL_HintPriority", "SDL_SetHintWithPriority",
+           "SDL_SetHint", "SDL_GetHint", "SDL_ClearHints"
+           ]
+
 SDL_HINT_FRAMEBUFFER_ACCELERATION = b"SDL_FRAMEBUFFER_ACCELERATION"
 SDL_HINT_RENDER_DRIVER = b"SDL_RENDER_DRIVER"
 SDL_HINT_RENDER_OPENGL_SHADERS = b"SDL_RENDER_OPENGL_SHADERS"
 SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS = b"SDL_VIDEO_MINIMIZE_ON_FOCUS_LOSS"
 SDL_HINT_IDLE_TIMER_DISABLED = b"SDL_IOS_IDLE_TIMER_DISABLED"
 SDL_HINT_ORIENTATIONS = b"SDL_IOS_ORIENTATIONS"
-SD_HINT_XINPUT_ENABLED = b"SDL_XINPUT_ENABLED"
+SDL_HINT_XINPUT_ENABLED = b"SDL_XINPUT_ENABLED"
 SDL_HINT_GAMECONTROLLERCONFIG = b"SDL_GAMECONTROLLERCONFIG"
 SDL_HINT_ALLOW_TOPMOST = b"SDL_ALLOW_TOPMOST"
 SDL_HINT_DEFAULT = 0

File sdl2/joystick.py

 from .dll import _bind
 from .stdinc import Sint16, Sint32, Uint8, SDL_bool
 
+__all__ = ["SDL_Joystick", "SDL_JoystickGUID", "SDL_JoystickID",
+           "SDL_NumJoysticks", "SDL_JoystickNameForIndex", "SDL_JoystickOpen",
+           "SDL_JoystickName", "SDL_JoystickGetDeviceGUID",
+           "SDL_JoystickGetGUID", "SDL_JoystickGetGUIDString",
+           "SDL_JoystickGetGUIDFromString", "SDL_JoystickGetAttached",
+           "SDL_JoystickInstanceID", "SDL_JoystickNumAxes",
+           "SDL_JoystickNumBalls", "SDL_JoystickNumHats",
+           "SDL_JoystickNumButtons", "SDL_JoystickUpdate",
+           "SDL_JoystickEventState", "SDL_JoystickGetAxis", "SDL_HAT_CENTERED",
+           "SDL_HAT_UP", "SDL_HAT_RIGHT", "SDL_HAT_DOWN", "SDL_HAT_LEFT",
+           "SDL_HAT_RIGHTUP", "SDL_HAT_RIGHTDOWN", "SDL_HAT_LEFTUP",
+           "SDL_HAT_LEFTDOWN", "SDL_JoystickGetHat", "SDL_JoystickGetBall",
+           "SDL_JoystickGetButton", "SDL_JoystickClose"
+           ]
+
 class SDL_Joystick(Structure):
     pass
 

File sdl2/keyboard.py

 from .rect import SDL_Rect
 from .video import SDL_Window
 
+__all__ = ["SDL_Keysym", "SDL_GetKeyboardFocus", "SDL_GetKeyboardState",
+           "SDL_GetModState", "SDL_SetModState", "SDL_GetKeyFromScancode",
+           "SDL_GetScancodeFromKey", "SDL_GetScancodeName",
+           "SDL_GetScancodeFromName", "SDL_GetKeyName", "SDL_GetKeyFromName",
+           "SDL_StartTextInput", "SDL_IsTextInputActive", "SDL_StopTextInput",
+           "SDL_SetTextInputRect", "SDL_HasScreenKeyboardSupport",
+           "SDL_IsScreenKeyboardShown"
+           ]
+
 class SDL_Keysym(Structure):
     _fields_ = [("scancode", SDL_Scancode),
                 ("sym", SDL_Keycode),

File sdl2/loadso.py

 from ctypes import c_char_p, c_void_p
 from .dll import _bind
 
+__all__ = ["SDL_LoadObject", "SDL_LoadFunction", "SDL_UnloadObject"]
+
 SDL_LoadObject = _bind("SDL_LoadObject", [c_char_p], c_void_p)
 SDL_LoadFunction = _bind("SDL_LoadFunction", [c_void_p, c_char_p], c_void_p)
 SDL_UnloadObject = _bind("SDL_UnloadObject", [c_void_p])
 from ctypes import c_int, c_char_p, c_void_p, CFUNCTYPE, POINTER, py_object
 from .dll import _bind
 
+__all__ = ["SDL_MAX_LOG_MESSAGE", "SDL_LOG_CATEGORY_APPLICATION",
+           "SDL_LOG_CATEGORY_ERROR", "SDL_LOG_CATEGORY_ASSERT",
+           "SDL_LOG_CATEGORY_SYSTEM", "SDL_LOG_CATEGORY_AUDIO",
+           "SDL_LOG_CATEGORY_VIDEO", "SDL_LOG_CATEGORY_RENDER",
+           "SDL_LOG_CATEGORY_INPUT", "SDL_LOG_CATEGORY_TEST",
+           "SDL_LOG_CATEGORY_RESERVED1", "SDL_LOG_CATEGORY_RESERVED2",
+           "SDL_LOG_CATEGORY_RESERVED3", "SDL_LOG_CATEGORY_RESERVED4",
+           "SDL_LOG_CATEGORY_RESERVED5", "SDL_LOG_CATEGORY_RESERVED6",
+           "SDL_LOG_CATEGORY_RESERVED7", "SDL_LOG_CATEGORY_RESERVED8",
+           "SDL_LOG_CATEGORY_RESERVED9", "SDL_LOG_CATEGORY_RESERVED10",
+           "SDL_LOG_CATEGORY_CUSTOM", "SDL_LOG_PRIORITY_VERBOSE",
+           "SDL_LOG_PRIORITY_DEBUG", "SDL_LOG_PRIORITY_INFO",
+           "SDL_LOG_PRIORITY_WARN", "SDL_LOG_PRIORITY_ERROR",
+           "SDL_LOG_PRIORITY_CRITICAL", "SDL_NUM_LOG_PRIORITIES",
+           "SDL_LogPriority", "SDL_LogSetAllPriority", "SDL_LogSetPriority",
+           "SDL_LogGetPriority", "SDL_LogResetPriorities", "SDL_Log",
+           "SDL_LogVerbose", "SDL_LogDebug", "SDL_LogInfo", "SDL_LogWarn",
+           "SDL_LogError", "SDL_LogCritical", "SDL_LogMessage",
+           "SDL_LogOutputFunction", "SDL_LogGetOutputFunction",
+           "SDL_LogSetOutputFunction"
+           ]
+
 SDL_MAX_LOG_MESSAGE = 4096
 SDL_LOG_CATEGORY_APPLICATION = 0
 SDL_LOG_CATEGORY_ERROR = 1

File sdl2/messagebox.py

 from .stdinc import Uint8, Uint32
 from .video import SDL_Window
 
+__all__ = ["SDL_MESSAGEBOX_ERROR", "SDL_MESSAGEBOX_WARNING",
+           "SDL_MESSAGEBOX_INFORMATION", "SDL_MessageBoxFlags",
+           "SDL_MESSAGEBOX_BUTTON_RETURNKEY_DEFAULT",
+           "SDL_MESSAGEBOX_BUTTON_ESCAPEKEY_DEFAULT",
+           "SDL_MessageBoxButtonFlags", "SDL_MessageBoxButtonData",
+           "SDL_MessageBoxColor", "SDL_MESSAGEBOX_COLOR_BACKGROUND",
+           "SDL_MESSAGEBOX_COLOR_TEXT", "SDL_MESSAGEBOX_COLOR_BUTTON_BORDER",
+           "SDL_MESSAGEBOX_COLOR_BUTTON_BACKGROUND",
+           "SDL_MESSAGEBOX_COLOR_BUTTON_SELECTED", "SDL_MESSAGEBOX_COLOR_MAX",
+           "SDL_MessageBoxColorType", "SDL_MessageBoxColorScheme",
+           "SDL_MessageBoxData", "SDL_ShowMessageBox",
+           "SDL_ShowSimpleMessageBox"
+           ]
+
 SDL_MESSAGEBOX_ERROR = 0x00000010
 SDL_MESSAGEBOX_WARNING = 0x00000020
 SDL_MESSAGEBOX_INFORMATION = 0x00000040

File sdl2/mouse.py

 from .video import SDL_Window
 from .surface import SDL_Surface
 
+__all__ = ["SDL_Cursor", "SDL_SYSTEM_CURSOR_ARROW", "SDL_SYSTEM_CURSOR_IBEAM",
+           "SDL_SYSTEM_CURSOR_WAIT", "SDL_SYSTEM_CURSOR_CROSSHAIR",
+           "SDL_SYSTEM_CURSOR_WAITARROW", "SDL_SYSTEM_CURSOR_SIZENWSE",
+           "SDL_SYSTEM_CURSOR_SIZENESW", "SDL_SYSTEM_CURSOR_SIZEWE",
+           "SDL_SYSTEM_CURSOR_SIZENS", "SDL_SYSTEM_CURSOR_SIZEALL",
+           "SDL_SYSTEM_CURSOR_NO", "SDL_SYSTEM_CURSOR_HAND",
+           "SDL_NUM_SYSTEM_CURSORS", "SDL_SystemCursor", "SDL_GetMouseFocus",
+           "SDL_GetMouseState", "SDL_GetRelativeMouseState",
+           "SDL_WarpMouseInWindow", "SDL_SetRelativeMouseMode",
+           "SDL_GetRelativeMouseMode", "SDL_CreateCursor",
+           "SDL_CreateColorCursor", "SDL_CreateSystemCursor", "SDL_SetCursor",
+           "SDL_GetCursor", "SDL_FreeCursor", "SDL_ShowCursor", "SDL_BUTTON",
+           "SDL_BUTTON_LEFT", "SDL_BUTTON_MIDDLE", "SDL_BUTTON_RIGHT",
+           "SDL_BUTTON_X1", "SDL_BUTTON_X2", "SDL_BUTTON_LMASK",
+           "SDL_BUTTON_MMASK", "SDL_BUTTON_RMASK", "SDL_BUTTON_X1MASK",
+           "SDL_BUTTON_X2MASK"
+           ]
+
 class SDL_Cursor(Structure):
     pass
 SDL_SYSTEM_CURSOR_ARROW = 0

File sdl2/platform.py

 from ctypes import c_char_p
 from .dll import _bind
 
+__all__ = ["SDL_GetPlatform"]
+
 SDL_GetPlatform = _bind("SDL_GetPlatform", None, c_char_p)

File sdl2/power.py

 from ctypes import POINTER, c_int
 from .dll import _bind
 
+__all__ = ["SDL_PowerState", "SDL_POWERSTATE_UNKNOWN",
+          "SDL_POWERSTATE_ON_BATTERY", "SDL_POWERSTATE_NO_BATTERY",
+          "SDL_POWERSTATE_CHARGING", "SDL_POWERSTATE_CHARGED",
+          "SDL_GetPowerInfo"
+          ]
+
 SDL_PowerState = c_int
 SDL_POWERSTATE_UNKNOWN = 0
 SDL_POWERSTATE_ON_BATTERY = 1

File sdl2/rect.py

 from .dll import _bind
 from .stdinc import SDL_bool
 
+__all__ = ["SDL_Point", "SDL_Rect", "SDL_RectEmpty", "SDL_RectEquals",
+           "SDL_HasIntersection", "SDL_IntersectRect", "SDL_UnionRect",
+           "SDL_EnclosePoints", "SDL_IntersectRectAndLine"
+           ]
+
+
 class SDL_Point(Structure):
     _fields_ = [("x", c_int), ("y", c_int)]
 

File sdl2/render.py

 from .surface import SDL_Surface
 from .video import SDL_Window
 
+__all__ = ["SDL_RendererFlags", "SDL_RENDERER_SOFTWARE",
+           "SDL_RENDERER_ACCELERATED", "SDL_RENDERER_PRESENTVSYNC",
+           "SDL_RENDERER_TARGETTEXTURE", "SDL_RendererInfo",
+           "SDL_TextureAccess", "SDL_TEXTUREACCESS_STATIC",
+           "SDL_TEXTUREACCESS_STREAMING", "SDL_TEXTUREACCESS_TARGET",
+           "SDL_TextureModulate", "SDL_TEXTUREMODULATE_NONE",
+           "SDL_TEXTUREMODULATE_COLOR", "SDL_TEXTUREMODULATE_ALPHA",
+           "SDL_RendererFlip", "SDL_FLIP_NONE", "SDL_FLIP_HORIZONTAL",
+           "SDL_FLIP_VERTICAL", "SDL_Renderer", "SDL_Texture",
+           "SDL_GetNumRenderDrivers", "SDL_GetRenderDriverInfo",
+           "SDL_CreateWindowAndRenderer", "SDL_CreateRenderer",
+           "SDL_CreateSoftwareRenderer", "SDL_GetRenderer",
+           "SDL_GetRendererInfo", "SDL_CreateTexture",
+           "SDL_CreateTextureFromSurface", "SDL_QueryTexture",
+           "SDL_SetTextureColorMod", "SDL_GetTextureColorMod",
+           "SDL_SetTextureAlphaMod", "SDL_GetTextureAlphaMod",
+           "SDL_SetTextureBlendMode", "SDL_GetTextureBlendMode",
+           "SDL_UpdateTexture", "SDL_LockTexture", "SDL_UnlockTexture",
+           "SDL_RenderTargetSupported", "SDL_SetRenderTarget",
+           "SDL_GetRenderTarget", "SDL_RenderSetLogicalSize",
+           "SDL_RenderGetLogicalSize", "SDL_RenderSetViewport",
+           "SDL_RenderGetViewport", "SDL_RenderSetScale", "SDL_RenderGetScale",
+           "SDL_SetRenderDrawColor", "SDL_GetRenderDrawColor",
+           "SDL_SetRenderDrawBlendMode", "SDL_GetRenderDrawBlendMode",
+           "SDL_RenderClear", "SDL_RenderDrawPoint", "SDL_RenderDrawPoints",
+           "SDL_RenderDrawLine", "SDL_RenderDrawLines", "SDL_RenderDrawRect",
+           "SDL_RenderDrawRects", "SDL_RenderFillRect", "SDL_RenderFillRects",
+           "SDL_RenderCopy", "SDL_RenderCopyEx", "SDL_RenderReadPixels",
+           "SDL_RenderPresent", "SDL_DestroyTexture", "SDL_DestroyRenderer",
+           "SDL_GL_BindTexture", "SDL_GL_UnbindTexture"
+           ]
+
 SDL_RendererFlags = c_int
 SDL_RENDERER_SOFTWARE = 0x00000001
 SDL_RENDERER_ACCELERATED = 0x00000002

File sdl2/rwops.py

 from .dll import _bind
 from .stdinc import Sint64, Uint8, Uint16, Uint32, Uint64, SDL_bool
 
+__all__ = ["SDL_RWOPS_UNKNOWN", "SDL_RWOPS_WINFILE", "SDL_RWOPS_STDFILE",
+           "SDL_RWOPS_JNIFILE", "SDL_RWOPS_MEMORY", "SDL_RWOPS_MEMORY_RO",
+           "SDL_RWops", "SDL_RWFromFile", "SDL_RWFromFP", "SDL_RWFromMem",
+           "SDL_RWFromConstMem", "SDL_AllocRW", "SDL_FreeRW", "RW_SEEK_SET",
+           "RW_SEEK_CUR", "RW_SEEK_END", "SDL_RWsize", "SDL_RWseek",
+           "SDL_RWtell", "SDL_RWread", "SDL_RWwrite", "SDL_RWclose",
+           "SDL_ReadU8", "SDL_ReadLE16", "SDL_ReadBE16", "SDL_ReadLE32",
+           "SDL_ReadBE32", "SDL_ReadLE64", "SDL_ReadBE64", "SDL_WriteU8",
+           "SDL_WriteLE16", "SDL_WriteBE16", "SDL_WriteLE32", "SDL_WriteBE32",
+           "SDL_WriteLE64", "SDL_WriteBE64", "rw_from_object"
+           ]
+
 SDL_RWOPS_UNKNOWN = 0
 SDL_RWOPS_WINFILE = 1
 SDL_RWOPS_STDFILE = 2

File sdl2/sdlimage.py

+import os
+from ctypes import POINTER, c_int, c_char_p
+from .dll import _DLL
+from .version import SDL_version
+from .surface import SDL_Surface
+from .rwops import SDL_RWops
+from .render import SDL_Texture, SDL_Renderer
+from .error import SDL_SetError, SDL_GetError
+
+__all__ = ["SDL_IMAGE_MAJOR_VERSION", "SDL_IMAGE_MINOR_VERSION", \
+           "SDL_IMAGE_PATCHLEVEL", "SDL_IMAGE_VERSION", "IMG_Linked_Version",
+           "IMG_InitFlags", "IMG_INIT_JPG", "IMG_INIT_PNG", "IMG_INIT_TIF",
+           "IMG_INIT_WEBP", "IMG_Init", "IMG_Quit", "IMG_LoadTyped_RW",
+           "IMG_Load", "IMG_Load_RW", "IMG_LoadTexture", "IMG_LoadTexture_RW",
+           "IMG_LoadTextureTyped_RW", "IMG_InvertAlpha", "IMG_isICO",
+           "IMG_isCUR", "IMG_isBMP", "IMG_isGIF", "IMG_isJPG", "IMG_isLBM",
+           "IMG_isPNG", "IMG_isPNM", "IMG_isPCX", "IMG_isTIF", "IMG_isXCF",
+           "IMG_isXV", "IMG_isWEBP", "IMG_LoadBMP_RW", "IMG_LoadCUR_RW",
+           "IMG_LoadCUR_RW", "IMG_LoadGIF_RW", "IMG_LoadICO_RW",
+           "IMG_LoadJPG_RW", "IMG_LoadLBM_RW", "IMG_LoadPCX_RW",
+           "IMG_LoadPNM_RW", "IMG_LoadPNG_RW", "IMG_LoadTGA_RW",
+           "IMG_LoadTIF_RW", "IMG_LoadXCF_RW", "IMG_LoadWEBP_RW",
+           "IMG_LoadXPM_RW", "IMG_LoadXV_RW", "IMG_ReadXPMFromArray",
+           "IMG_GetError", "IMG_SetError",
+           "get_dll_file"
+           ]
+
+dll = _DLL("SDL2_image", ["SDL2_image", "SDL2_image-2.0"],
+           os.getenv("PYSDL2_DLL_PATH"))
+
+def get_dll_file():
+    """Gets the file name of the loaded SDL2 library."""
+    return dll.libfile
+
+_bind = dll.bind_function
+
+SDL_IMAGE_MAJOR_VERSION = 2
+SDL_IMAGE_MINOR_VERSION = 0
+SDL_IMAGE_PATCHLEVEL = 0
+
+def SDL_IMAGE_VERSION(x):
+    x.major = SDL_IMAGE_MAJOR_VERSION
+    x.minor = SDL_IMAGE_MINOR_VERSION
+    x.patch = SDL_IMAGE_PATCHLEVEL
+
+IMG_Linked_Version = _bind("IMG_Linked_Version", None, POINTER(SDL_version))
+
+IMG_InitFlags = c_int
+IMG_INIT_JPG = 0x00000001
+IMG_INIT_PNG = 0x00000002
+IMG_INIT_TIF = 0x00000004
+IMG_INIT_WEBP = 0x00000008
+
+IMG_Init = _bind("IMG_Init", [c_int], c_int)
+IMG_Quit = _bind("IMG_Quit")
+IMG_LoadTyped_RW = _bind("IMG_LoadTyped_RW", [POINTER(SDL_RWops), c_int, c_char_p], POINTER(SDL_Surface))
+IMG_Load = _bind("IMG_Load", [c_char_p], POINTER(SDL_Surface))
+IMG_Load_RW = _bind("IMG_Load_RW", [POINTER(SDL_RWops), c_int], POINTER(SDL_Surface)) 
+IMG_LoadTexture = _bind("IMG_LoadTexture", [POINTER(SDL_Renderer), c_char_p], POINTER(SDL_Texture))
+IMG_LoadTexture_RW = _bind("IMG_LoadTexture_RW", [POINTER(SDL_Renderer), POINTER(SDL_RWops), c_int], POINTER(SDL_Texture))
+IMG_LoadTextureTyped_RW = _bind("IMG_LoadTextureTyped_RW", [POINTER(SDL_Renderer), POINTER(SDL_RWops), c_int, c_char_p], POINTER(SDL_Texture))
+IMG_InvertAlpha = _bind("IMG_InvertAlpha", [c_int], c_int)
+
+IMG_isICO = _bind("IMG_isICO", [POINTER(SDL_RWops)], c_int)
+IMG_isCUR = _bind("IMG_isCUR", [POINTER(SDL_RWops)], c_int)
+IMG_isBMP = _bind("IMG_isBMP", [POINTER(SDL_RWops)], c_int)
+IMG_isGIF = _bind("IMG_isGIF", [POINTER(SDL_RWops)], c_int)
+IMG_isJPG = _bind("IMG_isJPG", [POINTER(SDL_RWops)], c_int)
+IMG_isLBM = _bind("IMG_isLBM", [POINTER(SDL_RWops)], c_int)
+IMG_isPCX = _bind("IMG_isPCX", [POINTER(SDL_RWops)], c_int)
+IMG_isPNG = _bind("IMG_isPNG", [POINTER(SDL_RWops)], c_int)
+IMG_isPNM = _bind("IMG_isPNM", [POINTER(SDL_RWops)], c_int)
+IMG_isTIF = _bind("IMG_isTIF", [POINTER(SDL_RWops)], c_int)
+IMG_isXCF = _bind("IMG_isXCF", [POINTER(SDL_RWops)], c_int)
+IMG_isXPM = _bind("IMG_isXPM", [POINTER(SDL_RWops)], c_int)
+IMG_isXV = _bind("IMG_isXV", [POINTER(SDL_RWops)], c_int)
+IMG_isWEBP = _bind("IMG_isWEBP", [POINTER(SDL_RWops)], c_int)
+
+IMG_LoadICO_RW = _bind("IMG_LoadICO_RW", [POINTER(SDL_RWops)], POINTER(SDL_Surface))
+IMG_LoadCUR_RW = _bind("IMG_LoadCUR_RW", [POINTER(SDL_RWops)], POINTER(SDL_Surface))
+IMG_LoadBMP_RW = _bind("IMG_LoadBMP_RW", [POINTER(SDL_RWops)], POINTER(SDL_Surface))
+IMG_LoadGIF_RW = _bind("IMG_LoadGIF_RW", [POINTER(SDL_RWops)], POINTER(SDL_Surface))
+IMG_LoadJPG_RW = _bind("IMG_LoadJPG_RW", [POINTER(SDL_RWops)], POINTER(SDL_Surface))
+IMG_LoadLBM_RW = _bind("IMG_LoadLBM_RW", [POINTER(SDL_RWops)], POINTER(SDL_Surface))
+IMG_LoadPCX_RW = _bind("IMG_LoadPCX_RW", [POINTER(SDL_RWops)], POINTER(SDL_Surface))
+IMG_LoadPNG_RW = _bind("IMG_LoadPNG_RW", [POINTER(SDL_RWops)], POINTER(SDL_Surface))
+IMG_LoadPNM_RW = _bind("IMG_LoadPNM_RW", [POINTER(SDL_RWops)], POINTER(SDL_Surface))
+IMG_LoadTGA_RW = _bind("IMG_LoadTGA_RW", [POINTER(SDL_RWops)], POINTER(SDL_Surface))
+IMG_LoadTIF_RW = _bind("IMG_LoadTIF_RW", [POINTER(SDL_RWops)], POINTER(SDL_Surface))
+IMG_LoadXCF_RW = _bind("IMG_LoadXCF_RW", [POINTER(SDL_RWops)], POINTER(SDL_Surface))
+IMG_LoadXPM_RW = _bind("IMG_LoadXPM_RW", [POINTER(SDL_RWops)], POINTER(SDL_Surface))
+IMG_LoadXV_RW = _bind("IMG_LoadXV_RW", [POINTER(SDL_RWops)], POINTER(SDL_Surface))
+IMG_LoadWEBP_RW = _bind("IMG_LoadWEBP_RW", [POINTER(SDL_RWops)], POINTER(SDL_Surface))
+
+IMG_ReadXPMFromArray = _bind("IMG_ReadXPMFromArray", [POINTER(c_char_p)], POINTER(SDL_Surface))
+IMG_SetError = SDL_SetError
+IMG_GetError = SDL_GetError

File sdl2/shape.py

 from .surface import SDL_Surface
 from .video import SDL_Window
 
+__all__ = ["SDL_NONSHAPEABLE_WINDOW", "SDL_INVALID_SHAPE_ARGUMENT",
+           "SDL_WINDOW_LACKS_SHAPE", "SDL_CreateShapedWindow",
+           "SDL_IsShapedWindow", "WindowShapeMode", "ShapeModeDefault",
+           "ShapeModeBinarizeAlpha", "ShapeModeReverseBinarizeAlpha",
+           "ShapeModeColorKey", "SDL_SHAPEMODEALPHA", "SDL_WindowShapeParams",
+           "SDL_WindowShapeMode", "SDL_SetWindowShape",
+           "SDL_GetShapedWindowMode"
+           ]
+
 SDL_NONSHAPEABLE_WINDOW = -1
 SDL_INVALID_SHAPE_ARGUMENT = -2
 SDL_WINDOW_LACKS_SHAPE = -3

File sdl2/stdinc.py

 from ctypes import c_int, c_byte, c_ubyte, c_ushort, c_short, c_uint, \
     c_longlong, c_ulonglong, cdll, c_size_t, c_void_p, c_char_p
 
+__all__ = ["SDL_FALSE", "SDL_TRUE", "SDL_bool", "Sint8", "Uint8", "Sint16",
+           "Uint16", "Sint32", "Uint32", "Sint64", "Uint64", "SDL_malloc",
+           "SDL_calloc", "SDL_realloc", "SDL_free", "SDL_getenv",
+           "SDL_setenv", "SDL_abs", "SDL_min", "SDL_max", "SDL_memset",
+           "SDL_memcpy"
+           ]
+
 SDL_FALSE = 0
 SDL_TRUE = 1
 

File sdl2/surface.py

 from .pixels import SDL_PixelFormat, SDL_Palette
 from .rwops import SDL_RWops, SDL_RWFromFile
 
+__all__ = ["SDL_SWSURFACE", "SDL_PREALLOC", "SDL_RLEACCEL", "SDL_DONTFREE",
+           "SDL_MUSTLOCK", "SDL_BlitMap", "SDL_Surface", "SDL_Blit",
+           "SDL_CreateRGBSurface", "SDL_CreateRGBSurfaceFrom", "SDL_FreeSurface",
+           "SDL_SetSurfacePalette", "SDL_LockSurface", "SDL_UnlockSurface",
+           "SDL_LoadBMP_RW", "SDL_LoadBMP", "SDL_SaveBMP_RW", "SDL_SaveBMP",
+           "SDL_SetSurfaceRLE", "SDL_SetColorKey", "SDL_GetColorKey",
+           "SDL_SetSurfaceColorMod", "SDL_GetSurfaceColorMod",
+           "SDL_SetSurfaceAlphaMod", "SDL_GetSurfaceAlphaMod",
+           "SDL_SetSurfaceBlendMode", "SDL_GetSurfaceBlendMode",
+           "SDL_SetClipRect", "SDL_GetClipRect", "SDL_ConvertSurface",
+           "SDL_ConvertSurfaceFormat", "SDL_ConvertPixels", "SDL_FillRect",
+           "SDL_FillRects", "SDL_UpperBlit", "SDL_BlitSurface", "SDL_LowerBlit",
+           "SDL_SoftStretch", "SDL_UpperBlitScaled", "SDL_BlitScaled",
+           "SDL_LowerBlitScaled"
+           ]
+
 SDL_SWSURFACE = 0
 SDL_PREALLOC = 0x00000001
 SDL_RLEACCEL = 0x00000002

File sdl2/syswm.py

 from .version import SDL_version
 from .video import SDL_Window
 
+__all__ = ["SDL_SYSWM_TYPE", "SDL_SYSWM_UNKNOWN", "SDL_SYSWM_WINDOWS",
+           "SDL_SYSWM_X11", "SDL_SYSWM_DIRECTFB", "SDL_SYSWM_COCOA",
+           "SDL_SYSWM_UIKIT", "SDL_SysWMmsg", "SDL_SysWMinfo",
+           "SDL_GetWindowWMInfo"
+           ]
+
 SDL_SYSWM_TYPE = c_int
 SDL_SYSWM_UNKNOWN = 0
 SDL_SYSWM_WINDOWS = 1

File sdl2/test/resources/rwopstest.txt

+This is a test file for  sdl2.rwops!
+
+DO NOT MODIFY ITS CONTENTS (NOT EVEN A BYTE), SINCE THE UNITTESTS ASSUME FIXED
+VALUES, RANGES AND SUCH!

File sdl2/test/resources/surfacetest.bmp

Added
New image

File sdl2/test/resources/surfacetest.cur

Binary file added.

File sdl2/test/resources/surfacetest.gif

Added
New image

File sdl2/test/resources/surfacetest.ico

Added
New image

File sdl2/test/resources/surfacetest.jpg

Added
New image

File sdl2/test/resources/surfacetest.pbm

Added
New image

File sdl2/test/resources/surfacetest.pcx

Binary file added.

File sdl2/test/resources/surfacetest.pgm

Added
New image

File sdl2/test/resources/surfacetest.png

Added
New image

File sdl2/test/resources/surfacetest.pnm

Added
New image

File sdl2/test/resources/surfacetest.ppm

Added
New image

File sdl2/test/resources/surfacetest.tga

Added
New image

File sdl2/test/resources/surfacetest.tif

Added
New image

File sdl2/test/resources/surfacetest.webp

Added
New image

File sdl2/test/resources/surfacetest.xcf

Binary file added.

File sdl2/test/resources/surfacetest.xpm

+/* XPM */
+static char * surfacetest_xpm[] = {
+"32 32 6 1",
+" 	c None",
+".	c #FF0000",
+"+	c #00FF00",
+"@	c #0000FF",
+"#	c #FFFFFF",
+"$	c #000000",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@########",
+"........++++++++@@@@@@@@$$$$$$$$",
+"........++++++++@@@@@@@@$$$$$$$$",
+"........++++++++@@@@@@@@$$$$$$$$",
+"........++++++++@@@@@@@@$$$$$$$$",
+"........++++++++@@@@@@@@$$$$$$$$",
+"........++++++++@@@@@@@@$$$$$$$$",
+"........++++++++@@@@@@@@$$$$$$$$",
+"........++++++++@@@@@@@@$$$$$$$$",
+"........++++++++@@@@@@@@$$$$$$$$",
+"........++++++++@@@@@@@@$$$$$$$$",
+"........++++++++@@@@@@@@$$$$$$$$",
+"........++++++++@@@@@@@@$$$$$$$$",
+"........++++++++@@@@@@@@$$$$$$$$",
+"........++++++++@@@@@@@@$$$$$$$$",
+"........++++++++@@@@@@@@$$$$$$$$",
+"........++++++++@@@@@@@@$$$$$$$$"};

File sdl2/test/rwops_test.py

     __tags__ = ["sdl"]
 
     def setUp(self):
-        self.testfile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "rwopstest.txt")
+        self.testfile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "rwopstest.txt")
 
     def tearDown(self):
         pass

File sdl2/test/rwopstest.txt

-This is a test file for  sdl2.rwops!
-
-DO NOT MODIFY ITS CONTENTS (NOT EVEN A BYTE), SINCE THE UNITTESTS ASSUME FIXED
-VALUES, RANGES AND SUCH!

File sdl2/test/sdlimage_test.py

+import os
+import sys
+import ctypes
+import unittest
+from .. import SDL_Init, SDL_Quit, version, surface, rwops, render
+from .. import sdlimage
+
+formats = ("bmp",
+           "cur",
+           "gif",
+           "ico",
+           "jpg",
+           # "lbm",
+           "pbm",
+           "pcx",
+           "pgm",
+           "png",
+           "pnm",
+           "ppm",
+           "tga",
+           "tif",
+           "webp",
+           "xcf",
+           "xpm",
+           # "xv",
+           )
+
+
+class SDLImageTest(unittest.TestCase):
+    __tags__ = ["sdl", "sdlimage"]
+
+    def setUp(self):
+        SDL_Init(0)
+        sdlimage.IMG_Init(sdlimage.IMG_INIT_JPG | sdlimage.IMG_INIT_PNG |
+                          sdlimage.IMG_INIT_TIF | sdlimage.IMG_INIT_WEBP)
+
+    def tearDown(self):
+        SDL_Quit()
+        sdlimage.IMG_Quit()
+
+    @unittest.skip("not implemented")
+    def test_IMG_InitQuit(self):
+        pass
+
+    def test_IMG_Linked_Version(self):
+        v = sdlimage.IMG_Linked_Version()
+        self.assertIsInstance(v.contents, version.SDL_version)
+        self.assertEqual(v.contents.major, 2)
+        self.assertEqual(v.contents.minor, 0)
+        self.assertGreaterEqual(v.contents.patch, 0)
+
+    def test_IMG_Load(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)),
+                                    "resources", fname % fmt)
+            sf = sdlimage.IMG_Load(filename.encode("utf-8"))
+            self.assertIsInstance(sf.contents, surface.SDL_Surface)
+            surface.SDL_FreeSurface(sf)
+
+    def test_IMG_Load_RW(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            if fmt == "tga":
+                # SDL_image does not support loading TGA via IMG_Load_RW()
+                continue
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)),
+                                    "resources", fname % fmt)
+            fp = open(filename, "rb")
+            sf = sdlimage.IMG_Load_RW(rwops.rw_from_object(fp), False)
+            fp.close()
+            self.assertIsInstance(sf.contents, surface.SDL_Surface)
+            surface.SDL_FreeSurface(sf)
+
+    def test_IMG_LoadTexture(self):
+        sf = surface.SDL_CreateRGBSurface(0, 10, 10, 32, 0, 0, 0, 0)
+        rd = render.SDL_CreateSoftwareRenderer(sf)
+
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)),
+                                    "resources", fname % fmt)
+            tex = sdlimage.IMG_LoadTexture(rd, filename.encode("utf-8"))
+            self.assertIsInstance(tex.contents, render.SDL_Texture)
+            render.SDL_DestroyTexture(tex)
+
+        #self.assertRaises(sdl.SDLError, sdlimage.load_texture, rd,
+        #                  RESOURCES.get_path("rwopstest.txt"))
+
+        #self.assertRaises(sdl.SDLError, sdlimage.load_texture, rd, None)
+        #self.assertRaises(sdl.SDLError, sdlimage.load_texture, rd, 1234)
+        #self.assertRaises((AttributeError, TypeError),
+        #                  sdlimage.load_texture, None,
+        #                  RESOURCES.get_path("surfacetest.bmp"))
+        #self.assertRaises((AttributeError, TypeError),
+        #                  sdlimage.load_texture, "Test",
+        #                  RESOURCES.get_path("surfacetest.bmp"))
+        #self.assertRaises((AttributeError, TypeError),
+        #                  sdlimage.load_texture, 1234,
+        #                  RESOURCES.get_path("surfacetest.bmp"))
+
+        render.SDL_DestroyRenderer(rd)
+        surface.SDL_FreeSurface(sf)
+
+    def test_IMG_LoadTexture_RW(self):
+        sf = surface.SDL_CreateRGBSurface(0, 10, 10, 32, 0, 0, 0, 0)
+        rd = render.SDL_CreateSoftwareRenderer(sf)
+
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            if fmt == "tga":
+                # SDL_image does not support loading TGA via
+                # IMG_LoadTexture_RW()
+                continue
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)),
+                                    "resources", fname % fmt)
+            fp = open(filename, "rb")
+            tex = sdlimage.IMG_LoadTexture_RW(rd, rwops.rw_from_object(fp), False)
+            fp.close()
+            self.assertIsInstance(tex.contents, render.SDL_Texture)
+            render.SDL_DestroyTexture(tex)
+
+        render.SDL_DestroyRenderer(rd)
+        surface.SDL_FreeSurface(sf)
+
+    def test_IMG_LoadTextureTyped_RW(self):
+        sf = surface.SDL_CreateRGBSurface(0, 10, 10, 32, 0, 0, 0, 0)
+        rd = render.SDL_CreateSoftwareRenderer(sf)
+
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)),
+                                    "resources", fname % fmt)
+            fp = open(filename, "rb")
+            tex = sdlimage.IMG_LoadTextureTyped_RW(rd, rwops.rw_from_object(fp),
+                                                   False, fmt.upper().encode("utf-8"))
+            fp.close()
+            self.assertIsInstance(tex.contents, render.SDL_Texture)
+            render.SDL_DestroyTexture(tex)
+        render.SDL_DestroyRenderer(rd)
+        surface.SDL_FreeSurface(sf)
+
+    def test_IMG_LoadTyped_RW(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)),
+                                    "resources", fname % fmt)
+            fp = open(filename, "rb")
+            sf = sdlimage.IMG_LoadTyped_RW(rwops.rw_from_object(fp), False,
+                                           fmt.upper().encode("utf-8"))
+            fp.close()
+            self.assertIsInstance(sf.contents, surface.SDL_Surface)
+            surface.SDL_FreeSurface(sf)
+
+    def test_IMG_LoadBMP_rw(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.bmp"), "rb")
+        sf = sdlimage.IMG_LoadBMP_RW(rwops.rw_from_object(fp))
+        fp.close()
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+
+    def test_lIMG_LoadCUR_RW(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.cur"), "rb")
+        sf = sdlimage.IMG_LoadCUR_RW(rwops.rw_from_object(fp))
+        fp.close()
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+        pass
+
+    def test_IMG_LoadGIF_RW(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.gif"), "rb")
+        sf = sdlimage.IMG_LoadGIF_RW(rwops.rw_from_object(fp))
+        fp.close()
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+
+    def test_IMG_LoadICO_RW(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.ico"), "rb")
+        sf = sdlimage.IMG_LoadICO_RW(rwops.rw_from_object(fp))
+        fp.close()
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+
+    def test_IMG_LoadJPG_RW(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.jpg"), "rb")
+        sf = sdlimage.IMG_LoadJPG_RW(rwops.rw_from_object(fp))
+        fp.close()
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+
+    @unittest.skip("not implemented")
+    def test_IMG_LoadLBM_RW(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.lbm"), "rb")
+        sf = sdlimage.IMG_LoadLBM_RW(rwops.rw_from_object(fp))
+        fp.close()
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+
+    def test_IMG_LoadPCX_RW(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.pcx"), "rb")
+        sf = sdlimage.IMG_LoadPCX_RW(rwops.rw_from_object(fp))
+        fp.close()
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+
+    def test_IMG_LoadPNG_RW(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.png"), "rb")
+        sf = sdlimage.IMG_LoadPNG_RW(rwops.rw_from_object(fp))
+        fp.close()
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+
+    def test_IMG_LoadPNM_RW(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.pnm"), "rb")
+        sf = sdlimage.IMG_LoadPNM_RW(rwops.rw_from_object(fp))
+        fp.close()
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+
+    def test_IMG_LoadTGA_RW(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.tga"), "rb")
+        sf = sdlimage.IMG_LoadTGA_RW(rwops.rw_from_object(fp))
+        fp.close()
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+
+    def test_IMG_LoadTIF_RW(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.tif"), "rb")
+        sf = sdlimage.IMG_LoadTIF_RW(rwops.rw_from_object(fp))
+        fp.close()
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+
+    def test_IMG_LoadWEBP_RW(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.webp"), "rb")
+        sf = sdlimage.IMG_LoadWEBP_RW(rwops.rw_from_object(fp))
+        fp.close()
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+
+    def test_IMG_LoadXCF_RW(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.xcf"), "rb")
+        sf = sdlimage.IMG_LoadXCF_RW(rwops.rw_from_object(fp))
+        fp.close()
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+
+    def test_IMG_LoadXPM_RW(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.xpm"), "rb")
+        sf = sdlimage.IMG_LoadXPM_RW(rwops.rw_from_object(fp))
+        fp.close()
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+
+    @unittest.skip("not implemented")
+    def test_IMG_LoadXV_RW(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.xv"), "rb")
+        sf = sdlimage.IMG_LoadXV_RW(rwops.rw_from_object(fp))
+        fp.close()
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+
+    def test_IMG_isBMP(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", fname % fmt)
+            fp = open(filename, "rb")
+            imgrw = rwops.rw_from_object(fp)
+            if fmt == "bmp":
+                self.assertTrue(sdlimage.IMG_isBMP(imgrw))
+            else:
+                self.assertFalse(sdlimage.IMG_isBMP(imgrw))
+            fp.close()
+
+    def test_IMG_isCUR(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", fname % fmt)
+            fp = open(filename, "rb")
+            imgrw = rwops.rw_from_object(fp)
+            if fmt == "cur":
+                self.assertTrue(sdlimage.IMG_isCUR(imgrw))
+            else:
+                self.assertFalse(sdlimage.IMG_isCUR(imgrw))
+            fp.close()
+
+    def test_IMG_isGIF(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", fname % fmt)
+            fp = open(filename, "rb")
+            imgrw = rwops.rw_from_object(fp)
+            if fmt == "gif":
+                self.assertTrue(sdlimage.IMG_isGIF(imgrw))
+            else:
+                self.assertFalse(sdlimage.IMG_isGIF(imgrw))
+            fp.close()
+
+    def test_IMG_isICO(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", fname % fmt)
+            fp = open(filename, "rb")
+            imgrw = rwops.rw_from_object(fp)
+            if fmt == "ico":
+                self.assertTrue(sdlimage.IMG_isICO(imgrw))
+            else:
+                self.assertFalse(sdlimage.IMG_isICO(imgrw))
+            fp.close()
+
+    def test_IMG_isJPG(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", fname % fmt)
+            fp = open(filename, "rb")
+            imgrw = rwops.rw_from_object(fp)
+            if fmt == "jpg":
+                self.assertTrue(sdlimage.IMG_isJPG(imgrw))
+            else:
+                self.assertFalse(sdlimage.IMG_isJPG(imgrw))
+            fp.close()
+
+    @unittest.skip("not implemented")
+    def test_IMG_isLBM(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", fname % fmt)
+            fp = open(filename, "rb")
+            imgrw = rwops.rw_from_object(fp)
+            if fmt == "lbm":
+                self.assertTrue(sdlimage.IMG_isLBM(imgrw))
+            else:
+                self.assertFalse(sdlimage.IMG_isLBM(imgrw))
+            fp.close()
+
+    def test_IMG_isPCX(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", fname % fmt)
+            fp = open(filename, "rb")
+            imgrw = rwops.rw_from_object(fp)
+            if fmt == "pcx":
+                self.assertTrue(sdlimage.IMG_isPCX(imgrw))
+            else:
+                self.assertFalse(sdlimage.IMG_isPCX(imgrw))
+            fp.close()
+
+    def test_IMG_isPNG(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", fname % fmt)
+            fp = open(filename, "rb")
+            imgrw = rwops.rw_from_object(fp)
+            if fmt == "png":
+                self.assertTrue(sdlimage.IMG_isPNG(imgrw))
+            else:
+                self.assertFalse(sdlimage.IMG_isPNG(imgrw))
+            fp.close()
+
+    def test_IMG_isPNM(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", fname % fmt)
+            fp = open(filename, "rb")
+            imgrw = rwops.rw_from_object(fp)
+            if fmt in ("pnm", "pbm", "ppm", "pgm"):
+                self.assertTrue(sdlimage.IMG_isPNM(imgrw))
+            else:
+                self.assertFalse(sdlimage.IMG_isPNM(imgrw))
+            fp.close()
+
+    def test_IMG_isTIF(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", fname % fmt)
+            fp = open(filename, "rb")
+            imgrw = rwops.rw_from_object(fp)
+            if fmt == "tif":
+                self.assertTrue(sdlimage.IMG_isTIF(imgrw))
+            else:
+                self.assertFalse(sdlimage.IMG_isTIF(imgrw))
+            fp.close()
+
+    def test_IMG_isWEBP(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", fname % fmt)
+            fp = open(filename, "rb")
+            imgrw = rwops.rw_from_object(fp)
+            if fmt == "webp":
+                self.assertTrue(sdlimage.IMG_isWEBP(imgrw))
+            else:
+                self.assertFalse(sdlimage.IMG_isWEBP(imgrw))
+            fp.close()
+
+    def test_IMG_isXCF(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", fname % fmt)
+            fp = open(filename, "rb")
+            imgrw = rwops.rw_from_object(fp)
+            if fmt == "xcf":
+                self.assertTrue(sdlimage.IMG_isXCF(imgrw))
+            else:
+                self.assertFalse(sdlimage.IMG_isXCF(imgrw))
+            fp.close()
+
+    def test_IMG_isXPM(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", fname % fmt)
+            fp = open(filename, "rb")
+            imgrw = rwops.rw_from_object(fp)
+            if fmt == "xpm":
+                self.assertTrue(sdlimage.IMG_isXPM(imgrw))
+            else:
+                self.assertFalse(sdlimage.IMG_isXPM(imgrw))
+            fp.close()
+
+    @unittest.skip("not implemented")
+    def test_IMG_isXV(self):
+        fname = "surfacetest.%s"
+        for fmt in formats:
+            filename = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", fname % fmt)
+            fp = open(filename, "rb")
+            imgrw = rwops.rw_from_object(fp)
+            if fmt == "xv":
+                self.assertTrue(sdlimage.IMG_isXV(imgrw))
+            else:
+                self.assertFalse(sdlimage.IMG_isXV(imgrw))
+            fp.close()
+
+    @unittest.skipIf(hasattr(sys, "pypy_version_info"),
+                     "PyPy's ctypes fails to pass a correct string array")
+    def test_IMG_ReadXPMFromArray(self):
+        fp = open(os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.xpm"), "rb")
+        xpm = b""
+        fp.readline()  # /* XPM */
+        fp.readline()  # static char * surfacetest_xpm[] = {
+        lbuf = fp.readlines()
+        fp.close()
+        for line in lbuf:
+            if line.endswith(b"};"):
+                xpm += line[1:-4]
+            else:
+                xpm += line[1:-3]
+        pxpm = ctypes.c_char_p(xpm)
+        sf = sdlimage.IMG_ReadXPMFromArray(ctypes.byref(pxpm))
+        self.assertIsInstance(sf.contents, surface.SDL_Surface)
+        surface.SDL_FreeSurface(sf)
+
+
+if __name__ == '__main__':
+    sys.exit(unittest.main())

File sdl2/test/surface_test.py

     __tags__ = ["sdl"]
 
     def setUp(self):
-        self.testfile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "surfacetest.bmp")
+        self.testfile = os.path.join(os.path.dirname(os.path.abspath(__file__)), "resources", "surfacetest.bmp")
         SDL_Init(SDL_INIT_EVERYTHING)
 
     def tearDown(self):

File sdl2/test/surfacetest.bmp

Removed
Old image

File sdl2/timer.py

 from .dll import _bind
 from .stdinc import Uint32, Uint64, SDL_bool
 
+__all__ = ["SDL_GetTicks", "SDL_GetPerformanceCounter",
+           "SDL_GetPerformanceFrequency", "SDL_Delay", "SDL_TimerCallback",
+           "SDL_TimerID", "SDL_AddTimer", "SDL_RemoveTimer"
+           ]
+
 SDL_GetTicks = _bind("SDL_GetTicks", None, Uint32)
 SDL_GetPerformanceCounter = _bind("SDL_GetPerformanceCounter", None, Uint64)
 SDL_GetPerformanceFrequency = _bind("SDL_GetPerformanceFrequency", None, Uint64)

File sdl2/touch.py

 from .dll import _bind
 from .stdinc import Sint64
 
+__all__ = ["SDL_TouchID", "SDL_FingerID", "SDL_Finger", "SDL_GetNumTouchDevices",
+           "SDL_GetTouchDevice", "SDL_GetNumTouchFingers", "SDL_GetTouchFinger"
+           ]
+
 SDL_TouchID = Sint64
 SDL_FingerID = Sint64
 

File sdl2/version.py

 from .dll import _bind
 from .stdinc import Uint8
 
+__all__ = ["SDL_version", "SDL_MAJOR_VERSION", "SDL_MINOR_VERSION",
+           "SDL_PATCHLEVEL", "SDL_VERSION", "SDL_VERSIONNUM",
+           "SDL_COMPILEDVERSION", "SDL_VERSION_ATLEAST", "SDL_GetVersion",
+           "SDL_GetRevision", "SDL_GetRevisionNumber"
+           ]
+
 class SDL_version(Structure):
     _fields_ = [("major", Uint8),
                 ("minor", Uint8),

File sdl2/video.py

 from .rect import SDL_Rect
 from .surface import SDL_Surface
 
+__all__ = ["SDL_DisplayMode", "SDL_Window", "SDL_WindowFlags",
+           "SDL_WINDOW_FULLSCREEN", "SDL_WINDOW_OPENGL", "SDL_WINDOW_SHOWN",
+           "SDL_WINDOW_HIDDEN", "SDL_WINDOW_BORDERLESS", "SDL_WINDOW_RESIZABLE",
+           "SDL_WINDOW_MINIMIZED", "SDL_WINDOW_MAXIMIZED",
+           "SDL_WINDOW_INPUT_GRABBED", "SDL_WINDOW_INPUT_FOCUS",
+           "SDL_WINDOW_MOUSE_FOCUS", "SDL_WINDOW_FULLSCREEN_DESKTOP",
+           "SDL_WINDOW_FOREIGN", "SDL_WINDOWPOS_UNDEFINED_MASK",
+           "SDL_WINDOWPOS_UNDEFINED_DISPLAY", "SDL_WINDOWPOS_UNDEFINED",
+           "SDL_WINDOWPOS_ISUNDEFINED", "SDL_WINDOWPOS_CENTERED_MASK",
+           "SDL_WINDOWPOS_CENTERED_DISPLAY", "SDL_WINDOWPOS_CENTERED",
+           "SDL_WINDOWPOS_ISCENTERED", "SDL_WindowEventID",
+           "SDL_WINDOWEVENT_NONE", "SDL_WINDOWEVENT_SHOWN",
+           "SDL_WINDOWEVENT_HIDDEN", "SDL_WINDOWEVENT_EXPOSED",
+           "SDL_WINDOWEVENT_MOVED", "SDL_WINDOWEVENT_RESIZED",
+           "SDL_WINDOWEVENT_SIZE_CHANGED", "SDL_WINDOWEVENT_MINIMIZED",
+           "SDL_WINDOWEVENT_MAXIMIZED", "SDL_WINDOWEVENT_RESTORED",
+           "SDL_WINDOWEVENT_ENTER", "SDL_WINDOWEVENT_LEAVE",
+           "SDL_WINDOWEVENT_FOCUS_GAINED", "SDL_WINDOWEVENT_FOCUS_LOST",
+           "SDL_WINDOWEVENT_CLOSE", "SDL_GLContext", "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_GLprofile", "SDL_GL_CONTEXT_PROFILE_CORE",
+           "SDL_GL_CONTEXT_PROFILE_COMPATIBILITY", "SDL_GL_CONTEXT_PROFILE_ES",
+           "SDL_GLcontextFlag", "SDL_GL_CONTEXT_DEBUG_FLAG",
+           "SDL_GL_CONTEXT_FORWARD_COMPATIBLE_FLAG",
+           "SDL_GL_CONTEXT_ROBUST_ACCESS_FLAG",
+           "SDL_GL_CONTEXT_RESET_ISOLATION_FLAG", "SDL_GetNumVideoDrivers",
+           "SDL_GetVideoDriver", "SDL_VideoInit", "SDL_VideoQuit",
+           "SDL_GetCurrentVideoDriver", "SDL_GetNumVideoDisplays",
+           "SDL_GetDisplayName", "SDL_GetDisplayBounds",
+           "SDL_GetNumDisplayModes", "SDL_GetDisplayMode",
+           "SDL_GetDesktopDisplayMode", "SDL_GetCurrentDisplayMode",
+           "SDL_GetClosestDisplayMode", "SDL_GetWindowDisplayIndex",
+           "SDL_SetWindowDisplayMode", "SDL_GetWindowDisplayMode",
+           "SDL_GetWindowPixelFormat", "SDL_CreateWindow", "SDL_CreateWindowFrom",
+           "SDL_GetWindowID", "SDL_GetWindowFromID", "SDL_GetWindowFlags",
+           "SDL_SetWindowTitle", "SDL_GetWindowTitle", "SDL_SetWindowIcon",
+           "SDL_SetWindowData", "SDL_GetWindowData", "SDL_SetWindowPosition",
+           "SDL_GetWindowPosition", "SDL_SetWindowSize", "SDL_GetWindowSize",
+           "SDL_SetWindowMinimumSize", "SDL_GetWindowMinimumSize",
+           "SDL_SetWindowMaximumSize", "SDL_GetWindowMaximumSize",
+           "SDL_SetWindowBordered", "SDL_ShowWindow", "SDL_HideWindow",
+           "SDL_RaiseWindow", "SDL_MaximizeWindow", "SDL_MinimizeWindow",
+           "SDL_RestoreWindow", "SDL_SetWindowFullscreen", "SDL_GetWindowSurface",
+           "SDL_UpdateWindowSurface", "SDL_UpdateWindowSurfaceRects",
+           "SDL_SetWindowGrab", "SDL_GetWindowGrab", "SDL_SetWindowBrightness",
+           "SDL_GetWindowBrightness", "SDL_SetWindowGammaRamp",
+           "SDL_GetWindowGammaRamp", "SDL_DestroyWindow", "SDL_DisableScreenSaver",
+           "SDL_IsScreenSaverEnabled", "SDL_EnableScreenSaver",
+           "SDL_GL_LoadLibrary", "SDL_GL_GetProcAddress", "SDL_GL_UnloadLibrary",
+           "SDL_GL_ExtensionSupported", "SDL_GL_SetAttribute",
+           "SDL_GL_GetAttribute", "SDL_GL_CreateContext", "SDL_GL_MakeCurrent",
+           "SDL_GL_SetSwapInterval", "SDL_GL_GetSwapInterval",
+           "SDL_GL_SwapWindow", "SDL_GL_DeleteContext"
+           ]
+
 class SDL_DisplayMode(Structure):
     _fields_ = [("format", Uint32),
                 ("w", c_int),