The objects in RGtk2 (and cairoDevice) are externalptr objects in R. One
approach would be to create an externalptr in C, and then call some R code
that sets the class attribute accordingly, i.e., to the result of
gTypeGetAncestors("GtkDrawingArea"), and then calls asCairoDevice() on that
object.

Michael



On Mon, Sep 9, 2013 at 5:24 PM, Thomas Glogowski <thomas.glogowski@rub.de>wrote:

> Greetings,
>
> im trying to show a simple plot-window in a GtkDrawingArea of a GTK3+
> app. I thought it would be possible to use the CairoDevice-Package and
> hand the DrawingArea generated in my GTK-App via a DLL over to the
> CairoDeviceDriver, but I was unable to figure out, how.
> As far as I understand a call to the DLL via ".C" does not work, because
> a DrawingArea is not a basic C-Type.
> Using ".Call" (even for simple test calls without transferring
> parameters) always end up in a crash to RGUI. Registering my
> DLL-transfer-function (I'm not sure wether this is necessary or not)
> doesn't work either, because I lack the necessary lib-files to compile
> the register-function (I'm using VS2010). The entire project is based on
> VS2010 so using the RTools and gcc to build R from source to obtain the
> lib-files is no option.
>
> Any hints are greatly appreciated.
>
> kind regards, Thomas
>
> _______________________________________________
> R-SIG-GUI mailing list
> R-SIG-GUI@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-gui
>

	[[alternative HTML version deleted]]

