GPUWindow

Configuration options for creating a GPUWindow, including initial dimensions and title.

Module: elide.GPUWindow Support: Experimental

20 members: 20 undocumented

Constructors

⚪ constructor(descriptor)
Creates a new native window with the given dimensions and title.

Methods

⚪ getContext(contextType)
Returns a GPUCanvasContext bound to this window's surface.
⚪ destroy()
Releases the native window and all associated resources.
⚪ requestAnimationFrame(callback)
Schedule a callback before the next repaint. Returns a request ID.
⚪ cancelAnimationFrame(handle)
Cancel a previously scheduled animation frame callback.

Properties

⚪ width
→ u32
⚪ height
Initial width of the window in logical pixels.
⚪ devicePixelRatio
Device pixel ratio — physical pixels per logical pixel.
⚪ onkeydown
Fired when a key is pressed while the window has focus.
⚪ onkeyup
Fired when a key is released while the window has focus.
⚪ onmousedown
Fired when a mouse button is pressed inside the window.
⚪ onmouseup
Fired when a mouse button is released inside the window.
⚪ onmousemove
Fired when the mouse pointer moves within the window.
⚪ onclick
Fired when a mouse click (press and release) occurs in the window.
⚪ ondblclick
Fired when a double-click occurs in the window.
⚪ onwheel
Fired when the mouse wheel or trackpad scrolls over the window.
⚪ onresize
Fired when the window is resized.
⚪ onfocus
Fired when the window gains keyboard focus.
⚪ onblur
Fired when the window loses keyboard focus.
⚪ onclose
Fired when the window is closed by the user or programmatically.

Dictionary GPUWindowDescriptor

Configuration options for creating a GPUWindow, including initial dimensions and title.

3 members: 3 undocumented

Properties

⚪ width
→ u32
⚪ height
Initial width of the window in logical pixels.
⚪ title
→ string

---

Callback FrameRequestCallback

Schedule a callback before the next repaint. Returns a request ID.

---