grid_defs.h
Go to the documentation of this file.
1 #ifndef NVIM_GRID_DEFS_H
2 #define NVIM_GRID_DEFS_H
3 
4 #include <stdbool.h>
5 #include <stddef.h>
6 #include <stdint.h>
7 
8 #include "nvim/types.h"
9 
10 #define MAX_MCO 6 // maximum value for 'maxcombine'
11 
12 // The characters and attributes drawn on grids.
13 typedef char_u schar_T[(MAX_MCO+1) * 4 + 1];
14 typedef int16_t sattr_T;
15 
38 typedef struct {
40 
43  unsigned *line_offset;
45 
46  // the size of the allocated grid.
47  int Rows;
48  int Columns;
49 
50  // The state of the grid is valid. Otherwise it needs to be redrawn.
51  bool valid;
52 
53  // offsets for the grid relative to the global screen
56 
57  // whether the compositor should blend the grid with the background grid
58  bool blending;
59 
60  // state owned by the compositor.
61  int comp_row;
62  int comp_col;
63  size_t comp_index;
65 } ScreenGrid;
66 
67 #define SCREEN_GRID_INIT { 0, NULL, NULL, NULL, NULL, 0, 0, false, 0, 0, \
68  false, 0, 0, 0, false }
69 
70 #endif // NVIM_GRID_DEFS_H
int16_t sattr_T
Definition: grid_defs.h:14
sattr_T * attrs
Definition: grid_defs.h:42
int col_offset
Definition: grid_defs.h:55
size_t comp_index
Definition: grid_defs.h:63
char_u schar_T[(MAX_MCO+1)*4+1]
Definition: grid_defs.h:13
bool blending
Definition: grid_defs.h:58
char_u * line_wraps
Definition: grid_defs.h:44
handle_T handle
Definition: grid_defs.h:39
bool comp_disabled
Definition: grid_defs.h:64
schar_T * chars
Definition: grid_defs.h:41
#define MAX_MCO
Definition: grid_defs.h:10
int comp_col
Definition: grid_defs.h:62
int row_offset
Definition: grid_defs.h:54
int Rows
Definition: grid_defs.h:47
int comp_row
Definition: grid_defs.h:61
int handle_T
Definition: types.h:17
unsigned char char_u
Definition: types.h:11
Definition: grid_defs.h:38
unsigned * line_offset
Definition: grid_defs.h:43
bool valid
Definition: grid_defs.h:51
int Columns
Definition: grid_defs.h:48