![]() |
SCTC
the soundcloud.com terminal client
|
#include "tui.h"#include <ncurses.h>#include <term.h>#include "helper.h"#include "log.h"#include "state.h"#include "track.h"#include "command.h"Data Structures | |
| struct | textbox_window |
Macros | |
| #define | COLOR_SHELL -1 /* the default color used by the shell, required to be -1 */ |
| #define | COLOR_GRAY 78 /* user defined color 'gray' */ |
| #define | COLOR_DGRAY 79 /* user defined color 'dark gray' */ |
| #define | COLOR_DGREEN 80 |
| #define | TIME_BUFFER_SIZE 64 |
| #define | wcsps(S) mbstowcs(NULL, S, 0) |
| #define | INIT_COLOR(C, R, G, B) if(ERR == init_color(C, R, G, B)) { _log("init_color("#C", %d, %d, %d) failed", R, G, B); } |
| #define | INIT_PAIR(CP, CF, CB) if(ERR == init_pair(CP, CF, CB)) { _log("init_pair("#CP", "#CF", "#CB") failed"); } |
Functions | |
| static void | tui_track_print_line (struct track *entry, bool selected, int line) |
| static void | tui_print (char *fmt,...) |
| static void | tui_track_list_print () |
| static size_t | tui_track_focus () |
| static void | tui_update_suggestion_list () |
| static void | tui_update_textbox () |
| static void | tui_redraw () |
| static void | tui_draw_title_line () |
| static void | tui_draw_tab_bar () |
| static void | tui_draw_status_line () |
| static void * | _thread_tui_function (void *unused) |
| static size_t | tui_track_print_played (size_t remaining, bool selected, enum color color, enum color color_played, enum color color_selected, char *format,...) |
| static size_t | tui_draw_text (WINDOW *win, char *text, const int max_width) |
| void | tui_submit_action (enum tui_action_kind _action) |
| static void | tui_callback_textbox_modifed () |
| static void | tui_callback_tabbar_modified () |
| static void | tui_callback_titlebar_modified () |
| static void | tui_callback_statusbar_modified () |
| static void | tui_callback_list_modified () |
| static void | tui_callback_sugg_modified () |
| static void | tui_terminal_resized (int signum) |
| bool | tui_init () |
| void | tui_finalize () |
Variables | |
| static pthread_t | thread_tui |
| static bool | terminate = false |
| static bool | whole_redraw_required = false |
| static struct textbox_window | textbox_window = { NULL } |
| static WINDOW * | suggestion_window = NULL |
| static sem_t | sem_have_action |
| static sem_t | sem_wait_action |
| static enum tui_action_kind | action |
| #define COLOR_DGRAY 79 /* user defined color 'dark gray' */ |
| #define COLOR_DGREEN 80 |
| #define COLOR_GRAY 78 /* user defined color 'gray' */ |
| #define COLOR_SHELL -1 /* the default color used by the shell, required to be -1 */ |
| #define INIT_COLOR | ( | C, | |
| R, | |||
| G, | |||
| B | |||
| ) | if(ERR == init_color(C, R, G, B)) { _log("init_color("#C", %d, %d, %d) failed", R, G, B); } |
| #define INIT_PAIR | ( | CP, | |
| CF, | |||
| CB | |||
| ) | if(ERR == init_pair(CP, CF, CB)) { _log("init_pair("#CP", "#CF", "#CB") failed"); } |
| #define TIME_BUFFER_SIZE 64 |
| #define wcsps | ( | S | ) | mbstowcs(NULL, S, 0) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
| void tui_finalize | ( | ) |
| bool tui_init | ( | ) |
|
static |
|
static |
| void tui_submit_action | ( | enum tui_action_kind | _action | ) |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
1.8.9.1