[READ-ONLY] Mirror of https://github.com/bombshell-dev/tty. Platform independent 2D layout engine for terminal applications based on Clay bomb.sh/docs/tty
Something went wrong. Try again.
C
123456789101112131415161718192021222324252627282930313233343536/* clayterm.h — WASM terminal rendering engine for Clay UI */
#ifndef CLAYTERM_H#define CLAYTERM_H
#include <stdint.h>
#include "cell.h"
struct Clayterm;
/* Capability bits for set_capabilities(). */#define RENDER_CAP_SYNC_OUTPUT (1u << 0)#define RENDER_CAP_POINTER_SHAPE (1u << 1)
/* WASM exports */int clayterm_size(int w, int h);struct Clayterm *init(void *mem, int w, int h);int set_capabilities(struct Clayterm *ct, uint32_t caps);int pointer_shape(struct Clayterm *ct);void set_pointer_shape(struct Clayterm *ct, int shape);void reduce(struct Clayterm *ct, uint32_t *buf, int len, int mode, int row, float deltaTime, float px, float py, int pointer);char *output(struct Clayterm *ct);int length(struct Clayterm *ct);int animating(struct Clayterm *ct);void measure(int ret, int txt);
int get_element_bounds(const char *name, int name_len, float *out);
int pointer_over_count(void);int pointer_over_id_string_length(int index);int pointer_over_id_string_ptr(int index);
#endif