foot/grid.h
Daniel Eklöf 304f15d696
Use a 'damage' list to communicate what needs to be updated
Instead of having each cell in the grid track it's own dirtiness, grid
operations now append "damage" to a list.

This list is consumed every time we render the grid.

This allows us to special case some operations, like erase (and in the
future, scroll).
2019-06-19 14:17:43 +02:00

22 lines
720 B
C

#pragma once
#include "terminal.h"
void grid_damage_update(struct grid *grid, int start, int length);
void grid_damage_erase(struct grid *grid, int start, int length);
void grid_erase(struct grid *grid, int start, int end);
void grid_cursor_to(struct grid *grid, int row, int col);
void grid_cursor_left(struct grid *grid, int count);
void grid_cursor_right(struct grid *grid, int count);
void grid_cursor_up(struct grid *grid, int count);
void grid_cursor_down(struct grid *grid, int count);
void grid_scroll(struct grid *grid, int rows);
int grid_cursor_linear(const struct grid *grid, int row, int col);
//void grid_cursor_to(struct grid *grid, int pos);
//void grid_cursor_move(struct grid *grid, int cols);