Hi,
you can try to SetOpacity to the window.

 DFBCHECK (dl->CreateWindow(dl, &dwinconf,&vwindow));
 DFBCHECK(vwindow->SetOpacity(vwindow,0xFF)); //0xFF is visible
 //DFBCHECK(vwindow->Resize(vwindow,480,640));

2008/1/2, [EMAIL PROTECTED] <[EMAIL PROTECTED]>:
> Hello
>
> I am trying to create a window and put a box around it.  Nothing spectacular, 
> the code compiles and runs ok but nothing displays onscreen.  Attached is the 
> code, any ideas what is wrong??
>
> Mark RAder
>
>   DFBSurfaceDescription dsc;
>   DFBDisplayLayerConfig         dscsurf;
>   DFBWindowDescription  dwinconf;
>   IDirectFBDisplayLayer *dl;
>   IDirectFBImageProvider *provider;
>   IDirectFBWindow   *vwindow;
>   IDirectFBSurface  *vsurface;
>
>   DFBCHECK (DirectFBInit (&argc, &argv));
>   DFBCHECK (DirectFBCreate (&dfb));
>   DFBCHECK (dfb->SetCooperativeLevel (dfb, DFSCL_FULLSCREEN));
>   dsc.flags = DSDESC_CAPS;
>   dsc.caps  = DSCAPS_PRIMARY | DSCAPS_FLIPPING;
>   DFBCHECK (dfb->CreateSurface( dfb, &dsc, &primary ));
>   DFBCHECK (primary->GetSize (primary, &screen_width, &screen_height));
>   DFBCHECK (primary->FillRectangle (primary, 0, 0, screen_width, 
> screen_height));
>   DFBCHECK (primary->SetColor (primary, 0x00, 0x00, 0x00, 0x00));
>
>   DFBDisplayLayerCallback   cbdata;
>   void * data;
>   //DFBCHECK( dfb->EnumDisplayLayers(dfb, cbdata, &data));
>   DFBCHECK (dfb->GetDisplayLayer(dfb,1,&dl));
>
>
>   DFBCHECK (dl->CreateWindow(dl, &dwinconf,&vwindow));
>   DFBCHECK(vwindow->GetSurface(vwindow,&vsurface));
>   //DFBCHECK(vwindow->Resize(vwindow,480,640));
>  DFBColor color;
>   color.a = 0x00;
>   color.r = 0x00;
>   color.g = 0x00;
>   color.b = 0x00;
>   vsurface->SetColor (vsurface,color.a,color.r,color.g,color.b);
>   vsurface->DrawRectangle(vsurface,0,0,480,640);
>  vsurface->DrawRectangle(vsurface,1,1,479,639);
>   vsurface->Flip(vsurface,NULL,0);
>  DFBCHECK (primary->Flip (primary, NULL, 0));
>   sleep (5);
>   vwindow->Release (vwindow);
>   vsurface ->Release (vsurface);
>   dl->Release(dl);
>   primary->Release( primary );
>   dfb->Release( dfb );
>   return 0;
> --
> If you think dogs can't count, try putting three dog biscuits in your pocket 
> and then give him only two of them.
> **-Phil Pastoret**
>
> _______________________________________________
> directfb-users mailing list
> [EMAIL PROTECTED]
> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
>

_______________________________________________
directfb-dev mailing list
directfb-dev@directfb.org
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to