lam_types(3)liblaminaVersion 1.0.0

NAME

lam_types - liblamina types and constants

- Fundamental types and constants used by liblamina.

SYNOPSIS

Macros

#define LAM_RGBA(r, g, b, a)
#define LAM_RGB(r, g, b)
#define LAM_COLOR_A(c)
#define LAM_COLOR_R(c)
#define LAM_COLOR_G(c)
#define LAM_COLOR_B(c)
#define LAM_COLOR_WHITE 0xFFFFFFFF

Typedefs

typedef void lam_lambda_t(uint8_t *color, uint32_t x, uint32_t y, void *ctx)

Software rendering callback.

typedef int lam_key_cb_t(unsigned short code, unsigned short type, int value)

Keyboard event callback prototype.

Enumerations

enum lam_key_flags { LAM_INPUT_MULTILINE = 1, LAM_INPUT_NUMERIC = 2 }

Input field flags used by keyboard handlers.

Detailed Description

Fundamental types and constants used by liblamina.

Macro Definition Documentation

#define LAM_COLOR_A( c)

Value:

(((uint32_t)(c) >> 24) & 0xFF)

Extract 8-bit Alpha channel from 32-bit color.

#define LAM_COLOR_B( c)

Value:

((uint32_t)(c) & 0xFF)

Extract 8-bit Blue channel from 32-bit color.

#define LAM_COLOR_G( c)

Value:

(((uint32_t)(c) >> 8) & 0xFF)

Extract 8-bit Green channel from 32-bit color.

#define LAM_COLOR_R( c)

Value:

(((uint32_t)(c) >> 16) & 0xFF)

Extract 8-bit Red channel from 32-bit color.

#define LAM_COLOR_WHITE 0xFFFFFFFF

Standard color palette constants

#define LAM_RGB( r, g, b)

Value:

LAM_RGBA(r, g, b, 255)

Pack 8-bit RGB channels with full opacity (alpha = 255).

#define LAM_RGBA( r, g, b, a)

Value:

    ((((uint32_t)(a) & 0xFF) << 24) | \
     (((uint32_t)(r) & 0xFF) << 16) | \
     (((uint32_t)(g) & 0xFF) << 8)  | \
      ((uint32_t)(b) & 0xFF))

Pack 8-bit RGBA channels into 32-bit integer compatible with liblamina shaders.

Typedef Documentation

typedef int lam_key_cb_t(unsigned short code, unsigned short type, int value)

Keyboard event callback prototype.

Parameters

code Platform key code.
type Event type (press, release, repeat).
value Event state (1 = pressed, 0 = released).

Returns

Non-zero to consume the event, zero to propagate.

typedef void lam_lambda_t(uint8_t *color, uint32_t x, uint32_t y, void *ctx)

Software rendering callback. Called once per pixel for procedural or CPU-based rendering.

Parameters

color Pointer to the pixel in BGRA format.
x X coordinate of the pixel.
y Y coordinate of the pixel.
ctx Optional user data pointer.

Enumeration Type Documentation

enum lam_key_flags

Input field flags used by keyboard handlers.

Enumerator

LAM_INPUT_MULTILINE
Allows multi-line input (ENTER adds newlines).
LAM_INPUT_NUMERIC
Restricts input to numeric characters.

Author

Generated automatically by Doxygen for liblamina from the source code.