Lines Matching refs:rect
103 static void damagerect(VTermScreen *screen, VTermRect rect) in damagerect() argument
110 emit = rect; in damagerect()
116 if(rect.end_row > rect.start_row + 1) { in damagerect()
119 emit = rect; in damagerect()
123 screen->damaged = rect; in damagerect()
126 else if(rect.start_row == screen->damaged.start_row) { in damagerect()
128 if(screen->damaged.start_col > rect.start_col) in damagerect()
129 screen->damaged.start_col = rect.start_col; in damagerect()
130 if(screen->damaged.end_col < rect.end_col) in damagerect()
131 screen->damaged.end_col = rect.end_col; in damagerect()
137 screen->damaged = rect; in damagerect()
145 screen->damaged = rect; in damagerect()
147 rect_expand(&screen->damaged, &rect); in damagerect()
162 VTermRect rect = { in damagescreen() local
169 damagerect(screen, rect); in damagescreen()
191 VTermRect rect = { in putglyph() local
202 damagerect(screen, rect); in putglyph()
265 static int erase_internal(VTermRect rect, int selective, void *user) in erase_internal() argument
269 for(int row = rect.start_row; row < screen->state->rows && row < rect.end_row; row++) { in erase_internal()
272 for(int col = rect.start_col; col < rect.end_col; col++) { in erase_internal()
288 static int erase_user(VTermRect rect, int selective, void *user) in erase_user() argument
292 damagerect(screen, rect); in erase_user()
297 static int erase(VTermRect rect, int selective, void *user) in erase() argument
299 erase_internal(rect, selective, user); in erase()
300 return erase_user(rect, 0, user); in erase()
303 static int scrollrect(VTermRect rect, int downward, int rightward, void *user) in scrollrect() argument
308 vterm_scroll_rect(rect, downward, rightward, in scrollrect()
313 vterm_scroll_rect(rect, downward, rightward, in scrollrect()
320 !rect_intersects(&rect, &screen->damaged)) { in scrollrect()
325 screen->pending_scrollrect = rect; in scrollrect()
329 else if(rect_equal(&screen->pending_scrollrect, &rect) && in scrollrect()
338 screen->pending_scrollrect = rect; in scrollrect()
343 vterm_scroll_rect(rect, downward, rightward, in scrollrect()
349 if(rect_contains(&rect, &screen->damaged)) { in scrollrect()
352 rect_clip(&screen->damaged, &rect); in scrollrect()
359 else if(rect.start_col <= screen->damaged.start_col && in scrollrect()
360 rect.end_col >= screen->damaged.end_col && in scrollrect()
362 if(screen->damaged.start_row >= rect.start_row && in scrollrect()
363 screen->damaged.start_row < rect.end_row) { in scrollrect()
365 if(screen->damaged.start_row < rect.start_row) in scrollrect()
366 screen->damaged.start_row = rect.start_row; in scrollrect()
367 if(screen->damaged.start_row > rect.end_row) in scrollrect()
368 screen->damaged.start_row = rect.end_row; in scrollrect()
370 if(screen->damaged.end_row >= rect.start_row && in scrollrect()
371 screen->damaged.end_row < rect.end_row) { in scrollrect()
373 if(screen->damaged.end_row < rect.start_row) in scrollrect()
374 screen->damaged.end_row = rect.start_row; in scrollrect()
375 if(screen->damaged.end_row > rect.end_row) in scrollrect()
376 screen->damaged.end_row = rect.end_row; in scrollrect()
381 ARGSrect(screen->damaged), ARGSrect(rect)); in scrollrect()
498 VTermRect rect = { in resize() local
504 scrollrect(rect, first_blank_row - new_rows, 0, user); in resize()
526 VTermRect rect = { in resize() local
532 damagerect(screen, rect); in resize()
542 VTermRect rect = { in resize() local
548 scrollrect(rect, -1, 0, user); in resize()
554 rect.end_row = 1; in resize()
555 damagerect(screen, rect); in resize()
564 VTermRect rect = { in resize() local
570 damagerect(screen, rect); in resize()
591 VTermRect rect = { in setlineinfo() local
597 damagerect(screen, rect); in setlineinfo()
600 rect.start_col = screen->cols / 2; in setlineinfo()
601 rect.end_col = screen->cols; in setlineinfo()
603 erase_internal(rect, 0, user); in setlineinfo()
676 …et_chars(const VTermScreen *screen, const int utf8, void *buffer, size_t len, const VTermRect rect) in _get_chars() argument
696 for(int row = rect.start_row; row < rect.end_row; row++) { in _get_chars()
697 for(int col = rect.start_col; col < rect.end_col; col++) { in _get_chars()
717 if(row < rect.end_row - 1) { in _get_chars()
726 …term_screen_get_chars(const VTermScreen *screen, uint32_t *chars, size_t len, const VTermRect rect) in vterm_screen_get_chars() argument
728 return _get_chars(screen, 0, chars, len, rect); in vterm_screen_get_chars()
731 size_t vterm_screen_get_text(const VTermScreen *screen, char *str, size_t len, const VTermRect rect) in vterm_screen_get_text() argument
733 return _get_chars(screen, 1, str, len, rect); in vterm_screen_get_text()