X11 GC from a GtkDrawingArea?



 

Hi all.
I'm new to X11 and GNOME/Gtk, and have the "GNOME/GTK+ Programming Bible" by Arthur
Griffith.

I have some open source that creates and draws to an X11 Window.  I'm trying to modify  it to
draw on an drawing area  in an applet.

The 'legacy' code creates a window using  XCreateSimpleWindow() and the GC from XCreateGC().
It then does an XCopyArea using the GC.

 I'm using GtkWidget area = gtk_drawing_area_new() and thought that using  area->window would work
as the GC.  I'm trying to 'plug-in' the applet code without rewriting all the low level X code that's there.

I only get a warning about incompatible pointer types when assigning the area-> window to a GC.  It runs, but no drawing.
The API docs at http://developer.gnome.org/doc/API/gtk/gtkdrawingarea.html say nothing about GCs nor
anwhere in GtkWidget or GtkObject.

Any ideas would be appreciated.

Thanks,
John.
 



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