Subversion Repositories HelenOS-historic

Compare Revisions

Ignore whitespace Rev 1558 → Rev 1557

/uspace/trunk/console/gcons.c
99,13 → 99,11
nsend_call_2(fbphone, FB_SET_STYLE, fgcolor, bgcolor);
}
 
/** Transparent putchar */
static void tran_putch(char c, int row, int col)
static void putch(char c, int row, int col)
{
nsend_call_3(fbphone, FB_TRANS_PUTCHAR, c, row, col);
nsend_call_3(fbphone, FB_PUTCHAR, c, row, col);
}
 
/** Redraw the button showing state of a given console */
static void redraw_state(int consnum)
{
char data[5];
119,7 → 117,7
if (state != CONS_DISCONNECTED && state != CONS_KERNEL && state != CONS_DISCONNECTED_SEL) {
snprintf(data, 5, "%d", consnum+1);
for (i=0;data[i];i++)
tran_putch(data[i], 1, 2+i);
putch(data[i], 1, 2+i);
}
}
 
172,7 → 170,6
vp_switch(console_vp);
}
 
/** Notification function called on console connect */
void gcons_notify_connect(int consnum)
{
if (!use_gcons)
241,7 → 238,6
extern int _binary_helenos_ppm_size;
extern char _binary_nameic_ppm_start[0];
extern int _binary_nameic_ppm_size;
/** Redraws console graphics */
static void gcons_redraw_console(void)
{
int i;
256,17 → 252,12
draw_pixmap(_binary_helenos_ppm_start, (size_t)&_binary_helenos_ppm_size, xres-66, 2);
draw_pixmap(_binary_nameic_ppm_start, (size_t)&_binary_nameic_ppm_size, 5, 17);
 
 
for (i=0;i < CONSOLE_COUNT; i++)
redraw_state(i);
vp_switch(console_vp);
}
 
/** Creates a pixmap on framebuffer
*
* @param data PPM data
* @param size PPM data size
* @return Pixmap identification
*/
static int make_pixmap(char *data, int size)
{
char *shm;
/uspace/trunk/console/cons_kernel.ppm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/uspace/trunk/console/cons_has_data.ppm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/uspace/trunk/console/cons_selected.ppm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/uspace/trunk/console/cons_idle.ppm
Cannot display: file marked as a binary type.
svn:mime-type = application/octet-stream
/uspace/trunk/fb/fb.c
266,16 → 266,8
/***************************************************************/
/* Character-console functions */
 
/** Draw character at given position
*
* @param vp Viewport where the character is printed
* @param sx Coordinates of top-left of the character
* @param sy Coordinates of top-left of the character
* @param style Color of the character
* @param transparent If false, print background color
*/
static void draw_glyph(int vp,__u8 glyph, unsigned int sx, unsigned int sy,
style_t style, int transparent)
/** Draw character at given position */
static void draw_glyph(int vp,__u8 glyph, unsigned int sx, unsigned int sy, style_t style)
{
int i;
unsigned int y;
286,7 → 278,7
for (i = 0; i < 8; i++) {
if (glline & (1 << (7 - i)))
putpixel(vp, sx + i, sy + y, style.fg_color);
else if (!transparent)
else
putpixel(vp, sx + i, sy + y, style.bg_color);
}
}
434,9 → 426,8
* @param c Character to print
* @param row Screen position relative to viewport
* @param col Screen position relative to viewport
* @param transparent If false, print background color with character
*/
static void draw_char(int vp, char c, unsigned int row, unsigned int col, style_t style, int transparent)
static void draw_char(int vp, char c, unsigned int row, unsigned int col, style_t style)
{
viewport_t *vport = &viewports[vp];
 
445,7 → 436,7
(vport->cur_col != col || vport->cur_row != row))
invert_char(vp, vport->cur_row, vport->cur_col);
draw_glyph(vp, c, col * COL_WIDTH, row * FONT_SCANLINES, style, transparent);
draw_glyph(vp, c, col * COL_WIDTH, row * FONT_SCANLINES, style);
 
vport->cur_col = col;
vport->cur_row = row;
478,8 → 469,7
continue;
col = i % vport->cols;
row = i / vport->cols;
draw_glyph(vp, data[i].character, col * COL_WIDTH, row * FONT_SCANLINES,
data[i].style, style_same(data[i].style,vport->style));
draw_glyph(vp, data[i].character, col * COL_WIDTH, row * FONT_SCANLINES, data[i].style);
}
cursor_print(vp);
}
788,7 → 778,6
return; /* Exit thread */
 
case FB_PUTCHAR:
case FB_TRANS_PUTCHAR:
c = IPC_GET_ARG1(call);
row = IPC_GET_ARG2(call);
col = IPC_GET_ARG3(call);
798,7 → 787,7
}
ipc_answer_fast(callid,0,0,0);
 
draw_char(vp, c, row, col, vport->style, IPC_GET_METHOD(call) == FB_TRANS_PUTCHAR);
draw_char(vp, c, row, col, vport->style);
continue; /* msg already answered */
case FB_CLEAR:
clear_port(vp);
/uspace/trunk/libc/include/ipc/fb.h
29,6 → 29,4
#define FB_VP2PIXMAP 1043
#define FB_DROP_PIXMAP 1044
 
#define FB_TRANS_PUTCHAR 1045
 
#endif