From 992bed5fbbbe47917e862ef6a4aee3921bdf4abb Mon Sep 17 00:00:00 2001 From: FreeArtMan Date: Fri, 2 Oct 2015 21:25:53 +0100 Subject: graphical waterfall drawing --- draw/glui.h | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) (limited to 'draw/glui.h') 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 ); -- cgit v1.2.3