X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=src%2Fscreen_interface.h;h=a5b29b90318ac2b8f6f9daa16bbddd3ea8eac70b;hb=f6bb989398b1ab8fa4ba5ad9a42958a1c5e866f0;hp=8371b537004d9459efeaebd24987ee6f5e798482;hpb=0796b270b1699336f29908d11bca92d64da0653c;p=ncmpc.git diff --git a/src/screen_interface.h b/src/screen_interface.h index 8371b53..a5b29b9 100644 --- a/src/screen_interface.h +++ b/src/screen_interface.h @@ -20,20 +20,16 @@ #ifndef NCMPC_SCREEN_INTERFACE_H #define NCMPC_SCREEN_INTERFACE_H +#include "config.h" #include "command.h" +#include "ncmpc_curses.h" #include #include -#ifdef HAVE_NCURSESW_NCURSES_H -#include -#else -#include -#endif - struct mpdclient; -typedef struct screen_functions { +struct screen_functions { void (*init)(WINDOW *w, int cols, int rows); void (*exit)(void); void (*open)(struct mpdclient *c); @@ -41,8 +37,15 @@ typedef struct screen_functions { void (*resize)(int cols, int rows); void (*paint)(void); void (*update)(struct mpdclient *c); + + /** + * Handle a command. + * + * @returns true if the command should not be handled by the ncmpc core. + */ bool (*cmd)(struct mpdclient *c, command_t cmd); + const char *(*get_title)(char *s, size_t size); -} screen_functions_t; +}; #endif