From 49196eba130b3ab4f0939f13d071aef3d0a70eab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Wed, 10 Sep 2014 12:44:25 +0200 Subject: Simplify drawing of the window statusbar --- editor.h | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'editor.h') diff --git a/editor.h b/editor.h index 388f8d5..2f47b52 100644 --- a/editor.h +++ b/editor.h @@ -28,8 +28,6 @@ typedef struct { bool active; /* whether the prompt is currently shown or not */ } Prompt; -typedef void (*editor_statusbar_t)(WINDOW *win, bool active, const char *filename, size_t line, size_t col); - enum Reg { REG_a, REG_b, @@ -99,7 +97,7 @@ struct Editor { Prompt *prompt; /* used to get user input */ Regex *search_pattern; /* last used search pattern */ void (*windows_arrange)(Editor*); /* current layout which places the windows */ - editor_statusbar_t statusbar; /* configurable user hook to draw statusbar */ + void (*statusbar)(EditorWin*); /* configurable user hook to draw statusbar */ bool running; /* (TODO move elsewhere?) */ }; @@ -149,7 +147,7 @@ void editor_prompt_set(Editor *vis, const char *line); void editor_prompt_show(Editor *vis, const char *title); void editor_prompt_hide(Editor *vis); -void editor_statusbar_set(Editor*, editor_statusbar_t); +void editor_statusbar_set(Editor*, void (*statusbar)(EditorWin*)); /* look up a curses color pair for the given combination of fore and * background color */ -- cgit v1.2.3