Code

screen_browser: export screen_browser_paint_directory()
[ncmpc.git] / src / screen_browser.h
index 093ece7cf30dab942db30c78f3734c8e4125b740..ba2ad3bad895ec7125827059983a7587ed07ce6b 100644 (file)
 #ifndef SCREEN_BROWSER_H
 #define SCREEN_BROWSER_H
 
-#include "screen.h"
-#include "mpdclient.h"
+#include "command.h"
 #include "config.h"
 
 #include <stdbool.h>
 
+#ifdef HAVE_NCURSESW_NCURSES_H
+#include <ncursesw/ncurses.h>
+#else
+#include <ncurses.h>
+#endif
+
+struct mpdclient;
+struct mpdclient_playlist;
+struct filelist;
 struct list_window;
 struct list_window_state;
 
 struct screen_browser {
        struct list_window *lw;
 
-       mpdclient_filelist_t *filelist;
+       struct filelist *filelist;
 };
 
 #ifndef NCMPC_MINI
 
 void
-sync_highlights(mpdclient_t *c, mpdclient_filelist_t *fl);
+screen_browser_sync_highlights(struct filelist *fl,
+                              const struct mpdclient_playlist *playlist);
 
-void
-browser_playlist_changed(struct screen_browser *browser, mpdclient_t *c,
-                        int event, gpointer data);
+#else
+
+#include <glib.h>
+static inline void
+screen_browser_sync_highlights(G_GNUC_UNUSED struct filelist *fl,
+                              G_GNUC_UNUSED const struct mpdclient_playlist *playlist)
+{
+}
 
 #endif
 
-const char *browser_lw_callback(unsigned index, bool *highlight, char** second_column, void *filelist);
+void
+screen_browser_paint_directory(WINDOW *w, unsigned width,
+                              bool selected, const char *name);
+
+void
+screen_browser_paint(const struct screen_browser *browser);
 
 struct filelist_entry *
 browser_get_selected_entry(const struct screen_browser *browser);