summaryrefslogtreecommitdiff
path: root/draw/glui.h
diff options
context:
space:
mode:
authorFreeArtMan <=>2015-09-26 14:32:36 +0100
committerFreeArtMan <=>2015-09-26 14:32:36 +0100
commitb32da0908a2768d03fe57c8b43435971d9685fec (patch)
treef8b314e3ad98b89be2f1e4cd40496fb26a56efb8 /draw/glui.h
parent6b85a7d453414d31432e63045581b2602d4abf45 (diff)
downloadradiola-b32da0908a2768d03fe57c8b43435971d9685fec.tar.gz
radiola-b32da0908a2768d03fe57c8b43435971d9685fec.zip
Added test terminal waterafall
Diffstat (limited to 'draw/glui.h')
-rw-r--r--draw/glui.h40
1 files changed, 40 insertions, 0 deletions
diff --git a/draw/glui.h b/draw/glui.h
index e69de29..d55f931 100644
--- a/draw/glui.h
+++ b/draw/glui.h
@@ -0,0 +1,40 @@
+#ifndef __RADIOLA_GLUI_H
+#define __RADIOLA_GLUI_H
+
+#include <stdio.h>
+#include <stdint.h>
+#include <stdlib.h>
+#include <string.h>
+#include <termios.h>
+#include <unistd.h>
+
+//to draw waterfall
+typedef struct glui_waterfall_t
+{
+ int type;
+ int h,w;
+ uint8_t *buf;
+ size_t buf_len;
+} glui_waterfall_t;
+
+typedef struct glui_t
+{
+ glui_waterfall_t *wf;
+} glui_t;
+
+//prepare terminal ui
+int glui_init( glui_t **t );
+//init waterfall
+int glui_waterfall( glui_t **t, glui_waterfall_t **w );
+//first draw, draw all buffer
+int glui_waterfall_draw( glui_waterfall_t *w );
+//redraw only changed lines
+int glui_waterfall_redraw( glui_waterfall_t *w );
+//update params of waterfall and then need to draw not redraw
+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 );
+//close terminal ui
+int glui_close( glui_t *t ); \ No newline at end of file