Files
wlgol/include/grid.h
T
arek 7874a5f7c6 feat: implement keyboard and mouse input, pattern placement, and HiDPI scaling
Add configurable key bindings (TOML), modifier-aware dispatch, mouse-driven
pattern placement with preview and rotation, cell grid storage/rendering,
and fractional/integer HiDPI scaling. Archive the input-and-placement change
and sync its specs to main specs.

Tests: Hashtable, Config, Grid, Pattern (4/4 pass).
2026-11-08 14:46:04 +01:00

18 lines
393 B
C

#ifndef GRID_H
#define GRID_H
typedef struct {
int cols;
int rows;
unsigned char *cells;
int show_lines;
} grid_t;
void grid_init(grid_t *g, int cols, int rows);
void grid_free(grid_t *g);
void grid_resize(grid_t *g, int new_cols, int new_rows);
void grid_clear(grid_t *g);
int grid_get(const grid_t *g, int c, int r);
void grid_set(grid_t *g, int c, int r, int val);
#endif