summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: ce28308)
raw | patch | inline | side by side (parent: ce28308)
author | Max Kellermann <max@duempel.org> | |
Wed, 30 Sep 2009 18:49:26 +0000 (20:49 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Wed, 30 Sep 2009 18:49:26 +0000 (20:49 +0200) |
Use the "screen_artist_" prefix.
src/screen_artist.c | patch | blob | history |
diff --git a/src/screen_artist.c b/src/screen_artist.c
index c6173d0b3cd5c241ed5c1fa9ee54499000cdea54..b331015e25b9d2599d76ecda14fb814cb15221f3 100644 (file)
--- a/src/screen_artist.c
+++ b/src/screen_artist.c
/* list_window callback */
static const char *
-artist_lw_callback(unsigned idx, G_GNUC_UNUSED bool *highlight,
- G_GNUC_UNUSED char** sc, G_GNUC_UNUSED void *data)
+screen_artist_lw_callback(unsigned idx, G_GNUC_UNUSED bool *highlight,
+ G_GNUC_UNUSED char** sc, G_GNUC_UNUSED void *data)
{
GPtrArray *list = data;
static char buf[BUFSIZE];
}
static void
-paint(void);
+screen_artist_paint(void);
static void
artist_repaint(void)
{
- paint();
+ screen_artist_paint();
wrefresh(browser.lw->w);
}
}
static void
-init(WINDOW *w, int cols, int rows)
+screen_artist_init(WINDOW *w, int cols, int rows)
{
browser.lw = list_window_init(w, cols, rows);
artist = NULL;
}
static void
-quit(void)
+screen_artist_quit(void)
{
free_state(NULL);
list_window_free(browser.lw);
}
static void
-open(struct mpdclient *c)
+screen_artist_open(struct mpdclient *c)
{
if (artist_list == NULL && album_list == NULL &&
browser.filelist == NULL)
}
static void
-resize(int cols, int rows)
+screen_artist_resize(int cols, int rows)
{
browser.lw->cols = cols;
browser.lw->rows = rows;
}
static void
-paint(void)
+screen_artist_paint(void)
{
if (browser.filelist) {
list_window_paint(browser.lw, browser_lw_callback,
browser.filelist);
} else if (album_list != NULL)
- list_window_paint(browser.lw, artist_lw_callback, album_list);
+ list_window_paint(browser.lw, screen_artist_lw_callback,
+ album_list);
else if (artist_list != NULL)
- list_window_paint(browser.lw, artist_lw_callback, artist_list);
+ list_window_paint(browser.lw, screen_artist_lw_callback,
+ artist_list);
else {
wmove(browser.lw->w, 0, 0);
wclrtobot(browser.lw->w);
}
static const char *
-get_title(char *str, size_t size)
+screen_artist_get_title(char *str, size_t size)
{
char *s1, *s2;
}
static int
-artist_lw_cmd(struct mpdclient *c, command_t cmd)
+screen_artist_lw_cmd(struct mpdclient *c, command_t cmd)
{
switch (mode) {
case LIST_ARTISTS:
}
static bool
-artist_cmd(struct mpdclient *c, command_t cmd)
+screen_artist_cmd(struct mpdclient *c, command_t cmd)
{
char *selected;
char *old;
switch (mode) {
case LIST_ARTISTS:
screen_find(browser.lw, artist_list->len,
- cmd, artist_lw_callback, artist_list);
+ cmd, screen_artist_lw_callback,
+ artist_list);
artist_repaint();
return true;
case LIST_ALBUMS:
screen_find(browser.lw, album_list->len + 2,
- cmd, artist_lw_callback, album_list);
+ cmd, screen_artist_lw_callback,
+ album_list);
artist_repaint();
return true;
case CMD_LIST_JUMP:
switch (mode) {
case LIST_ARTISTS:
- screen_jump(browser.lw, artist_lw_callback, artist_list);
+ screen_jump(browser.lw, screen_artist_lw_callback,
+ artist_list);
artist_repaint();
return true;
case LIST_ALBUMS:
- screen_jump(browser.lw, artist_lw_callback, album_list);
+ screen_jump(browser.lw, screen_artist_lw_callback,
+ album_list);
artist_repaint();
return true;
break;
}
- if (artist_lw_cmd(c, cmd)) {
+ if (screen_artist_lw_cmd(c, cmd)) {
if (screen_is_visible(&screen_artist))
artist_repaint();
return true;
}
const struct screen_functions screen_artist = {
- .init = init,
- .exit = quit,
- .open = open,
- .resize = resize,
- .paint = paint,
+ .init = screen_artist_init,
+ .exit = screen_artist_quit,
+ .open = screen_artist_open,
+ .resize = screen_artist_resize,
+ .paint = screen_artist_paint,
.update = screen_artist_update,
- .cmd = artist_cmd,
- .get_title = get_title,
+ .cmd = screen_artist_cmd,
+ .get_title = screen_artist_get_title,
};