summaryrefslogtreecommitdiff
path: root/draw/glui.h
diff options
context:
space:
mode:
Diffstat (limited to 'draw/glui.h')
-rw-r--r--draw/glui.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/draw/glui.h b/draw/glui.h
index f9f9bdf..0b9f6f3 100644
--- a/draw/glui.h
+++ b/draw/glui.h
@@ -17,16 +17,29 @@ typedef struct glui_waterfall_t
int h,w;
uint8_t *buf;
size_t buf_len;
+ int cur_h;
+
+ SDL_Renderer *rend;
} glui_waterfall_t;
typedef struct glui_t
{
- SDL_Window *win;
- SDL_Renderer *rend;
+ int h, w;
+
+ SDL_Window *win;
+
glui_waterfall_t *wf;
} glui_t;
+typedef struct glui_color_t
+{
+ uint8_t r;
+ uint8_t g;
+ uint8_t b;
+ uint8_t a;
+} glui_color_t;
+
//prepare terminal ui
int glui_init( glui_t **t );
//init waterfall
@@ -40,7 +53,7 @@ int glui_waterfall_update( glui_t *w );
//push one line of data to buffer
int glui_waterfall_data( glui_t *w, int len, uint8_t *buf );
//return color
-uint8_t glui_waterfall_color( uint8_t d );
+glui_color_t glui_waterfall_color( uint8_t d );
//close terminal ui
int glui_close( glui_t *t );