# generated by h2ctypes.py

from ctypes import *

# predefines
size_t = c_ulong
_IO_FILE = c_ulong
__ssize_t = c_int
ssize_t = c_uint

# defines
SDL_ALPHA_OPAQUE = 255
SDL_ALPHA_TRANSPARENT = 0
SDL_ANYFORMAT = 0x10000000
SDL_ASSEMBLY_ROUTINES = 1
SDL_ASYNCBLIT = 0x00000004
SDL_AUDIO_DRIVER_ALSA = 1
SDL_AUDIO_DRIVER_ARTS = 1
SDL_AUDIO_DRIVER_DISK = 1
SDL_AUDIO_DRIVER_DUMMY = 1
SDL_AUDIO_DRIVER_ESD = 1
SDL_AUDIO_DRIVER_OSS = 1
SDL_BYTEORDER = 1234
SDL_CDROM_LINUX = 1
SDL_DOUBLEBUF = 0x40000000
SDL_FULLSCREEN = 0x80000000
SDL_HAS_64BIT_TYPE = 1
SDL_HERMES_BLITTERS = 1
SDL_HWACCEL = 0x00000100
SDL_HWPALETTE = 0x20000000
SDL_HWSURFACE = 0x00000001
SDL_ICONV_E2BIG = size_t(-2)
SDL_ICONV_EILSEQ = size_t(-3)
SDL_ICONV_EINVAL = size_t(-4)
SDL_ICONV_ERROR = size_t(-1)
SDL_IYUV_OVERLAY = 0x56555949
SDL_JOYSTICK_LINUX = 1
SDL_LOADSO_DLOPEN = 1
SDL_LOGPAL = 0x01
SDL_NOFRAME = 0x00000020
SDL_OPENGL = 0x00000002
SDL_OPENGLBLIT = 0x0000000A
SDL_PHYSPAL = 0x02
SDL_PREALLOC = 0x01000000
SDL_RESIZABLE = 0x00000010
SDL_RLEACCEL = 0x00004000
SDL_RLEACCELOK = 0x00002000
SDL_SRCALPHA = 0x00010000
SDL_SRCCOLORKEY = 0x00001000
SDL_SWSURFACE = 0x00000000
SDL_THREAD_PTHREAD = 1
SDL_THREAD_PTHREAD_RECURSIVE_MUTEX = 1
SDL_TIMER_UNIX = 1
SDL_UYVY_OVERLAY = 0x59565955
SDL_VIDEO_DRIVER_AALIB = 1
SDL_VIDEO_DRIVER_DGA = 1
SDL_VIDEO_DRIVER_DIRECTFB = 1
SDL_VIDEO_DRIVER_DUMMY = 1
SDL_VIDEO_DRIVER_FBCON = 1
SDL_VIDEO_DRIVER_X11 = 1
SDL_VIDEO_DRIVER_X11_DGAMOUSE = 1
SDL_VIDEO_DRIVER_X11_DPMS = 1
SDL_VIDEO_DRIVER_X11_DYNAMIC = "libX11.so.6"
SDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT = "libXext.so.6"
SDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR = "libXrandr.so.2"
SDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER = "libXrender.so.1"
SDL_VIDEO_DRIVER_X11_VIDMODE = 1
SDL_VIDEO_DRIVER_X11_XINERAMA = 1
SDL_VIDEO_DRIVER_X11_XME = 1
SDL_VIDEO_DRIVER_X11_XRANDR = 1
SDL_VIDEO_DRIVER_X11_XV = 1
SDL_VIDEO_OPENGL = 1
SDL_VIDEO_OPENGL_GLX = 1
SDL_YUY2_OVERLAY = 0x32595559
SDL_YV12_OVERLAY = 0x32315659
SDL_YVYU_OVERLAY = 0x55595659
SEEK_CUR = 1
SEEK_END = 2
SEEK_SET = 0
STDC_HEADERS = 1
TMP_MAX = 238328
WCONTINUED = 8
WEXITED = 4
WNOHANG = 1
WNOWAIT = 0x01000000
WSTOPPED = 2
WUNTRACED = 2

# using file "/usr/include/SDL/SDL_video.h"
uint32_t = c_uint

Uint32 = uint32_t

uint8_t = c_ubyte

Uint8 = uint8_t

class SDL_Color(Structure):
	_fields_ = [
		('r', Uint8),
		('g', Uint8),
		('b', Uint8),
		('unused', Uint8),
	]

SDL_Color = SDL_Color

class SDL_Palette(Structure):
	_fields_ = [
		('ncolors', c_int),
		('colors', POINTER(SDL_Color)),
	]

SDL_Palette = SDL_Palette

