Internal textual user interface routines. More...

Go to the source code of this file.
Defines | |
| #define | GUI_SIZE_PLAYQ_HEIGHT (((LINES * gui_draw_ratio) / 100) - 1) |
| Height of playlist window. | |
| #define | GUI_SIZE_BROWSER_DIRNAME_TOP (GUI_SIZE_PLAYQ_HEIGHT + 1) |
| Offset of the window containing the filebrowser's directory name. | |
| #define | GUI_SIZE_BROWSER_TOP (GUI_SIZE_BROWSER_DIRNAME_TOP + 1) |
| Offset of the filebrowser window. | |
| #define | GUI_SIZE_BROWSER_HEIGHT (LINES - GUI_SIZE_BROWSER_TOP - 1) |
| Height of the filebrowser window. | |
| #define | GUI_SIZE_MSGBAR_TOP (LINES - 1) |
| Offset of the message bar window. | |
| #define | GUI_COLOR_BAR 2 |
| Curses colour code used to draw bars (status, dirname). | |
| #define | GUI_COLOR_BLOCK 3 |
| Curses colour code used to draw blocks (playlist, browser). | |
| #define | GUI_COLOR_SELECT 4 |
| Curses colour code used to draw focused selections. | |
| #define | GUI_COLOR_DESELECT 5 |
| Curses colour code used to draw unfocused selections. | |
| #define | GUI_COLOR_MARKED 6 |
| Curses colour code used to draw marked items (song currenty played). | |
Functions | |
| void | gui_draw_resize (void) |
| Refresh the curses GUI after a terminal resize. | |
| void | gui_draw_done (void) |
| Write all altered data back to the physical terminal. | |
| static void | gui_lock (void) |
| Acquire a lock on the GUI. | |
| static void | gui_unlock (void) |
| Release a lock on the GUI. | |
| int | gui_input_askyesno (const char *question) |
| Display a standard Yes/No question at the bottom of the screen and return the user response. | |
| 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. | |
| void | gui_msgbar_init (void) |
| Create a bar at the bottom of the terminal displaying messages and questions. | |
| void | gui_msgbar_destroy (void) |
| Destroy the message bar at the bottom of the screen. | |
| void | gui_msgbar_resize (void) |
| Set the proper size of the message bar after a terminal resize. | |
| void | gui_msgbar_refresh (void) |
| Redraw the message bar after its contents have been altered. | |
| void | gui_msgbar_flush (void) |
| Flush the text in the message bar. | |
| void | gui_msgbar_ask (const char *msg) |
| Show a message in the message bar that will only be overwritten by other messages with this priority. This routine will also unhide the cursor and show it right after the message. | |
| void | gui_playq_init (void) |
| Initialize the playlist window. | |
| void | gui_playq_destroy (void) |
| Destroy the playlist window. | |
| void | gui_playq_resize (void) |
| Redraw the playlist window, because of a terminal resize. | |
| void | gui_playq_cursor_up (void) |
| Move the cursor of the playlist one item up. | |
| void | gui_playq_cursor_down (void) |
| Move the cursor of the playlist one item down. | |
| void | gui_playq_cursor_pageup (void) |
| Move the cursor and the viewport of the playlist one page up. | |
| void | gui_playq_cursor_pagedown (void) |
| Move the cursor and the viewport of the playlist one page down. | |
| void | gui_playq_cursor_head (void) |
| Move the cursor and the viewport of the playlist to the top of the playlist. | |
| void | gui_playq_cursor_tail (void) |
| Move the cursor and the viewport of the playlist to the bottom of the playlist. | |
| void | gui_playq_song_remove (void) |
| Remove the currently selected song from the playlist. | |
| void | gui_playq_song_remove_all (void) |
| Remove all songs from the playlist after presenting the user with a question. | |
| void | gui_playq_song_randomize (void) |
| Randomize all songs in the playlist after presenting the user with a question. | |
| void | gui_playq_song_add_before (struct vfsref *ve) |
| Add a song before the selected item in the playlist. | |
| void | gui_playq_song_add_after (struct vfsref *ve) |
| Add a song after the selected item in the playlist. | |
| void | gui_playq_song_move_up (void) |
| Move the currently selected song one up. | |
| void | gui_playq_song_move_down (void) |
| Move the currently selected song one down. | |
| void | gui_playq_song_move_head (void) |
| Move the currently selected song to the top of the playlist. | |
| void | gui_playq_song_move_tail (void) |
| Move the currently selected song to the bottom of the playlist. | |
| void | gui_playq_song_select (void) |
| Start playback on the currently selected song. | |
| int | gui_playq_searchnext (const struct vfsmatch *vm) |
| Search for the next item matching gui_input_cursearch in the playlist. | |
| void | gui_playq_setfocus (int focus) |
| Focus or unfocus the playlist. | |
| void | gui_playq_fullpath (void) |
| Write the full pathname of the selected item in the message bar. | |
| void | gui_playq_volume_up (void) |
| Increment the volume and display the new value. | |
| void | gui_playq_volume_down (void) |
| Decrement the volume and display the new value. | |
| void | gui_playq_gotofolder (void) |
| Go to the directory containing the selected item. | |
| void | gui_browser_gotohome (void) |
| Go to the current user's home directory. | |
| void | gui_browser_gotofile (struct vfsref *vr) |
| Go to the parent directory of the VFS reference and select the item which shares the same filename. | |
| void | gui_browser_init (void) |
| Initialize the filebrowser window. | |
| void | gui_browser_destroy (void) |
| Destroy the filebrowser window. | |
| void | gui_browser_resize (void) |
| Redraw the filebrowser, because of a terminal resize. | |
| void | gui_browser_cursor_up (void) |
| Move the cursor of the filebrowser one position up. | |
| void | gui_browser_cursor_down (void) |
| Move the cursor of the filebrowser one position down. | |
| void | gui_browser_cursor_pageup (void) |
| Move the cursor and the viewport of the filebrowser one page up. | |
| void | gui_browser_cursor_pagedown (void) |
| Move the cursor and the viewport of the filebrowser one page down. | |
| void | gui_browser_cursor_head (void) |
| Move the cursor and the viewport of the filebrowser to the top of the current directory. | |
| void | gui_browser_cursor_tail (void) |
| Move the cursor and the viewport of the filebrowser to the bottom of the current directory. | |
| void | gui_browser_dir_parent (void) |
| Change the current working directory of the filebrowser to the parent directory. | |
| void | gui_browser_dir_enter (void) |
| Change the current working directory of the filebrowser to the currently selected item. | |
| void | gui_browser_playq_add_tail (void) |
| Add the current selection to the tail of the playlist. | |
| void | gui_browser_playq_add_head (void) |
| Add the current selection to the head of the playlist. | |
| void | gui_browser_playq_add_after (void) |
| Add the current selection after the selected item in the playlist. | |
| void | gui_browser_playq_add_before (void) |
| Add the current selection before the selected item in the playlist. | |
| int | gui_browser_searchnext (const struct vfsmatch *vm) |
| Search for the next item matching gui_input_cursearch in the file browser. | |
| void | gui_browser_chdir (void) |
| Change to a directory, filled in by the user. | |
| void | gui_browser_setfocus (int focus) |
| Focus or unfocus the filebrowser. | |
| void | gui_browser_write_playlist (void) |
| Write the playlist to a file. | |
| void | gui_browser_fullpath (void) |
| Write the full pathname of the selected item in the message bar. | |
| int | gui_browser_locate (const struct vfsmatch *vm) |
| Apply a recursive search filter on the current directory. | |
| void | gui_browser_gotofolder (void) |
| Go to the directory containing the selected item. | |
Variables | |
| int | gui_draw_colors |
| Determine whether our terminal is black or white or color. | |
| int | gui_draw_ratio |
| Height percentage of the playlist. | |
| GMutex * | gui_mtx |
| The mutex that locks the GUI down. | |
Internal textual user interface routines.
Definition in file gui_internal.h.
1.6.3