aboutsummaryrefslogtreecommitdiff
path: root/subprojects/d2tk/d2tk
diff options
context:
space:
mode:
Diffstat (limited to 'subprojects/d2tk/d2tk')
-rw-r--r--subprojects/d2tk/d2tk/base.h7
-rw-r--r--subprojects/d2tk/d2tk/hash.h10
2 files changed, 14 insertions, 3 deletions
diff --git a/subprojects/d2tk/d2tk/base.h b/subprojects/d2tk/d2tk/base.h
index 5a213f1..3ba8d40 100644
--- a/subprojects/d2tk/d2tk/base.h
+++ b/subprojects/d2tk/d2tk/base.h
@@ -331,14 +331,15 @@ d2tk_base_cursor(d2tk_base_t *base, const d2tk_rect_t *rect);
D2TK_API d2tk_state_t
d2tk_base_button_label_image(d2tk_base_t *base, d2tk_id_t id, ssize_t lbl_len,
- const char *lbl, ssize_t path_len, const char *path, const d2tk_rect_t *rect);
+ const char *lbl, d2tk_align_t align, ssize_t path_len, const char *path,
+ const d2tk_rect_t *rect);
#define d2tk_base_button_label_image_is_changed(...) \
d2tk_state_is_changed(d2tk_base_button_label_image(__VA_ARGS__))
D2TK_API d2tk_state_t
d2tk_base_button_label(d2tk_base_t *base, d2tk_id_t id, ssize_t lbl_len,
- const char *lbl, const d2tk_rect_t *rect);
+ const char *lbl, d2tk_align_t align, const d2tk_rect_t *rect);
#define d2tk_base_button_label_is_changed(...) \
d2tk_state_is_changed(d2tk_base_button_label(__VA_ARGS__))
@@ -370,7 +371,7 @@ d2tk_base_button(d2tk_base_t *base, d2tk_id_t id, const d2tk_rect_t *rect);
D2TK_API d2tk_state_t
d2tk_base_toggle_label(d2tk_base_t *base, d2tk_id_t id, ssize_t lbl_len,
- const char *lbl, const d2tk_rect_t *rect, bool *value);
+ const char *lbl, d2tk_align_t align, const d2tk_rect_t *rect, bool *value);
#define d2tk_base_toggle_label_is_changed(...) \
d2tk_state_is_changed(d2tk_base_toggle_label(__VA_ARGS__))
diff --git a/subprojects/d2tk/d2tk/hash.h b/subprojects/d2tk/d2tk/hash.h
index fc8d70f..be69e92 100644
--- a/subprojects/d2tk/d2tk/hash.h
+++ b/subprojects/d2tk/d2tk/hash.h
@@ -27,12 +27,22 @@
extern "C" {
#endif
+typedef struct _d2tk_hash_dict_t d2tk_hash_dict_t;
+
+struct _d2tk_hash_dict_t {
+ const void *key;
+ size_t len;
+};
+
D2TK_API uint64_t
d2tk_hash(const void *data, ssize_t nbytes);
D2TK_API uint64_t
d2tk_hash_foreach(const void *data, ssize_t nbytes, ...) __attribute__((sentinel));
+D2TK_API uint64_t
+d2tk_hash_dict(const d2tk_hash_dict_t *dict);
+
#ifdef __cplusplus
}
#endif