class SDL_PixelFormat(Structure):
	_fields_ = [
		('palette', POINTER(SDL_Palette)),
		('BitsPerPixel', Uint8),
		('BytesPerPixel', Uint8),
		('Rloss', Uint8),
		('Gloss', Uint8),
		('Bloss', Uint8),
		('Aloss', Uint8),
		('Rshift', Uint8),
		('Gshift', Uint8),
		('Bshift', Uint8),
		('Ashift', Uint8),
		('Rmask', Uint32),
		('Gmask', Uint32),
		('Bmask', Uint32),
		('Amask', Uint32),
		('colorkey', Uint32),
		('alpha', Uint8),
	]

SDL_PixelFormat = SDL_PixelFormat

uint16_t = c_ushort

Uint16 = uint16_t

class private_hwdata(Structure):
	_fields_ = [
	]

int16_t = c_short

Sint16 = int16_t

class SDL_Rect(Structure):
	_fields_ = [
		('x', Sint16),
		('y', Sint16),
		('w', Uint16),
		('h', Uint16),
	]

SDL_Rect = SDL_Rect

class SDL_BlitMap(Structure):
	_fields_ = [
	]

class SDL_Surface(Structure):
	_fields_ = [
		('flags', Uint32),
		('format', POINTER(SDL_PixelFormat)),
		('w', c_int),
		('h', c_int),
		('pitch', Uint16),
		('pixels', c_void_p),
		('offset', c_int),
		('hwdata', POINTER(private_hwdata)),
		('clip_rect', SDL_Rect),
		('unused1', Uint32),
		('locked', Uint32),
		('map', POINTER(SDL_BlitMap)),
		('format_version', c_uint),
		('refcount', c_int),
	]

class SDL_VideoInfo(Structure):
	_fields_ = [
		('hw_available', Uint32),
		('wm_available', Uint32),
		('UnusedBits1', Uint32),
		('UnusedBits2', Uint32),
		('blit_hw', Uint32),
		('blit_hw_CC', Uint32),
		('blit_hw_A', Uint32),
		('blit_sw', Uint32),
		('blit_sw_CC', Uint32),
		('blit_sw_A', Uint32),
		('blit_fill', Uint32),
		('UnusedBits3', Uint32),
		('video_mem', Uint32),
		('vfmt', POINTER(SDL_PixelFormat)),
		('current_w', c_int),
		('current_h', c_int),
	]

SDL_VideoInfo = SDL_VideoInfo

class private_yuvhwfuncs(Structure):
	_fields_ = [
	]

class private_yuvhwdata(Structure):
	_fields_ = [
	]


class SDL_Overlay(Structure):
	_fields_ = [
		('format', Uint32),
		('w', c_int),
		('h', c_int),
		('planes', c_int),
		('pitches', POINTER(Uint16)),
		('pixels', POINTER(POINTER(Uint8))),
		('hwfuncs', POINTER(private_yuvhwfuncs)),
		('hwdata', POINTER(private_yuvhwdata)),
		('hw_overlay', Uint32),
		('UnusedBits', Uint32),
	]

SDL_Overlay = SDL_Overlay

SDL_Surface = SDL_Surface

SDL_blit = CFUNCTYPE(c_int,POINTER(SDL_Surface),POINTER(SDL_Rect),POINTER(SDL_Surface),POINTER(SDL_Rect))

# enumeration SDL_GLattr
SDL_GL_RED_SIZE = 0
SDL_GL_GREEN_SIZE = 1
SDL_GL_BLUE_SIZE = 2
SDL_GL_ALPHA_SIZE = 3
SDL_GL_BUFFER_SIZE = 4
SDL_GL_DOUBLEBUFFER = 5
SDL_GL_DEPTH_SIZE = 6
SDL_GL_STENCIL_SIZE = 7
SDL_GL_ACCUM_RED_SIZE = 8
SDL_GL_ACCUM_GREEN_SIZE = 9
SDL_GL_ACCUM_BLUE_SIZE = 10
SDL_GL_ACCUM_ALPHA_SIZE = 11
SDL_GL_STEREO = 12
SDL_GL_MULTISAMPLEBUFFERS = 13
SDL_GL_MULTISAMPLESAMPLES = 14
SDL_GL_ACCELERATED_VISUAL = 15
SDL_GL_SWAP_CONTROL = 16

import glob

libSDL = CDLL(glob.glob("/usr/lib/libSDL-1.2.so*")[0])
SDL_VideoInit = libSDL.SDL_VideoInit
SDL_VideoInit.restype = c_int
SDL_VideoInit.argtypes = [c_char_p,Uint32]

SDL_VideoQuit = libSDL.SDL_VideoQuit
SDL_VideoQuit.restype = None
SDL_VideoQuit.argtypes = []

SDL_VideoDriverName = libSDL.SDL_VideoDriverName
SDL_VideoDriverName.restype = c_char_p
SDL_VideoDriverName.argtypes = [c_char_p,c_int]

SDL_GetVideoSurface = libSDL.SDL_GetVideoSurface
SDL_GetVideoSurface.restype = POINTER(SDL_Surface)
SDL_GetVideoSurface.argtypes = []

