Subversion Repositories HelenOS

Compare Revisions

Ignore whitespace Rev 4210 → Rev 4211

/trunk/uspace/srv/fb/serial_console.c
102,6 → 102,11
putc_function(*(str++));
}
 
void serial_putchar(wchar_t ch)
{
(*putc_function)(ch);
}
 
void serial_goto(const unsigned int row, const unsigned int col)
{
if ((row > scr_height) || (col > scr_width))
256,7 → 261,7
a1 = &field->attrs;
if (!attrs_same(*a0, *a1))
serial_set_attrs(a1);
(*putc_function)(field->character);
serial_putchar(field->character);
a0 = a1;
}
}
276,7 → 281,7
keyfield_t *interbuf = NULL;
size_t intersize = 0;
 
char c;
wchar_t c;
int col, row, w, h;
int fgcolor;
int bgcolor;
343,7 → 348,7
serial_goto(row, col);
lastcol = col + 1;
lastrow = row;
(*putc_function)(c);
serial_putchar(c);
retval = 0;
break;
case FB_CURSOR_GOTO:
/trunk/uspace/srv/fb/fb.c
97,7 → 97,7
 
/** Backbuffer character cell. */
typedef struct {
uint8_t glyph;
uint32_t glyph;
uint32_t fg_color;
uint32_t bg_color;
} bb_cell_t;
194,9 → 194,9
ipcarg_t bg_color, ipcarg_t attr);
 
static void draw_glyph_aligned(unsigned int x, unsigned int y, bool cursor,
uint8_t *glyphs, uint8_t glyph, uint32_t fg_color, uint32_t bg_color);
uint8_t *glyphs, uint32_t glyph, uint32_t fg_color, uint32_t bg_color);
static void draw_glyph_fallback(unsigned int x, unsigned int y, bool cursor,
uint8_t *glyphs, uint8_t glyph, uint32_t fg_color, uint32_t bg_color);
uint8_t *glyphs, uint32_t glyph, uint32_t fg_color, uint32_t bg_color);
 
static void draw_vp_glyph(viewport_t *vport, bool cursor, unsigned int col,
unsigned int row);
659,7 → 659,7
* @param bg_color Backgroudn color.
*/
static void draw_glyph_aligned(unsigned int x, unsigned int y, bool cursor,
uint8_t *glyphs, uint8_t glyph, uint32_t fg_color, uint32_t bg_color)
uint8_t *glyphs, uint32_t glyph, uint32_t fg_color, uint32_t bg_color)
{
unsigned int i, yd;
unsigned long fg_buf, bg_buf;
667,6 → 667,10
unsigned long mask;
unsigned int ww, d_add;
 
/* Check glyph range. */
if (glyph >= FONT_GLYPHS)
return;
 
/*
* Prepare a pair of words, one filled with foreground-color
* pattern and the other filled with background-color pattern.
678,7 → 682,6
bg_color);
}
 
 
/* Pointer to the current position in the mask. */
maskp = (unsigned long *) &glyphs[GLYPH_POS(glyph, 0, cursor)];
 
720,7 → 723,7
* @param bg_color Backgroudn color.
*/
void draw_glyph_fallback(unsigned int x, unsigned int y, bool cursor,
uint8_t *glyphs, uint8_t glyph, uint32_t fg_color, uint32_t bg_color)
uint8_t *glyphs, uint32_t glyph, uint32_t fg_color, uint32_t bg_color)
{
unsigned int i, j, yd;
uint8_t fg_buf[4], bg_buf[4];
728,6 → 731,10
unsigned int d_add;
uint8_t b;
 
/* Check glyph range. */
if (glyph >= FONT_GLYPHS)
return;
 
/* Pre-render 1x the foreground and background color pixels. */
if (cursor) {
screen.rgb_conv(fg_buf, bg_color);
779,7 → 786,7
unsigned int x = vport->x + COL2X(col);
unsigned int y = vport->y + ROW2Y(row);
 
uint8_t glyph;
uint32_t glyph;
uint32_t fg_color;
uint32_t bg_color;
836,7 → 843,7
* @param row Screen position relative to viewport
*
*/
static void draw_char(viewport_t *vport, uint8_t c, unsigned int col, unsigned int row)
static void draw_char(viewport_t *vport, wchar_t c, unsigned int col, unsigned int row)
{
bb_cell_t *bbp;
 
846,7 → 853,7
cursor_hide(vport);
 
bbp = &vport->backbuf[BB_POS(vport, col, row)];
bbp->glyph = c;
bbp->glyph = (uint32_t) c;
bbp->fg_color = vport->attr.fg_color;
bbp->bg_color = vport->attr.bg_color;
 
889,7 → 896,7
unsigned int row = y + j;
 
bbp = &vport->backbuf[BB_POS(vport, col, row)];
uint8_t glyph = bbp->glyph;
uint32_t glyph = bbp->glyph;
 
a = &data[j * w + i].attrs;
rgb_from_attr(&rgb, a);
1510,7 → 1517,7
int retval;
unsigned int i;
int scroll;
uint8_t glyph;
uint32_t glyph;
unsigned int row, col;
if ((vport->cursor_active) || (anims_enabled))