Code

screen_queue: no typedef for completion_callback_data_t
[ncmpc.git] / src / status_bar.h
index 78b367c1f710ed61eaa6dca7d9408f2dac3dea6f..1fc4cf369163debb236aea022a515d5fa28171cb 100644 (file)
@@ -1,5 +1,5 @@
 /* ncmpc (Ncurses MPD Client)
- * (c) 2004-2009 The Music Player Daemon Project
+ * (c) 2004-2017 The Music Player Daemon Project
  * Project homepage: http://musicpd.org
  *
  * This program is free software; you can redistribute it and/or modify
 
 #include "window.h"
 
-#include <glib.h>
+#ifndef NCMPC_MINI
+#include "hscroll.h"
+#endif
 
-#include <stdbool.h>
+#include <glib.h>
 
 struct mpd_status;
 struct mpd_song;
@@ -32,28 +34,24 @@ struct mpd_song;
 struct status_bar {
        struct window window;
 
-       GTime message_timestamp;
-};
+       guint message_source_id;
 
-static inline void
-status_bar_init(struct status_bar *p, unsigned width, int y, int x)
-{
-       window_init(&p->window, 1, width, y, x);
+#ifndef NCMPC_MINI
+       struct hscroll hscroll;
 
-       leaveok(p->window.w, false);
-       keypad(p->window.w, true);
+       const struct mpd_status *prev_status;
+       const struct mpd_song *prev_song;
+#endif
+};
 
-       p->message_timestamp = 0;
-}
+void
+status_bar_init(struct status_bar *p, unsigned width, int y, int x);
 
-static inline void
-status_bar_deinit(struct status_bar *p)
-{
-       delwin(p->window.w);
-}
+void
+status_bar_deinit(struct status_bar *p);
 
 void
-status_bar_paint(const struct status_bar *p, const struct mpd_status *status,
+status_bar_paint(struct status_bar *p, const struct mpd_status *status,
                 const struct mpd_song *song);
 
 void
@@ -62,4 +60,7 @@ status_bar_resize(struct status_bar *p, unsigned width, int y, int x);
 void
 status_bar_message(struct status_bar *p, const char *msg);
 
+void
+status_bar_clear_message(struct status_bar *p);
+
 #endif