Documentation updates for 0.4.
[paraslash.git] / gui_theme.c
index 7844e60..a33df3d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2005-2007 Andre Noll <maan@systemlinux.org>
+ * Copyright (C) 2005-2009 Andre Noll <maan@systemlinux.org>
  *
  * Licensed under the GPL v2. For licencing details see COPYING.
  */
@@ -40,14 +40,14 @@ static void init_theme_simple(struct gui_theme *t)
        t->default_bg = COLOR_BLUE;
        t->sep_str = "*";
 
-       d[SI_STATUS_BAR].prefix = "";
-       d[SI_STATUS_BAR].postfix = "";
-       d[SI_STATUS_BAR].fg = COLOR_WHITE;
-       d[SI_STATUS_BAR].bg = COLOR_BLUE;
-       d[SI_STATUS_BAR].align = CENTER;
-       d[SI_STATUS_BAR].x = 0;
-       d[SI_STATUS_BAR].y = 7;
-       d[SI_STATUS_BAR].len = 100;
+       d[SI_BASENAME].prefix = "";
+       d[SI_BASENAME].postfix = "";
+       d[SI_BASENAME].fg = COLOR_WHITE;
+       d[SI_BASENAME].bg = COLOR_BLUE;
+       d[SI_BASENAME].align = CENTER;
+       d[SI_BASENAME].x = 0;
+       d[SI_BASENAME].y = 7;
+       d[SI_BASENAME].len = 100;
 
        d[SI_STATUS].prefix = "para_server: ";
        d[SI_STATUS].postfix = "";
@@ -110,14 +110,14 @@ static void init_theme_colorful_blackness(struct gui_theme *t)
        d[SI_PLAY_TIME].y = 7;
        d[SI_PLAY_TIME].len = 35;
 
-       d[SI_STATUS_BAR].prefix = "";
-       d[SI_STATUS_BAR].postfix = "";
-       d[SI_STATUS_BAR].fg = COLOR_CYAN;
-       d[SI_STATUS_BAR].bg = COLOR_BLACK;
-       d[SI_STATUS_BAR].align = LEFT;
-       d[SI_STATUS_BAR].x = 35;
-       d[SI_STATUS_BAR].y = 7;
-       d[SI_STATUS_BAR].len = 65;
+       d[SI_BASENAME].prefix = "";
+       d[SI_BASENAME].postfix = "";
+       d[SI_BASENAME].fg = COLOR_CYAN;
+       d[SI_BASENAME].bg = COLOR_BLACK;
+       d[SI_BASENAME].align = LEFT;
+       d[SI_BASENAME].x = 35;
+       d[SI_BASENAME].y = 7;
+       d[SI_BASENAME].len = 65;
 
        d[SI_STATUS].prefix = "";
        d[SI_STATUS].postfix = " ";
@@ -137,14 +137,23 @@ static void init_theme_colorful_blackness(struct gui_theme *t)
        d[SI_STATUS_FLAGS].y = 17;
        d[SI_STATUS_FLAGS].len = 10;
 
-       d[SI_SELECTOR].prefix = "selector: ";
-       d[SI_SELECTOR].postfix = "";
-       d[SI_SELECTOR].fg = COLOR_RED;
-       d[SI_SELECTOR].bg = COLOR_BLACK;
-       d[SI_SELECTOR].align = CENTER;
-       d[SI_SELECTOR].x = 21;
-       d[SI_SELECTOR].y = 17;
-       d[SI_SELECTOR].len = 21;
+       d[SI_IMAGE_ID].prefix = "img: ";
+       d[SI_IMAGE_ID].postfix = "";
+       d[SI_IMAGE_ID].fg = COLOR_RED;
+       d[SI_IMAGE_ID].bg = COLOR_BLACK;
+       d[SI_IMAGE_ID].align = CENTER;
+       d[SI_IMAGE_ID].x = 21;
+       d[SI_IMAGE_ID].y = 17;
+       d[SI_IMAGE_ID].len = 10;
+
+       d[SI_LYRICS_ID].prefix = "lyr: ";
+       d[SI_LYRICS_ID].postfix = "";
+       d[SI_LYRICS_ID].fg = COLOR_RED;
+       d[SI_LYRICS_ID].bg = COLOR_BLACK;
+       d[SI_LYRICS_ID].align = CENTER;
+       d[SI_LYRICS_ID].x = 31;
+       d[SI_LYRICS_ID].y = 17;
+       d[SI_LYRICS_ID].len = 11;
 
        d[SI_FORMAT].prefix = "format: ";
        d[SI_FORMAT].postfix = "";