SDL_GetVideoInfo = libSDL.SDL_GetVideoInfo
SDL_GetVideoInfo.restype = POINTER(SDL_VideoInfo)
SDL_GetVideoInfo.argtypes = []

SDL_VideoModeOK = libSDL.SDL_VideoModeOK
SDL_VideoModeOK.restype = c_int
SDL_VideoModeOK.argtypes = [c_int,c_int,c_int,Uint32]

SDL_ListModes = libSDL.SDL_ListModes
SDL_ListModes.restype = POINTER(POINTER(SDL_Rect))
SDL_ListModes.argtypes = [POINTER(SDL_PixelFormat),Uint32]

SDL_SetVideoMode = libSDL.SDL_SetVideoMode
SDL_SetVideoMode.restype = POINTER(SDL_Surface)
SDL_SetVideoMode.argtypes = [c_int,c_int,c_int,Uint32]

SDL_UpdateRects = libSDL.SDL_UpdateRects
SDL_UpdateRects.restype = None
SDL_UpdateRects.argtypes = [POINTER(SDL_Surface),c_int,POINTER(SDL_Rect)]

int32_t = c_int

Sint32 = int32_t

SDL_UpdateRect = libSDL.SDL_UpdateRect
SDL_UpdateRect.restype = None
SDL_UpdateRect.argtypes = [POINTER(SDL_Surface),Sint32,Sint32,Uint32,Uint32]

SDL_Flip = libSDL.SDL_Flip
SDL_Flip.restype = c_int
SDL_Flip.argtypes = [POINTER(SDL_Surface)]

SDL_SetGamma = libSDL.SDL_SetGamma
SDL_SetGamma.restype = c_int
SDL_SetGamma.argtypes = [c_float,c_float,c_float]

SDL_SetGammaRamp = libSDL.SDL_SetGammaRamp
SDL_SetGammaRamp.restype = c_int
SDL_SetGammaRamp.argtypes = [POINTER(Uint16),POINTER(Uint16),POINTER(Uint16)]

SDL_GetGammaRamp = libSDL.SDL_GetGammaRamp
SDL_GetGammaRamp.restype = c_int
SDL_GetGammaRamp.argtypes = [POINTER(Uint16),POINTER(Uint16),POINTER(Uint16)]

SDL_SetColors = libSDL.SDL_SetColors
SDL_SetColors.restype = c_int
SDL_SetColors.argtypes = [POINTER(SDL_Surface),POINTER(SDL_Color),c_int,c_int]

SDL_SetPalette = libSDL.SDL_SetPalette
SDL_SetPalette.restype = c_int
SDL_SetPalette.argtypes = [POINTER(SDL_Surface),c_int,POINTER(SDL_Color),c_int,c_int]

SDL_MapRGB = libSDL.SDL_MapRGB
SDL_MapRGB.restype = Uint32
SDL_MapRGB.argtypes = [POINTER(SDL_PixelFormat),Uint8,Uint8,Uint8]

SDL_MapRGBA = libSDL.SDL_MapRGBA
SDL_MapRGBA.restype = Uint32
SDL_MapRGBA.argtypes = [POINTER(SDL_PixelFormat),Uint8,Uint8,Uint8,Uint8]

SDL_GetRGB = libSDL.SDL_GetRGB
SDL_GetRGB.restype = None
SDL_GetRGB.argtypes = [Uint32,POINTER(SDL_PixelFormat),POINTER(Uint8),POINTER(Uint8),POINTER(Uint8)]

SDL_GetRGBA = libSDL.SDL_GetRGBA
SDL_GetRGBA.restype = None
SDL_GetRGBA.argtypes = [Uint32,POINTER(SDL_PixelFormat),POINTER(Uint8),POINTER(Uint8),POINTER(Uint8),POINTER(Uint8)]

SDL_CreateRGBSurface = libSDL.SDL_CreateRGBSurface
SDL_CreateRGBSurface.restype = POINTER(SDL_Surface)
SDL_CreateRGBSurface.argtypes = [Uint32,c_int,c_int,c_int,Uint32,Uint32,Uint32,Uint32]

SDL_CreateRGBSurfaceFrom = libSDL.SDL_CreateRGBSurfaceFrom
SDL_CreateRGBSurfaceFrom.restype = POINTER(SDL_Surface)
SDL_CreateRGBSurfaceFrom.argtypes = [c_void_p,c_int,c_int,c_int,c_int,Uint32,Uint32,Uint32,Uint32]

SDL_FreeSurface = libSDL.SDL_FreeSurface
SDL_FreeSurface.restype = None
SDL_FreeSurface.argtypes = [POINTER(SDL_Surface)]

SDL_LockSurface = libSDL.SDL_LockSurface
SDL_LockSurface.restype = c_int
SDL_LockSurface.argtypes = [POINTER(SDL_Surface)]

