> Hi,
> I think that you can find the dfb_window through the lite_window,the 
> structure of the lite_window including one member called window,it's 
> type is dfb_window , you can use RaiseToTop method and so on
> example:
> lite_window->window->RaiseToTop(lite_window->window)
> This is the method I used to make the window to top
> 
> greets
> young

Hi, my code is now 

static IDirectFB *dfb = NULL;
static IDirectFBSurface *primary = NULL;
static int screen_width  = 0;
static int screen_height = 0;
#define DFBCHECK(x...)                                         \
  {                                                            \
    DFBResult err = x;                                         \
                                                               \
    if (err != DFB_OK)                                         \
      {                                                        \
        fprintf( stderr, "%s <%d>:\n\t", __FILE__, __LINE__ ); \
        DirectFBErrorFatal( #x, err );                         \
      }                                                        \
  }

int main (int argc, char **argv)
{

        if (lite_open( &argc, &argv ))
          return 1;

        DirectFBCreate (&dfb);
        DFBSurfaceDescription dsc;
        LiteWindow     *lite_window;
        DFBRectangle    rect;
        LiteImage *image;

        IDirectFBDisplayLayer *layer;
        DFBDisplayLayerConfig layer_config;
        DFBCHECK(dfb->GetDisplayLayer(dfb, DLID_PRIMARY, &layer));
        layer->SetCooperativeLevel(layer, DLSCL_ADMINISTRATIVE);
        layer->GetConfiguration(layer, &layer_config);
        layer->EnableCursor (layer, 1);
        layer->SetBackgroundImage ( layer, primary);
        layer->SetBackgroundMode (layer, DLBM_IMAGE);
        
        rect.x = 100;rect.y = 100;rect.w = 50;rect.h = 50;

        
lite_new_window(layer,&rect,DWCAPS_ALPHACHANNEL,liteNoWindowTheme,"test",&lite_window
 );

        rect.x = 0; rect.y = 0; rect.w = 50; rect.h = 50;
        lite_new_image(LITE_BOX(lite_window), &rect, liteDefaultImageTheme, 
&image);
        lite_load_image( image, "about.png" );

        lite_window->window->RaiseToTop (lite_window->window);
        lite_set_window_opacity( lite_window, liteFullWindowOpacity );  
        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->Flip (primary, NULL, DSFLIP_WAITFORSYNC));
        lite_window_event_loop( lite_window, 0 );
}

There are no warnings while compiling. If i start the program, it shows me only 
the primary surface.
When i comment -- DFBCHECK (primary->Flip (primary, NULL, DSFLIP_WAITFORSYNC)); 
--- out, 
to see if the window is existing, it isn't. Have you got any idea?

greets
____________________________________________________________________
Psssst! Schon vom neuen WEB.DE MultiMessenger gehört? 
Der kann`s mit allen: http://www.produkte.web.de/messenger/?did=3123

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

Reply via email to