@@ -159,127 +168,205 @@ static void init_theme_colorful_blackness(struct gui_theme *t)
        d[SI_NUM_PLAYED].postfix = "";
        d[SI_NUM_PLAYED].fg = COLOR_RED;
        d[SI_NUM_PLAYED].bg = COLOR_BLACK;
-       d[SI_NUM_PLAYED].align = CENTER;
+       d[SI_NUM_PLAYED].align = LEFT;
        d[SI_NUM_PLAYED].x = 60;
        d[SI_NUM_PLAYED].y = 17;
-       d[SI_NUM_PLAYED].len = 15;
-
-       d[SI_UPTIME].prefix = "SUp: ";
-       d[SI_UPTIME].postfix = "";
-       d[SI_UPTIME].fg = COLOR_RED;
-       d[SI_UPTIME].bg = COLOR_BLACK;
-       d[SI_UPTIME].align = CENTER;
-       d[SI_UPTIME].x = 75;
-       d[SI_UPTIME].y = 17;
-       d[SI_UPTIME].len = 25;
-
-       d[SI_AUDIOD_STATUS].prefix = "audiod: ";
+       d[SI_NUM_PLAYED].len = 5;
+
+       d[SI_BITRATE].prefix = "";
+       d[SI_BITRATE].postfix = "";
+       d[SI_BITRATE].fg = COLOR_RED;
+       d[SI_BITRATE].bg = COLOR_BLACK;
+       d[SI_BITRATE].align = CENTER;
+       d[SI_BITRATE].x = 65;
+       d[SI_BITRATE].y = 17;
+       d[SI_BITRATE].len = 13;
+
+       d[SI_FREQUENCY].prefix = "";
+       d[SI_FREQUENCY].postfix = "";
+       d[SI_FREQUENCY].fg = COLOR_RED;
+       d[SI_FREQUENCY].bg = COLOR_BLACK;
+       d[SI_FREQUENCY].align = CENTER;
+       d[SI_FREQUENCY].x = 78;
+       d[SI_FREQUENCY].y = 17;
+       d[SI_FREQUENCY].len = 10;
+
+       d[SI_SCORE].prefix = "sc: ";
+       d[SI_SCORE].postfix = "";
+       d[SI_SCORE].fg = COLOR_RED;
+       d[SI_SCORE].bg = COLOR_BLACK;
+       d[SI_SCORE].align = CENTER;
+       d[SI_SCORE].x = 88;
+       d[SI_SCORE].y = 17;
+       d[SI_SCORE].len = 10;
+
+       d[SI_AUDIOD_STATUS].prefix = "";
        d[SI_AUDIOD_STATUS].postfix = "";
        d[SI_AUDIOD_STATUS].fg = COLOR_MAGENTA;
        d[SI_AUDIOD_STATUS].bg = COLOR_BLACK;
-       d[SI_AUDIOD_STATUS].align = RIGHT;
+       d[SI_AUDIOD_STATUS].align = CENTER;
        d[SI_AUDIOD_STATUS].x = 0;
        d[SI_AUDIOD_STATUS].y = 27;
-       d[SI_AUDIOD_STATUS].len = 14;
-
+       d[SI_AUDIOD_STATUS].len = 5;
 
        d[SI_DECODER_FLAGS].prefix = "[";
        d[SI_DECODER_FLAGS].postfix = "]";
        d[SI_DECODER_FLAGS].fg = COLOR_MAGENTA;
        d[SI_DECODER_FLAGS].bg = COLOR_BLACK;
