-/* stat */
-enum {
- SI_STATUS_BAR, SI_STATUS, SI_NUM_PLAYED,
- SI_MTIME, SI_LENGTH_MIN, SI_LENGTH_SEC,
- SI_FILE_SIZE, SI_STATUS_FLAGS, SI_FORMAT,
- SI_SCORE, SI_AUDIO_INFO1, SI_AUDIO_INFO2,
- SI_AUDIO_INFO3, SI_DBINFO1, SI_DBINFO2,
- SI_DBINFO3, SI_DECODER_FLAGS, SI_AUDIOD_STATUS,
- SI_PLAY_TIME, SI_UPTIME, SI_OFFSET,
- SI_LENGTH, SI_STREAM_START, SI_CURRENT_TIME,
- SI_AUDIOD_UPTIME, SI_SELECTOR, NUM_STAT_ITEMS
-};
-
-int stat_item_valid(const char *item);
-int stat_line_valid(const char *);
-void stat_client_write(char *msg, int itemnum);
-int stat_client_add(int fd, long unsigned mask);
-unsigned for_each_line(char *, int, void (*)(char *));
-#define FOR_EACH_STAT_ITEM(i) for (i = 0; i < NUM_STAT_ITEMS; i++)
-
-struct stat_item_data {
- const char *prefix, *postfix;
- unsigned x, y, len;
- int fg, bg, align;
-};
-
-/* gui_theme */
-struct gui_theme {
- const char *name;
- const char *author;
- int sb_fg, sb_bg;
- int cmd_fg, cmd_bg;
- int output_fg, output_bg;
- int msg_fg, msg_bg;
- int err_msg_fg, err_msg_bg;
- int welcome_fg, welcome_bg;
- int sep_fg, sep_bg;
- const char *sep_str;
- int default_fg, default_bg;
-
- int top_lines_default, top_lines_min;
- int lines_min, cols_min;
- struct stat_item_data data[NUM_STAT_ITEMS];
-};
-
-void init_theme(int i, struct gui_theme *);
-void next_theme(struct gui_theme *);
-void prev_theme(struct gui_theme *);
-#define LEFT 1
-#define RIGHT 2
-#define CENTER 3
-
+/** The enum of all status items. */
+enum status_items {STATUS_ITEM_ENUM NUM_STAT_ITEMS};
+extern const char *status_item_list[];
+/** Loop over each status item. */
+#define FOR_EACH_STATUS_ITEM(i) for (i = 0; i < NUM_STAT_ITEMS; i++)
+int for_each_stat_item(char *item_buf, size_t num_bytes,
+ int (*item_handler)(int, char *));