SDL_UnlockSurface = libSDL.SDL_UnlockSurface
SDL_UnlockSurface.restype = None
SDL_UnlockSurface.argtypes = [POINTER(SDL_Surface)]

class _IO_marker(Structure):
	_fields_ = [
		('_next', c_void_p),
		('_sbuf', POINTER(_IO_FILE)),
		('_pos', c_int),
	]

t__off_t = c_long

_IO_lock_t = None

t__quad_t = c_longlong

t__off64_t = t__quad_t

class _IO_FILE(Structure):
	_fields_ = [
		('_flags', c_int),
		('_IO_read_ptr', c_char_p),
		('_IO_read_end', c_char_p),
		('_IO_read_base', c_char_p),
		('_IO_write_base', c_char_p),
		('_IO_write_ptr', c_char_p),
		('_IO_write_end', c_char_p),
		('_IO_buf_base', c_char_p),
		('_IO_buf_end', c_char_p),
		('_IO_save_base', c_char_p),
		('_IO_backup_base', c_char_p),
		('_IO_save_end', c_char_p),
		('_markers', POINTER(_IO_marker)),
		('_chain', c_void_p),
		('_fileno', c_int),
		('_flags2', c_int),
		('_old_offset', t__off_t),
		('_cur_column', c_ushort),
		('_vtable_offset', c_char),
		('_shortbuf', c_char*1),
		('_lock', POINTER(_IO_lock_t)),
		('_offset', t__off64_t),
		('__pad1', c_void_p),
		('__pad2', c_void_p),
		('__pad3', c_void_p),
		('__pad4', c_void_p),
		('__pad5', size_t),
		('_mode', c_int),
		('_unused2', c_char*40),
	]

FILE = _IO_FILE

class struct__a428a7ed(Structure):
	_fields_ = [
		('autoclose', c_int),
		('fp', POINTER(FILE)),
	]

class struct__bc739503(Structure):
	_fields_ = [
		('base', POINTER(Uint8)),
		('here', POINTER(Uint8)),
		('stop', POINTER(Uint8)),
	]

class struct__4757d83f(Structure):
	_fields_ = [
		('data1', c_void_p),
	]

class union__048648d8(Union):
	_fields_ = [
		('stdio', struct__a428a7ed),
		('mem', struct__bc739503),
		('unknown', struct__4757d83f),
	]

class SDL_RWops(Structure):
	_fields_ = [
		('seek', CFUNCTYPE(c_int,POINTER("SDL_RWops"),c_int,c_int)),
		('read', CFUNCTYPE(c_int,POINTER("SDL_RWops"),c_void_p,c_int,c_int)),
		('write', CFUNCTYPE(c_int,POINTER("SDL_RWops"),c_void_p,c_int,c_int)),
		('close', CFUNCTYPE(c_int,POINTER("SDL_RWops"))),
		('type', Uint32),
		('hidden', union__048648d8),
	]

SDL_RWops = SDL_RWops

SDL_LoadBMP_RW = libSDL.SDL_LoadBMP_RW
SDL_LoadBMP_RW.restype = POINTER(SDL_Surface)
SDL_LoadBMP_RW.argtypes = [POINTER(SDL_RWops),c_int]

SDL_SaveBMP_RW = libSDL.SDL_SaveBMP_RW
SDL_SaveBMP_RW.restype = c_int
SDL_SaveBMP_RW.argtypes = [POINTER(SDL_Surface),POINTER(SDL_RWops),c_int]

SDL_SetColorKey = libSDL.SDL_SetColorKey
SDL_SetColorKey.restype = c_int
SDL_SetColorKey.argtypes = [POINTER(SDL_Surface),Uint32,Uint32]

SDL_SetAlpha = libSDL.SDL_SetAlpha
SDL_SetAlpha.restype = c_int
SDL_SetAlpha.argtypes = [POINTER(SDL_Surface),Uint32,Uint8]

# enumeration SDL_bool
SDL_FALSE = 0
SDL_TRUE = 1

SDL_bool = c_int

SDL_SetClipRect = libSDL.SDL_SetClipRect
SDL_SetClipRect.restype = SDL_bool
SDL_SetClipRect.argtypes = [POINTER(SDL_Surface),POINTER(SDL_Rect)]

SDL_GetClipRect = libSDL.SDL_GetClipRect
SDL_GetClipRect.restype = None
SDL_GetClipRect.argtypes = [POINTER(SDL_Surface),POINTER(SDL_Rect)]

SDL_ConvertSurface = libSDL.SDL_ConvertSurface
SDL_ConvertSurface.restype = POINTER(SDL_Surface)
SDL_ConvertSurface.argtypes = [POINTER(SDL_Surface),POINTER(SDL_PixelFormat),Uint32]

SDL_UpperBlit = libSDL.SDL_UpperBlit
SDL_UpperBlit.restype = c_int
SDL_UpperBlit.argtypes = [POINTER(SDL_Surface),POINTER(SDL_Rect),POINTER(SDL_Surface),POINTER(SDL_Rect)]

