robin/laufey

git clone https://git.robinwobin.dev/robin/laufey

Justin M. Keyesrefactor: move ugrid.c => tui/ugrid.c #38540bff9b5f010

master
501 B26 linesraw
1#pragma once
2
3#include "nvim/types_defs.h"
4
5typedef struct {
6  schar_T data;
7  sattr_T attr;
8} UCell;
9
10typedef struct {
11  int row, col;
12  int width, height;
13  UCell **cells;
14} UGrid;
15
16#define UGRID_FOREACH_CELL(grid, row, startcol, endcol, code) \
17  do { \
18    UCell *row_cells = (grid)->cells[row]; \
19    for (int curcol = startcol; curcol < endcol; curcol++) { \
20      UCell *cell = row_cells + curcol; \
21      (void)(cell); \
22      code; \
23    } \
24  } while (0)
25
26#include "tui/ugrid.h.generated.h"