Module system

system.nim

Include file for platform specific SDL API procedures.

Types

WindowsMessageHook* = proc (userdata: pointer; hWnd: pointer; message: cuint;
                         wParam: uint64; lParam: int64) {.
cdecl
.}
IDirect3DDevice9* = pointer

Procs

proc setWindowsMessageHook*(callback: WindowsMessageHook; userdata: pointer) {.
cdecl, importc: "SDL_SetWindowsMessageHook", dynlib: SDL2_LIB
.}
Set a procedure that is called for every windows message, before translateMessage().
proc direct3D9GetAdapterIndex*(displayIndex: cint): cint {.
cdecl, importc: "SDL_Direct3D9GetAdapterIndex", dynlib: SDL2_LIB
.}
Returns the D3D9 adapter index that matches the specified display index. This adapter index can be passed to IDirect3D9::CreateDevice and controls on which monitor a full screen application will appear.
proc renderGetD3D9Device*(renderer: ptr Renderer): IDirect3DDevice9 {.
cdecl, importc: "SDL_RenderGetD3D9Device", dynlib: SDL2_LIB
.}
Returns the D3D device associated with a renderer, or nil if it's not a D3D renderer. Once you are done using the device, you should release it to avoid a resource leak.
proc dXGIGetOutputInfo*(displayIndex: cint; adapterIndex: ptr cint;
                       outputIndex: ptr cint): bool {.
cdecl, importc: "SDL_DXGIGetOutputInfo", dynlib: SDL2_LIB
.}
Returns the DXGI Adapter and Output indices for the specified display index. These can be passed to EnumAdapters and EnumOutputs respectively to get the objects required to create a DX10 or DX11 device and swap chain.