Lines Matching defs:cy

87 screen_write_set_cursor(struct screen_write_ctx *ctx, int cx, int cy)
94 if (cx != -1 && (u_int)cx == s->cx && cy != -1 && (u_int)cy == s->cy)
102 if (cy != -1) {
103 if ((u_int)cy > screen_size_y(s) - 1)
104 cy = screen_size_y(s) - 1;
105 s->cy = cy;
184 ttyctx->ocy = s->cy;
398 u_int cy = s->cy, i, end, next, idx = 0, at, left;
453 if (s->cy == cy + lines - 1 || text[idx].size == 0)
456 screen_write_cursormove(ctx, cx, s->cy + 1, 0);
464 if ((s->cy == cy + lines - 1 && (!more || s->cx == cx + width)) ||
476 screen_write_cursormove(ctx, cx, s->cy + 1, 0);
574 u_int xx, yy, cx = s->cx, cy = s->cy;
579 cy = s->cy;
592 grid_view_set_cell(ctx->s->grid, s->cx, s->cy, &gc);
600 s->cy++;
604 s->cy = cy;
650 u_int cx, cy, i;
653 cy = s->cy;
677 screen_write_set_cursor(ctx, cx, cy);
686 u_int cx, cy, i;
689 cy = s->cy;
696 screen_write_set_cursor(ctx, cx, cy + i);
699 screen_write_set_cursor(ctx, cx, cy + ny - 1);
702 screen_write_set_cursor(ctx, cx, cy);
714 u_int cx, cy, i, j, width = menu->width;
718 cy = s->cy;
728 screen_write_cursormove(ctx, cx, cy + 1 + i, 0);
737 screen_write_cursormove(ctx, cx + 1, cy + 1 + i, 0);
741 screen_write_cursormove(ctx, cx + 2, cy + 1 + i, 0);
753 screen_write_set_cursor(ctx, cx, cy);
763 u_int cx, cy, i;
766 cy = s->cy;
786 screen_write_set_cursor(ctx, cx, cy + ny - 1);
799 screen_write_set_cursor(ctx, cx, cy + i);
802 screen_write_set_cursor(ctx, cx + nx - 1, cy + i);
808 screen_write_cursormove(ctx, cx + 2, cy, 0);
812 screen_write_set_cursor(ctx, cx, cy);
825 u_int cx, cy, px, py;
828 cy = s->cy;
846 py = src->cy;
865 grid_view_get_cell(src->grid, src->cx, src->cy, &gc);
868 cy + (src->cy - py));
902 u_int cx = s->cx, cy = s->cy;
907 if (cy < s->rupper) {
909 if (ny > cy)
910 ny = cy;
913 if (ny > cy - s->rupper)
914 ny = cy - s->rupper;
919 cy -= ny;
921 screen_write_set_cursor(ctx, cx, cy);
929 u_int cx = s->cx, cy = s->cy;
934 if (cy > s->rlower) {
936 if (ny > screen_size_y(s) - 1 - cy)
937 ny = screen_size_y(s) - 1 - cy;
940 if (ny > s->rlower - cy)
941 ny = s->rlower - cy;
948 cy += ny;
950 screen_write_set_cursor(ctx, cx, cy);
958 u_int cx = s->cx, cy = s->cy;
970 screen_write_set_cursor(ctx, cx, cy);
978 u_int cx = s->cx, cy = s->cy;
990 screen_write_set_cursor(ctx, cx, cy);
999 u_int cx = s->cx, cy = s->cy;
1002 if (cy == 0)
1004 gl = grid_get_line(s->grid, s->grid->hsize + cy - 1);
1006 cy--;
1012 screen_write_set_cursor(ctx, cx, cy);
1064 grid_view_insert_cells(s->grid, s->cx, s->cy, nx, bg);
1092 grid_view_delete_cells(s->grid, s->cx, s->cy, nx, bg);
1120 grid_view_clear(s->grid, s->cx, s->cy, nx, 1, bg);
1138 if (s->cy < s->rupper || s->cy > s->rlower) {
1139 if (ny > screen_size_y(s) - s->cy)
1140 ny = screen_size_y(s) - s->cy;
1147 grid_view_insert_lines(gd, s->cy, ny, bg);
1155 if (ny > s->rlower + 1 - s->cy)
1156 ny = s->rlower + 1 - s->cy;
1163 if (s->cy < s->rupper || s->cy > s->rlower)
1164 grid_view_insert_lines(gd, s->cy, ny, bg);
1166 grid_view_insert_lines_region(gd, s->rlower, s->cy, ny, bg);
1186 if (s->cy < s->rupper || s->cy > s->rlower) {
1187 if (ny > sy - s->cy)
1188 ny = sy - s->cy;
1195 grid_view_delete_lines(gd, s->cy, ny, bg);
1203 if (ny > s->rlower + 1 - s->cy)
1204 ny = s->rlower + 1 - s->cy;
1211 if (s->cy < s->rupper || s->cy > s->rlower)
1212 grid_view_delete_lines(gd, s->cy, ny, bg);
1214 grid_view_delete_lines_region(gd, s->rlower, s->cy, ny, bg);
1230 gl = grid_get_line(s->grid, s->grid->hsize + s->cy);
1234 grid_view_clear(s->grid, 0, s->cy, sx, 1, bg);
1236 screen_write_collect_clear(ctx, s->cy, 1);
1241 TAILQ_INSERT_TAIL(&ctx->s->write_list[s->cy].items, ci, entry);
1259 gl = grid_get_line(s->grid, s->grid->hsize + s->cy);
1263 grid_view_clear(s->grid, s->cx, s->cy, sx - s->cx, 1, bg);
1265 before = screen_write_collect_trim(ctx, s->cy, s->cx, sx - s->cx, NULL);
1271 TAILQ_INSERT_TAIL(&ctx->s->write_list[s->cy].items, ci, entry);
1291 grid_view_clear(s->grid, 0, s->cy, sx, 1, bg);
1293 grid_view_clear(s->grid, 0, s->cy, s->cx + 1, 1, bg);
1295 before = screen_write_collect_trim(ctx, s->cy, 0, s->cx + 1, NULL);
1301 TAILQ_INSERT_TAIL(&ctx->s->write_list[s->cy].items, ci, entry);
1326 log_debug("%s: from %u,%u to %u,%u", __func__, s->cx, s->cy, px, py);
1337 if (s->cy == s->rupper) {
1345 } else if (s->cy > 0)
1346 screen_write_set_cursor(ctx, -1, s->cy - 1);
1382 gl = grid_get_line(gd, gd->hsize + s->cy);
1386 log_debug("%s: at %u,%u (region %u-%u)", __func__, s->cx, s->cy,
1394 if (s->cy == s->rlower) {
1398 } else if (s->cy < screen_size_y(s) - 1)
1399 screen_write_set_cursor(ctx, -1, s->cy + 1);
1473 s->cy == 0 &&
1480 grid_view_clear(gd, s->cx, s->cy, sx - s->cx, 1, bg);
1481 grid_view_clear(gd, 0, s->cy + 1, sx, sy - (s->cy + 1), bg);
1484 screen_write_collect_clear(ctx, s->cy + 1, sy - (s->cy + 1));
1500 if (s->cy > 0)
1501 grid_view_clear(s->grid, 0, 0, sx, s->cy, bg);
1503 grid_view_clear(s->grid, 0, s->cy, sx, 1, bg);
1505 grid_view_clear(s->grid, 0, s->cy, s->cx + 1, 1, bg);
1507 screen_write_collect_clear(ctx, 0, s->cy);
1664 log_debug("%s: at %u,%u (region %u-%u)", __func__, s->cx, s->cy,
1692 u_int y, cx, cy, last, items = 0;
1715 cx = s->cx; cy = s->cy;
1745 s->cx = cx; s->cy = cy;
1756 struct screen_write_cline *cl = &s->write_list[s->cy];
1764 before = screen_write_collect_trim(ctx, s->cy, s->cx, ci->used,
1775 (int)ci->used, cl->data + ci->x, s->cx, s->cy);
1779 grid_view_get_cell(s->grid, xx, s->cy, &gc);
1782 grid_view_set_cell(s->grid, xx, s->cy,
1786 grid_view_set_cell(s->grid, xx, s->cy,
1791 grid_view_set_cells(s->grid, s->cx, s->cy, &ci->gc, cl->data + ci->x,
1796 grid_view_get_cell(s->grid, xx, s->cy, &gc);
1799 grid_view_set_cell(s->grid, xx, s->cy, &grid_default_cell);
1844 log_debug("%s: wrapped at %u,%u", __func__, s->cx, s->cy);
1852 if (ctx->s->write_list[s->cy].data == NULL)
1853 ctx->s->write_list[s->cy].data = xmalloc(screen_size_x(ctx->s));
1854 ctx->s->write_list[s->cy].data[s->cx + ci->used++] = gc->data.data[0];
1891 grid_view_insert_cells(s->grid, s->cx, s->cy, width, 8);
1897 log_debug("%s: wrapped at %u,%u", __func__, s->cx, s->cy);
1904 if (s->cx > sx - width || s->cy > sy - 1)
1909 gl = grid_get_line(s->grid, s->grid->hsize + s->cy);
1911 grid_view_get_cell(gd, s->cx, s->cy, &now_gc);
1921 log_debug("%s: new padding at %u,%u", __func__, xx, s->cy);
1922 grid_view_set_padding(gd, xx, s->cy);
1952 selected = screen_check_selection(s, s->cx, s->cy);
1956 grid_view_set_cell(gd, s->cx, s->cy, &tmp_gc);
1960 grid_view_set_cell(gd, s->cx, s->cy, &tmp_gc);
1962 grid_view_set_cell(gd, s->cx, s->cy, gc);
2001 u_int n, cx = s->cx, cy = s->cy;
2022 (int)ud->size, ud->data, cx, cy, ud->width);
2026 grid_view_get_cell(gd, cx - n, cy, &last);
2029 grid_view_get_cell(gd, cx - n, cy, &last);
2057 cx - n, cy, n, last.data.width);
2072 grid_view_set_cell(gd, cx - n, cy, &last);
2074 grid_view_set_padding(gd, cx - 1, cy);
2082 screen_write_set_cursor(ctx, cx - n, cy);
2087 screen_write_set_cursor(ctx, cx, cy);
2119 grid_view_get_cell(gd, xx, s->cy, &tmp_gc);
2122 log_debug("%s: padding at %u,%u", __func__, xx, s->cy);
2123 grid_view_set_cell(gd, xx, s->cy, &grid_default_cell);
2127 log_debug("%s: character at %u,%u", __func__, xx, s->cy);
2128 grid_view_set_cell(gd, xx, s->cy, &grid_default_cell);
2141 grid_view_get_cell(gd, xx, s->cy, &tmp_gc);
2145 s->cy);
2153 grid_view_set_cell(gd, xx, s->cy, &tmp_gc);
2155 grid_view_set_cell(gd, xx, s->cy,