UI: add "compositor" layer to merge grids for TUI use in a correct way

Initially we will use this for the popupmenu, floating windows will
follow soon

NB: writedelay + compositor is weird, we need more flexible
redraw introspection.
This commit is contained in:
Björn Linse
2018-02-03 20:11:31 +01:00
parent 894f6bee54
commit 31cbd34d97
15 changed files with 583 additions and 112 deletions

View File

@@ -1,6 +1,8 @@
#ifndef NVIM_GRID_DEFS_H
#define NVIM_GRID_DEFS_H
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include "nvim/types.h"
@@ -48,8 +50,15 @@ typedef struct {
// offsets for the grid relative to the global screen
int row_offset;
int col_offset;
// state owned by the compositor.
int comp_row;
int comp_col;
size_t comp_index;
bool comp_disabled;
} ScreenGrid;
#define SCREEN_GRID_INIT { 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0 }
#define SCREEN_GRID_INIT { 0, NULL, NULL, NULL, NULL, 0, 0, 0, 0, 0, 0, 0, \
false }
#endif // NVIM_GRID_DEFS_H