-       d[SI_DECODER_FLAGS].align = LEFT;
-       d[SI_DECODER_FLAGS].x = 15;
+       d[SI_DECODER_FLAGS].align = CENTER;
+       d[SI_DECODER_FLAGS].x = 5;
        d[SI_DECODER_FLAGS].y = 27;
        d[SI_DECODER_FLAGS].len = 10;
 
-       d[SI_MTIME].prefix = "Mtime: ";
+       d[SI_MTIME].prefix = "mod: ";
        d[SI_MTIME].postfix = "";
        d[SI_MTIME].fg = COLOR_MAGENTA;
        d[SI_MTIME].bg = COLOR_BLACK;
        d[SI_MTIME].align = CENTER;
-       d[SI_MTIME].x = 25;
+       d[SI_MTIME].x = 15;
        d[SI_MTIME].y = 27;
-       d[SI_MTIME].len = 29;
+       d[SI_MTIME].len = 22;
 
-       d[SI_FILE_SIZE].prefix = "Size: ";
-       d[SI_FILE_SIZE].postfix = " kb";
+       d[SI_FILE_SIZE].prefix = "";
+       d[SI_FILE_SIZE].postfix = "kb";
        d[SI_FILE_SIZE].fg = COLOR_MAGENTA;
        d[SI_FILE_SIZE].bg = COLOR_BLACK;
        d[SI_FILE_SIZE].align = CENTER;
-       d[SI_FILE_SIZE].x = 54;
+       d[SI_FILE_SIZE].x = 37;
        d[SI_FILE_SIZE].y = 27;
