Esempio n. 1
0
/* VT100 alignment test. */
void
screen_write_alignmenttest(struct screen_write_ctx *ctx)
{
	struct screen		*s = ctx->s;
	struct tty_ctx	 	 ttyctx;
	struct grid_cell       	 gc;
	u_int			 xx, yy;

	screen_write_initctx(ctx, &ttyctx, 0);

	memcpy(&gc, &grid_default_cell, sizeof gc);
	grid_cell_one(&gc, 'E');

	for (yy = 0; yy < screen_size_y(s); yy++) {
		for (xx = 0; xx < screen_size_x(s); xx++)
			grid_view_set_cell(s->grid, xx, yy, &gc);
	}

	s->cx = 0;
	s->cy = 0;

	s->rupper = 0;

	s->rlower = screen_size_y(s) - 1;

	tty_write(tty_cmd_alignmenttest, &ttyctx);
}
Esempio n. 2
0
/* Write character. */
void
screen_write_putc(struct screen_write_ctx *ctx, struct grid_cell *gc,
    u_char ch)
{
	grid_cell_one(gc, ch);
	screen_write_cell(ctx, gc);
}
Esempio n. 3
0
File: input.c Progetto: akracun/tmux
/* Output this character to the screen. */
int
input_print(struct input_ctx *ictx)
{
	grid_cell_one(&ictx->cell, ictx->ch);
	screen_write_cell(&ictx->ctx, &ictx->cell);

	return (0);
}
Esempio n. 4
0
/* Output this character to the screen. */
int
input_print(struct input_ctx *ictx)
{
	int	set;

	set = ictx->cell.set == 0 ? ictx->cell.g0set : ictx->cell.g1set;
	if (set == 1)
		ictx->cell.cell.attr |= GRID_ATTR_CHARSET;
	else
		ictx->cell.cell.attr &= ~GRID_ATTR_CHARSET;

	grid_cell_one(&ictx->cell.cell, ictx->ch);
	screen_write_cell(&ictx->ctx, &ictx->cell.cell);

	ictx->cell.cell.attr &= ~GRID_ATTR_CHARSET;

	return (0);
}