ugrid.h
Go to the documentation of this file.
1 #ifndef NVIM_UGRID_H
2 #define NVIM_UGRID_H
3 
4 #include "nvim/ui.h"
5 #include "nvim/globals.h"
6 
7 typedef struct ucell UCell;
8 typedef struct ugrid UGrid;
9 
10 #define CELLBYTES (sizeof(schar_T))
11 
12 struct ucell {
13  char data[CELLBYTES + 1];
15 };
16 
17 struct ugrid {
18  int row, col;
19  int width, height;
21 };
22 
23 // -V:UGRID_FOREACH_CELL:625
24 
25 #define UGRID_FOREACH_CELL(grid, row, startcol, endcol, code) \
26  do { \
27  UCell *row_cells = (grid)->cells[row]; \
28  for (int curcol = startcol; curcol < endcol; curcol++) { \
29  UCell *cell = row_cells + curcol; \
30  (void)(cell); \
31  code; \
32  } \
33  } while (0)
34 
35 #ifdef INCLUDE_GENERATED_DECLARATIONS
36 # include "ugrid.h.generated.h"
37 #endif
38 #endif // NVIM_UGRID_H
int16_t sattr_T
Definition: grid_defs.h:12
#define CELLBYTES
Definition: ugrid.h:10
Definition: ugrid.h:17
Definition: ugrid.h:12
sattr_T attr
Definition: ugrid.h:14
int row
Definition: ugrid.h:18
int width
Definition: ugrid.h:19
char data[CELLBYTES+1]
Definition: ugrid.h:13
UCell ** cells
Definition: ugrid.h:20