Hemant Kumar, Noida-1 schrieb:
> The problem remains...but I have done like this:--
> 
>  
> 
>  
> 
> The sequence of commands which I have used is as follows:--
> 
> Layer->GetDisplayLayer (dfb, layer_id,&layer);
> 
> layer->SetCooperativeLevel(layer,DLSCL_ADMINISTARTIVE);
> 
> layer->SetBackgroundColor(layer,0xff,0xff,0xff,0xff);/*in exclusive
> 
> layer->unable to set background color*/
> 
> layer->SetCooperativeLevel(layer,DLSCL_EXCLUSIVE);
> 
> layer->GetSurface(layer,layer_id,&layer);
> 
> primary->SetColor(primary,0x00,0x00,0xff,0xff);
> 
> primary->DrawRectangle(primary,20,20,200,100);
> 
> primary->Flip(primary,NULL,0);
> 
> layer->EnableCursor(layer,enable);

You're mixing windowed and exclusive access.

Either you access the layer's surface as you already do,
but without using the cursor of the window stack. Or you
rather create a window on the layer and don't use exclusive
and direct surface access.

> rolling the mouse over the rectangle drawn over the layer  deletes it.I 
> have studied the overview document of directfb..is there any other 
> material which can explain me the basic concepts of directfb as due to 
> this only I am facing problems at every step. Can anyone please  tell me 
> the  general flow  how I should proceed for developing the GUI  using 
> these APIs.

You render your custom graphics to the layer's surface, but the windowing
code that you activated by enabling the cursor overdraws yours.

-- 
Best regards,
   Denis Oliver Kropp

.------------------------------------------.
| DirectFB - Hardware accelerated graphics |
| http://www.directfb.org/                 |
"------------------------------------------"

_______________________________________________
directfb-dev mailing list
[email protected]
http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev

Reply via email to