Keyboard and signal input for user interface. More...
#include "stdinc.h"#include "audio_output.h"#include "config.h"#include "dbus.h"#include "gui.h"#include "gui_internal.h"#include "playq.h"#include "scrobbler.h"#include "vfs.h"
Go to the source code of this file.
Data Structures | |
| struct | gui_binding |
| A simple binding from a keyboard character input to a function. More... | |
Defines | |
| #define | GUI_FOCUS_BROWSER 0 |
| The focus is on the browser. | |
| #define | GUI_FOCUS_PLAYQ 1 |
| The focus is on the playlist. | |
| #define | GUI_FOCUS_COUNT 2 |
| The number of focusable windows. | |
| #define | CTRL(x) (((x) - 'A' + 1) & 0x7f) |
| Add the Ctrl modifier to a character. | |
| #define | NUM_BINDINGS (sizeof kbdbindings / sizeof(struct gui_binding)) |
| Amount of keybindings. | |
Functions | |
| static void | gui_input_quit (void) |
| Properly shutdown the application by stopping playback and destroying the GUI. | |
| static void | gui_input_askquit (void) |
| Prompt the user with a message to confirm termination of the application. | |
| static int | gui_input_getch (void) |
| Fetch a character from the keyboard, already processing terminal resizes and awkward bugs. | |
| static void | gui_input_switchfocus (void) |
| Switch the focus to the next window. | |
| static int | gui_input_asksearch (void) |
| Ask the user to enter a new search string. | |
| static void | gui_input_searchnext (void) |
| Ask the user to enter a search string when none was given and search for the next item matching the search string. | |
| static void | gui_input_search (void) |
| Ask the user to enter a new search string and perform the first search. | |
| static void | gui_input_locate (void) |
| Ask for a search string and filter matching files in the file browser. | |
| static void | gui_input_cursong_seek_backward (void) |
| Instruct the playlist to seek the current song 5 seconds backward. | |
| static void | gui_input_cursong_seek_forward (void) |
| Instruct the playlist to seek the current song 5 seconds forward. | |
| static int | gui_input_cursong_seek_validator (const char *str, char c) |
| Approve input string format for the seeking option. | |
| static void | gui_input_cursong_seek_jump (void) |
| Ask the user to specify a position to seek the current song to. | |
| void | gui_input_sigmask (void) |
| Mask certain signals that are only need by the GUI. Call this function right after starting a new thread. | |
| void | gui_input_loop (void) |
| Read commands from the keyboard. Function terminates when user quits the application. | |
| int | gui_input_askyesno (const char *question) |
| Display a standard Yes/No question at the bottom of the screen and return the user response. | |
| static int | gui_input_trimword (GString *gs) |
| Find the offset to where a string should be trimmed to remove one word or special character sequence, including trailing whitespace. | |
| char * | gui_input_askstring (const char *question, const char *defstr, int(*validator)(const char *str, char c)) |
| Display a string input question at the bottom of the screen and return the user response. | |
Variables | |
| static int | gui_input_curfocus = GUI_FOCUS_BROWSER |
| Window that is currently focused. | |
| static struct vfsmatch * | cursearch = NULL |
| Indicator of the current search string. | |
| static char * | curseek = NULL |
| The last seek string that has been entered. | |
| static int | shutting_down = 0 |
| Determine if we're already trying to shut down, to prevent multiple signals being handled while quitting. | |
| static struct gui_binding | kbdbindings [] |
| List of keybindings available in the GUI. | |
Keyboard and signal input for user interface.
Definition in file gui_input.c.
1.6.3