2009/4/16 Diego Jacobi <jacobidiego@xxxxxxxxx>: > Is it possible to draw all GTK stuff inside a Clutter surface? And the > get the clutter instance from any widget or DrawingArea. > > I want to try to develop some widgets with 3D animation (if available) > (like transitions in a tabbed browsing), and i have read that Clutter > cant create more than one Clutter-Gtk per window. > > So i am guessing if there is some sort of feature to enable to draw > GTK completely inside of a Clutter window, and the widgets with its > own animation will create its own surface. > > If not, maybe there is some method to not create a window with GTK, > and call an event with the image result and then paint it to Clutter. > I have managed to get the screenshot of only the application, this is called "offscreen rendering". But i cant get the parent window hiden. If i hide the widget, i get a NULL image. So it doesnt work, if the widget is not shown. Is it possible to create a TopLevel Window that acts as a parent but draws everything to a PixBuf ? I clearly not a GTK internals expert, but cant a GdkPixBuf be a GdkVisual?, or a Screen, or whatever that emplies the dest. device? And on each redraw or update, call an update event with a pointer to that object and the updated rect. /*Code to take screenshots*/ GdkColormap* colormap; GdkPixmap* pixmap; GdkPixbuf* pixbuf; GError *error = NULL; //gtk_widget_hide(win); pixmap= gtk_widget_get_snapshot(win, NULL); // works if obscured colormap = gdk_drawable_get_colormap(pixmap); pixbuf = gdk_pixbuf_get_from_drawable( NULL, GDK_DRAWABLE(pixmap), NULL, 0, 0, 0, 0, -1, -1); gdk_pixbuf_save (pixbuf, "/home/diego/Desktop/test.png", "png", &error, NULL); if (error) g_print("Error: %s\n", error->message); _______________________________________________ gtk-list mailing list gtk-list@xxxxxxxxx http://mail.gnome.org/mailman/listinfo/gtk-list