windows/gdi32

Windows GDI declarations for pixel-format selection, pixel-format installation, and buffer swapping on one device context.


PIXELFORMATDESCRIPTOR

Descriptor schema passed to pixel-format selection and installation functions.

Schema example

"windows/gdi32" use
"control" use

{} () {} [
  PIXELFORMATDESCRIPTOR fieldCount printStack _:;
  PIXELFORMATDESCRIPTOR 0 fieldName printStack _:;
  PIXELFORMATDESCRIPTOR 25 fieldName printStack _:;
] "main" exportFunction

Expected Output During Compilation

26
"nSize"
"dwDamageMask"

Pixel-format workflow


Imported functions


Signature examples

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

Expected Output During Compilation

{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

See also