Re: interface Gdk::Pixbuf with normal X Window



On Mon, Nov 29, 2004 at 23:49:50 -0500, Carl Nygard wrote:
> What do I need to do to get Gdk::Pixbuf to render to a normal X Window,
> say one created by normal Xlib or OpenMotif?

You can't interact directly with X Windows. You have to wrap them in Gdk
windows. There is a function for it somewhere in the appropriate
gdk_x11_*. I am not sure whether it is bound in C++ or whether you'll
have to go to the C interface directly (it is an internal interface).

Once you have Gdk::Window, you can simply render the pixbuf there, since
Gdk::Window is a drawable.

> How easy/possible is this?  I didn't see anything relevant in the docs,
> am I going to have to do this in C?

You may need to use C for wrapping your X window in a Gdk window. Look
around in Gdk and Gdk/X11 documentation. The function is something like
gdk_window_forwigm or gdk_window_new_from_foreign or somesuch (it may
have the gdk_x11_ prefix, too).

-------------------------------------------------------------------------------
						 Jan 'Bulb' Hudec <bulb ucw cz>

Attachment: signature.asc
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]