parin.backend.web
struct BackendState
fn activateSound beginBlend beginCamera beginClip beginDrawing beginDroppedPaths beginViewport clearBackground closeWindow deactivateSound deltaMouse deltaTime deltaWheel dequeuePressedKey dequeuePressedRune drawCirc drawLine drawRect drawRune drawSurface drawTexture drawViewport droppedPaths elapsedTicks elapsedTime endBlend endCamera endClip endDrawing endDroppedPaths endViewport fontCount fontFilter fontFree fontGlyphInfo fontIsValid fontLineSpacing fontRuneSpacing fontSetFilter fontSetLineSpacing fontSetRuneSpacing fontSetWrap fontSize fontWrap fps fpsMax freeAllFonts freeAllSounds freeAllTextures freeAllViewports isBackendNull isCursorVisible isDown isFullscreen isPressed isReleased isWindowCloseButtonPressed isWindowResized loadFont loadSound loadSurface loadTexture loadViewport masterVolume matrixRotate matrixScale matrixTranslate mouse openUrl openWindow pauseSound playSound popMatrix pumpEvents pushMatrix randf randi randomize resourceIsNull resumeSound screenHeight screenWidth setFpsMax setIsCursorVisible setIsFullscreen setMasterVolume setRandomSeed setVsync setWindowIconFromFiles setWindowMaxSize setWindowMinSize setWindowTitle soundCanRepeat soundCount soundDuration soundFree soundIsActive soundIsPaused soundIsValid soundPan soundPitch soundPitchVariance soundPitchVarianceBase soundProgress soundSetCanRepeat soundSetPan soundSetPitch soundSetPitchVariance soundSetPitchVarianceBase soundSetVolume soundTime soundVolume startSound stopSound takeScreenshot takeScreenshotAndUseAsTexture textureCount textureFilter textureFree textureHeight textureIsValid textureSetFilter textureSetWrap textureSize textureWidth textureWrap toCanvasPoint toScenePoint updateIsFullscreen updateSound updateSoundPitchVariance updateVsync updateWindow viewportBlend viewportColor viewportCount viewportFilter viewportFree viewportHeight viewportIsAttached viewportIsFirstUse viewportIsValid viewportResize viewportSetBlend viewportSetColor viewportSetFilter viewportSetWrap viewportSize viewportWidth viewportWrap vsync windowHeight windowWidth
Types 1
structBackendState
Functions 166
fn
void updateWindow(alias updateWindowLoop, alias finishWindowLoop)() @trustedUpdates the window every frame with the given function. Returns when the given function returns true.fn
void openWindow(int width, int height, IStr title, bool vsync, int fpsMax, int windowMinWidth, int windowMinHeight) @trusted nothrowfn
Maybe!Surface loadSurface(const(ubyte)[] memory, IStr ext = ".png", IStr file = __FILE__, Sz line = __LINE__) @trusted nothrowfn
Maybe!ResourceId loadFont(IStr path, int size, int runeSpacing, int lineSpacing, IStr32 runes) @trusted nothrowfn
Maybe!ResourceId loadFont(const(ubyte)[] memory, int size, int runeSpacing, int lineSpacing, IStr32 runes, IStr ext = ".ttf") @trusted nothrowfn
Maybe!ResourceId loadSound(IStr path, float volume, float pitch, bool canRepeat, float pitchVariance = 1.0f) @trusted nothrowfn
void soundSetPitch(ResourceId id, float value, bool canUpdatePitchVarianceBase) @trusted nothrow @nogcfn
Fault takeScreenshot(IStr path, ResourceId canvasViewportId, bool hasAlpha) @trusted nothrow @nogcfn
Maybe!ResourceId takeScreenshotAndUseAsTexture(ResourceId canvasViewportId, bool hasAlpha) @trusted nothrow @nogcfn
void drawRect(Rect area, Rgba color, float thickness, Vec2 origin, float rotation) @trusted nothrow @nogcfn
void drawSurface(ref Surface surface, Rect area, Rect target, Vec2 origin, float rotation, Rgba color) @trusted nothrow @nogcfn
void drawTexture(ResourceId id, Rect area, Rect target, Vec2 origin, float rotation, Rgba color) @trusted nothrow @nogcfn
void drawViewport(ResourceId id, Rect area, Rect target, Vec2 origin, float rotation, Rgba color) @trusted nothrow @nogcVariables 3
var
BackendState * _backendStateenumvar
defaultBackendMaxSurfaceCount = 4enumvar
defaultBackendMaxSurfaceSide = 1024