diff options
author | FreeArtMan <dos21h@gmail.com> | 2015-10-02 21:25:53 +0100 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2015-10-02 21:25:53 +0100 |
commit | 992bed5fbbbe47917e862ef6a4aee3921bdf4abb (patch) | |
tree | fda00d50423c3c4ea785e96820e9545c0487f178 /draw/glui.h | |
parent | 240c02c5d64ee02659d0bcbbc61ef3680cbf8ea2 (diff) | |
download | radiola-992bed5fbbbe47917e862ef6a4aee3921bdf4abb.tar.gz radiola-992bed5fbbbe47917e862ef6a4aee3921bdf4abb.zip |
graphical waterfall drawing
Diffstat (limited to 'draw/glui.h')
-rw-r--r-- | draw/glui.h | 19 |
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 ); |