예제 #1
0
파일: teken.c 프로젝트: connor1983/freebsd
static inline void
teken_funcs_cursor(teken_t *t)
{

	teken_assert(t->t_cursor.tp_row < t->t_winsize.tp_row);
	teken_assert(t->t_cursor.tp_col < t->t_winsize.tp_col);

	t->t_funcs->tf_cursor(t->t_softc, &t->t_cursor);
}
예제 #2
0
파일: teken.c 프로젝트: connor1983/freebsd
static inline void
teken_funcs_putchar(teken_t *t, const teken_pos_t *p, teken_char_t c,
    const teken_attr_t *a)
{

	teken_assert(p->tp_row < t->t_winsize.tp_row);
	teken_assert(p->tp_col < t->t_winsize.tp_col);

	t->t_funcs->tf_putchar(t->t_softc, p, c, a);
}
예제 #3
0
파일: teken.c 프로젝트: connor1983/freebsd
static inline void
teken_funcs_fill(teken_t *t, const teken_rect_t *r,
    const teken_char_t c, const teken_attr_t *a)
{

	teken_assert(r->tr_end.tp_row > r->tr_begin.tp_row);
	teken_assert(r->tr_end.tp_row <= t->t_winsize.tp_row);
	teken_assert(r->tr_end.tp_col > r->tr_begin.tp_col);
	teken_assert(r->tr_end.tp_col <= t->t_winsize.tp_col);

	t->t_funcs->tf_fill(t->t_softc, r, c, a);
}
예제 #4
0
static inline void
teken_funcs_putchar(teken_t *t, const teken_pos_t *p, teken_char_t c,
    const teken_attr_t *a)
{
	teken_attr_t ta;

	teken_assert(p->tp_row < t->t_winsize.tp_row);
	teken_assert(p->tp_col < t->t_winsize.tp_col);

	/* Apply inversion. */
	if (a->ta_format & TF_REVERSE) {
		ta.ta_format = a->ta_format;
		ta.ta_fgcolor = a->ta_bgcolor;
		ta.ta_bgcolor = a->ta_fgcolor;
		a = &ta;
	}

	t->t_funcs->tf_putchar(t->t_softc, p, c, a);
}
예제 #5
0
static inline void
teken_funcs_fill(teken_t *t, const teken_rect_t *r,
    const teken_char_t c, const teken_attr_t *a)
{
	teken_attr_t ta;

	teken_assert(r->tr_end.tp_row > r->tr_begin.tp_row);
	teken_assert(r->tr_end.tp_row <= t->t_winsize.tp_row);
	teken_assert(r->tr_end.tp_col > r->tr_begin.tp_col);
	teken_assert(r->tr_end.tp_col <= t->t_winsize.tp_col);

	/* Apply inversion. */
	if (a->ta_format & TF_REVERSE) {
		ta.ta_format = a->ta_format;
		ta.ta_fgcolor = a->ta_bgcolor;
		ta.ta_bgcolor = a->ta_fgcolor;
		a = &ta;
	}

	t->t_funcs->tf_fill(t->t_softc, r, c, a);
}
예제 #6
0
파일: teken.c 프로젝트: connor1983/freebsd
static inline void
teken_funcs_copy(teken_t *t, const teken_rect_t *r, const teken_pos_t *p)
{

	teken_assert(r->tr_end.tp_row > r->tr_begin.tp_row);
	teken_assert(r->tr_end.tp_row <= t->t_winsize.tp_row);
	teken_assert(r->tr_end.tp_col > r->tr_begin.tp_col);
	teken_assert(r->tr_end.tp_col <= t->t_winsize.tp_col);
	teken_assert(p->tp_row + (r->tr_end.tp_row - r->tr_begin.tp_row) <= t->t_winsize.tp_row);
	teken_assert(p->tp_col + (r->tr_end.tp_col - r->tr_begin.tp_col) <= t->t_winsize.tp_col);

	t->t_funcs->tf_copy(t->t_softc, r, p);
}