+ i=2;
+ while(i<argc) {
+ do {
+ printf("image: %s\n",argv[i]);
+ if((int)k_buf->GetEvent(k_buf,DFB_EVENT(&k_event))!=0) {
+ if(k_event.type==DIET_KEYPRESS) {
+ int a;
+ a=(int)k_event.key_id;
+ if(a==(int)DIKI_ESCAPE) {
+ i=argc;
+ break;
+ }
+ if(a==(int)DIKI_SPACE) {
+ char *pause_txt="paused (press button to continue)";
+ DFBCHECK(font->GetStringWidth(font,pause_txt,-1,&str_width));
+ DFBCHECK(primary->SetColor(primary,0x80,0x80,0xff,0xff));
+ DFBCHECK(primary->DrawString(primary,pause_txt,-1,(screen_width-str_width)/2,screen_height/2,DSTF_LEFT));
+ DFBCHECK(primary->Flip(primary,NULL,DSFLIP_WAITFORSYNC));
+ DFBCHECK(k_buf->Reset(k_buf));
+ DFBCHECK(k_buf->WaitForEvent(k_buf));
+ k_event.key_id=DIKI_A; /* no longer pause! */
+ }
+ if(a==(int)DIKI_LEFT) {
+ i=((i<=3)?2:i-2);
+ k_event.key_id=DIKI_A; /* no longer back key! */
+ break;
+ }
+ }
+ }