X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fscreen.h;h=8a91d46279254a7205a16af18d899196de787d2e;hb=f2b8b4378b3760e8ba5a1ed54a5f8635d3dac85e;hp=c546e281b1b91183b3dde806a11e49e7bec6eafc;hpb=758546d96b07de76947bfdef71ea83d2500b51d7;p=ncmpc.git diff --git a/src/screen.h b/src/screen.h index c546e28..8a91d46 100644 --- a/src/screen.h +++ b/src/screen.h @@ -32,6 +32,8 @@ #include +#include + struct mpdclient; struct screen_functions; @@ -41,6 +43,8 @@ struct screen { struct progress_bar progress_bar; struct status_bar status_bar; + const struct screen_functions *current_page; + char *buf; size_t buf_size; @@ -62,6 +66,9 @@ void screen_init(struct mpdclient *c); void screen_exit(void); void screen_resize(struct mpdclient *c); +void +paint_top_window(const struct mpdclient *c); + void screen_paint(struct mpdclient *c, bool main_dirty); @@ -73,8 +80,11 @@ screen_switch(const struct screen_functions *sf, struct mpdclient *c); void screen_swap(struct mpdclient *c, const struct mpd_song *song); -gboolean -screen_is_visible(const struct screen_functions *sf); +static inline bool +screen_is_visible(const struct screen_functions *sf) +{ + return sf == screen.current_page; +} int screen_get_mouse_event(struct mpdclient *c, unsigned long *bstate, int *row);