aboutsummaryrefslogtreecommitdiff
path: root/composed.h
diff options
context:
space:
mode:
authorDaniel Eklöf <daniel@ekloef.se>2025-02-06 13:03:33 +0000
committerDaniel Eklöf <daniel@ekloef.se>2025-02-06 13:03:33 +0000
commitd84b0d4c6a75b9856045bb49d00e05ea10f77755 (patch)
treeb6c76c69263f37c467be60c2b256f05727d4c12b /composed.h
parentterm: insert-mode: handle combining characters correctly (diff)
parentchangelog: text-sizing protocol (diff)
Merge branch 'text-width-protocol'
Diffstat (limited to 'composed.h')
-rw-r--r--composed.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/composed.h b/composed.h
index 17158407..18afb146 100644
--- a/composed.h
+++ b/composed.h
@@ -10,9 +10,16 @@ struct composed {
uint32_t key;
uint8_t count;
uint8_t width;
+ uint8_t forced_width;
};
-struct composed *composed_lookup(struct composed *root, uint32_t key);
+uint32_t composed_key_from_chars(const uint32_t chars[], size_t count);
+uint32_t composed_key_from_key(uint32_t prev_key, uint32_t next_char);
+
+const struct composed *composed_lookup(struct composed *root, uint32_t key);
+const struct composed *composed_lookup_without_collision(
+ struct composed *root, uint32_t *key,
+ const char32_t *prefix, size_t prefix_len, char32_t wc, int forced_width);
void composed_insert(struct composed **root, struct composed *node);
void composed_free(struct composed *root);