49sdl2 Module

49.1Overview

The sdl2 module provices functions of SDL2 library.

49.2Module Function

sdl2.Init(flags:number):void

Use this function to initialize the SDL library. This must be called before using any other SDL function.

The Event Handling, File I/O, and Threading subsystems are initialized by default. You must specifically initialize other subsystems if you use them in your application.

flags may be any of the following OR'd together:

  • sdl2.INIT_TIMER .. timer subsystem
  • sdl2.INIT_AUDIO .. audio subsystem
  • sdl2.INIT_VIDEO .. video subsystem
  • sdl2.INIT_JOYSTICK .. joystick subsystem
  • sdl2.INIT_HAPTIC .. haptic (force feedback) subsystem
  • sdl2.INIT_GAMECONTROLLER .. controller subsystem
  • sdl2.INIT_EVENTS .. events subsystem
  • sdl2.INIT_EVERYTHING .. all of the above subsystems
  • sdl2.INIT_NOPARACHUTE .. compatibility; this flag is ignored

If you want to initialize subsystems separately you would call SDL_Init(0) followed by SDL_InitSubSystem() with the desired subsystem flag.

sdl2.InitSubSystem(flags:number):void

Use this function to initialize specific SDL subsystems.

After SDL has been initialized with SDL_Init() you may initialize uninitialized subsystems with SDL_InitSubSystem().

These are the flags which may be passed to SDL_InitSubSystem() and may be OR'd together to initialize multiple subsystems simultaneously.

  • sdl2.INIT_TIMER .. timer subsystem
  • sdl2.INIT_AUDIO .. audio subsystem
  • sdl2.INIT_VIDEO .. video subsystem
  • sdl2.INIT_JOYSTICK .. joystick subsystem
  • sdl2.INIT_HAPTIC .. haptic (force feedback) subsystem
  • sdl2.INIT_GAMECONTROLLER .. controller subsystem
  • sdl2.INIT_EVENTS .. events subsystem
  • sdl2.INIT_EVERYTHING .. all of the above subsystems
  • sdl2.INIT_NOPARACHUTE .. compatibility; this flag is ignored

If you want to initialize subsystems separately you would call SDL_Init(0) followed by SDL_InitSubSystem() with the desired subsystem flag.

sdl2.Quit():void

Use this function to clean up all initialized subsystems. You should call it upon all exit conditions.

You should call this function even if you have already shutdown each initialized subsystem with SDL_QuitSubSystem().

If you start a subsystem using a call to that subsystem's init function (for example SDL_VideoInit()) instead of SDL_Init() or SDL_InitSubSystem(), then you must use that subsystem's quit function (SDL_VideoQuit()) to shut it down before calling SDL_Quit().

You can use this function with atexit() to ensure that it is run when your application is shutdown, but it is not wise to do this from a library or other dynamically loaded code.

sdl2.QuitSubSystem(flags:number):void

Use this function to shut down specific SDL subsystems.

These are the flags which may be passed to SDL_QuitSubSystem() and may be OR'd together to quit multiple subsystems simultaneously.

  • sdl2.INIT_TIMER .. timer subsystem
  • sdl2.INIT_AUDIO .. audio subsystem
  • sdl2.INIT_VIDEO .. video subsystem
  • sdl2.INIT_JOYSTICK .. joystick subsystem
  • sdl2.INIT_HAPTIC .. haptic (force feedback) subsystem
  • sdl2.INIT_GAMECONTROLLER .. controller subsystem
  • sdl2.INIT_EVENTS .. events subsystem
  • sdl2.INIT_EVERYTHING .. all of the above subsystems
  • sdl2.INIT_NOPARACHUTE .. compatibility; this flag is ignored

If you want to initialize subsystems separately you would call SDL_Init(0) followed by SDL_InitSubSystem() with the desired subsystem flag.

sdl2.SetMainReady():void

Use this function to circumvent failure of SDL_Init() when not using SDL_main() as an entry point.

This function is defined in SDL_main.h, along with the preprocessor rule to redefine main() as SDL_main(). Thus to ensure that your main() function will not be changed it is necessary to define SDL_MAIN_HANDLED before including SDL.h.

sdl2.WasInit(flags:number) {block?}

Use this function to return a mask of the specified subsystems which have previously been initialized.

These are the flags which may be passed to SDL_WasInit() and may be OR'd together to query multiple subsystems simultaneously.

  • sdl2.INIT_TIMER .. timer subsystem
  • sdl2.INIT_AUDIO .. audio subsystem
  • sdl2.INIT_VIDEO .. video subsystem
  • sdl2.INIT_JOYSTICK .. joystick subsystem
  • sdl2.INIT_HAPTIC .. haptic (force feedback) subsystem
  • sdl2.INIT_GAMECONTROLLER .. controller subsystem
  • sdl2.INIT_EVENTS .. events subsystem
  • sdl2.INIT_EVERYTHING .. all of the above subsystems
  • sdl2.INIT_NOPARACHUTE .. compatibility; this flag is ignored

