The library documents itself · Graphics
stzWindow
32 own methods · 4 forms written with extensions, listed under their method
the source: base/graphics/stzWindow.ring(opens in a new tab) · All classes · The area reference: Graphics
Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean
No method of this class is run on this page: the class reaches files, the network, processes, the clock, chance or sound, and an example run here would only be an example of its effects. Each method carries the explanation the library gives of itself.
Method
Explanation, as the source carries it
init
(no comment in the source: the name reads as a sentence) initno extension
Id_
(no comment in the source: the name reads as a sentence) id_no extension
NativeHandle
It crosses as an f64, which holds integers exactly to 2^53. Real handles sit far below that on every platform here, but a caller that means to pass it back to a C API should check rather than assume -- the house has already paid once for an f64 boundary, on epoch nanos.no extension
NativeDisplay
The X11 Display pointer, which AT-SPI needs alongside the window id. 0 on Windows and macOS, where the handle alone is the whole address.no extension
IsOpen
state --------------------------------------------------------------- TRUE until the user closes it (the X button, Alt-F4) or Close() is called. This is the `while` condition of every frame loop.no extension
CanDraw
(no comment in the source: the name reads as a sentence) can drawno extension
Width
(no comment in the source: the name reads as a sentence) widthno extension
Height
(no comment in the source: the name reads as a sentence) heightno extension
Title
(no comment in the source: the name reads as a sentence) titleno extension
SetTitle
(no comment in the source: the name reads as a sentence) set titleQCSXTZZZIBWU
SetSize
Resize from code. The size lands at the next Poll(), which is also where the swapchain reconfigures -- so this drives exactly the path a dragged window edge drives, and that is why it exists: without it the resize path could only ever be tested by a person with a mouse.QCSXTZZZIBWU
WasResized
TRUE for the frame in which the user finished resizing. The surface is reconfigured HERE rather than in Draw(), so a caller that wants to re-lay-out its picture can do so before anything is drawn at the new size.no extension
Poll
the frame ----------------------------------------------------------- Pump the OS event queue and SAMPLE input. Everything the frame then reads -- keys, mouse, size, delta -- describes the same instant, so two reads in one frame cannot disagree with each other.QCSXTZZZIBWU
DeltaTime
Seconds since the previous Poll(). Multiply speeds by this and motion stops depending on how fast the machine happens to be -- the one number that separates an animation from a slideshow.no extension
FrameCount
(no comment in the source: the name reads as a sentence) frame countno extension
FPS
Frames per second implied by the last frame's delta. An INSTANT rate, not an average -- it jitters, and a caller that wants a smooth number should average it themselves rather than be handed a lie.no extension
Draw
(no comment in the source: the name reads as a sentence) drawQCSXTZZZIBWU
KeyDown
HELD vs PRESSED, and why a loop needs both: KeyDown answers "is it down right now" -- true every frame you hold it, which is what movement wants. KeyPressed answers "did it go down since the last Poll" -- true exactly once per physical press, which is what a command wants. Written with only the first, pressing P once pauses and unpauses sixty times.no extension
KeyPressed
(no comment in the source: the name reads as a sentence) key pressedno extension
MouseX
(no comment in the source: the name reads as a sentence) mouse xno extension
MouseY
(no comment in the source: the name reads as a sentence) mouse yno extension
MousePosition
(no comment in the source: the name reads as a sentence) mouse positionno extension
MouseDown
button: 1 = left, 2 = right, 3 = middle (as a person counts them, not as the C API indexes them)no extension
MouseClicked
(no comment in the source: the name reads as a sentence) mouse clickedno extension
SetVSync
presentation knobs -------------------------------------------------- VSync ON (the default) caps the loop at the monitor's refresh and never tears. OFF runs as fast as the card allows -- the honest way to MEASURE frame cost, and the wrong way to ship. Answers FALSE when the card refuses the mode rather than pretending it changed.no extension
VSync
(no comment in the source: the name reads as a sentence) v syncno extension
SurfaceFormat
(no comment in the source: the name reads as a sentence) surface formatno extension
Stats
[ width, height, framesPresented, reconfigures, frameHeld, presentMode ]no extension
Show
the two convenience loops ------------------------------------------- Show a still picture and wait. Escape or the X button closes it. This is what stzCanvas.Show() now calls -- the same picture that used to be written to a PNG and opened in whatever the OS felt like.no extension
EachFrame
Run a frame loop, calling pFunc(This) once per frame until the window closes. The anonymous function does the updating and the drawing; this only owns the pump. Escape closes, because a window with no way out is a bug in every program that ever shipped one.no extension
Close
lifetimeno extension
Free
(no comment in the source: the name reads as a sentence) freeno extension