SDL_LowerBlit = libSDL.SDL_LowerBlit
SDL_LowerBlit.restype = c_int
SDL_LowerBlit.argtypes = [POINTER(SDL_Surface),POINTER(SDL_Rect),POINTER(SDL_Surface),POINTER(SDL_Rect)]

SDL_FillRect = libSDL.SDL_FillRect
SDL_FillRect.restype = c_int
SDL_FillRect.argtypes = [POINTER(SDL_Surface),POINTER(SDL_Rect),Uint32]

SDL_DisplayFormat = libSDL.SDL_DisplayFormat
SDL_DisplayFormat.restype = POINTER(SDL_Surface)
SDL_DisplayFormat.argtypes = [POINTER(SDL_Surface)]

SDL_DisplayFormatAlpha = libSDL.SDL_DisplayFormatAlpha
SDL_DisplayFormatAlpha.restype = POINTER(SDL_Surface)
SDL_DisplayFormatAlpha.argtypes = [POINTER(SDL_Surface)]

SDL_CreateYUVOverlay = libSDL.SDL_CreateYUVOverlay
SDL_CreateYUVOverlay.restype = POINTER(SDL_Overlay)
SDL_CreateYUVOverlay.argtypes = [c_int,c_int,Uint32,POINTER(SDL_Surface)]

SDL_LockYUVOverlay = libSDL.SDL_LockYUVOverlay
SDL_LockYUVOverlay.restype = c_int
SDL_LockYUVOverlay.argtypes = [POINTER(SDL_Overlay)]

SDL_UnlockYUVOverlay = libSDL.SDL_UnlockYUVOverlay
SDL_UnlockYUVOverlay.restype = None
SDL_UnlockYUVOverlay.argtypes = [POINTER(SDL_Overlay)]

SDL_DisplayYUVOverlay = libSDL.SDL_DisplayYUVOverlay
SDL_DisplayYUVOverlay.restype = c_int
SDL_DisplayYUVOverlay.argtypes = [POINTER(SDL_Overlay),POINTER(SDL_Rect)]

SDL_FreeYUVOverlay = libSDL.SDL_FreeYUVOverlay
SDL_FreeYUVOverlay.restype = None
SDL_FreeYUVOverlay.argtypes = [POINTER(SDL_Overlay)]

SDL_GL_LoadLibrary = libSDL.SDL_GL_LoadLibrary
SDL_GL_LoadLibrary.restype = c_int
SDL_GL_LoadLibrary.argtypes = [c_char_p]

SDL_GL_GetProcAddress = libSDL.SDL_GL_GetProcAddress
SDL_GL_GetProcAddress.restype = c_void_p
SDL_GL_GetProcAddress.argtypes = [c_char_p]

SDL_GL_SetAttribute = libSDL.SDL_GL_SetAttribute
SDL_GL_SetAttribute.restype = c_int
SDL_GL_SetAttribute.argtypes = [c_int,c_int]

SDL_GL_GetAttribute = libSDL.SDL_GL_GetAttribute
SDL_GL_GetAttribute.restype = c_int
SDL_GL_GetAttribute.argtypes = [c_int,POINTER(c_int)]

SDL_GL_SwapBuffers = libSDL.SDL_GL_SwapBuffers
SDL_GL_SwapBuffers.restype = None
SDL_GL_SwapBuffers.argtypes = []

SDL_GL_UpdateRects = libSDL.SDL_GL_UpdateRects
SDL_GL_UpdateRects.restype = None
SDL_GL_UpdateRects.argtypes = [c_int,POINTER(SDL_Rect)]

SDL_GL_Lock = libSDL.SDL_GL_Lock
SDL_GL_Lock.restype = None
SDL_GL_Lock.argtypes = []

SDL_GL_Unlock = libSDL.SDL_GL_Unlock
SDL_GL_Unlock.restype = None
SDL_GL_Unlock.argtypes = []

SDL_WM_SetCaption = libSDL.SDL_WM_SetCaption
SDL_WM_SetCaption.restype = None
SDL_WM_SetCaption.argtypes = [c_char_p,c_char_p]

SDL_WM_GetCaption = libSDL.SDL_WM_GetCaption
SDL_WM_GetCaption.restype = None
SDL_WM_GetCaption.argtypes = [POINTER(c_char_p),POINTER(c_char_p)]

SDL_WM_SetIcon = libSDL.SDL_WM_SetIcon
SDL_WM_SetIcon.restype = None
SDL_WM_SetIcon.argtypes = [POINTER(SDL_Surface),POINTER(Uint8)]

SDL_WM_IconifyWindow = libSDL.SDL_WM_IconifyWindow
SDL_WM_IconifyWindow.restype = c_int
SDL_WM_IconifyWindow.argtypes = []

SDL_WM_ToggleFullScreen = libSDL.SDL_WM_ToggleFullScreen
SDL_WM_ToggleFullScreen.restype = c_int
SDL_WM_ToggleFullScreen.argtypes = [POINTER(SDL_Surface)]

# enumeration SDL_GrabMode
SDL_GRAB_QUERY = -1
SDL_GRAB_OFF = 0
SDL_GRAB_ON = 1
SDL_GRAB_FULLSCREEN = 2

SDL_WM_GrabInput = libSDL.SDL_WM_GrabInput
SDL_WM_GrabInput.restype = c_int
SDL_WM_GrabInput.argtypes = [c_int]

SDL_SoftStretch = libSDL.SDL_SoftStretch
SDL_SoftStretch.restype = c_int
SDL_SoftStretch.argtypes = [POINTER(SDL_Surface),POINTER(SDL_Rect),POINTER(SDL_Surface),POINTER(SDL_Rect)]

# using file "/usr/include/SDL/SDL_mouse.h"
# using file "/usr/include/SDL/SDL_events.h"
Uint8 = c_ubyte

class SDL_ActiveEvent(Structure):
	_fields_ = [
		('type', Uint8),
		('gain', Uint8),
		('state', Uint8),
	]

SDL_ActiveEvent = SDL_ActiveEvent

