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).
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#ifndef PATTERN_H
|
||||
#define PATTERN_H
|
||||
|
||||
typedef struct { int dx, dy; } cell_offset_t;
|
||||
|
||||
typedef struct {
|
||||
const char *name;
|
||||
int count;
|
||||
const cell_offset_t *cells;
|
||||
} pattern_t;
|
||||
|
||||
int pattern_count(void);
|
||||
const pattern_t *pattern_get(int index);
|
||||
|
||||
/* Fill out_dx/out_dy with normalized rotated offsets. Returns cell count. */
|
||||
int pattern_rotated_offsets(int index, int rotation, int *out_dx, int *out_dy);
|
||||
|
||||
/* Bounding box of rotated pattern. */
|
||||
void pattern_bounds(int index, int rotation, int *w, int *h);
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user