I can grab the main window contents using the gdk_pixbuf_get_from_drawable function & then get a pointer to the raw pixels. I guess the way that call is used, creates a pixmap, makes copies of the data etc..etc
Anybody know of a leaner way to grab the pixel data?

--------------------------------------------

In mozilla-1.7.12/widget/src/gtk2/nsWindow.cpp
nsWindow::OnExposeEvent(GtkWidget *aWidget, GdkEventExpose *aEvent)
{
    // copy from surface to pixbuf
GdkPixbuf * pb = gdk_pixbuf_get_from_drawable(NULL, mDrawingarea->inner_window,
                                                  0,
                                                  0,0, 0,0,
                                                  width, height);

    unsigned char *pixels=gdk_pixbuf_get_pixels(pb);


On Thu, 17 Nov 2005 10:34:08 -0800, Jacob Z <[EMAIL PROTECTED]> wrote:


Hi,
I'm embedding mozilla in a linux application & want to read the main display buffer that mozilla uses & convert that to an opengl Texture. Am using the Mozilla-1.7.12/../GtkMozEmbed library.

I see that there are multiple nsRenderingContextGTK instacnes which each all have a part of the page in the offscreen buffer. I'm also looking at nsViewManager which calls refresh on each of the rendering contexts. But so far, i've not found the main/composite buffer that holds the entire page.

Anyone have have any tips?

Thanks



--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
_______________________________________________
mozilla-embedding mailing list
[email protected]
http://mail.mozilla.org/listinfo/mozilla-embedding

Reply via email to