Re: X11 GC from a GtkDrawingArea?



I did realize this soon after I posted that I was mixing apples and oranges.

Still I need an X Window as well, and not the GdkWindow, an X GC and not the

GdkGC.

There's no methods to get these it seems, but browsing
/usr/include/gdk/gdkx.h
seemed to help.  I found reference to GdkWindowPrivate and GdkGCPrivate..

I think those are what I want.

Thanks,
John

Philip Kendall wrote:

On Mon, Jan 01, 2001 at 06:14:37PM -0500, John Vago wrote:


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.

area->window is a GdkWindow*, not a GC.

Use the gtk_gc_* functions to create a GC (see
http://developer.gnome.org/doc/API/gtk/gtk-graphics-contexts.html)

HTH,

Phil

--
  Philip Kendall <pak ast cam ac uk>
  http://www.srcf.ucam.org/~pak21/

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





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