Logo Search packages:      
Sourcecode: herrie version File versions  Download package

gui_playq.c File Reference


Detailed Description

Playlist management for textual user interface.

Definition in file gui_playq.c.

#include "stdinc.h"
#include "audio_file.h"
#include "audio_output.h"
#include "gui.h"
#include "gui_internal.h"
#include "gui_vfslist.h"
#include "playq.h"
#include "vfs.h"

Go to the source code of this file.

Functions

void gui_playq_cursor_down (void)
 Move the cursor of the playlist one item 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_pagedown (void)
 Move the cursor and the viewport of the playlist one page down.
void gui_playq_cursor_pageup (void)
 Move the cursor and the viewport of the playlist one page up.
void gui_playq_cursor_tail (void)
 Move the cursor and the viewport of the playlist to the bottom of the playlist.
void gui_playq_cursor_up (void)
 Move the cursor of the playlist one item up.
void gui_playq_destroy (void)
 Destroy the playlist window.
void gui_playq_fullpath (void)
 Write the full pathname of the selected item in the message bar.
void gui_playq_init (void)
 Initialize the playlist window.
void gui_playq_notify_done (void)
 Redraw the playlist, as the manipulation of the playlist is finished.
void gui_playq_notify_post_insertion (unsigned int index)
 Adjust the cursor and the viewport offset of the playlist right after the insertion of the actual entry.
void gui_playq_notify_post_randomization (void)
 Adjust the cursor and the viewport offset of the playlist right after the randomization of the playlist.
void gui_playq_notify_pre_removal (unsigned int index)
 Adjust the cursor and the viewport offset of the playlist right before the removal of the actual entry.
void gui_playq_resize (void)
 Redraw the playlist window, because of a terminal resize.
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_song_add_after (struct vfsref *vr)
 Add a song after the selected item in the playlist.
void gui_playq_song_add_before (struct vfsref *vr)
 Add a song before the selected item in the playlist.
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_move_up (void)
 Move the currently selected song one up.
void gui_playq_song_randomize (void)
 Randomize all songs in the playlist after presenting the user with a question.
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_select (void)
 Start playback on the currently selected song.
static void gui_playq_song_set (struct audio_file *fd, int paused, int timeonly)
 Set the name of the song and time showed in the status bar.
void gui_playq_song_update (struct audio_file *fd, int paused, int timeonly)
 Update the status bar with information about the current song.
static void gui_playq_statbar_refresh (void)
 Refresh the bar above the playlist to show the correct title and time of the current track and the percentage of the playlist.
static void gui_playq_statbar_song (struct audio_file *fd)
 Fills the str_song with the artist and song value of the audio file.
static void gui_playq_statbar_status (struct audio_file *fd, int paused)
 Set str_status to the current playback status.
static void gui_playq_statbar_time (struct audio_file *fd)
 Fills the str_time with the time value of the audio file. audio file. It also checks if the times are the same as before, useful to discard useless refreshes.
static void gui_playq_statbar_time_calc (GString *str, unsigned int time)
 Append a formatted string representation of a timestamp to a string.

Variables

static GString * str_song
 Buffer containing a string representation of the artist and title of the current song.
static const char * str_status = NULL
 Pointer to string containing playback status.
static GString * str_time
 Buffer containing a string representation of the playback time of the current song in the form of " [x:xx/y:yy]".
static struct gui_vfslistwin_playq
 Reference to the window used to display the playlist.
static WINDOW * win_statbar
 Window object of the status bar at the top of the screen.


Generated by  Doxygen 1.6.0   Back to index