예제 #1
0
static void
fbcon_sti_bmove(struct display *p, int sy, int sx,
		int dy, int dx,
		int height, int width)
{
#if 0 /* Unfortunately, still broken */
	sti_bmove(default_sti /* FIXME */, sy, sx, dy, dx, height, width);
#else
	u8 *src, *dest;
	u_int rows;

	if (sx == 0 && dx == 0 && width == p->next_line) {
		src = p->screen_base+sy*fontheight(p)*width;
		dest = p->screen_base+dy*fontheight(p)*width;
		memcpy_fromhp_tohp(dest, src, height*fontheight(p)*width);
	} else if (dy <= sy) {
		src = p->screen_base+sy*fontheight(p)*p->next_line+sx;
		dest = p->screen_base+dy*fontheight(p)*p->next_line+dx;
		for (rows = height*fontheight(p); rows--;) {
			memcpy_fromhp_tohp(dest, src, width);
			src += p->next_line;
			dest += p->next_line;
		}
	} else {
		src = p->screen_base+((sy+height)*fontheight(p)-1)*p->next_line+sx;
		dest = p->screen_base+((dy+height)*fontheight(p)-1)*p->next_line+dx;
		for (rows = height*fontheight(p); rows--;) {
			memcpy_fromhp_tohp(dest, src, width);
			src -= p->next_line;
			dest -= p->next_line;
		}
	}
#endif
}
예제 #2
0
void
sti_eraserows(void *v, int srcrow, int nrows, long attr)
{
	struct sti_screen *scr = (struct sti_screen *)v;
	struct sti_font *fp = &scr->scr_curfont;

	sti_bmove(scr, 0, srcrow * fp->height, 0, srcrow * fp->height,
	    nrows * fp->height, scr->scr_cfg.scr_width, bmf_clear);
}
예제 #3
0
void
sti_copyrows(void *v, int srcrow, int dstrow, int nrows)
{
	struct sti_screen *scr = (struct sti_screen *)v;
	struct sti_font *fp = &scr->scr_curfont;

	sti_bmove(scr, 0, srcrow * fp->height, 0, dstrow * fp->height,
	    nrows * fp->height, scr->scr_cfg.scr_width, bmf_copy);
}
예제 #4
0
void
sti_copycols(void *v, int row, int srccol, int dstcol, int ncols)
{
	struct sti_screen *scr = (struct sti_screen *)v;
	struct sti_font *fp = &scr->scr_curfont;

	sti_bmove(scr, srccol * fp->width, row * fp->height, dstcol * fp->width,
	    row * fp->height, fp->height, ncols * fp->width, bmf_copy);
}
예제 #5
0
/*
 * wsdisplay emulops
 */
void
sti_cursor(void *v, int on, int row, int col)
{
	struct sti_screen *scr = (struct sti_screen *)v;
	struct sti_font *fp = &scr->scr_curfont;

	sti_bmove(scr, col * fp->width, row * fp->height, col * fp->width,
	    row * fp->height, fp->height, fp->width, bmf_invert);
}
예제 #6
0
void
sti_erasecols(void *v, int row, int startcol, int ncols, long attr)
{
	struct sti_screen *scr = (struct sti_screen *)v;
	struct sti_font *fp = &scr->scr_curfont;

	sti_bmove(scr, startcol * fp->width, row * fp->height,
	    startcol * fp->width, row * fp->height, fp->height,
	    ncols * fp->width, bmf_clear);
}
예제 #7
0
static int sticon_scroll(struct vc_data *conp, int t, int b, int dir, int count)
{
    struct sti_struct *sti = sticon_sti;

    if (vga_is_gfx)
        return 0;

    sticon_cursor(conp, CM_ERASE);

    switch (dir) {
    case SM_UP:
	sti_bmove(sti, t + count, 0, t, 0, b - t - count, conp->vc_cols);
	sti_clear(sti, b - count, 0, count, conp->vc_cols, conp->vc_video_erase_char);
	break;

    case SM_DOWN:
	sti_bmove(sti, t, 0, t + count, 0, b - t - count, conp->vc_cols);
	sti_clear(sti, t, 0, count, conp->vc_cols, conp->vc_video_erase_char);
	break;
    }

    return 0;
}
예제 #8
0
static void sticon_bmove(struct vc_data *conp, int sy, int sx, 
	int dy, int dx, int height, int width)
{
    if (!width || !height)
	    return;
#if 0
    if (((sy <= p->cursor_y) && (p->cursor_y < sy+height) &&
	(sx <= p->cursor_x) && (p->cursor_x < sx+width)) ||
	((dy <= p->cursor_y) && (p->cursor_y < dy+height) &&
	(dx <= p->cursor_x) && (p->cursor_x < dx+width)))
		sticon_cursor(p, CM_ERASE /*|CM_SOFTBACK*/);
#endif

    sti_bmove(sticon_sti, sy, sx, dy, dx, height, width);
}