Windows GDI declarations for pixel-format selection, pixel-format installation, and buffer swapping on one device context.
Descriptor schema passed to pixel-format selection and installation functions.
nSize and nVersion: descriptor size and version fields that describe the passed structure.dwFlags and iPixelType: pixel-format capability flags and pixel type.cColorBits, cRedBits, cRedShift, cGreenBits, cGreenShift, cBlueBits, cBlueShift, cAlphaBits, and cAlphaShift: color-channel layout fields.cAccumBits, cAccumRedBits, cAccumGreenBits, cAccumBlueBits, and cAccumAlphaBits: accumulation-buffer layout fields.cDepthBits, cStencilBits, and cAuxBuffers: depth, stencil, and auxiliary-buffer counts.iLayerType, bReserved, dwLayerMask, dwVisibleMask, and dwDamageMask: layer and visibility mask fields."windows/gdi32" use
"control" use
{} () {} [
PIXELFORMATDESCRIPTOR fieldCount printStack _:;
PIXELFORMATDESCRIPTOR 0 fieldName printStack _:;
PIXELFORMATDESCRIPTOR 25 fieldName printStack _:;
] "main" exportFunction
26
"nSize"
"dwDamageMask"
ChoosePixelFormat selects one pixel-format ordinal for one device context from one PIXELFORMATDESCRIPTOR request and returns 0 when no format is selected.SetPixelFormat installs the selected ordinal into the same device context and returns one nonzero status on success.SwapBuffers presents one already configured double-buffered device context and returns one nonzero status on success.ChoosePixelFormat (hdc ppfd -- format): selects one pixel-format ordinal for one device context from one PIXELFORMATDESCRIPTOR request.SetPixelFormat (hdc format ppfd -- result): installs one selected pixel format into one device context.SwapBuffers (hdc -- result): swaps the front and back buffers of one double-buffered device context.Printing imported names during compilation shows the exact imported signatures.
"windows/gdi32" use
"control" use
{} Int32 {} [
@ChoosePixelFormat printStack _:;
@SetPixelFormat printStack _:;
@SwapBuffers printStack _:;
0
] "main" exportFunction
{hdc: {DC: (); unused: Int32;} Cref; ppfd: {nSize: Nat16; nVersion: Nat16; dwFlags: Nat32; iPixelType: Nat8; cColorBits: Nat8; cRedBits: Nat8; cRedShift: Nat8; cGreenBits: Nat8; cGreenShift: Nat8; cBlueBits: Nat8; cBlueShift: Nat8; cAlphaBits: Nat8; cAlphaShift: Nat8; cAccumBits: Nat8; cAccumRedBits: Nat8; cAccumGreenBits: Nat8; cAccumBlueBits: Nat8; cAccumAlphaBits: Nat8; cDepthBits: Nat8; cStencilBits: Nat8; cAuxBuffers: Nat8; iLayerType: Nat8; bReserved: Nat8; dwLayerMask: Nat32; dwVisibleMask: Nat32; dwDamageMask: Nat32;} Cref;} Int32 {convention: "";} codeRef
{hdc: {DC: (); unused: Int32;} Cref; format: Int32; ppfd: {nSize: Nat16; nVersion: Nat16; dwFlags: Nat32; iPixelType: Nat8; cColorBits: Nat8; cRedBits: Nat8; cRedShift: Nat8; cGreenBits: Nat8; cGreenShift: Nat8; cBlueBits: Nat8; cBlueShift: Nat8; cAlphaBits: Nat8; cAlphaShift: Nat8; cAccumBits: Nat8; cAccumRedBits: Nat8; cAccumGreenBits: Nat8; cAccumBlueBits: Nat8; cAccumAlphaBits: Nat8; cDepthBits: Nat8; cStencilBits: Nat8; cAuxBuffers: Nat8; iLayerType: Nat8; bReserved: Nat8; dwLayerMask: Nat32; dwVisibleMask: Nat32; dwDamageMask: Nat32;} Cref;} Int32 {convention: "";} codeRef
{Arg1: {DC: (); unused: Int32;} Cref;} Int32 {convention: "";} codeRef