Lines Matching defs:cx

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)
97 if (cx != -1) {
98 if ((u_int)cx > screen_size_x(s)) /* allow last column */
99 cx = screen_size_x(s) - 1;
100 s->cx = cx;
183 ttyctx->ocx = s->cx;
392 screen_write_text(struct screen_write_ctx *ctx, u_int cx, u_int width,
411 left = (cx + width) - s->cx;
456 screen_write_cursormove(ctx, cx, s->cy + 1, 0);
464 if ((s->cy == cy + lines - 1 && (!more || s->cx == cx + width)) ||
475 if (!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;
583 s->cx = cx;
592 grid_view_set_cell(ctx->s->grid, s->cx, s->cy, &gc);
598 s->cx++;
603 s->cx = cx;
650 u_int cx, cy, i;
652 cx = s->cx;
677 screen_write_set_cursor(ctx, cx, cy);
686 u_int cx, cy, i;
688 cx = s->cx;
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;
717 cx = s->cx;
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;
765 cx = s->cx;
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;
827 cx = s->cx;
835 px = src->cx;
865 grid_view_get_cell(src->grid, src->cx, src->cy, &gc);
867 screen_write_set_cursor(ctx, cx + (src->cx - px),
902 u_int cx = s->cx, cy = s->cy;
916 if (cx == screen_size_x(s))
917 cx--;
921 screen_write_set_cursor(ctx, cx, cy);
929 u_int cx = s->cx, cy = s->cy;
943 if (cx == screen_size_x(s))
944 cx--;
950 screen_write_set_cursor(ctx, cx, cy);
958 u_int cx = s->cx, cy = s->cy;
963 if (nx > screen_size_x(s) - 1 - cx)
964 nx = screen_size_x(s) - 1 - cx;
968 cx += nx;
970 screen_write_set_cursor(ctx, cx, cy);
978 u_int cx = s->cx, cy = s->cy;
983 if (nx > cx)
984 nx = cx;
988 cx -= nx;
990 screen_write_set_cursor(ctx, cx, cy);
999 u_int cx = s->cx, cy = s->cy;
1001 if (cx == 0) {
1007 cx = screen_size_x(s) - 1;
1010 cx--;
1012 screen_write_set_cursor(ctx, cx, cy);
1053 if (nx > screen_size_x(s) - s->cx)
1054 nx = screen_size_x(s) - s->cx;
1058 if (s->cx > screen_size_x(s) - 1)
1064 grid_view_insert_cells(s->grid, s->cx, s->cy, nx, bg);
1081 if (nx > screen_size_x(s) - s->cx)
1082 nx = screen_size_x(s) - s->cx;
1086 if (s->cx > screen_size_x(s) - 1)
1092 grid_view_delete_cells(s->grid, s->cx, s->cy, nx, bg);
1109 if (nx > screen_size_x(s) - s->cx)
1110 nx = screen_size_x(s) - s->cx;
1114 if (s->cx > screen_size_x(s) - 1)
1120 grid_view_clear(s->grid, s->cx, s->cy, nx, 1, bg);
1254 if (s->cx == 0) {
1260 if (s->cx > sx - 1 || (s->cx >= gl->cellsize && COLOUR_DEFAULT(bg)))
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);
1266 ci->x = s->cx;
1267 ci->used = sx - s->cx;
1285 if (s->cx >= sx - 1) {
1290 if (s->cx > sx - 1)
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);
1297 ci->used = s->cx + 1;
1326 log_debug("%s: from %u,%u to %u,%u", __func__, s->cx, s->cy, px, py);
1386 log_debug("%s: at %u,%u (region %u-%u)", __func__, s->cx, s->cy,
1472 if (s->cx == 0 &&
1479 if (s->cx <= sx - 1)
1480 grid_view_clear(gd, s->cx, s->cy, sx - s->cx, 1, bg);
1502 if (s->cx > sx - 1)
1505 grid_view_clear(s->grid, 0, s->cy, s->cx + 1, 1, bg);
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;
1764 before = screen_write_collect_trim(ctx, s->cy, s->cx, ci->used,
1766 ci->x = s->cx;
1775 (int)ci->used, cl->data + ci->x, s->cx, s->cy);
1777 if (s->cx != 0) {
1778 for (xx = s->cx; xx > 0; xx--) {
1791 grid_view_set_cells(s->grid, s->cx, s->cy, &ci->gc, cl->data + ci->x,
1793 screen_write_set_cursor(ctx, s->cx + ci->used, -1);
1795 for (xx = s->cx; xx < screen_size_x(s); xx++) {
1839 if (s->cx > sx - 1 || ctx->item->used > sx - 1 - s->cx)
1843 if (s->cx > sx - 1) {
1844 log_debug("%s: wrapped at %u,%u", __func__, s->cx, s->cy);
1854 ctx->s->write_list[s->cy].data[s->cx + ci->used++] = gc->data.data[0];
1886 (width > sx || (s->cx != sx && s->cx > sx - width)))
1891 grid_view_insert_cells(s->grid, s->cx, s->cy, width, 8);
1896 if ((s->mode & MODE_WRAP) && s->cx > sx - width) {
1897 log_debug("%s: wrapped at %u,%u", __func__, s->cx, s->cy);
1904 if (s->cx > sx - width || s->cy > sy - 1)
1911 grid_view_get_cell(gd, s->cx, s->cy, &now_gc);
1920 for (xx = s->cx + 1; xx < s->cx + width; xx++) {
1928 if (s->cx >= gl->cellsize)
1931 gce = &gl->celldata[s->cx];
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);
1971 if (s->cx <= sx - not_wrap - width)
1972 screen_write_set_cursor(ctx, s->cx + width, -1);
2001 u_int n, cx = s->cx, cy = s->cy;
2019 if (ud->size < 2 || cx == 0)
2022 (int)ud->size, ud->data, cx, cy, ud->width);
2026 grid_view_get_cell(gd, cx - n, cy, &last);
2027 if (cx != 1 && (last.flags & GRID_FLAG_PADDING)) {
2029 grid_view_get_cell(gd, cx - n, cy, &last);
2057 cx - n, cy, n, last.data.width);
2067 cx++;
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);
2117 xx = s->cx + 1;
2139 xx = s->cx + width - 1;