From 15b92cd8b26116a5c59fab1490f50b33a5cdf01c Mon Sep 17 00:00:00 2001 From: louie Date: Fri, 7 Jul 2023 15:03:52 -0700 Subject: Create tui_text structure --- src/tui_text.h | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 src/tui_text.h (limited to 'src/tui_text.h') diff --git a/src/tui_text.h b/src/tui_text.h new file mode 100644 index 0000000..6edc9e6 --- /dev/null +++ b/src/tui_text.h @@ -0,0 +1,28 @@ +#ifndef TUI_TEXT_H +#define TUI_TEXT_H + +enum tui_text_type { ENTRY, GROUP }; + +typedef struct tui_text { + // location of beginning of text in window + int start_x; + int start_y; + + // relevant data + enum tui_text_type type; + void *data; // should be either Entry * or Group * +} Tui_text; + +// getters +int tui_text_get_x(Tui_text *t); +int tui_text_get_y(Tui_text *t); +enum tui_text_type tui_text_get_type(Tui_text *t); +void *tui_text_get_data(Tui_text *t); + +// setters +void tui_text_set_x(Tui_text *t, int start_x); +void tui_text_set_y(Tui_text *t, int start_y); +void tui_text_set_type(Tui_text *t, enum tui_text_type type); +void tui_text_set_data(Tui_text *t, void *data); + +#endif -- cgit