diff options
author | Max Kellermann <max@duempel.org> | 2008-10-02 15:20:18 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2008-10-02 15:20:18 +0200 |
commit | 3b61108fb88d032c168497d193f8cedc28b97df3 (patch) | |
tree | a8b38c6ac44a9a7a990206364ff59dd4d8396e63 | |
parent | a277ac660bdf2871ebbcddcb5288e29a03a46c92 (diff) | |
download | mpd-3b61108fb88d032c168497d193f8cedc28b97df3.tar.gz mpd-3b61108fb88d032c168497d193f8cedc28b97df3.tar.xz mpd-3b61108fb88d032c168497d193f8cedc28b97df3.zip |
screen: no typedefs for methods
Since the method types are used only once, we do not need typedefs for
that. Declare the method types within struct screen_functions.
-rw-r--r-- | src/screen.h | 29 |
1 files changed, 9 insertions, 20 deletions
diff --git a/src/screen.h b/src/screen.h index f47e57d39..1aa2ce5ab 100644 --- a/src/screen.h +++ b/src/screen.h @@ -42,17 +42,6 @@ typedef struct screen { int painted; } screen_t; - -typedef void (*screen_init_fn_t)(WINDOW *w, int cols, int rows); -typedef void (*screen_exit_fn_t)(void); -typedef void (*screen_open_fn_t)(struct screen *screen, mpdclient_t *c); -typedef void (*screen_close_fn_t)(void); -typedef void (*screen_resize_fn_t)(int cols, int rows); -typedef void (*screen_paint_fn_t)(mpdclient_t *c); -typedef void (*screen_update_fn_t)(mpdclient_t *c); -typedef int (*screen_cmd_fn_t)(struct screen *scr, mpdclient_t *c, command_t cmd); -typedef const char *(*screen_title_fn_t)(char *s, size_t size); - extern const struct screen_functions screen_playlist; extern const struct screen_functions screen_browse; #ifdef ENABLE_ARTIST_SCREEN @@ -70,15 +59,15 @@ extern const struct screen_functions screen_lyrics; #endif typedef struct screen_functions { - screen_init_fn_t init; - screen_exit_fn_t exit; - screen_open_fn_t open; - screen_close_fn_t close; - screen_resize_fn_t resize; - screen_paint_fn_t paint; - screen_update_fn_t update; - screen_cmd_fn_t cmd; - screen_title_fn_t get_title; + void (*init)(WINDOW *w, int cols, int rows); + void (*exit)(void); + void (*open)(struct screen *screen, mpdclient_t *c); + void (*close)(void); + void (*resize)(int cols, int rows); + void (*paint)(mpdclient_t *c); + void (*update)(mpdclient_t *c); + int (*cmd)(struct screen *scr, mpdclient_t *c, command_t cmd); + const char *(*get_title)(char *s, size_t size); } screen_functions_t; void screen_init(mpdclient_t *c); |