Data Fields
ScreenGrid Struct Reference

#include <grid_defs.h>

Data Fields

handle_T handle
 
schar_Tchars
 
sattr_Tattrs
 
unsigned * line_offset
 
char_uline_wraps
 
int Rows
 
int Columns
 
bool valid
 
int row_offset
 
int col_offset
 
bool blending
 
int comp_row
 
int comp_col
 
size_t comp_index
 
bool comp_disabled
 

Detailed Description

ScreenGrid represents a resizable rectuangular grid displayed by UI clients.

chars[] contains the UTF-8 text that is currently displayed on the grid. It is stored as a single block of cells. When redrawing a part of the grid, the new state can be compared with the existing state of the grid. This way we can avoid sending bigger updates than neccessary to the Ul layer.

Screen cells are stored as NUL-terminated UTF-8 strings, and a cell can contain up to MAX_MCO composing characters after the base character. The composing characters are to be drawn on top of the original character. The content after the NUL is not defined (so comparison must be done a single cell at a time). Double-width characters are stored in the left cell, and the right cell should only contain the empty string. When a part of the screen is cleared, the cells should be filled with a single whitespace char.

attrs[] contains the highlighting attribute for each cell. line_offset[n] is the offset from chars[] and attrs[] for the start of line 'n'. These offsets are in general not linear, as full screen scrolling is implemented by rotating the offsets in the line_offset array. line_wraps[] is an array of boolean flags indicating if the screen line wraps to the next line. It can only be true if a window occupies the entire screen width.

Field Documentation

sattr_T* ScreenGrid::attrs
bool ScreenGrid::blending
schar_T* ScreenGrid::chars
int ScreenGrid::col_offset
int ScreenGrid::Columns
int ScreenGrid::comp_col
bool ScreenGrid::comp_disabled
size_t ScreenGrid::comp_index
int ScreenGrid::comp_row
handle_T ScreenGrid::handle
unsigned* ScreenGrid::line_offset
char_u* ScreenGrid::line_wraps
int ScreenGrid::row_offset
int ScreenGrid::Rows
bool ScreenGrid::valid

The documentation for this struct was generated from the following file: