Changeset 1fd7700 in mainline for console/gcons.c


Ignore:
Timestamp:
2006-06-07T14:12:53Z (19 years ago)
Author:
Ondrej Palkovsky <ondrap@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
70178b74
Parents:
b7e9c34
Message:

Added animation to fb, fb running status shown.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • console/gcons.c

    rb7e9c34 r1fd7700  
    7171/** List of pixmaps identifying these icons */
    7272static int ic_pixmaps[CONS_LAST] = {-1,-1,-1,-1,-1,-1};
     73static int animation = -1;
    7374
    7475static int active_console = 0;
     
    320321}
    321322
     323extern char _binary_anim_1_ppm_start[0];
     324extern int _binary_anim_1_ppm_size;
     325extern char _binary_anim_2_ppm_start[0];
     326extern int _binary_anim_2_ppm_size;
     327extern char _binary_anim_3_ppm_start[0];
     328extern int _binary_anim_3_ppm_size;
     329extern char _binary_anim_4_ppm_start[0];
     330extern int _binary_anim_4_ppm_size;
     331static void make_anim(void)
     332{
     333        int an;
     334        int pm;
     335
     336        an = async_req(fbphone, FB_ANIM_CREATE, cstatus_vp[KERNEL_CONSOLE], NULL);
     337        if (an < 0)
     338                return;
     339
     340        pm = make_pixmap(_binary_anim_1_ppm_start, (int)&_binary_anim_1_ppm_size);
     341        async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm);
     342
     343        pm = make_pixmap(_binary_anim_2_ppm_start, (int)&_binary_anim_2_ppm_size);
     344        async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm);
     345
     346        pm = make_pixmap(_binary_anim_3_ppm_start, (int)&_binary_anim_3_ppm_size);
     347        async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm);
     348
     349        pm = make_pixmap(_binary_anim_4_ppm_start, (int)&_binary_anim_4_ppm_size);
     350        async_msg_2(fbphone, FB_ANIM_ADDPIXMAP, an, pm);
     351
     352        async_msg(fbphone, FB_ANIM_START, an);
     353
     354        animation = an;
     355}
     356
    322357extern char _binary_cons_selected_ppm_start[0];
    323358extern int _binary_cons_selected_ppm_size;
     
    333368        int rc;
    334369        int i;
     370        int status_start = STATUS_START;
    335371
    336372        fbphone = phone;
     
    352388       
    353389        /* Create status buttons */
     390        status_start += (xres-800) / 2;
    354391        for (i=0; i < CONSOLE_COUNT; i++) {
    355                 cstatus_vp[i] = vp_create(STATUS_START+CONSOLE_MARGIN+i*(STATUS_WIDTH+STATUS_SPACE),
     392                cstatus_vp[i] = vp_create(status_start+CONSOLE_MARGIN+i*(STATUS_WIDTH+STATUS_SPACE),
    356393                                          STATUS_TOP, STATUS_WIDTH, STATUS_HEIGHT);
    357394                if (cstatus_vp[i] < 0)
     
    373410                                              (int)&_binary_cons_kernel_ppm_size);
    374411        ic_pixmaps[CONS_DISCONNECTED_SEL] = ic_pixmaps[CONS_SELECTED];
     412       
     413        make_anim();
    375414
    376415        use_gcons = 1;
Note: See TracChangeset for help on using the changeset viewer.