From 9bcf2667e7e239873597b7ec2172206a9af18071 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Andr=C3=A9=20Tanner?= Date: Tue, 14 Mar 2017 16:53:53 +0100 Subject: Restructure display code Use pull instead of push based model for display code. Previously view.c was calling into the ui frontend code, with the new scheme this switches around: the necessary data is fetched by the ui as necessary. The UI independent display code is moved out of view.c/ui-curses.c into vis.c. The cell styles are now directly embedded into the Cell struct. New UI styles are introduced for: - status bar (focused / non-focused) - info message - window separator - EOF symbol You will have to update your color themes. The terminal output code is further abstracted into a generic ui-terminal.c part which keeps track of the whole in-memory cell matrix and #includes ui-terminal-curses.c for the actual terminal output. This architecture currently assumes that there are no overlapping windows. It will also allow non-curses based terminal user interfaces. --- vis-core.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'vis-core.h') diff --git a/vis-core.h b/vis-core.h index 4350794..0739e55 100644 --- a/vis-core.h +++ b/vis-core.h @@ -147,7 +147,6 @@ struct Win { Mode modes[VIS_MODE_INVALID]; /* overlay mods used for per window key bindings */ Win *parent; /* window which was active when showing the command prompt */ Mode *parent_mode; /* mode which was active when showing the command prompt */ - ViewEvent event; /* callbacks from view.[ch] */ char *lexer_name; /* corresponds to filename in lexers/ subdirectory */ size_t horizon; /* max bytes to consider for syntax coloring before viewport */ Win *prev, *next; /* neighbouring windows */ @@ -195,6 +194,7 @@ struct Vis { volatile sig_atomic_t cancel_filter; /* abort external command/filter (SIGINT occured) */ volatile sig_atomic_t sigbus; /* one of the memory mapped region became unavailable (SIGBUS) */ volatile sig_atomic_t need_resize; /* need to resize UI (SIGWINCH occured) */ + volatile sig_atomic_t resume; /* need to resume UI (SIGCONT occured) */ volatile sig_atomic_t terminate; /* need to terminate we were being killed by SIGTERM */ sigjmp_buf sigbus_jmpbuf; /* used to jump back to a known good state in the mainloop after (SIGBUS) */ Map *actions; /* registered editor actions / special keys commands */ -- cgit v1.2.3