ttypt/lam-mobile.h(3)liblaminaVersion 1.0.0

NAME

ttypt/lam-mobile.h - Native mobile host bridge (Android EGL/GLES3 & iOS GLES3/Metal) for liblamina.

SYNOPSIS

#include <stdint.h>

Data Structures

struct lam_safe_insets_t
struct lam_mobile_ops_t

Functions

void lam_mobile_set_ops (const lam_mobile_ops_t *ops)
void lam_mobile_set_safe_insets (float top, float right, float bottom, float left)
void lam_safe_insets (lam_safe_insets_t *out)
void lam_ime_show (int flags)
void lam_ime_hide (void)
void lam_mobile_touch_down (int32_t pointer_id, float px_x, float px_y)
void lam_mobile_commit_utf8 (const char *utf8)
void lam_mobile_key_event (uint32_t lam_key, int action, int mods)
void lam_mobile_surface_resized (uint32_t fb_w, uint32_t fb_h, float content_scale)
void lam_android_set_window (void *anative_window, uint32_t w, uint32_t h, float density)
void lam_ios_attach_layer (void *native_layer, uint32_t fb_w, uint32_t fb_h, float scale)

Detailed Description

Native mobile host bridge (Android EGL/GLES3 & iOS GLES3/Metal) for liblamina.

Keeps the public <ttypt/lam.h> API completely unchanged so existing apps compile unmodified for mobile and desktop. Desktop builds provide safe no-op defaults (zero safe-area insets, no-op IME show/hide).

Function Documentation

void lam_android_set_window (void * anative_window, uint32_t w, uint32_t h, float density)

Android ANativeWindow / EGL lifecycle hooks (src/android_egl.c).

void lam_ime_hide (void )

Dismiss the soft keyboard if visible.

void lam_ime_show (int flags)

Request soft-keyboard presentation (flags: LAM_INPUT_MULTILINE / LAM_INPUT_NUMERIC).

void lam_ios_attach_layer (void * native_layer, uint32_t fb_w, uint32_t fb_h, float scale)

iOS CAEAGLLayer / CAMetalLayer lifecycle hooks (src/ios_gl.m).

void lam_mobile_commit_utf8 (const char * utf8)

Commit UTF-8 text from mobile IME, emitting LAM_EV_CHAR (and LAM_EV_KEY for '

void lam_mobile_key_event (uint32_t lam_key, int action, int mods)

Forward a key event (e.g. LAM_KEY_BACKSPACE, LAM_KEY_ENTER, hardware keyboard).

void lam_mobile_set_ops (const lam_mobile_ops_t * ops)

Register mobile host callbacks (IME show/hide & clipboard).

void lam_mobile_set_safe_insets (float top, float right, float bottom, float left)

Update logical-dp safe-area insets from Android WindowInsets / iOS UIView.safeAreaInsets.

void lam_mobile_surface_resized (uint32_t fb_w, uint32_t fb_h, float content_scale)

Notify liblamina of a mobile surface resize / density update.

void lam_mobile_touch_down (int32_t pointer_id, float px_x, float px_y)

Multi-touch & IME ingestion hooks (called from Android JNI / iOS UIView). Coordinates (px_x, px_y) are in physical surface pixels and are automatically scaled by lam_get_dpi_scale() into logical dp matching desktop liblamina.

void lam_safe_insets (lam_safe_insets_t * out)

Query current logical-dp safe-area insets (zeros on desktop).

Author

Generated automatically by Doxygen for liblamina from the source code.