If you want to initialize subsystems separately you would call SDL_Init(0) followed by SDL_InitSubSystem() with the desired subsystem flag.

sdl2.AddHintCallback():void
sdl2.ClearHints():void
sdl2.DelhintCallback():void
sdl2.GetHint():void
sdl2.SetHint():void
sdl2.SetHintWithPriority():void
sdl2.ClearError():void
Use this function to clear any previous error message.
sdl2.GetError() {block?}

Use this function to retrieve a message about the last error that occurred.

Returns a message with information about the specific error that occurred, or an empty string if there hasn't been an error since the last call to SDL_ClearError(). Without calling SDL_ClearError(), the message is only applicable when an SDL function has signaled an error. You must check the return values of SDL function calls to determine when to appropriately call SDL_GetError().

This string is statically allocated and must not be freed by the application.

It is possible for multiple errors to occur before calling SDL_GetError(). Only the last error is returned.

sdl2.SetError():void
sdl2.Log():void
sdl2.LogCritical():void
sdl2.LogDebug():void
sdl2.LogError():void
sdl2.LogGetOutputFunction():void
sdl2.LogGetPriority():void
sdl2.LogInfo():void
sdl2.LogMessage():void
sdl2.LogMessageV():void
sdl2.LogResetPriorities():void
sdl2.LogSetAllPriority():void
sdl2.LogSetOutputFunction():void
sdl2.LogSetPriority():void
sdl2.LogVerbose():void
sdl2.LogWarn():void
sdl2.GetAssertionHandler():void
sdl2.GetAssertionReport():void
sdl2.GetDefaultAssertionHandler():void
sdl2.ResetAssertionReport():void
sdl2.SetAssertionHandler():void
sdl2.TriggerBreakpoint():void
sdl2.assert():void
sdl2.assert_paranoid():void
sdl2.assert_release():void
sdl2.GetRevision() {block?}
sdl2.GetRevisionNumber() {block?}
sdl2.GetVersion() {block?}
sdl2.VERSION() {block?}
sdl2.VERSION_ATLEAST(X:number, Y:number, Z:number) {block?}
sdl2.CreateWindow(title:string, x:number, y:number, w:number, h:number, flags:number) {block?}
sdl2.CreateWindowAndRenderer(width:number, height:number, window_flags:number) {block?}
sdl2.CreateWindowFrom():void
sdl2.DestroyWindow(window:sdl2.Window):void
sdl2.DisableScreenSaver():void
sdl2.EnableScreenSaver():void
sdl2.GL_CreateContext(window:sdl2.Window) {block?}
sdl2.GL_DeleteContext(context:sdl2.GLContext):void
sdl2.GL_ExtensionSupported(extension:string) {block?}
sdl2.GL_GetAttribute(attr:number) {block?}
sdl2.GL_GetCurrentContext() {block?}
sdl2.GL_GetCurrentWindow() {block?}
sdl2.GL_GetDrawableSize(window:sdl2.Window) {block?}
sdl2.GL_GetProcAddress():void
sdl2.GL_GetSwapInterval() {block?}
sdl2.GL_LoadLibrary(path:string):void
sdl2.GL_MakeCurrent(window:sdl2.Window, context:sdl2.GLContext):void
sdl2.GL_ResetAttributes():void
sdl2.GL_SetAttribute(attr:number, value:number):void
sdl2.GL_SetSwapInterval(interval:number):void
sdl2.GL_SwapWindow(window:sdl2.Window):void
sdl2.GL_UnloadLibrary():void
sdl2.GetClosestDisplayMode(displayIndex:number, mode:sdl2.DisplayMode) {block?}
sdl2.GetCurrentDisplayMode(displayIndex:number) {block?}
sdl2.GetCurrentVideoDriver() {block?}
sdl2.GetDesktopDisplayMode(displayIndex:number) {block?}
sdl2.GetDisplayBounds(displayIndex:number) {block?}
sdl2.GetDisplayMode(displayIndex:number, modeIndex:number) {block?}
sdl2.GetDisplayName(dipslayIndex:number) {block?}
sdl2.GetNumDisplayModes(displayIndex:number) {block?}
sdl2.GetNumVideoDisplays() {block?}
sdl2.GetNumVideoDrivers() {block?}
sdl2.GetVideoDriver(index:number) {block?}
sdl2.GetWindowBrightness(window:sdl2.Window) {block?}
sdl2.GetWindowData(window:sdl2.Window, name:string):void
sdl2.GetWindowDisplayIndex(window:sdl2.Window) {block?}
sdl2.GetWindowDisplayMode(window:sdl2.Window, mode:sdl2.DisplayMode):void
sdl2.GetWindowFlags(window:sdl2.Window) {block?}
sdl2.GetWindowFromID(id:number) {block?}
sdl2.GetWindowGammaRamp(window:sdl2.Window) {block?}
sdl2.GetWindowGrab(window:sdl2.Window) {block?}
sdl2.GetWindowID(window:sdl2.Window) {block?}
sdl2.GetWindowMaximumSize(window:sdl2.Window) {block?}
sdl2.GetWindowMinimumSize(window:sdl2.Window) {block?}
sdl2.GetWindowPixelFormat(window:sdl2.Window) {block?}
sdl2.GetWindowPosition(window:sdl2.Window) {block?}
sdl2.GetWindowSize(window:sdl2.Window) {block?}
sdl2.GetWindowSurface(window:sdl2.Window) {block?}
sdl2.GetWindowTitle(window:sdl2.Window) {block?}
sdl2.GetWindowWMInfo(window:sdl2.Window):void
sdl2.HideWindow(window:sdl2.Window):void
sdl2.IsScreenSaverEnabled() {block?}
sdl2.MaximizeWindow(window:sdl2.Window):void
sdl2.MinimizeWindow(window:sdl2.Window):void
sdl2.RaiseWindow(window:sdl2.Window):void
sdl2.RestoreWindow(window:sdl2.Window):void
sdl2.SetWindowBordered(window:sdl2.Window, bordered:boolean):void
sdl2.SetWindowBrightness(window:sdl2.Window, brightness:number):void
sdl2.SetWindowData(window:sdl2.Window, name:string):void
sdl2.SetWindowDisplayMode(window:sdl2.Window, mode:sdl2.DisplayMode):void
sdl2.SetWindowFullscreen(window:sdl2.Window, flags:number):void
sdl2.SetWindowGammaRamp(window:sdl2.Window, red[]:number, green[]:number, blue[]:number):void
sdl2.SetWindowGrab(window:sdl2.Window, grabbed:boolean):void
sdl2.SetWindowHitTest(window:sdl2.Window):void
sdl2.SetWindowIcon(window:sdl2.Window, icon:sdl2.Surface):void
sdl2.SetWindowMaximumSize(window:sdl2.Window, max_w:number, max_h:number):void
sdl2.SetWindowMinimumSize(window:sdl2.Window, min_w:number, min_h:number):void
sdl2.SetWindowPosition(window:sdl2.Window, x:number, y:number):void
sdl2.SetWindowSize(window:sdl2.Window, w:number, h:number):void
sdl2.SetWindowTitle(window:sdl2.Window, title:string):void
sdl2.ShowMessageBox():void
sdl2.ShowSimpleMessageBox(flags:number, title:string, message:string, window:sdl2.Window):void
sdl2.ShowWindow(window:sdl2.Window):void
sdl2.UpdateWindowSurface(window:sdl2.Window):void
sdl2.UpdateWindowSurfaceRects(window:sdl2.Window, rects[]:sdl2.Rect):void
sdl2.VideoInit(driver_name:string):void
sdl2.VideoQuit():void
sdl2.CreateRenderer(window:sdl2.Window, index:number, flags:number) {block?}
sdl2.CreateSoftwareRenderer(surface:sdl2.Surface) {block?}
sdl2.CreateTexture(renderer:sdl2.Renderer, format:number, access:number, w:number, h:number) {block?}
sdl2.CreateTextureFromSurface(renderer:sdl2.Renderer, surface:sdl2.Surface) {block?}
sdl2.DestroyRenderer(renderer:sdl2.Renderer):void
sdl2.DestroyTexture(texture:sdl2.Texture):void
sdl2.GL_BindTexture(texture:sdl2.Texture) {block?}
sdl2.GL_UnbindTexture(texture:sdl2.Texture):void
sdl2.GetNumRenderDrivers() {block?}
sdl2.GetRenderDrawBlendMode(renderer:sdl2.Renderer) {block?}
sdl2.GetRenderDrawColor(renderer:sdl2.Renderer) {block?}
sdl2.GetRenderDriverInfo(index:number) {block?}
sdl2.GetRenderTarget(renderer:sdl2.Renderer) {block?}
sdl2.GetRenderer(window:sdl2.Window) {block?}
sdl2.GetRendererInfo(renderer:sdl2.Renderer) {block?}
sdl2.GetRenderOutputSize(renderer:sdl2.Renderer) {block?}
sdl2.GetTextureAlphaMod(texture:sdl2.Texture) {block?}
sdl2.GetTextureBlendMode(texture:sdl2.Texture) {block?}
sdl2.GetTextureColorMod(texture:sdl2.Texture) {block?}
sdl2.LockTexture(texture:sdl2.Texture, rect:sdl2.Rect):void
sdl2.QueryTexture(texture:sdl2.Texture) {block?}
sdl2.RenderClear(renderer:sdl2.Renderer):void
sdl2.RenderCopy(renderer:sdl2.Renderer, texture:sdl2.Texture, srcrect:sdl2.Rect:nil, dstrect:sdl2.Rect:nil):void
sdl2.RenderCopyEx(renderer:sdl2.Renderer, texture:sdl2.Texture, srcrect:sdl2.Rect:nil, dstrect:sdl2.Rect:nil, angle:number, center:sdl2.Point:nil, flip:number):void
sdl2.RenderDrawLine(renderer:sdl2.Renderer, x1:number, y1:number, x2:number, y2:number):void
sdl2.RenderDrawLines(renderer:sdl2.Renderer, points[]:sdl2.Point):void
sdl2.RenderDrawPoint(renderer:sdl2.Renderer, x:number, y:number):void
sdl2.RenderDrawPoints(renderer:sdl2.Renderer, points[]:sdl2.Point):void
sdl2.RenderDrawRect(renderer:sdl2.Renderer, rect:sdl2.Rect:nil):void
sdl2.RenderDrawRects(renderer:sdl2.Renderer, rects[]:sdl2.Rect):void
sdl2.RenderFillRect(renderer:sdl2.Renderer, rect:sdl2.Rect:nil):void
sdl2.RenderFillRects(renderer:sdl2.Renderer, rects[]:sdl2.Rect):void
sdl2.RenderGetClipRect(renderer:sdl2.Renderer) {block?}
sdl2.RenderGetLogicalSize(renderer:sdl2.Renderer) {block?}
sdl2.RenderGetScale(renderer:sdl2.Renderer) {block?}
sdl2.RenderGetViewport(renderer:sdl2.Renderer) {block?}
sdl2.RenderIsClipEnabled(renderer:sdl2.Renderer)
sdl2.RenderPresent(renderer:sdl2.Renderer):void
sdl2.RenderReadPixels(renderer:sdl2.Renderer, rect:sdl2.Rect:nil, format:symbol) {block?}
sdl2.RenderSetClipRect(renderer:sdl2.Renderer, rect:sdl2.Rect:nil):void
sdl2.RenderSetLogicalSize(renderer:sdl2.Renderer, w:number, h:number):void
sdl2.RenderSetScale(renderer:sdl2.Renderer, scaleX:number, scaleY:number):void
sdl2.RenderSetViewport(renderer:sdl2.Renderer, rect:sdl2.Rect:nil):void
sdl2.RenderTargetSupported(renderer:sdl2.Renderer) {block?}
sdl2.SetRenderDrawBlendMode(renderer:sdl2.Renderer, blendMode:number):void
sdl2.SetRenderDrawColor(renderer:sdl2.Renderer, r:number, g:number, b:number, a:number):void
sdl2.SetRenderTarget(renderer:sdl2.Renderer, texture:sdl2.Texture:nil):void
sdl2.SetTextureAlphaMod(texture:sdl2.Texture, alpha:number):void
sdl2.SetTextureBlendMode(texture:sdl2.Texture, blendMode:number):void
sdl2.SetTextureColorMod(texture:sdl2.Texture, r:number, g:number, b:number):void
sdl2.UnlockTexture(texture:sdl2.Texture):void
sdl2.UpdateTexture(texture:sdl2.Texture, rect:sdl2.Rect:nil, pitch:number):void
sdl2.UpdateYUVTexture():void
sdl2.AllocFormat(pixel_format:number) {block?}
sdl2.AllocPalette(ncolors:number) {block?}
sdl2.CalculateGammaRamp(gamma:number) {block?}
sdl2.FreeFormat(format:sdl2.PixelFormat):void
sdl2.FreePalette(palette:sdl2.Palette):void
sdl2.GetPixelFormatName(format:number) {block?}
sdl2.GetRGB(pixel:number, format:sdl2.PixelFormat) {block?}
sdl2.GetRGBA(pixel:number, format:sdl2.PixelFormat) {block?}
sdl2.MapRGB(format:sdl2.PixelFormat, r:number, g:number, b:number) {block?}
sdl2.MapRGBA(format:sdl2.PixelFormat, r:number, g:number, b:number, a:number) {block?}
sdl2.MasksToPixelFormatEnum(bpp:number, Rmask:number, Gmask:number, Bmask:number, Amask:number) {block?}
sdl2.PixelFormatEnumToMasks(format:number) {block?}
sdl2.SetPaletteColors(palette:sdl2.Palette, colors[]:sdl2.Color, firstcolor:number, ncolors:number):void
sdl2.SetPixelFormatPalette(format:sdl2.PixelFormat, palette:sdl2.Palette):void
sdl2.EnclosePoints(points[]:sdl2.Point, clip:sdl2.Rect) {block?}
sdl2.HasIntersection(A:sdl2.Rect, B:sdl2.Rect) {block?}
sdl2.IntersectRect(A:sdl2.Rect, B:sdl2.Rect) {block?}
sdl2.IntersectRectAndLine(rect:sdl2.Rect, X1:number, Y1:number, X2:number, Y2:number):void
sdl2.PointInRect(p:sdl2.Point, r:sdl2.Rect):void
sdl2.RectEmpty(r:sdl2.Rect) {block?}
sdl2.RectEquals(a:sdl2.Rect, b:sdl2.Rect) {block?}
sdl2.UnionRect(A:sdl2.Rect, B:sdl2.Rect) {block?}
sdl2.BlitScaled(src:sdl2.Surface, srcrect:sdl2.Rect:nil, dst:sdl2.Surface, dstrect:sdl2.Rect:nil):void
sdl2.BlitSurface(src:sdl2.Surface, srcrect:sdl2.Rect:nil, dst:sdl2.Surface, dstrect:sdl2.Rect:nil):void
sdl2.ConvertPixels(width:number, height:number, src_format:number, dst_format:number):void
sdl2.ConvertSurface(src:sdl2.Surface, fmt:sdl2.PixelFormat, flags:number) {block?}
sdl2.ConvertSurfaceFormat(src:sdl2.Surface, pixel_format:number, flags:number) {block?}
sdl2.CreateRGBSurface(flags:number, width:number, height:number, depth:number, Rmask:number, Gmask:number, Bmask:number, Amask:number) {block?}
sdl2.CreateRGBSurfaceFrom(pixels:array:nomap, width:number, height:number, depth:number, pitch:number, Rmask:number, Gmask:number, Bmask:number, Amask:number) {block?}
sdl2.CreateRGBSurfaceFromImage(image:image) {block?}
sdl2.FillRect(dst:sdl2.Surface, rect:sdl2.Rect:nil, color:number):void
sdl2.FillRects(dst:sdl2.Surface, rects[]:sdl2.Rect, color:number):void
sdl2.FreeSurface(surface:sdl2.Surface):void
sdl2.GetClipRect(surface:sdl2.Surface) {block?}
sdl2.GetColorKey(surface:sdl2.Surface) {block?}
sdl2.GetSurfaceAlphaMod(surface:sdl2.Surface) {block?}
sdl2.GetSurfaceBlendMode(surface:sdl2.Surface) {block?}
sdl2.GetSurfaceColorMod(surface:sdl2.Surface) {block?}
sdl2.LoadBMP(src:stream) {block?}
sdl2.LoadBMP_RW():void
sdl2.LockSurface(surface:sdl2.Surface):void
sdl2.LowerBlit(src:sdl2.Surface, srcrect:sdl2.Rect:nil, dst:sdl2.Surface, dstrect:sdl2.Rect:nil):void
sdl2.LowerBlitScaled(src:sdl2.Surface, srcrect:sdl2.Rect:nil, dst:sdl2.Surface, dstrect:sdl2.Rect:nil):void
sdl2.MUSTLOCK(surface:sdl2.Surface) {block?}
sdl2.SaveBMP(surface:sdl2.Surface, dst:stream) {block?}
sdl2.SaveBMP_RW():void
sdl2.SetClipRect(surface:sdl2.Surface, rect:sdl2.Rect) {block?}
sdl2.SetColorKey(surface:sdl2.Surface, flag:number, key:number):void
sdl2.SetSurfaceAlphaMod(surface:sdl2.Surface, alpha:number):void
sdl2.SetSurfaceBlendMode(surface:sdl2.Surface, blendMode:number):void
sdl2.SetSurfaceColorMod(surface:sdl2.Surface, r:number, g:number, b:number):void
sdl2.SetSurfacePalette(surface:sdl2.Surface, palette:sdl2.Palette):void
sdl2.SetSurfaceRLE(surface:sdl2.Surface, flag:number):void
sdl2.UnlockSurface(surface:sdl2.Surface):void
sdl2.GetClipboardText() {block?}
sdl2.HasClipboardText() {block?}
sdl2.SetClipboardText(text:string):void
sdl2.AddEventWatch():void
sdl2.DelEventWatch():void
sdl2.EventState(type:number, state:number) {block?}
sdl2.FilterEvents():void
sdl2.FlushEvent(type:number):void
sdl2.FlushEvents(minType:number, maxType:number):void
sdl2.GetEventFilter():void
sdl2.GetNumTouchDevices() {block?}
sdl2.GetNumTouchFingers(touchId:number) {block?}
sdl2.GetTouchDevice(index:number) {block?}
sdl2.GetTouchFinger(touchId:number, index:number) {block?}
sdl2.HasEvent(type:number) {block?}
sdl2.HasEvents(minType:number, maxType:number) {block?}
sdl2.LoadDollarTemplates(touchId:number, src:stream) {block?}
sdl2.AddEvents(events[]:sdl2.Event) {block?}
sdl2.PeekEvents(numevents:number, minType:number, maxType:number) {block?}
sdl2.GetEvents(numevents:number, minType:number, maxType:number) {block?}
sdl2.PollEvent() {block?}
sdl2.PumpEvents():void
sdl2.PushEvent(event:sdl2.Event) {block?}
sdl2.QuitRequested() {block?}
sdl2.RecordGesture(touchId:number) {block?}
sdl2.RegisterEvents(numevents:number) {block?}
sdl2.SaveAllDollarTemplates(dst:stream) {block?}
sdl2.SaveDollarTemplate(gestureId:number, dst:stream):void
sdl2.SetEventFilter():void
sdl2.WaitEvent() {block?}
sdl2.WaitEventTimeout(timeout:number) {block?}
sdl2.CheckKeyboardState(scancode:number) {block?}
sdl2.GetKeyFromName(name:string) {block?}
sdl2.GetKeyFromScancode(scancode:number) {block?}
sdl2.GetKeyName(key:number) {block?}
sdl2.GetKeyboardFocus() {block?}
sdl2.GetKeyboardState() {block?}
sdl2.GetModState() {block?}
sdl2.GetScancodeFromKey(key:number) {block?}
sdl2.GetScancodeFromName(name:string) {block?}
sdl2.GetScancodeName(scancode:number) {block?}
sdl2.HasScreenKeyboardSupport() {block?}
sdl2.IsScreenKeyboardShown(window:sdl2.Window) {block?}
sdl2.IsTextInputActive() {block?}
sdl2.SetModState(modstate:number):void
sdl2.SetTextInputRect(rect:sdl2.Rect):void
sdl2.StartTextInput():void
sdl2.StopTextInput():void
sdl2.CaptureMouse(enalbed:boolean):void
sdl2.CreateColorCursor(surface:sdl2.Surface, hot_x:number, hot_y:number) {block?}
sdl2.CreateCursor(data:array@uint8:nomap, mask:array@uint8:nomap, w:number, h:number, hot_x:number, hot_y:number) {block?}
sdl2.CreateSystemCursor(id:number) {block?}
sdl2.FreeCursor(cursor:sdl2.Cursor):void
sdl2.GetCursor() {block?}
sdl2.GetDefaultCursor() {block?}
sdl2.GetGlobalMouseState():void
sdl2.GetMouseFocus() {block?}
sdl2.GetMouseState() {block?}
sdl2.GetRelativeMouseMode() {block?}
sdl2.GetRelativeMouseState() {block?}
sdl2.SetCursor(cursor:sdl2.Cursor):void
sdl2.SetRelativeMouseMode(enabled:boolean):void
sdl2.ShowCursor(toggle:number):void
sdl2.WarpMouseGlobal(x:number, y:number):void
sdl2.WarpMouseInWindow(window:sdl2.Window, x:number, y:number):void
sdl2.JoystickClose(joystick:sdl2.Joystick):void
sdl2.JoystickEventState(state:number) {block?}
sdl2.JoystickGetAttached(joystick:sdl2.Joystick) {block?}
sdl2.JoystickGetAxis(joystick:sdl2.Joystick, axis:number) {block?}
sdl2.JoystickGetBall(joystick:sdl2.Joystick, ball:number) {block?}
sdl2.JoystickGetButton(joystick:sdl2.Joystick, button:number) {block?}
sdl2.JoystickGetDeviceGUID(device_index:number) {block?}
sdl2.JoystickGetGUID(joystick:sdl2.Joystick) {block?}
sdl2.JoystickGetGUIDFromString(pchGUID:string) {block?}
sdl2.JoystickGetGUIDString(guid:sdl2.JoystickGUID) {block?}
sdl2.JoystickGetHat(joystick:sdl2.Joystick, hat:number) {block?}
sdl2.JoystickInstanceID(joystick:sdl2.Joystick) {block?}
sdl2.JoystickName(joystick:sdl2.Joystick) {block?}
sdl2.JoystickNameForIndex(device_index:number) {block?}
sdl2.JoystickNumAxes(joystick:sdl2.Joystick) {block?}
sdl2.JoystickNumBalls(joystick:sdl2.Joystick) {block?}
sdl2.JoystickNumButtons(joystick:sdl2.Joystick) {block?}
sdl2.JoystickNumHats(joystick:sdl2.Joystick) {block?}
sdl2.JoystickOpen(device_index:number) {block?}
sdl2.JoystickUpdate():void
sdl2.NumJoysticks() {block?}
sdl2.GameControllerAddMapping(mappingString:string) {block?}
sdl2.GameControllerAddMappingsFromFile(file:stream) {block?}
sdl2.GameControllerAddMappingsFromRW():void
sdl2.GameControllerClose(gamecontroller:sdl2.GameController):void
sdl2.GameControllerEventState(state:number) {block?}
sdl2.GameControllerGetAttached(gamecontroller:sdl2.GameController) {block?}
sdl2.GameControllerGetAxis(gamecontroller:sdl2.GameController, axis:number) {block?}
sdl2.GameControllerGetAxisFromString(pchString:string) {block?}
sdl2.GameControllerGetBindForAxis(gamecontroller:sdl2.GameController, axis:number) {block?}
sdl2.GameControllerGetBindForButton(gamecontroller:sdl2.GameController, button:number) {block?}
sdl2.GameControllerGetButton(gamecontroller:sdl2.GameController, button:number) {block?}
sdl2.GameControllerGetButtonFromString(pchString:string) {block?}
sdl2.GameControllerGetJoystick(gamecontroller:sdl2.GameController) {block?}
sdl2.GameControllerGetStringForAxis(axis:number) {block?}
sdl2.GameControllerGetStringForButton(button:number) {block?}
sdl2.GameControllerMapping(gamecontroller:sdl2.GameController) {block?}
sdl2.GameControllerMappingForGUID(guid:sdl2.JoystickGUID) {block?}
sdl2.GameControllerName(gamecontroller:sdl2.GameController) {block?}
sdl2.GameControllerNameForIndex(joystick_index:number) {block?}
sdl2.GameControllerOpen(joystick_index:number) {block?}
sdl2.GameControllerUpdate():void
sdl2.IsGameController(joystick_index:number) {block?}
sdl2.HapticClose(haptic:sdl2.Haptic):void
sdl2.HapticDestroyEffect(haptic:sdl2.Haptic, effect:number):void
sdl2.HapticEffectSupported(haptic:sdl2.Haptic, effect:sdl2.HapticEffect) {block?}
sdl2.HapticGetEffectStatus(haptic:sdl2.Haptic, effect:number) {block?}
sdl2.HapticIndex(haptic:sdl2.Haptic) {block?}
sdl2.HapticName(device_index:number) {block?}
sdl2.HapticNewEffect(haptic:sdl2.Haptic, effect:sdl2.HapticEffect) {block?}
sdl2.HapticNumAxes(haptic:sdl2.Haptic) {block?}
sdl2.HapticNumEffects(haptic:sdl2.Haptic) {block?}
sdl2.HapticNumEffectsPlaying(haptic:sdl2.Haptic) {block?}
sdl2.HapticOpen(device_index:number) {block?}
sdl2.HapticOpenFromJoystick(joystick:sdl2.Joystick) {block?}
sdl2.HapticOpenFromMouse() {block?}
sdl2.HapticOpened(device_index:number) {block?}
sdl2.HapticPause(haptic:sdl2.Haptic):void
sdl2.HapticQuery(haptic:sdl2.Haptic) {block?}
sdl2.HapticRumbleInit(haptic:sdl2.Haptic):void
sdl2.HapticRumblePlay(haptic:sdl2.Haptic, strength:number, length:number):void
sdl2.HapticRumbleStop(haptic:sdl2.Haptic):void
sdl2.HapticRumbleSupported(haptic:sdl2.Haptic) {block?}
sdl2.HapticRunEffect(haptic:sdl2.Haptic, effect:number, iterations:number):void
sdl2.HapticSetAutocenter(haptic:sdl2.Haptic, autocenter:number):void
sdl2.HapticSetGain(haptic:sdl2.Haptic, gain:number):void
sdl2.HapticStopAll(haptic:sdl2.Haptic):void
sdl2.HapticStopEffect(haptic:sdl2.Haptic, effect:number):void
sdl2.HapticUnpause(haptic:sdl2.Haptic):void
sdl2.HapticUpdateEffect(haptic:sdl2.Haptic, effect:number, data:sdl2.HapticEffect):void
sdl2.JoystickIsHaptic(joystick:sdl2.Joystick) {block?}
sdl2.MouseIsHaptic() {block?}
sdl2.NumHaptics() {block?}
sdl2.AudioInit(driver_name:string):void
sdl2.AudioQuit():void
sdl2.BuildAudioCVT(cvt:sdl2.AudioCVT, src_format:number, src_channels:number, src_rate:number, dst_format:number, dst_channels:number, dst_rate:number) {block?}
sdl2.ClearQueuedAudio(dev:number):void
sdl2.CloseAudio():void
sdl2.CloseAudioDevice(dev:number):void
sdl2.ConvertAudio(cvt:sdl2.AudioCVT):void
sdl2.FreeWAV(wav:sdl2.Wav):void
sdl2.GetAudioDeviceName(index:number, iscapture:number) {block?}
sdl2.GetAudioDeviceStatus(dev:number) {block?}
sdl2.GetAudioDriver(index:number) {block?}
sdl2.GetAudioStatus() {block?}
sdl2.GetCurrentAudioDriver() {block?}
sdl2.GetNumAudioDevices(iscapture:number) {block?}
sdl2.GetNumAudioDrivers() {block?}
sdl2.GetQueuedAudioSize(dev:number):void
sdl2.LoadWAV(file:stream) {block?}
sdl2.LoadWAV_RW():void
sdl2.LockAudio():void
sdl2.LockAudioDevice(dev:number):void
sdl2.MixAudio(volume:number):void
sdl2.MixAudioFormat(format:number, volume:number):void
sdl2.OpenAudio(desired:sdl2.AudioSpec) {block?}
sdl2.OpenAudioDevice(device:string, iscapture:number, desired:sdl2.AudioSpec, allowed_changes:number):void
sdl2.PauseAudio(pause_on:number):void
sdl2.PauseAudioDevice(dev:number, pause_on:number):void
sdl2.QueueAudio(dev:number):void
sdl2.UnlockAudio():void
sdl2.UnlockAudioDevice(dev:number):void
sdl2.AUDIO_BITSIZE(x:number) {block?}
sdl2.AUDIO_ISFLOAT(x:number) {block?}
sdl2.AUDIO_ISBIGENDIAN(x:number) {block?}
sdl2.AUDIO_ISSIGNED(x:number) {block?}
sdl2.AUDIO_ISINT(x:number) {block?}
sdl2.AUDIO_ISLITTLEENDIAN(x:number) {block?}
sdl2.AUDIO_ISUNSIGNED(x:number) {block?}
sdl2.CreateThread():void
sdl2.DetachThread():void
sdl2.GetThreadID():void
sdl2.GetThreadName():void
sdl2.GetThreadPriority():void
sdl2.TLSCreate():void
sdl2.TLSGet():void
sdl2.TLSSet():void
sdl2.ThreadID():void
sdl2.WaitThread():void
sdl2.CondBroadcast():void
sdl2.CondSignal():void
sdl2.CondWait():void
sdl2.CondWaitTimeout():void
sdl2.CreateCond():void
sdl2.CreateMutex():void
sdl2.CreateSemaphore():void
sdl2.DestroyCond():void
sdl2.DestroyMutex():void
sdl2.DestroySemaphore():void
sdl2.LockMutex():void
sdl2.SemPost():void
sdl2.SemTryWait():void
sdl2.SemValue():void
sdl2.SemWait():void
sdl2.SemWaitTimeout():void
sdl2.TryLockMutex():void
sdl2.UnlockMutex():void
sdl2.AtomicAdd():void
sdl2.AtomicCAS():void
sdl2.AtomicCASPtr():void
sdl2.AtomicDecRef():void
sdl2.AtomicGet():void
sdl2.AtomicGetPtr():void
sdl2.AtomicIncRef():void
sdl2.AtomicLock():void
sdl2.AtomicSet():void
sdl2.AtomicSetPtr():void
sdl2.AtomicTryLock():void
sdl2.AtomicUnlock():void
sdl2.CompilerBarrier():void
sdl2.AddTimer(interval:number):void
sdl2.Delay(ms:number):void
sdl2.GetPerformanceCounter() {block?}
sdl2.GetPerformanceFrequency() {block?}
sdl2.GetTicks() {block?}
sdl2.RemoveTimer(id:number) {block?}
sdl2.TICKS_PASSED(A:number, B:number) {block?}
sdl2.GetBasePath():void
sdl2.GetPrefPath(org:string, app:string):void
sdl2.AllocRW():void
sdl2.FreeRW():void
sdl2.RWFromConstMem():void
sdl2.RWFromFP():void
sdl2.RWFromFile():void
sdl2.RWFromMem():void
sdl2.RWclose():void
sdl2.RWread():void
sdl2.RWseek():void
sdl2.RWtell():void
sdl2.RWwrite():void
sdl2.ReadBE16():void
sdl2.ReadBE32():void
sdl2.ReadBE64():void
sdl2.ReadLE16():void
sdl2.ReadLE32():void
sdl2.ReadLE64():void
sdl2.WriteBE16():void
sdl2.WriteBE32():void
sdl2.WriteBE64():void
sdl2.WriteLE16():void
sdl2.WriteLE32():void
sdl2.WriteLE64():void
sdl2.GetPlatform() {block?}
sdl2.GetCPUCacheLineSize() {block?}
sdl2.GetCPUCount() {block?}
sdl2.GetSystemRAM() {block?}
sdl2.Has3DNow() {block?}
sdl2.HasAVX() {block?}
sdl2.HasAVX2():void
sdl2.HasAltiVec() {block?}
sdl2.HasMMX() {block?}
sdl2.HasRDTSC() {block?}
sdl2.HasSSE() {block?}
sdl2.HasSSE2() {block?}
sdl2.HasSSE3() {block?}
sdl2.HasSSE41() {block?}
sdl2.HasSSE42() {block?}
sdl2.Swap16():void
sdl2.Swap32():void
sdl2.Swap64():void
sdl2.SwapBE16():void
sdl2.SwapBE32():void
sdl2.SwapBE64():void
sdl2.SwapFloat():void
sdl2.SwapFloatBE():void
sdl2.SwapFloatLE():void
sdl2.SwapLE16():void
sdl2.SwapLE32():void
sdl2.SwapLE64():void
sdl2.MostSignificantBitIndex32(x:number):void
sdl2.GetPowerInfo() {block?}
sdl2.AndroidGetActivity():void
sdl2.AndroidGetExternalStoragePath():void
sdl2.AndroidGetExternalStorageState():void
sdl2.AndroidGetInternalStoragePath():void
sdl2.AndroidGetJNIEnv():void
sdl2.acos(x:number) {block?}

49.3sdl2.Window Class

49.4sdl2.Renderer Class

49.5sdl2.Texture Class

49.6sdl2.Event Class

49.7sdl2.Point Class

49.8sdl2.Rect Class

49.9sdl2.Color Class

49.10sdl2.Palette Class

49.11sdl2.PixelFormat Class

49.12sdl2.Keysym Class

49.13sdl2.Cursor Class

49.14sdl2.Joystick Class

49.15sdl2.JoystickGUID Class

49.16sdl2.GameController Class

49.17sdl2.GameControllerButtonBind Class

49.18sdl2.AudioCVT Class

49.19sdl2.AudioSpec Class

49.20sdl2.Wav Class

49.21sdl2.RendererInfo Class

49.22sdl2.DisplayMode Class

49.23sdl2.GLContext Class

49.24sdl2.HapticEffect Class

49.25sdl2.Surface Class

49.26sdl2.Finger Class

49.27Thanks

This module uses SDL2 library which is distributed in the following site:

http://www.libsdl.org/