Created
June 15, 2009 14:28
-
-
Save remogatto/130136 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This binding is generated against libSDL 1.2.13 headers. | |
| require 'rubygems' | |
| require 'ffi' | |
| module SDL | |
| extend FFI::Library | |
| ffi_lib "/usr/local/lib/libSDL.so" | |
| SDL_INIT_TIMER = 0x00000001 | |
| SDL_INIT_AUDIO = 0x00000010 | |
| SDL_INIT_VIDEO = 0x00000020 | |
| SDL_INIT_CDROM = 0x00000100 | |
| SDL_INIT_JOYSTICK = 0x00000200 | |
| SDL_INIT_NOPARACHUTE = 0x00100000 | |
| SDL_INIT_EVENTTHREAD = 0x01000000 | |
| SDL_INIT_EVERYTHING = 0x0000FFFF | |
| attach_function :SDL_Init, [ :uint ], :int | |
| attach_function :SDL_InitSubSystem, [ :uint ], :int | |
| attach_function :SDL_QuitSubSystem, [ :uint ], :void | |
| attach_function :SDL_WasInit, [ :uint ], :uint | |
| attach_function :SDL_Quit, [ ], :void | |
| SDL_FALSE = 0 | |
| SDL_TRUE = 1 | |
| class Uint64 < FFI::Struct | |
| layout( | |
| :hi, :uint, | |
| :lo, :uint | |
| ) | |
| end | |
| DUMMY_ENUM_VALUE = 0 | |
| class SDLAudioSpec < FFI::Struct | |
| layout( | |
| :freq, :int, | |
| :format, :ushort, | |
| :channels, :uchar, | |
| :silence, :uchar, | |
| :samples, :ushort, | |
| :padding, :ushort, | |
| :size, :uint, | |
| :callback, callback([ :pointer, :pointer, :int ], :void), | |
| :userdata, :pointer | |
| ) | |
| def callback=(cb) | |
| @callback = cb | |
| self[:callback] = @callback | |
| end | |
| def callback | |
| @callback | |
| end | |
| end | |
| AUDIO_U8 = 0x0008 | |
| AUDIO_S8 = 0x8008 | |
| AUDIO_U16LSB = 0x0010 | |
| AUDIO_S16LSB = 0x8010 | |
| AUDIO_U16MSB = 0x1010 | |
| AUDIO_S16MSB = 0x9010 | |
| AUDIO_U16 = 0x0010 | |
| AUDIO_S16 = 0x8010 | |
| AUDIO_U16SYS = 0x0010 | |
| AUDIO_S16SYS = 0x8010 | |
| class SDLAudioCVT < FFI::Struct | |
| layout( | |
| :needed, :int, | |
| :src_format, :ushort, | |
| :dst_format, :ushort, | |
| :rate_incr, :double, | |
| :buf, :pointer, | |
| :len, :int, | |
| :len_cvt, :int, | |
| :len_mult, :int, | |
| :len_ratio, :double, | |
| # :filters, [callback([ :pointer, :ushort ], :void), 10], | |
| :filter_index, :int | |
| ) | |
| end | |
| attach_function :SDL_AudioInit, [ :string ], :int | |
| attach_function :SDL_AudioQuit, [ ], :void | |
| attach_function :SDL_AudioDriverName, [ :pointer, :int ], :pointer | |
| attach_function :SDL_OpenAudio, [ :pointer, :pointer ], :int | |
| SDL_AUDIO_STOPPED = 0 | |
| SDL_AUDIO_PLAYING = 1 | |
| SDL_AUDIO_PAUSED = 2 | |
| attach_function :SDL_GetAudioStatus, [ ], :int | |
| attach_function :SDL_PauseAudio, [ :int ], :void | |
| attach_function :SDL_LoadWAV_RW, [ :pointer, :int, :pointer, :pointer, :pointer ], :pointer | |
| attach_function :SDL_FreeWAV, [ :pointer ], :void | |
| attach_function :SDL_BuildAudioCVT, [ :pointer, :ushort, :uchar, :int, :ushort, :uchar, :int ], :int | |
| attach_function :SDL_ConvertAudio, [ :pointer ], :int | |
| SDL_MIX_MAXVOLUME = 128 | |
| attach_function :SDL_MixAudio, [ :pointer, :pointer, :uint, :int ], :void | |
| attach_function :SDL_LockAudio, [ ], :void | |
| attach_function :SDL_UnlockAudio, [ ], :void | |
| attach_function :SDL_CloseAudio, [ ], :void | |
| SDL_MAX_TRACKS = 99 | |
| SDL_AUDIO_TRACK = 0x00 | |
| SDL_DATA_TRACK = 0x04 | |
| CD_ERROR = -1 | |
| CD_TRAYEMPTY = 0 | |
| CD_STOPPED = 1 | |
| CD_PLAYING = 2 | |
| CD_PAUSED = 3 | |
| class SDLCDtrack < FFI::Struct | |
| layout( | |
| :id, :uchar, | |
| :type, :uchar, | |
| :unused, :ushort, | |
| :length, :uint, | |
| :offset, :uint | |
| ) | |
| end | |
| class SDLCD < FFI::Struct | |
| layout( | |
| :id, :int, | |
| :status, :int, | |
| :numtracks, :int, | |
| :cur_track, :int, | |
| :cur_frame, :int | |
| # :track, a(99+1).SDL_CDtrack | |
| ) | |
| end | |
| CD_FPS = 75 | |
| attach_function :SDL_CDNumDrives, [ ], :int | |
| attach_function :SDL_CDName, [ :int ], :string | |
| attach_function :SDL_CDOpen, [ :int ], :pointer | |
| attach_function :SDL_CDStatus, [ :pointer ], :int | |
| attach_function :SDL_CDPlayTracks, [ :pointer, :int, :int, :int, :int ], :int | |
| attach_function :SDL_CDPlay, [ :pointer, :int, :int ], :int | |
| attach_function :SDL_CDPause, [ :pointer ], :int | |
| attach_function :SDL_CDResume, [ :pointer ], :int | |
| attach_function :SDL_CDStop, [ :pointer ], :int | |
| attach_function :SDL_CDEject, [ :pointer ], :int | |
| attach_function :SDL_CDClose, [ :pointer ], :void | |
| attach_function :SDL_HasRDTSC, [ ], :int | |
| attach_function :SDL_HasMMX, [ ], :int | |
| attach_function :SDL_HasMMXExt, [ ], :int | |
| attach_function :SDL_Has3DNow, [ ], :int | |
| attach_function :SDL_Has3DNowExt, [ ], :int | |
| attach_function :SDL_HasSSE, [ ], :int | |
| attach_function :SDL_HasSSE2, [ ], :int | |
| attach_function :SDL_HasAltiVec, [ ], :int | |
| SDL_LIL_ENDIAN = 1234 | |
| SDL_BIG_ENDIAN = 4321 | |
| SDL_BYTEORDER = 1234 | |
| attach_function :SDL_SetError, [ :string, :varargs ], :void | |
| attach_function :SDL_GetError, [ ], :pointer | |
| attach_function :SDL_ClearError, [ ], :void | |
| SDL_ENOMEM = 0 | |
| SDL_EFREAD = 1 | |
| SDL_EFWRITE = 2 | |
| SDL_EFSEEK = 3 | |
| SDL_UNSUPPORTED = 4 | |
| SDL_LASTERROR = 5 | |
| attach_function :SDL_Error, [ :int ], :void | |
| SDL_RELEASED = 0 | |
| SDL_PRESSED = 1 | |
| SDL_NOEVENT = 0 | |
| SDL_ACTIVEEVENT = 1 | |
| SDL_JOYBUTTONDOWN = 10 | |
| SDL_JOYBUTTONUP = 11 | |
| SDL_QUIT = 12 | |
| SDL_SYSWMEVENT = 13 | |
| SDL_EVENT_RESERVEDA = 14 | |
| SDL_EVENT_RESERVEDB = 15 | |
| SDL_VIDEORESIZE = 16 | |
| SDL_VIDEOEXPOSE = 17 | |
| SDL_EVENT_RESERVED2 = 18 | |
| SDL_EVENT_RESERVED3 = 19 | |
| SDL_KEYDOWN = 2 | |
| SDL_EVENT_RESERVED4 = 20 | |
| SDL_EVENT_RESERVED5 = 21 | |
| SDL_EVENT_RESERVED6 = 22 | |
| SDL_EVENT_RESERVED7 = 23 | |
| SDL_USEREVENT = 24 | |
| SDL_KEYUP = 3 | |
| SDL_NUMEVENTS = 32 | |
| SDL_MOUSEMOTION = 4 | |
| SDL_MOUSEBUTTONDOWN = 5 | |
| SDL_MOUSEBUTTONUP = 6 | |
| SDL_JOYAXISMOTION = 7 | |
| SDL_JOYBALLMOTION = 8 | |
| SDL_JOYHATMOTION = 9 | |
| SDL_ACTIVEEVENTMASK = (1 << (SDL_ACTIVEEVENT)) | |
| SDL_JOYAXISMOTIONMASK = (1 << (SDL_JOYAXISMOTION)) | |
| SDL_JOYEVENTMASK = (1 << (SDL_JOYAXISMOTION))|(1 << (SDL_JOYBALLMOTION))|(1 << (SDL_JOYHATMOTION))|(1 << (SDL_JOYBUTTONDOWN))|(1 << (SDL_JOYBUTTONUP)) | |
| SDL_JOYBALLMOTIONMASK = (1 << (SDL_JOYBALLMOTION)) | |
| SDL_JOYBUTTONDOWNMASK = (1 << (SDL_JOYBUTTONDOWN)) | |
| SDL_JOYBUTTONUPMASK = (1 << (SDL_JOYBUTTONUP)) | |
| SDL_JOYHATMOTIONMASK = (1 << (SDL_JOYHATMOTION)) | |
| SDL_KEYDOWNMASK = (1 << (SDL_KEYDOWN)) | |
| SDL_KEYEVENTMASK = (1 << (SDL_KEYDOWN))|(1 << (SDL_KEYUP)) | |
| SDL_KEYUPMASK = (1 << (SDL_KEYUP)) | |
| SDL_MOUSEBUTTONDOWNMASK = (1 << (SDL_MOUSEBUTTONDOWN)) | |
| SDL_MOUSEBUTTONUPMASK = (1 << (SDL_MOUSEBUTTONUP)) | |
| SDL_MOUSEMOTIONMASK = (1 << (SDL_MOUSEMOTION)) | |
| SDL_MOUSEEVENTMASK = (1 << (SDL_MOUSEMOTION))|(1 << (SDL_MOUSEBUTTONDOWN))|(1 << (SDL_MOUSEBUTTONUP)) | |
| SDL_QUITMASK = (1 << (SDL_QUIT)) | |
| SDL_SYSWMEVENTMASK = (1 << (SDL_SYSWMEVENT)) | |
| SDL_VIDEOEXPOSEMASK = (1 << (SDL_VIDEOEXPOSE)) | |
| SDL_VIDEORESIZEMASK = (1 << (SDL_VIDEORESIZE)) | |
| SDL_ALLEVENTS = 0xFFFFFFFF | |
| class SDLActiveEvent < FFI::Struct | |
| layout( | |
| :type, :uchar, | |
| :gain, :uchar, | |
| :state, :uchar | |
| ) | |
| end | |
| class SDLKeyboardEvent < FFI::Struct | |
| layout( | |
| :type, :uchar, | |
| :which, :uchar, | |
| :state, :uchar | |
| # :keysym, SDL_keysym | |
| ) | |
| end | |
| class SDLMouseMotionEvent < FFI::Struct | |
| layout( | |
| :type, :uchar, | |
| :which, :uchar, | |
| :state, :uchar, | |
| :x, :ushort, | |
| :y, :ushort, | |
| :xrel, :short, | |
| :yrel, :short | |
| ) | |
| end | |
| class SDLMouseButtonEvent < FFI::Struct | |
| layout( | |
| :type, :uchar, | |
| :which, :uchar, | |
| :button, :uchar, | |
| :state, :uchar, | |
| :x, :ushort, | |
| :y, :ushort | |
| ) | |
| end | |
| class SDLJoyAxisEvent < FFI::Struct | |
| layout( | |
| :type, :uchar, | |
| :which, :uchar, | |
| :axis, :uchar, | |
| :value, :short | |
| ) | |
| end | |
| class SDLJoyBallEvent < FFI::Struct | |
| layout( | |
| :type, :uchar, | |
| :which, :uchar, | |
| :ball, :uchar, | |
| :xrel, :short, | |
| :yrel, :short | |
| ) | |
| end | |
| class SDLJoyHatEvent < FFI::Struct | |
| layout( | |
| :type, :uchar, | |
| :which, :uchar, | |
| :hat, :uchar, | |
| :value, :uchar | |
| ) | |
| end | |
| class SDLJoyButtonEvent < FFI::Struct | |
| layout( | |
| :type, :uchar, | |
| :which, :uchar, | |
| :button, :uchar, | |
| :state, :uchar | |
| ) | |
| end | |
| class SDLResizeEvent < FFI::Struct | |
| layout( | |
| :type, :uchar, | |
| :w, :int, | |
| :h, :int | |
| ) | |
| end | |
| class SDLExposeEvent < FFI::Struct | |
| layout( | |
| :type, :uchar | |
| ) | |
| end | |
| class SDLQuitEvent < FFI::Struct | |
| layout( | |
| :type, :uchar | |
| ) | |
| end | |
| class SDLUserEvent < FFI::Struct | |
| layout( | |
| :type, :uchar, | |
| :code, :int, | |
| :data1, :pointer, | |
| :data2, :pointer | |
| ) | |
| end | |
| class SDLSysWMEvent < FFI::Struct | |
| layout( | |
| :type, :uchar, | |
| :msg, :pointer | |
| ) | |
| end | |
| class SDLEvent < FFI::Union | |
| layout( | |
| :type, :uchar, | |
| :active, SDLActiveEvent, | |
| :key, SDLKeyboardEvent, | |
| :motion, SDLMouseMotionEvent, | |
| :button, SDLMouseButtonEvent, | |
| :jaxis, SDLJoyAxisEvent, | |
| :jball, SDLJoyBallEvent, | |
| :jhat, SDLJoyHatEvent, | |
| :jbutton, SDLJoyButtonEvent, | |
| :resize, SDLResizeEvent, | |
| :expose, SDLExposeEvent, | |
| :quit, SDLQuitEvent, | |
| :user, SDLUserEvent, | |
| :syswm, SDLSysWMEvent | |
| ) | |
| end | |
| attach_function :SDL_PumpEvents, [ ], :void | |
| SDL_ADDEVENT = 0 | |
| SDL_PEEKEVENT = 1 | |
| SDL_GETEVENT = 2 | |
| attach_function :SDL_PeepEvents, [ :pointer, :int, :int, :uint ], :int | |
| attach_function :SDL_PollEvent, [ :pointer ], :int | |
| attach_function :SDL_WaitEvent, [ :pointer ], :int | |
| attach_function :SDL_PushEvent, [ :pointer ], :int | |
| callback(:SDL_EventFilter, [ :pointer ], :int) | |
| attach_function :SDL_SetEventFilter, [ :SDL_EventFilter ], :void | |
| attach_function :SDL_GetEventFilter, [ ], :SDL_EventFilter | |
| SDL_QUERY = -1 | |
| SDL_IGNORE = 0 | |
| SDL_DISABLE = 0 | |
| SDL_ENABLE = 1 | |
| attach_function :SDL_EventState, [ :uchar, :int ], :uchar | |
| attach_function :SDL_LoadObject, [ :string ], :pointer | |
| attach_function :SDL_LoadFunction, [ :pointer, :string ], :pointer | |
| attach_function :SDL_UnloadObject, [ :pointer ], :void | |
| SDL_MUTEX_TIMEDOUT = 1 | |
| attach_function :SDL_CreateMutex, [ ], :pointer | |
| attach_function :SDL_mutexP, [ :pointer ], :int | |
| attach_function :SDL_mutexV, [ :pointer ], :int | |
| attach_function :SDL_DestroyMutex, [ :pointer ], :void | |
| attach_function :SDL_CreateSemaphore, [ :uint ], :pointer | |
| attach_function :SDL_DestroySemaphore, [ :pointer ], :void | |
| attach_function :SDL_SemWait, [ :pointer ], :int | |
| attach_function :SDL_SemTryWait, [ :pointer ], :int | |
| attach_function :SDL_SemWaitTimeout, [ :pointer, :uint ], :int | |
| attach_function :SDL_SemPost, [ :pointer ], :int | |
| attach_function :SDL_SemValue, [ :pointer ], :uint | |
| attach_function :SDL_CreateCond, [ ], :pointer | |
| attach_function :SDL_DestroyCond, [ :pointer ], :void | |
| attach_function :SDL_CondSignal, [ :pointer ], :int | |
| attach_function :SDL_CondBroadcast, [ :pointer ], :int | |
| attach_function :SDL_CondWait, [ :pointer, :pointer ], :int | |
| attach_function :SDL_CondWaitTimeout, [ :pointer, :pointer, :uint ], :int | |
| class SDLRWopsHiddenMem < FFI::Struct | |
| layout( | |
| :base, :pointer, | |
| :here, :pointer, | |
| :stop, :pointer | |
| ) | |
| end | |
| class SDLRWopsHiddenUnknown < FFI::Struct | |
| layout( | |
| :data1, :pointer | |
| ) | |
| end | |
| # FIXME: Nested structures are not correctly supported at the moment. | |
| # Please check the order of the declarations in the structure below. | |
| # class SDLRWopsHidden < FFI::Union | |
| # layout( | |
| # :unknown, SDLRWopsHiddenUnknown, | |
| # :mem, SDLRWopsHiddenMem | |
| # ) | |
| # end | |
| # FIXME: Nested structures are not correctly supported at the moment. | |
| # Please check the order of the declarations in the structure below. | |
| # class SDLRWops < FFI::Struct | |
| # layout( | |
| # :seek, callback([ :pointer, :int, :int ], :int), | |
| # :read, callback([ :pointer, :pointer, :int, :int ], :int), | |
| # :write, callback([ :pointer, :pointer, :int, :int ], :int), | |
| # :close, callback([ :pointer ], :int), | |
| # :type, :uint, | |
| # :hidden, SDLRWopsHidden | |
| # ) | |
| # def seek=(cb) | |
| # @seek = cb | |
| # self[:seek] = @seek | |
| # end | |
| # def seek | |
| # @seek | |
| # end | |
| # def read=(cb) | |
| # @read = cb | |
| # self[:read] = @read | |
| # end | |
| # def read | |
| # @read | |
| # end | |
| # def write=(cb) | |
| # @write = cb | |
| # self[:write] = @write | |
| # end | |
| # def write | |
| # @write | |
| # end | |
| # def close=(cb) | |
| # @close = cb | |
| # self[:close] = @close | |
| # end | |
| # def close | |
| # @close | |
| # end | |
| # | |
| # end | |
| attach_function :SDL_RWFromFile, [ :string, :string ], :pointer | |
| attach_function :SDL_RWFromMem, [ :pointer, :int ], :pointer | |
| attach_function :SDL_RWFromConstMem, [ :pointer, :int ], :pointer | |
| attach_function :SDL_AllocRW, [ ], :pointer | |
| attach_function :SDL_FreeRW, [ :pointer ], :void | |
| RW_SEEK_SET = 0 | |
| RW_SEEK_CUR = 1 | |
| RW_SEEK_END = 2 | |
| attach_function :SDL_ReadLE16, [ :pointer ], :ushort | |
| attach_function :SDL_ReadBE16, [ :pointer ], :ushort | |
| attach_function :SDL_ReadLE32, [ :pointer ], :uint | |
| attach_function :SDL_ReadBE32, [ :pointer ], :uint | |
| attach_function :SDL_WriteLE16, [ :pointer, :ushort ], :int | |
| attach_function :SDL_WriteBE16, [ :pointer, :ushort ], :int | |
| attach_function :SDL_WriteLE32, [ :pointer, :uint ], :int | |
| attach_function :SDL_WriteBE32, [ :pointer, :uint ], :int | |
| attach_function :SDL_CreateThread, [ callback([ :pointer ], :int), :pointer ], :pointer | |
| attach_function :SDL_ThreadID, [ ], :uint | |
| attach_function :SDL_GetThreadID, [ :pointer ], :uint | |
| attach_function :SDL_WaitThread, [ :pointer, :pointer ], :void | |
| attach_function :SDL_KillThread, [ :pointer ], :void | |
| SDL_TIMESLICE = 10 | |
| TIMER_RESOLUTION = 10 | |
| attach_function :SDL_GetTicks, [ ], :uint | |
| attach_function :SDL_Delay, [ :uint ], :void | |
| callback(:SDL_TimerCallback, [ :uint ], :uint) | |
| attach_function :SDL_SetTimer, [ :uint, :SDL_TimerCallback ], :int | |
| callback(:SDL_NewTimerCallback, [ :uint, :pointer ], :uint) | |
| attach_function :SDL_AddTimer, [ :uint, :SDL_NewTimerCallback, :pointer ], :pointer | |
| attach_function :SDL_RemoveTimer, [ :pointer ], :int | |
| SDL_ALPHA_OPAQUE = 255 | |
| SDL_ALPHA_TRANSPARENT = 0 | |
| class SDLRect < FFI::Struct | |
| layout( | |
| :x, :short, | |
| :y, :short, | |
| :w, :ushort, | |
| :h, :ushort | |
| ) | |
| end | |
| class SDLColor < FFI::Struct | |
| layout( | |
| :r, :uchar, | |
| :g, :uchar, | |
| :b, :uchar, | |
| :unused, :uchar | |
| ) | |
| end | |
| class SDLPalette < FFI::Struct | |
| layout( | |
| :ncolors, :int, | |
| :colors, :pointer | |
| ) | |
| end | |
| class SDLPixelFormat < FFI::Struct | |
| layout( | |
| :palette, :pointer, | |
| :BitsPerPixel, :uchar, | |
| :BytesPerPixel, :uchar, | |
| :Rloss, :uchar, | |
| :Gloss, :uchar, | |
| :Bloss, :uchar, | |
| :Aloss, :uchar, | |
| :Rshift, :uchar, | |
| :Gshift, :uchar, | |
| :Bshift, :uchar, | |
| :Ashift, :uchar, | |
| :Rmask, :uint, | |
| :Gmask, :uint, | |
| :Bmask, :uint, | |
| :Amask, :uint, | |
| :colorkey, :uint, | |
| :alpha, :uchar | |
| ) | |
| end | |
| class SDLSurface < FFI::Struct | |
| layout( | |
| :flags, :uint, | |
| :format, :pointer, | |
| :w, :int, | |
| :h, :int, | |
| :pitch, :ushort, | |
| :pixels, :pointer, | |
| :offset, :int, | |
| :hwdata, :pointer, | |
| :clip_rect, SDLRect, | |
| :unused1, :uint, | |
| :locked, :uint, | |
| :map, :pointer, | |
| :format_version, :uint, | |
| :refcount, :int | |
| ) | |
| end | |
| SDL_SWSURFACE = 0x00000000 | |
| SDL_HWSURFACE = 0x00000001 | |
| SDL_ASYNCBLIT = 0x00000004 | |
| SDL_ANYFORMAT = 0x10000000 | |
| SDL_HWPALETTE = 0x20000000 | |
| SDL_DOUBLEBUF = 0x40000000 | |
| SDL_FULLSCREEN = 0x80000000 | |
| SDL_OPENGL = 0x00000002 | |
| SDL_OPENGLBLIT = 0x0000000A | |
| SDL_RESIZABLE = 0x00000010 | |
| SDL_NOFRAME = 0x00000020 | |
| SDL_HWACCEL = 0x00000100 | |
| SDL_SRCCOLORKEY = 0x00001000 | |
| SDL_RLEACCELOK = 0x00002000 | |
| SDL_RLEACCEL = 0x00004000 | |
| SDL_SRCALPHA = 0x00010000 | |
| SDL_PREALLOC = 0x01000000 | |
| callback(:SDL_blit, [ :pointer, :pointer, :pointer, :pointer ], :int) | |
| class SDLVideoInfo < FFI::Struct | |
| layout( | |
| :hw_available, :uint, | |
| :wm_available, :uint, | |
| :UnusedBits1, :uint, | |
| :UnusedBits2, :uint, | |
| :blit_hw, :uint, | |
| :blit_hw_CC, :uint, | |
| :blit_hw_A, :uint, | |
| :blit_sw, :uint, | |
| :blit_sw_CC, :uint, | |
| :blit_sw_A, :uint, | |
| :blit_fill, :uint, | |
| :UnusedBits3, :uint, | |
| :video_mem, :uint, | |
| :vfmt, :pointer, | |
| :current_w, :int, | |
| :current_h, :int | |
| ) | |
| end | |
| SDL_YV12_OVERLAY = 0x32315659 | |
| SDL_IYUV_OVERLAY = 0x56555949 | |
| SDL_YUY2_OVERLAY = 0x32595559 | |
| SDL_UYVY_OVERLAY = 0x59565955 | |
| SDL_YVYU_OVERLAY = 0x55595659 | |
| class SDLOverlay < FFI::Struct | |
| layout( | |
| :format, :uint, | |
| :w, :int, | |
| :h, :int, | |
| :planes, :int, | |
| :pitches, :pointer, | |
| :pixels, :pointer, | |
| :hwfuncs, :pointer, | |
| :hwdata, :pointer, | |
| :hw_overlay, :uint, | |
| :UnusedBits, :uint | |
| ) | |
| end | |
| SDL_GL_RED_SIZE = 0 | |
| SDL_GL_GREEN_SIZE = 1 | |
| 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 | |
| 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_LOGPAL = 0x01 | |
| SDL_PHYSPAL = 0x02 | |
| attach_function :SDL_VideoInit, [ :string, :uint ], :int | |
| attach_function :SDL_VideoQuit, [ ], :void | |
| attach_function :SDL_VideoDriverName, [ :pointer, :int ], :pointer | |
| attach_function :SDL_GetVideoSurface, [ ], :pointer | |
| attach_function :SDL_GetVideoInfo, [ ], :pointer | |
| attach_function :SDL_VideoModeOK, [ :int, :int, :int, :uint ], :int | |
| attach_function :SDL_ListModes, [ :pointer, :uint ], :pointer | |
| attach_function :SDL_SetVideoMode, [ :int, :int, :int, :uint ], :pointer | |
| attach_function :SDL_UpdateRects, [ :pointer, :int, :pointer ], :void | |
| attach_function :SDL_UpdateRect, [ :pointer, :int, :int, :uint, :uint ], :void | |
| attach_function :SDL_Flip, [ :pointer ], :int | |
| attach_function :SDL_SetGamma, [ :float, :float, :float ], :int | |
| attach_function :SDL_SetGammaRamp, [ :pointer, :pointer, :pointer ], :int | |
| attach_function :SDL_GetGammaRamp, [ :pointer, :pointer, :pointer ], :int | |
| attach_function :SDL_SetColors, [ :pointer, :pointer, :int, :int ], :int | |
| attach_function :SDL_SetPalette, [ :pointer, :int, :pointer, :int, :int ], :int | |
| attach_function :SDL_MapRGB, [ :pointer, :uchar, :uchar, :uchar ], :pointer | |
| attach_function :SDL_MapRGBA, [ :pointer, :uchar, :uchar, :uchar, :uchar ], :pointer | |
| attach_function :SDL_GetRGB, [ :uint, :pointer, :pointer, :pointer, :pointer ], :void | |
| attach_function :SDL_GetRGBA, [ :uint, :pointer, :pointer, :pointer, :pointer, :pointer ], :void | |
| attach_function :SDL_CreateRGBSurface, [ :uint, :int, :int, :int, :uint, :uint, :uint, :uint ], :pointer | |
| attach_function :SDL_CreateRGBSurfaceFrom, [ :pointer, :int, :int, :int, :int, :uint, :uint, :uint, :uint ], :pointer | |
| attach_function :SDL_FreeSurface, [ :pointer ], :void | |
| attach_function :SDL_LockSurface, [ :pointer ], :int | |
| attach_function :SDL_UnlockSurface, [ :pointer ], :void | |
| attach_function :SDL_LoadBMP_RW, [ :pointer, :int ], :pointer | |
| attach_function :SDL_SaveBMP_RW, [ :pointer, :pointer, :int ], :int | |
| attach_function :SDL_SetColorKey, [ :pointer, :uint, :uint ], :int | |
| attach_function :SDL_SetAlpha, [ :pointer, :uint, :uchar ], :int | |
| attach_function :SDL_SetClipRect, [ :pointer, :pointer ], :int | |
| attach_function :SDL_GetClipRect, [ :pointer, :pointer ], :void | |
| attach_function :SDL_ConvertSurface, [ :pointer, :pointer, :uint ], :pointer | |
| attach_function :SDL_UpperBlit, [ :pointer, :pointer, :pointer, :pointer ], :int | |
| attach_function :SDL_LowerBlit, [ :pointer, :pointer, :pointer, :pointer ], :int | |
| attach_function :SDL_FillRect, [ :pointer, :pointer, :uint ], :int | |
| attach_function :SDL_DisplayFormat, [ :pointer ], :pointer | |
| attach_function :SDL_DisplayFormatAlpha, [ :pointer ], :pointer | |
| attach_function :SDL_CreateYUVOverlay, [ :int, :int, :uint, :pointer ], :pointer | |
| attach_function :SDL_LockYUVOverlay, [ :pointer ], :int | |
| attach_function :SDL_UnlockYUVOverlay, [ :pointer ], :void | |
| attach_function :SDL_DisplayYUVOverlay, [ :pointer, :pointer ], :int | |
| attach_function :SDL_FreeYUVOverlay, [ :pointer ], :void | |
| attach_function :SDL_GL_LoadLibrary, [ :string ], :int | |
| attach_function :SDL_GL_GetProcAddress, [ :string ], :pointer | |
| attach_function :SDL_GL_SetAttribute, [ :int, :int ], :int | |
| attach_function :SDL_GL_GetAttribute, [ :int, :pointer ], :int | |
| attach_function :SDL_GL_SwapBuffers, [ ], :void | |
| attach_function :SDL_GL_UpdateRects, [ :int, :pointer ], :void | |
| attach_function :SDL_GL_Lock, [ ], :void | |
| attach_function :SDL_GL_Unlock, [ ], :void | |
| attach_function :SDL_WM_SetCaption, [ :string, :string ], :void | |
| attach_function :SDL_WM_GetCaption, [ :pointer, :pointer ], :void | |
| attach_function :SDL_WM_SetIcon, [ :pointer, :pointer ], :void | |
| attach_function :SDL_WM_IconifyWindow, [ ], :int | |
| attach_function :SDL_WM_ToggleFullScreen, [ :pointer ], :int | |
| SDL_GRAB_QUERY = -1 | |
| SDL_GRAB_OFF = 0 | |
| SDL_GRAB_ON = 1 | |
| SDL_GRAB_FULLSCREEN = 2 | |
| attach_function :SDL_WM_GrabInput, [ :int ], :int | |
| attach_function :SDL_SoftStretch, [ :pointer, :pointer, :pointer, :pointer ], :int | |
| SDL_MAJOR_VERSION = 1 | |
| SDL_MINOR_VERSION = 2 | |
| SDL_PATCHLEVEL = 13 | |
| class SDLVersion < FFI::Struct | |
| layout( | |
| :major, :uchar, | |
| :minor, :uchar, | |
| :patch, :uchar | |
| ) | |
| end | |
| SDL_COMPILEDVERSION = ((1) *1000+(2) *100+(13)) | |
| attach_function :SDL_Linked_Version, [ ], :pointer | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment