Re: How to convert X Pixmap into GdkPixmap?

2006-02-27 Thread Tristan Van Berkom

Peter Zhelezniakov wrote:

Hello Gtk gurus,

I have an X Display and an X Pixmap associated with that display, both
provided by a third-party library. I'd like to use the Pixmap in a GTK
program by wrapping it into a GdkPixmap structure. More specifically, i want
to use GTK's style functions (like gtk_paint_box) to draw to my Pixmap.


gdk_pixmap_foreign_new() should be what you're looking for.


How do i do that? I guess i need to convert X Display into a GdkDisplay
first -- how? gdk_x11_lookup_xdisplay() gives me NULL -- is that correct?


Use the macros, I think there is one of the form GDK_WINDOW_XDISPLAY().

You should find all of this in the xlib interaction section of the GDK
api reference manual.

Cheers,
-Tristan

___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list


How to convert X Pixmap into GdkPixmap?

2006-02-27 Thread Peter Zhelezniakov
Hello Gtk gurus,

I have an X Display and an X Pixmap associated with that display, both
provided by a third-party library. I'd like to use the Pixmap in a GTK
program by wrapping it into a GdkPixmap structure. More specifically, i want
to use GTK's style functions (like gtk_paint_box) to draw to my Pixmap.

How do i do that? I guess i need to convert X Display into a GdkDisplay
first -- how? gdk_x11_lookup_xdisplay() gives me NULL -- is that correct?

Thanks!
Peter
___
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list