SDLRuntime

clay.base.BaseRuntimeclay.sdl.SDLRuntime (Class)

Static Members

timestamp(): Float
Returns
Float

defaultConfig(): clay.RuntimeConfig
Returns
clay.RuntimeConfig

Instance Members



currentSdlEvent: SDLEvent

skipMouseEvents: Bool

skipKeyboardEvents: Bool

minFrameTime: Float

init(): Void

ready(): Void

run(): Bool
Returns
Bool

shutdown(?immediate: Bool = false): Void
Name Type Default
immediate Bool false

windowDevicePixelRatio(): Float
Returns
Float

windowWidth(): Int
Returns
Int

windowHeight(): Int
Returns
Int

setWindowTitle(title: String): Void
Name Type
title String

setWindowBorderless(borderless: Bool): Void
Name Type
borderless Bool

startGamepadRumble(gamepadId: Int, lowFrequency: Float, highFrequency: Float, duration: Float): Void
Name Type
gamepadId Int
lowFrequency Float
highFrequency Float
duration Float

stopGamepadRumble(gamepadId: Int): Void
Name Type
gamepadId Int

getGamepadName(index: Int): String
Name Type
index Int
Returns
String

setWindowFullscreen(fullscreen: Bool): Bool
Name Type
fullscreen Bool
Returns
Bool

windowSwap(): Void

new(app: clay.Clay): Void
Name Type
app clay.Clay

Private Members

timestampStart: Float

windowW: Int

windowH: Int

windowDpr: Float

windowFocused: Bool


gamepadInstanceIds: haxe.ds.IntMap<Int>


isSdlFullscreen: Bool

fingerIdList: Map

nextFingerId: Int

lastFrameTime: Float

initSDL(): Void

initCwd(): Void

createWindow(): Void

applyGLAttributes(render: clay.RenderConfig): Void
Name Type
render clay.RenderConfig

windowFlags(config: clay.WindowConfig): SDLWindowFlags
Name Type
config clay.WindowConfig
Returns
SDLWindowFlags

createRenderContext(window: SDLWindowPointer, render: clay.RenderConfig): Bool
Name Type
window SDLWindowPointer
render clay.RenderConfig
Returns
Bool

postRenderContext(window: SDLWindowPointer): Void
Name Type
window SDLWindowPointer

setVSync(enabled: Bool): Bool
Name Type
enabled Bool
Returns
Bool

updateWindowConfig(window: SDLWindowPointer, config: clay.WindowConfig): clay.WindowConfig
Name Type
window SDLWindowPointer
config clay.WindowConfig
Returns
clay.WindowConfig

updateRenderConfig(window: SDLWindowPointer, render: clay.RenderConfig): clay.RenderConfig
Name Type
window SDLWindowPointer
render clay.RenderConfig
Returns
clay.RenderConfig

clamp(n: Float): Float
Name Type
n Float
Returns
Float

loop(_: Int): Void
Name Type
_ Int

handleInputEvent(e: SDLEvent): Void
Name Type
e SDLEvent

toFingerId(value: cpp.Int64): Int
Name Type
value cpp.Int64
Returns
Int

removeFingerId(value: cpp.Int64): Void
Name Type
value cpp.Int64

toPixels(value: Float): Int
Name Type
value Float
Returns
Int

toKeyMod(modValue: Int): clay.ModState

Helper to return a ModState (shift, ctrl etc) from a given InputEvent

Name Type
modValue Int
Returns
clay.ModState

handleWindowEvent(e: SDLEvent): Void
Name Type
e SDLEvent

checkFullscreenState(e: SDLEvent): Void
Name Type
e SDLEvent

Metadata

Name Parameters
:headerCode "#include "linc_sdl.h""
:access clay.Clay
:access clay.Input
:access clay.Screen