-       d[SI_FILE_SIZE].len = 24;
-
-       d[SI_AUDIOD_UPTIME].prefix = "AUp: ";
-       d[SI_AUDIOD_UPTIME].postfix = "";
-       d[SI_AUDIOD_UPTIME].fg = COLOR_MAGENTA;
-       d[SI_AUDIOD_UPTIME].bg = COLOR_BLACK;
-       d[SI_AUDIOD_UPTIME].align = CENTER;
-       d[SI_AUDIOD_UPTIME].x = 78;
-       d[SI_AUDIOD_UPTIME].y = 27;
-       d[SI_AUDIOD_UPTIME].len = 22;
-
-
-       d[SI_AUDIO_INFO1].prefix = "";
-       d[SI_AUDIO_INFO1].postfix = "";
-       d[SI_AUDIO_INFO1].fg = COLOR_GREEN;
-       d[SI_AUDIO_INFO1].bg = COLOR_BLACK;
-       d[SI_AUDIO_INFO1].align = CENTER;
-       d[SI_AUDIO_INFO1].x = 0;
-       d[SI_AUDIO_INFO1].y = 43;
-       d[SI_AUDIO_INFO1].len = 100;
-
-       d[SI_AUDIO_INFO2].prefix = "";
-       d[SI_AUDIO_INFO2].postfix = "";
-       d[SI_AUDIO_INFO2].fg = COLOR_GREEN;
-       d[SI_AUDIO_INFO2].bg = COLOR_BLACK;
-       d[SI_AUDIO_INFO2].align = CENTER;
-       d[SI_AUDIO_INFO2].x = 0;
-       d[SI_AUDIO_INFO2].y = 53;
-       d[SI_AUDIO_INFO2].len = 100;
-
-       d[SI_AUDIO_INFO3].prefix = "";
-       d[SI_AUDIO_INFO3].postfix = "";
-       d[SI_AUDIO_INFO3].fg = COLOR_GREEN;
-       d[SI_AUDIO_INFO3].bg = COLOR_BLACK;
-       d[SI_AUDIO_INFO3].align = CENTER;
-       d[SI_AUDIO_INFO3].x = 0;
-       d[SI_AUDIO_INFO3].y = 63;
-       d[SI_AUDIO_INFO3].len = 100;
-
-       d[SI_DBINFO1].prefix = "";
-       d[SI_DBINFO1].postfix = "";
-       d[SI_DBINFO1].fg = COLOR_YELLOW;
-       d[SI_DBINFO1].bg = COLOR_BLACK;
-       d[SI_DBINFO1].align = CENTER;
-       d[SI_DBINFO1].x = 0;
-       d[SI_DBINFO1].y = 77;
-       d[SI_DBINFO1].len = 100;
-
-       d[SI_DBINFO2].prefix = "";
-       d[SI_DBINFO2].postfix = "";
-       d[SI_DBINFO2].fg = COLOR_YELLOW;
-       d[SI_DBINFO2].bg = COLOR_BLACK;
-       d[SI_DBINFO2].align = CENTER;
-       d[SI_DBINFO2].x = 0;
-       d[SI_DBINFO2].y = 87;
-       d[SI_DBINFO2].len = 100;
-
-       d[SI_DBINFO3].prefix = "";
-       d[SI_DBINFO3].postfix = "";
-       d[SI_DBINFO3].fg = COLOR_YELLOW;
-       d[SI_DBINFO3].bg = COLOR_BLACK;
-       d[SI_DBINFO3].align = CENTER;
-       d[SI_DBINFO3].x = 0;
-       d[SI_DBINFO3].y = 97;
-       d[SI_DBINFO3].len = 100;
+       d[SI_FILE_SIZE].len = 10;
+
+       d[SI_CHANNELS].prefix = "";
+       d[SI_CHANNELS].postfix = "ch";
+       d[SI_CHANNELS].fg = COLOR_MAGENTA;
+       d[SI_CHANNELS].bg = COLOR_BLACK;
+       d[SI_CHANNELS].align = CENTER;
+       d[SI_CHANNELS].x = 47;
+       d[SI_CHANNELS].y = 27;
+       d[SI_CHANNELS].len = 5;
+
+       d[SI_LAST_PLAYED].prefix = "lp: ";
+       d[SI_LAST_PLAYED].postfix = "";
+       d[SI_LAST_PLAYED].fg = COLOR_MAGENTA;
+       d[SI_LAST_PLAYED].bg = COLOR_BLACK;
+       d[SI_LAST_PLAYED].align = CENTER;
+       d[SI_LAST_PLAYED].x = 52;
+       d[SI_LAST_PLAYED].y = 27;
+       d[SI_LAST_PLAYED].len = 21;
+
+       d[SI_NUM_CHUNKS].prefix = "";
+       d[SI_NUM_CHUNKS].postfix = "x";
+       d[SI_NUM_CHUNKS].fg = COLOR_MAGENTA;
+       d[SI_NUM_CHUNKS].bg = COLOR_BLACK;
+       d[SI_NUM_CHUNKS].align = RIGHT;
+       d[SI_NUM_CHUNKS].x = 73;
+       d[SI_NUM_CHUNKS].y = 27;
+       d[SI_NUM_CHUNKS].len = 11;
+
+       d[SI_CHUNK_TIME].prefix = "";
+       d[SI_CHUNK_TIME].postfix = "ms";
+       d[SI_CHUNK_TIME].fg = COLOR_MAGENTA;
+       d[SI_CHUNK_TIME].bg = COLOR_BLACK;
+       d[SI_CHUNK_TIME].align = LEFT;
+       d[SI_CHUNK_TIME].x = 84;
+       d[SI_CHUNK_TIME].y = 27;
+       d[SI_CHUNK_TIME].len = 8;
+
+       d[SI_AMPLIFICATION].prefix = "amp:";
+       d[SI_AMPLIFICATION].postfix = "";
+       d[SI_AMPLIFICATION].fg = COLOR_MAGENTA;
+       d[SI_AMPLIFICATION].bg = COLOR_BLACK;
+       d[SI_AMPLIFICATION].align = RIGHT;
+       d[SI_AMPLIFICATION].x = 92;
+       d[SI_AMPLIFICATION].y = 27;
+       d[SI_AMPLIFICATION].len = 8;
+
+       d[SI_TECHINFO].prefix = "";
+       d[SI_TECHINFO].postfix = "";
+       d[SI_TECHINFO].fg = COLOR_GREEN;
+       d[SI_TECHINFO].bg = COLOR_BLACK;
+       d[SI_TECHINFO].align = CENTER;
+       d[SI_TECHINFO].x = 0;
+       d[SI_TECHINFO].y = 43;
+       d[SI_TECHINFO].len = 100;
+
+       d[SI_TITLE].prefix = "";
+       d[SI_TITLE].postfix = ",";
+       d[SI_TITLE].fg = COLOR_GREEN;
+       d[SI_TITLE].bg = COLOR_BLACK;
+       d[SI_TITLE].align = RIGHT;
+       d[SI_TITLE].x = 0;
+       d[SI_TITLE].y = 53;
+       d[SI_TITLE].len = 45;
+
+       d[SI_ARTIST].prefix = " by ";
+       d[SI_ARTIST].postfix = "";
+       d[SI_ARTIST].fg = COLOR_GREEN;
+       d[SI_ARTIST].bg = COLOR_BLACK;
+       d[SI_ARTIST].align = LEFT;
+       d[SI_ARTIST].x = 45;
+       d[SI_ARTIST].y = 53;
+       d[SI_ARTIST].len = 45;
+
+       d[SI_YEAR].prefix = "(";
+       d[SI_YEAR].postfix = ")";
+       d[SI_YEAR].fg = COLOR_GREEN;
+       d[SI_YEAR].bg = COLOR_BLACK;
+       d[SI_YEAR].align = RIGHT;
+       d[SI_YEAR].x = 90;
+       d[SI_YEAR].y = 53;
+       d[SI_YEAR].len = 10;
+
+       d[SI_ALBUM].prefix = "A: ";
+       d[SI_ALBUM].postfix = "";
+       d[SI_ALBUM].fg = COLOR_GREEN;
+       d[SI_ALBUM].bg = COLOR_BLACK;
+       d[SI_ALBUM].align = CENTER;
+       d[SI_ALBUM].x = 0;
+       d[SI_ALBUM].y = 63;
+       d[SI_ALBUM].len = 50;
+
+       d[SI_COMMENT].prefix = "C: ";
+       d[SI_COMMENT].postfix = "";
+       d[SI_COMMENT].fg = COLOR_GREEN;
+       d[SI_COMMENT].bg = COLOR_BLACK;
+       d[SI_COMMENT].align = CENTER;
+       d[SI_COMMENT].x = 50;
+       d[SI_COMMENT].y = 63;
+       d[SI_COMMENT].len = 50;
+
+       d[SI_AFS_MODE].prefix = "";
+       d[SI_AFS_MODE].postfix = "";
+       d[SI_AFS_MODE].fg = COLOR_YELLOW;
+       d[SI_AFS_MODE].bg = COLOR_BLACK;
+       d[SI_AFS_MODE].align = CENTER;
+       d[SI_AFS_MODE].x = 0;
+       d[SI_AFS_MODE].y = 77;
+       d[SI_AFS_MODE].len = 100;
+
+       d[SI_ATTRIBUTES_TXT].prefix = "";
+       d[SI_ATTRIBUTES_TXT].postfix = "";
+       d[SI_ATTRIBUTES_TXT].fg = COLOR_YELLOW;
+       d[SI_ATTRIBUTES_TXT].bg = COLOR_BLACK;
+       d[SI_ATTRIBUTES_TXT].align = CENTER;
+       d[SI_ATTRIBUTES_TXT].x = 0;
+       d[SI_ATTRIBUTES_TXT].y = 87;
+       d[SI_ATTRIBUTES_TXT].len = 100;
+
+       d[SI_DIRECTORY].prefix = "dir: ";
+       d[SI_DIRECTORY].postfix = "";
+       d[SI_DIRECTORY].fg = COLOR_YELLOW;
+       d[SI_DIRECTORY].bg = COLOR_BLACK;
+       d[SI_DIRECTORY].align = CENTER;
+       d[SI_DIRECTORY].x = 0;
+       d[SI_DIRECTORY].y = 97;
+       d[SI_DIRECTORY].len = 100;
 }
 
 void init_theme(int num, struct gui_theme *t)
 {
        int i;
-
-       for (i = 0; i < NUM_STAT_ITEMS; i++)
+       FOR_EACH_STATUS_ITEM(i)
                t->data[i].len = 0;
        current_theme_num = num;