summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: d5ad6e7)
raw | patch | inline | side by side (parent: d5ad6e7)
author | Max Kellermann <max@duempel.org> | |
Tue, 20 Oct 2009 06:00:13 +0000 (08:00 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Tue, 20 Oct 2009 06:00:13 +0000 (08:00 +0200) |
src/status_bar.c | patch | blob | history | |
src/status_bar.h | patch | blob | history |
diff --git a/src/status_bar.c b/src/status_bar.c
index 16012f4deb4d5807a9895a595b3910f1f69fb48e..657008c4eb892c7432b55b67a7cb61de453ee04b 100644 (file)
--- a/src/status_bar.c
+++ b/src/status_bar.c
#include <assert.h>
#include <string.h>
+void
+status_bar_init(struct status_bar *p, unsigned width, int y, int x)
+{
+ window_init(&p->window, 1, width, y, x);
+
+ leaveok(p->window.w, false);
+ keypad(p->window.w, true);
+
+ p->message_source_id = 0;
+
+#ifndef NCMPC_MINI
+ hscroll_reset(&p->hscroll);
+ p->scroll_source_id = 0;
+ p->prev_status = NULL;
+ p->prev_song = NULL;
+#endif
+}
+
+void
+status_bar_deinit(struct status_bar *p)
+{
+ delwin(p->window.w);
+
+ if (p->message_source_id != 0)
+ g_source_remove(p->message_source_id);
+}
+
#ifndef NCMPC_MINI
static gboolean
scroll_timer_callback(gpointer data)
diff --git a/src/status_bar.h b/src/status_bar.h
index 1410aed989a8cd81b7fe8b5682c3108727066428..bfbb2c04654103add9649b071f788be65457f4bc 100644 (file)
--- a/src/status_bar.h
+++ b/src/status_bar.h
#include <glib.h>
-#include <stdbool.h>
-
struct mpd_status;
struct mpd_song;
#endif
};
-static inline void
-status_bar_init(struct status_bar *p, unsigned width, int y, int x)
-{
- window_init(&p->window, 1, width, y, x);
-
- leaveok(p->window.w, false);
- keypad(p->window.w, true);
-
- p->message_source_id = 0;
-
-#ifndef NCMPC_MINI
- hscroll_reset(&p->hscroll);
- p->scroll_source_id = 0;
- p->prev_status = NULL;
- p->prev_song = NULL;
-#endif
-}
-
-static inline void
-status_bar_deinit(struct status_bar *p)
-{
- delwin(p->window.w);
+void
+status_bar_init(struct status_bar *p, unsigned width, int y, int x);
- if (p->message_source_id != 0)
- g_source_remove(p->message_source_id);
-}
+void
+status_bar_deinit(struct status_bar *p);
void
status_bar_paint(struct status_bar *p, const struct mpd_status *status,