# enumeration SDLKey
SDLK_UNKNOWN = 0
SDLK_FIRST = 0
SDLK_BACKSPACE = 8
SDLK_TAB = 9
SDLK_CLEAR = 12
SDLK_RETURN = 13
SDLK_PAUSE = 19
SDLK_ESCAPE = 27
SDLK_SPACE = 32
SDLK_EXCLAIM = 33
SDLK_QUOTEDBL = 34
SDLK_HASH = 35
SDLK_DOLLAR = 36
SDLK_AMPERSAND = 38
SDLK_QUOTE = 39
SDLK_LEFTPAREN = 40
SDLK_RIGHTPAREN = 41
SDLK_ASTERISK = 42
SDLK_PLUS = 43
SDLK_COMMA = 44
SDLK_MINUS = 45
SDLK_PERIOD = 46
SDLK_SLASH = 47
SDLK_0 = 48
SDLK_1 = 49
SDLK_2 = 50
SDLK_3 = 51
SDLK_4 = 52
SDLK_5 = 53
SDLK_6 = 54
SDLK_7 = 55
SDLK_8 = 56
SDLK_9 = 57
SDLK_COLON = 58
SDLK_SEMICOLON = 59
SDLK_LESS = 60
SDLK_EQUALS = 61
SDLK_GREATER = 62
SDLK_QUESTION = 63
SDLK_AT = 64
SDLK_LEFTBRACKET = 91
SDLK_BACKSLASH = 92
SDLK_RIGHTBRACKET = 93
SDLK_CARET = 94
SDLK_UNDERSCORE = 95
SDLK_BACKQUOTE = 96
SDLK_a = 97
SDLK_b = 98
SDLK_c = 99
SDLK_d = 100
SDLK_e = 101
SDLK_f = 102
SDLK_g = 103
SDLK_h = 104
SDLK_i = 105
SDLK_j = 106
SDLK_k = 107
SDLK_l = 108
SDLK_m = 109
SDLK_n = 110
SDLK_o = 111
SDLK_p = 112
SDLK_q = 113
SDLK_r = 114
SDLK_s = 115
SDLK_t = 116
SDLK_u = 117
SDLK_v = 118
SDLK_w = 119
SDLK_x = 120
SDLK_y = 121
SDLK_z = 122
SDLK_DELETE = 127
SDLK_WORLD_0 = 160
SDLK_WORLD_1 = 161
SDLK_WORLD_2 = 162
SDLK_WORLD_3 = 163
SDLK_WORLD_4 = 164
SDLK_WORLD_5 = 165
SDLK_WORLD_6 = 166
SDLK_WORLD_7 = 167
SDLK_WORLD_8 = 168
SDLK_WORLD_9 = 169
SDLK_WORLD_10 = 170
SDLK_WORLD_11 = 171
SDLK_WORLD_12 = 172
SDLK_WORLD_13 = 173
SDLK_WORLD_14 = 174
SDLK_WORLD_15 = 175
SDLK_WORLD_16 = 176
SDLK_WORLD_17 = 177
SDLK_WORLD_18 = 178
SDLK_WORLD_19 = 179
SDLK_WORLD_20 = 180
SDLK_WORLD_21 = 181
SDLK_WORLD_22 = 182
SDLK_WORLD_23 = 183
SDLK_WORLD_24 = 184
SDLK_WORLD_25 = 185
SDLK_WORLD_26 = 186
SDLK_WORLD_27 = 187
SDLK_WORLD_28 = 188
SDLK_WORLD_29 = 189
SDLK_WORLD_30 = 190
SDLK_WORLD_31 = 191
SDLK_WORLD_32 = 192
SDLK_WORLD_33 = 193
SDLK_WORLD_34 = 194
SDLK_WORLD_35 = 195
SDLK_WORLD_36 = 196
SDLK_WORLD_37 = 197
SDLK_WORLD_38 = 198
SDLK_WORLD_39 = 199
SDLK_WORLD_40 = 200
SDLK_WORLD_41 = 201
SDLK_WORLD_42 = 202
SDLK_WORLD_43 = 203
SDLK_WORLD_44 = 204
SDLK_WORLD_45 = 205
SDLK_WORLD_46 = 206
SDLK_WORLD_47 = 207
SDLK_WORLD_48 = 208
SDLK_WORLD_49 = 209
SDLK_WORLD_50 = 210
SDLK_WORLD_51 = 211
SDLK_WORLD_52 = 212
SDLK_WORLD_53 = 213
SDLK_WORLD_54 = 214
SDLK_WORLD_55 = 215
SDLK_WORLD_56 = 216
SDLK_WORLD_57 = 217
SDLK_WORLD_58 = 218
SDLK_WORLD_59 = 219
SDLK_WORLD_60 = 220
SDLK_WORLD_61 = 221
SDLK_WORLD_62 = 222
SDLK_WORLD_63 = 223
SDLK_WORLD_64 = 224
SDLK_WORLD_65 = 225
SDLK_WORLD_66 = 226
SDLK_WORLD_67 = 227
SDLK_WORLD_68 = 228
SDLK_WORLD_69 = 229
SDLK_WORLD_70 = 230
SDLK_WORLD_71 = 231
SDLK_WORLD_72 = 232
SDLK_WORLD_73 = 233
SDLK_WORLD_74 = 234
SDLK_WORLD_75 = 235
SDLK_WORLD_76 = 236
SDLK_WORLD_77 = 237
SDLK_WORLD_78 = 238
SDLK_WORLD_79 = 239
SDLK_WORLD_80 = 240
SDLK_WORLD_81 = 241
SDLK_WORLD_82 = 242
SDLK_WORLD_83 = 243
SDLK_WORLD_84 = 244
SDLK_WORLD_85 = 245
SDLK_WORLD_86 = 246
SDLK_WORLD_87 = 247
SDLK_WORLD_88 = 248
SDLK_WORLD_89 = 249
SDLK_WORLD_90 = 250
SDLK_WORLD_91 = 251
SDLK_WORLD_92 = 252
SDLK_WORLD_93 = 253
SDLK_WORLD_94 = 254
SDLK_WORLD_95 = 255
SDLK_KP0 = 256
SDLK_KP1 = 257
SDLK_KP2 = 258
SDLK_KP3 = 259
SDLK_KP4 = 260
SDLK_KP5 = 261
SDLK_KP6 = 262
SDLK_KP7 = 263
SDLK_KP8 = 264
SDLK_KP9 = 265
SDLK_KP_PERIOD = 266
SDLK_KP_DIVIDE = 267
SDLK_KP_MULTIPLY = 268
SDLK_KP_MINUS = 269
SDLK_KP_PLUS = 270
SDLK_KP_ENTER = 271
SDLK_KP_EQUALS = 272
SDLK_UP = 273
SDLK_DOWN = 274
SDLK_RIGHT = 275
SDLK_LEFT = 276
SDLK_INSERT = 277
SDLK_HOME = 278
SDLK_END = 279
SDLK_PAGEUP = 280
SDLK_PAGEDOWN = 281
SDLK_F1 = 282
SDLK_F2 = 283
SDLK_F3 = 284
SDLK_F4 = 285
SDLK_F5 = 286
SDLK_F6 = 287
SDLK_F7 = 288
SDLK_F8 = 289
SDLK_F9 = 290
SDLK_F10 = 291
SDLK_F11 = 292
SDLK_F12 = 293
SDLK_F13 = 294
SDLK_F14 = 295
SDLK_F15 = 296
SDLK_NUMLOCK = 300
SDLK_CAPSLOCK = 301
SDLK_SCROLLOCK = 302
SDLK_RSHIFT = 303
SDLK_LSHIFT = 304
SDLK_RCTRL = 305
SDLK_LCTRL = 306
SDLK_RALT = 307
SDLK_LALT = 308
SDLK_RMETA = 309
SDLK_LMETA = 310
SDLK_LSUPER = 311
SDLK_RSUPER = 312
SDLK_MODE = 313
SDLK_COMPOSE = 314
SDLK_HELP = 315
SDLK_PRINT = 316
SDLK_SYSREQ = 317
SDLK_BREAK = 318
SDLK_MENU = 319
SDLK_POWER = 320
SDLK_EURO = 321
SDLK_UNDO = 322
SDLK_LAST = 323

# enumeration SDLMod
KMOD_NONE = 0
KMOD_LSHIFT = 1
KMOD_RSHIFT = 2
KMOD_LCTRL = 64
KMOD_RCTRL = 128
KMOD_LALT = 256
KMOD_RALT = 512
KMOD_LMETA = 1024
KMOD_RMETA = 2048
KMOD_NUM = 4096
KMOD_CAPS = 8192
KMOD_MODE = 16384
KMOD_RESERVED = 32768

