Skip to content
Prev 1220 / 1236 Next

[R-gui] embedding R in GTK+ (GtkDrawingArea)

Michael Lawrence <lawrence.michael <at> gene.com> writes:
Thank's Michael but I don't understand how to do what you've explained. How
can I change an external pointer (created in C) to be an
GtkDrawingArea using R?

What I've tried so far is:

-1-store the existing GtkDrawingArea* from my app in a DLL callable variable
-2-set up a DrawingArea in R with: DA <- gtkDrawingArea
-3-call the DLL-function with .Call ("R_Interface_get_da", DA )
-4-the DLL-function R_Interface_get_da takes DA as an SEXP and lets it point
to the variable created in step 1 (i.e. my apps DrawingArea).

Doing it that way I thought DA would be an object of the correct class
allready, because I only let it point to some other DrawingArea. But that
doesn't work in conjunction with asCairoDevice.



Thomas