SINGODIWIRJO Hermantino wrote: > Hi all, > I have the following problem : > > I am coding a Toolkit/Wmanager with directFB. I got quite an advance > since I already have a bunch of basic widgets working and some test apps > running (Image viewer, Terminal tests windows ..). > I use fusion to share my theme structures between all process but > something troubles me : > Each time I need to draw my windows/widget I have to create surfaces > that I Tile Blit. What I would like to do is rendering once my pictures > on small surfaces that I'd like to share with fusion between all my > process. I couldn't find a way to share a directfb Surface||Window in an > easy way. That is, many > fields of these structures are pointers, dynamically allocated by > directfb. So if I want to do something like : > > IDirectFBWindow *sharedwindow; > sharedwindow = (IdirectFBWindow *) SHALLOC (1,sizeof(IDirectFBWindow)); > CopyToShare (my_created_window, sharedwindow); > //Then publish shared window in my arena > > The CopyToShare function will have to manually allocate all the memory > then memcpy the content from one structure to another .. Quite painfull ..
You're lucky if that would work at all. You can share windows easily by using IDirectFBWindow::GetID() in the creator process and pass that ID to the other process, via SHM or whatever. In the other process you call IDirectFBDisplayLayer::GetWindow() with that ID passed in. Sharing surfaces this way is not possible, but this could be added. -- Best regards, Denis Oliver Kropp .------------------------------------------. | DirectFB - Hardware accelerated graphics | | http://www.directfb.org/ | "------------------------------------------" _______________________________________________ directfb-users mailing list [email protected] http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-users
