2 * Copyright (c) 2006-2011 Ed Schouten <ed@80386.nl>
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
14 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
28 * @brief Public textual user interface control routines.
34 * @brief Initialize the curses GUI.
36 void gui_draw_init_pre(void);
38 * @brief Initialize trailing GUI components that can only be
39 * initialized after initializing locks and chroot()'ing.
41 void gui_draw_init_post(void);
43 * @brief Do a fast abort of the GUI.
45 void gui_draw_init_abort(void);
47 * @brief Destroy the curses GUI.
49 void gui_draw_destroy(void);
51 * @brief Return the Curses color number for a given color string.
53 int gui_draw_color_number(const char *name
);
56 * @brief Mask certain signals that are only need by the GUI. Call this
57 * function right after starting a new thread.
59 void gui_input_sigmask(void);
61 * @brief Read commands from the keyboard. Function terminates when user
62 * quits the application.
64 void gui_input_loop(void);
67 * @brief Show a message in the message bar that will be overwritten
68 * when another message is show.
70 void gui_msgbar_warn(const char *msg
);
73 * @brief Update the status bar with information about the current song.
75 void gui_playq_song_update(struct audio_file
*fd
, int paused
, int timeonly
);
77 * @brief Adjust the cursor and the viewport offset of the playlist
78 * right before the removal of the actual entry.
80 void gui_playq_notify_pre_removal(unsigned int index
);
82 * @brief Adjust the cursor and the viewport offset of the playlist
83 * right after the insertion of the actual entry.
85 void gui_playq_notify_post_insertion(unsigned int index
);
87 * @brief Adjust the cursor and the viewport offset of the playlist
88 * right after the randomization of the playlist.
90 void gui_playq_notify_post_randomization(void);
92 * @brief Redraw the playlist, as the manipulation of the playlist is
95 void gui_playq_notify_done(void);