mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-04 04:06:06 -05:00
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).
22 lines
720 B
C
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);
|