diff options
author | FreeArtMan <=> | 2015-09-22 21:37:16 +0100 |
---|---|---|
committer | FreeArtMan <=> | 2015-09-22 21:37:16 +0100 |
commit | 6b85a7d453414d31432e63045581b2602d4abf45 (patch) | |
tree | b99a04923dda28ff9d4607df09179f1f8bd26529 /draw/tui.h | |
parent | fa74c1448e236995a34d767a6e76c3055698fb60 (diff) | |
download | radiola-6b85a7d453414d31432e63045581b2602d4abf45.tar.gz radiola-6b85a7d453414d31432e63045581b2602d4abf45.zip |
Added tui interface, updated gitignores, updated makefiles
Diffstat (limited to 'draw/tui.h')
-rw-r--r-- | draw/tui.h | 40 |
1 files changed, 40 insertions, 0 deletions
@@ -0,0 +1,40 @@ +#ifndef __RADIOLA_TUI_H +#define __RADIOLA_TUI_H + +#include <stdio.h> +#include <stdlib.h> +#include <termios.h> +#include <unistd.h> + +//to draw waterfall +typedef struct tui_waterfall_t +{ + int type; + int h,w; + +} tui_waterfall_t; + +typedef struct tui_t +{ + int ifd, ofd; + struct termios orig_i, orig_o; + struct termios raw_i, raw_o; + tui_waterfall_t *wf; +} tui_t; + +//prepare terminal ui +int tui_init( tui_t *t ); +//init waterfall +int tui_waterfall( tui_t *t, tui_waterfall_t *w ); +//first draw, draw all buffer +int tui_waterfall_draw( tui_waterfall_t *w ); +//redraw only changed lines +int tui_waterfall_redraw( tui_waterfall_t *w ); +//update params of waterfall and then need to draw not redraw +int tui_waterfall_update( tui_waterfall_t *w ); +//push one line of data to buffer +int tui_waterfall_data( tui_waterfall_t *w, size_t *len, size_t *buf ); +//close terminal ui +int tui_close( tui_t *t ); + +#endif
\ No newline at end of file |