.TH "lam_types" 3 "Version 1.0.0" "liblamina" \" -*- nroff -*- .ad l .nh .SH NAME lam_types \- liblamina types and constants .PP \- Fundamental types and constants used by liblamina\&. .SH SYNOPSIS .br .PP .SS "Macros" .in +1c .ti -1c .RI "#define \fBLAM_RGBA\fP(r, g, b, a)" .br .ti -1c .RI "#define \fBLAM_RGB\fP(r, g, b)" .br .ti -1c .RI "#define \fBLAM_COLOR_A\fP(c)" .br .ti -1c .RI "#define \fBLAM_COLOR_R\fP(c)" .br .ti -1c .RI "#define \fBLAM_COLOR_G\fP(c)" .br .ti -1c .RI "#define \fBLAM_COLOR_B\fP(c)" .br .ti -1c .RI "#define \fBLAM_COLOR_WHITE\fP 0xFFFFFFFF" .br .in -1c .SS "Typedefs" .in +1c .ti -1c .RI "typedef void \fBlam_lambda_t\fP(uint8_t *color, uint32_t x, uint32_t y, void *ctx)" .br .RI "Software rendering callback\&. " .ti -1c .RI "typedef int \fBlam_key_cb_t\fP(unsigned short code, unsigned short type, int value)" .br .RI "Keyboard event callback prototype\&. " .in -1c .SS "Enumerations" .in +1c .ti -1c .RI "enum \fBlam_key_flags\fP { \fBLAM_INPUT_MULTILINE\fP = 1, \fBLAM_INPUT_NUMERIC\fP = 2 }" .br .RI "Input field flags used by keyboard handlers\&. " .in -1c .SH "Detailed Description" .PP Fundamental types and constants used by liblamina\&. .SH "Macro Definition Documentation" .PP .SS "#define LAM_COLOR_A( c)" \fBValue:\fP .nf (((uint32_t)(c) >> 24) & 0xFF) .PP .fi Extract 8-bit Alpha channel from 32-bit color\&. .SS "#define LAM_COLOR_B( c)" \fBValue:\fP .nf ((uint32_t)(c) & 0xFF) .PP .fi Extract 8-bit Blue channel from 32-bit color\&. .SS "#define LAM_COLOR_G( c)" \fBValue:\fP .nf (((uint32_t)(c) >> 8) & 0xFF) .PP .fi Extract 8-bit Green channel from 32-bit color\&. .SS "#define LAM_COLOR_R( c)" \fBValue:\fP .nf (((uint32_t)(c) >> 16) & 0xFF) .PP .fi Extract 8-bit Red channel from 32-bit color\&. .SS "#define LAM_COLOR_WHITE 0xFFFFFFFF" Standard color palette constants .SS "#define LAM_RGB( r, g, b)" \fBValue:\fP .nf LAM_RGBA(r, g, b, 255) .PP .fi Pack 8-bit RGB channels with full opacity (alpha = 255)\&. .SS "#define LAM_RGBA( r, g, b, a)" \fBValue:\fP .nf ((((uint32_t)(a) & 0xFF) << 24) | \\ (((uint32_t)(r) & 0xFF) << 16) | \\ (((uint32_t)(g) & 0xFF) << 8) | \\ ((uint32_t)(b) & 0xFF)) .PP .fi Pack 8-bit RGBA channels into 32-bit integer compatible with liblamina shaders\&. .SH "Typedef Documentation" .PP .SS "typedef int lam_key_cb_t(unsigned short code, unsigned short type, int value)" .PP Keyboard event callback prototype\&. .PP \fBParameters\fP .RS 4 \fIcode\fP Platform key code\&. .br \fItype\fP Event type (press, release, repeat)\&. .br \fIvalue\fP Event state (1 = pressed, 0 = released)\&. .RE .PP \fBReturns\fP .RS 4 Non-zero to consume the event, zero to propagate\&. .RE .PP .SS "typedef void lam_lambda_t(uint8_t *color, uint32_t x, uint32_t y, void *ctx)" .PP Software rendering callback\&. Called once per pixel for procedural or CPU-based rendering\&. .PP \fBParameters\fP .RS 4 \fIcolor\fP Pointer to the pixel in BGRA format\&. .br \fIx\fP X coordinate of the pixel\&. .br \fIy\fP Y coordinate of the pixel\&. .br \fIctx\fP Optional user data pointer\&. .RE .PP .SH "Enumeration Type Documentation" .PP .SS "enum \fBlam_key_flags\fP" .PP Input field flags used by keyboard handlers\&. .PP \fBEnumerator\fP .in +1c .TP \f(BILAM_INPUT_MULTILINE \fP Allows multi-line input (ENTER adds newlines)\&. .TP \f(BILAM_INPUT_NUMERIC \fP Restricts input to numeric characters\&. .SH "Author" .PP Generated automatically by Doxygen for liblamina from the source code\&.