Subversion Repositories HelenOS

Rev

Rev 3674 | Rev 4338 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 3674 Rev 4337
Line 103... Line 103...
103
}
103
}
104
 
104
 
105
/** Transparent putchar */
105
/** Transparent putchar */
106
static void tran_putch(char c, int row, int col)
106
static void tran_putch(char c, int row, int col)
107
{
107
{
108
    async_msg_3(fbphone, FB_TRANS_PUTCHAR, c, row, col);
108
    async_msg_3(fbphone, FB_PUTCHAR, c, row, col);
109
}
109
}
110
 
110
 
111
/** Redraw the button showing state of a given console */
111
/** Redraw the button showing state of a given console */
112
static void redraw_state(int consnum)
112
static void redraw_state(int consnum)
113
{
113
{
Line 215... Line 215...
215
}
215
}
216
 
216
 
217
/** Change to kernel console */
217
/** Change to kernel console */
218
void gcons_in_kernel(void)
218
void gcons_in_kernel(void)
219
{
219
{
220
    if (console_state[active_console] == CONS_DISCONNECTED_SEL)
-
 
221
        console_state[active_console] = CONS_DISCONNECTED;
-
 
222
    else
-
 
223
        console_state[active_console] = CONS_IDLE;
-
 
224
    redraw_state(active_console);
-
 
225
 
-
 
226
    if (animation != -1)
220
    if (animation != -1)
227
        async_msg_1(fbphone, FB_ANIM_STOP, animation);
221
        async_msg_1(fbphone, FB_ANIM_STOP, animation);
228
 
222
   
229
    active_console = KERNEL_CONSOLE; /* Set to kernel console */
223
    active_console = KERNEL_CONSOLE;
230
    vp_switch(0);
224
    vp_switch(0);
231
}
225
}
232
 
226
 
233
/** Return x, where left <= x <= right && |a-x|==min(|a-x|) is smallest */
227
/** Return x, where left <= x <= right && |a-x|==min(|a-x|) is smallest */
234
static inline int limit(int a,int left, int right)
228
static inline int limit(int a,int left, int right)
Line 340... Line 334...
340
 
334
 
341
extern char _binary_helenos_ppm_start[0];
335
extern char _binary_helenos_ppm_start[0];
342
extern int _binary_helenos_ppm_size;
336
extern int _binary_helenos_ppm_size;
343
extern char _binary_nameic_ppm_start[0];
337
extern char _binary_nameic_ppm_start[0];
344
extern int _binary_nameic_ppm_size;
338
extern int _binary_nameic_ppm_size;
-
 
339
 
345
/** Redraws console graphics  */
340
/** Redraws console graphics */
346
static void gcons_redraw_console(void)
341
void gcons_redraw_console(void)
347
{
342
{
348
    int i;
343
    int i;
349
 
344
   
350
    if (!use_gcons)
345
    if (!use_gcons)
351
        return;
346
        return;
Line 464... Line 459...
464
 
459
   
465
    rc = async_req_0_2(phone, FB_GET_RESOLUTION, &xres, &yres);
460
    rc = async_req_0_2(phone, FB_GET_RESOLUTION, &xres, &yres);
466
    if (rc)
461
    if (rc)
467
        return;
462
        return;
468
   
463
   
469
    if (xres < 800 || yres < 600)
464
    if ((xres < 800) || (yres < 600))
470
        return;
465
        return;
471
 
466
   
472
    /* create console viewport */
467
    /* create console viewport */
473
    /* Align width & height to character size */
468
    /* Align width & height to character size */
474
    console_vp = vp_create(CONSOLE_MARGIN, CONSOLE_TOP,
469
    console_vp = vp_create(CONSOLE_MARGIN, CONSOLE_TOP,
Line 513... Line 508...
513
    gcons_redraw_console();
508
    gcons_redraw_console();
514
}
509
}
515
 
510
 
516
/** @}
511
/** @}
517
 */
512
 */
518
 
-