Uint16 = c_ushort

class SDL_keysym(Structure):
	_fields_ = [
		('scancode', Uint8),
		('sym', c_int),
		('mod', c_int),
		('unicode', Uint16),
	]

SDL_keysym = SDL_keysym

class SDL_KeyboardEvent(Structure):
	_fields_ = [
		('type', Uint8),
		('which', Uint8),
		('state', Uint8),
		('keysym', SDL_keysym),
	]

SDL_KeyboardEvent = SDL_KeyboardEvent

Sint16 = c_short

class SDL_MouseMotionEvent(Structure):
	_fields_ = [
		('type', Uint8),
		('which', Uint8),
		('state', Uint8),
		('x', Uint16),
		('y', Uint16),
		('xrel', Sint16),
		('yrel', Sint16),
	]

SDL_MouseMotionEvent = SDL_MouseMotionEvent

class SDL_MouseButtonEvent(Structure):
	_fields_ = [
		('type', Uint8),
		('which', Uint8),
		('button', Uint8),
		('state', Uint8),
		('x', Uint16),
		('y', Uint16),
	]

SDL_MouseButtonEvent = SDL_MouseButtonEvent

class SDL_JoyAxisEvent(Structure):
	_fields_ = [
		('type', Uint8),
		('which', Uint8),
		('axis', Uint8),
		('value', Sint16),
	]

SDL_JoyAxisEvent = SDL_JoyAxisEvent

class SDL_JoyBallEvent(Structure):
	_fields_ = [
		('type', Uint8),
		('which', Uint8),
		('ball', Uint8),
		('xrel', Sint16),
		('yrel', Sint16),
	]

SDL_JoyBallEvent = SDL_JoyBallEvent

class SDL_JoyHatEvent(Structure):
	_fields_ = [
		('type', Uint8),
		('which', Uint8),
		('hat', Uint8),
		('value', Uint8),
	]

SDL_JoyHatEvent = SDL_JoyHatEvent

class SDL_JoyButtonEvent(Structure):
	_fields_ = [
		('type', Uint8),
		('which', Uint8),
		('button', Uint8),
		('state', Uint8),
	]

SDL_JoyButtonEvent = SDL_JoyButtonEvent

class SDL_ResizeEvent(Structure):
	_fields_ = [
		('type', Uint8),
		('w', c_int),
		('h', c_int),
	]

SDL_ResizeEvent = SDL_ResizeEvent

class SDL_ExposeEvent(Structure):
	_fields_ = [
		('type', Uint8),
	]

SDL_ExposeEvent = SDL_ExposeEvent

class SDL_QuitEvent(Structure):
	_fields_ = [
		('type', Uint8),
	]

SDL_QuitEvent = SDL_QuitEvent

class SDL_UserEvent(Structure):
	_fields_ = [
		('type', Uint8),
		('code', c_int),
		('data1', c_void_p),
		('data2', c_void_p),
	]

SDL_UserEvent = SDL_UserEvent

class SDL_SysWMmsg(Structure):
	_fields_ = [
	]

SDL_SysWMmsg = SDL_SysWMmsg

class SDL_SysWMEvent(Structure):
	_fields_ = [
		('type', Uint8),
		('msg', POINTER(SDL_SysWMmsg)),
	]

SDL_SysWMEvent = SDL_SysWMEvent

class SDL_Event(Union):
	_fields_ = [
		('type', Uint8),
		('active', SDL_ActiveEvent),
		('key', SDL_KeyboardEvent),
		('motion', SDL_MouseMotionEvent),
		('button', SDL_MouseButtonEvent),
		('jaxis', SDL_JoyAxisEvent),
		('jball', SDL_JoyBallEvent),
		('jhat', SDL_JoyHatEvent),
		('jbutton', SDL_JoyButtonEvent),
		('resize', SDL_ResizeEvent),
		('expose', SDL_ExposeEvent),
		('quit', SDL_QuitEvent),
		('user', SDL_UserEvent),
		('syswm', SDL_SysWMEvent),
	]

class SDL_Rect(Structure):
	_fields_ = [
		('x', Sint16),
		('y', Sint16),
		('w', Uint16),
		('h', Uint16),
	]

SDL_Rect = SDL_Rect

class WMcursor(Structure):
	_fields_ = [
	]

WMcursor = WMcursor

class SDL_Cursor(Structure):
	_fields_ = [
		('area', SDL_Rect),
		('hot_x', Sint16),
		('hot_y', Sint16),
		('data', POINTER(Uint8)),
		('mask', POINTER(Uint8)),
		('save', POINTER(Uint8)*2),
		('wm_cursor', POINTER(WMcursor)),
	]
SDL_PollEvent = libSDL.SDL_PollEvent