Home | History | Annotate | Download | only in dev

Lines Matching refs:scr

505 	adccscr_t  * scr;
507 scr = screen;
509 if (row < 0 || col < 0 || row >= scr->nrows || col >= scr->ncols)
512 amidisplaycc_cursor_undraw(scr);
515 scr->cursorrow = row;
516 scr->cursorcol = col;
517 amidisplaycc_cursor_draw(scr);
519 scr->cursorrow = -1;
520 scr->cursorcol = -1;
525 amidisplaycc_cursor_undraw(struct amidisplaycc_screen * scr)
527 if (scr->cursordrawn) {
528 amidisplaycc_cursor_xor(scr, scr->cursorrow, scr->cursorcol);
529 scr->cursordrawn = 0;
534 amidisplaycc_cursor_draw(struct amidisplaycc_screen * scr)
536 if (!scr->cursordrawn && scr->cursorrow >= 0 && scr->cursorcol >= 0) {
537 amidisplaycc_cursor_xor(scr, scr->cursorrow, scr->cursorcol);
538 scr->cursordrawn = 1;
543 amidisplaycc_cursor_xor(struct amidisplaycc_screen * scr, int row, int col)
548 KASSERT(scr);
552 dst = scr->planes[0];
553 dst += row * scr->rowbytes;
556 for (i = scr->fontheight ; i > 0 ; i--) {
558 dst += scr->linebytes;
582 adccscr_t * scr;
603 scr = screen;
605 if (row < 0 || col < 0 || row >= scr->nrows || col >= scr->ncols)
614 fgcolor = scr->colormap[fgcolor];
615 bgcolor = scr
626 fontreal = scr->wsfont->data;
627 fontlow = scr->wsfont->firstchar;
628 fonthigh = fontlow + scr->wsfont->numchars - 1;
630 fontheight = uimin(scr->fontheight, scr->wsfont->fontheight);
631 depth = scr->depth;
632 linebytes = scr->linebytes;
638 fontreal += scr->wsfont->fontheight * (ch - fontlow);
640 bmapoffset = row * scr->rowbytes + col;
642 scr->rowmasks[row] |= fgcolor | bgcolor;
645 dst = scr->planes[plane] + bmapoffset;
704 adccscr_t * scr;
715 scr = screen;
717 if (srccol < 0 || srccol + ncols > scr->ncols ||
718 dstcol < 0 || dstcol + ncols > scr->ncols ||
719 row < 0 || row >= scr->nrows)
722 depth = scr->depth;
723 linebytes = scr->linebytes;
724 bmapoffset = row * scr->rowbytes;
727 src = scr->planes[plane] + bmapoffset;
729 for (j = 0 ; j < scr->fontheight ; j++) {
756 adccscr_t * scr;
767 scr = screen;
769 if (row < 0 || row >= scr->nrows ||
770 startcol < 0 || startcol + ncols > scr->ncols)
773 depth = scr->depth;
774 linebytes = scr->linebytes;
775 bmapoffset = row * scr->rowbytes + startcol;
779 bgcolor = scr->colormap[bgcolor];
785 dst = scr->planes[plane] + bmapoffset;
787 for (j = 0 ; j < scr->fontheight ; j++) {
801 adccscr_t * scr;
821 scr = screen;
823 if (srcrow < 0 || srcrow + nrows > scr->nrows ||
824 dstrow < 0 || dstrow + nrows > scr->nrows)
827 depth = scr->depth;
829 widthbytes = scr->widthbytes;
830 rowbytes = scr->rowbytes;
831 linebytes = scr->linebytes;
832 fontheight = scr->fontheight;
860 srcmask = scr->rowmasks[srcrow];
861 dstmask = scr->rowmasks[dstrow];
862 scr->rowmasks[dstrow] = srcmask;
872 src = scr->planes[plane] + srcbmapoffset;
873 dst = scr->planes[plane] + dstbmapoffset;
898 dst = scr->planes[plane] + dstbmapoffset;
929 adccscr_t * scr;
945 scr = screen;
947 if (row < 0 || row + nrows > scr->nrows)
949 amidisplaycc_cursor_undraw(scr);
951 depth = scr->depth;
952 widthbytes = scr->widthbytes;
953 linebytes = scr->linebytes;
954 rowbytes = scr->rowbytes;
964 bgcolor = scr->colormap[bgcolor];
967 scr->rowmasks[row+j] = bgcolor;
970 dst = scr->planes[plane] + bmapoffset;
977 for (j = 0 ; j < scr->fontheight * nrows ; j++) {
984 amidisplaycc_cursor_draw(scr);
995 adccscr_t * scr;
1000 scr = screen;
1001 maxcolor = (1 << scr->view->bitmap->depth) - 1;
1251 struct amidisplaycc_screen * scr;
1296 scr = &amidisplaycc_consolescreen;
1297 if (scr->isconsole)
1300 scr->isconsole = 1;
1302 scr = malloc(sizeof(adccscr_t), M_DEVBUF, M_WAITOK|M_ZERO);
1305 scr->view = view;
1307 scr->ncols = screenp->ncols;
1308 scr->nrows = screenp->nrows;
1311 scr->width = dimension.width;
1312 scr->height = dimension.height;
1313 scr->depth = depth;
1314 scr->widthbytes = view->bitmap->bytes_per_row;
1315 scr->linebytes = scr->widthbytes + view->bitmap->row_mod;
1316 scr->rowbytes = scr->linebytes * fontheight;
1318 scr->device = adp;
1330 scr->wsfont = NULL;
1331 scr->wsfontcookie = -1;
1332 scr->fontwidth = fontwidth;
1333 scr->fontheight = fontheight;
1336 amidisplaycc_setfont(scr, NULL);
1338 if (scr->wsfont == NULL)
1340 scr->wsfont = amidisplaycc_getbuiltinfont();
1341 scr->wsfontcookie = -1;
1344 KASSERT(scr->wsfont);
1345 KASSERT(scr->wsfont->stride == 1);
1348 scr->planes[i] = view->bitmap->plane[i];
1352 scr->rowmasks[i] = 0;
1356 scr->colormap[i] = i;
1370 scr->colormap[i] = j;
1371 scr->colormap[j] = i;
1379 amidisplaycc_setemulcmap(scr, &pal2);
1381 amidisplaycc_setemulcmap(scr, &pal4);
1383 amidisplaycc_setemulcmap(scr, &pal8);
1385 *cookiep = scr;
1388 scr->cursorrow = -1;
1389 scr->cursorcol = -1;
1392 amidisplaycc_cursor(scr, 1, *curxp, *curyp);
1398 grf_display_view(scr->view);
1405 scr->wsfont->name);
1419 struct amidisplaycc_screen * scr;
1422 scr = screen;
1425 if (scr == NULL)
1429 if (scr->wsfont && scr->wsfontcookie != -1)
1430 wsfont_unlock(scr->wsfontcookie);
1431 scr->wsfont = NULL;
1432 scr->wsfontcookie = -1;
1434 if (adp->currentscreen == scr)
1437 if (scr->view)
1438 grf_free_view(scr->view);
1439 scr->view = NULL;
1442 if (scr != &amidisplaycc_consolescreen) {
1443 free(scr, M_DEVBUF);
1456 adccscr_t *scr;
1460 scr = screen;
1466 if (scr == NULL) {
1467 dprintf("amidisplaycc_show_screen: scr==NULL\n");
1476 adp->currentscreen = scr;
1479 grf_display_view(scr->view);
1494 struct amidisplaycc_screen * scr __diagused;
1497 scr = cookie;
1500 KASSERT(scr);
1512 return amidisplaycc_setfont(scr, font->name);
1638 amidisplaycc_setemulcmap(struct amidisplaycc_screen *scr,
1661 tmpcmap.count = 1 << scr->depth;
1666 rc = amidisplaycc_getcmap(scr->view, &tmpcmap);
1672 tmpcmap.red [ scr->colormap[ i ] ] = cmap->red [ i ];
1673 tmpcmap.green [ scr->colormap[ i ] ] = cmap->green [ i ];
1674 tmpcmap.blue [ scr->colormap[ i ] ] = cmap->blue [ i ];
1677 rc = amidisplaycc_setcmap(scr->view, &tmpcmap);
1867 amidisplaycc_setfont(struct amidisplaycc_screen *scr, const char *fontname)
1872 KASSERT(scr);
1875 scr->fontwidth,
1876 scr->fontheight,
1891 if (scr->wsfont && scr->wsfontcookie != -1)
1892 wsfont_unlock(scr->wsfontcookie);
1894 scr->wsfont = wsfont;
1895 scr->wsfontcookie = wsfontcookie;