X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fstatus_bar.h;h=c4a54708cbf706c3b762441240d6f41c2c2c7c9b;hb=e25477105dc2cff39d54b270e6b732e2145daa0f;hp=c97c7a1a6398a72b87d3bf9ef253f93d059f2699;hpb=d9115690c8677457386ab0851a42752b81b3517f;p=ncmpc.git diff --git a/src/status_bar.h b/src/status_bar.h index c97c7a1..c4a5470 100644 --- a/src/status_bar.h +++ b/src/status_bar.h @@ -28,8 +28,6 @@ #include -#include - struct mpd_status; struct mpd_song; @@ -40,33 +38,17 @@ struct status_bar { #ifndef NCMPC_MINI struct hscroll hscroll; -#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->hscroll.t = 0; + const struct mpd_status *prev_status; + const struct mpd_song *prev_song; #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,