int main( int argc, char *argv[] ) { int i; DFBResult ret; IDirectFB *dfb; IDirectFBDisplayLayer *layer = NULL; App apps[1]; DFBDisplayLayerConfig config; /* Parse arguments. */ for (i=1; i<argc; i++) { if (!strcmp( argv[i], "-h" )) return show_usage( argv[0] ); } /* Initialize DirectFB. */ ret = DirectFBInit( &argc, &argv ); if (ret) { D_DERROR( ret, "DFBTest/WindowFlip: DirectFBInit() failed!\n" ); return ret; } /* Create super interface. */ ret = DirectFBCreate( &dfb ); if (ret) { D_DERROR( ret, "DFBTest/WindowFlip: DirectFBCreate() failed!\n" ); return ret; } /* Get primary layer. */ ret = dfb->GetDisplayLayer( dfb, DLID_PRIMARY, &layer ); if (ret) { D_DERROR( ret, "DFBTest/WindowFlip: IDirectFB::GetDisplayLayer( PRIMARY ) failed!\n" ); goto out; } layer->GetConfiguration( layer, &config ); app_init( &apps[0], layer, 100, 50, config.width-300, config.height-150, 0 ); while (true) { direct_thread_sleep( 1000000 ); app_update( &apps[0] ); } out: /* Shutdown DirectFB. */ dfb->Release( dfb ); return ret; }
void wd_set_update(wd_upd_type type, const char *fname1, const char *fname2) { WINDOW *w = xw_first(); while (w != NULL) { if (xw_type(w) == DIR_WIND) ((ITM_WINDOW *) w)->itm_func->wd_set_update(w, type, fname1, fname2); w = xw_next(); } ((ITM_WINDOW *) desk_window)->itm_func->wd_set_update(desk_window, type, fname1, fname2); app_update(type, fname1, fname2); }