#ifndef R_DEV_GTK_H #define R_DEV_GTK_H #include #include #include #include #if R_VERSION < R_Version(2, 7, 0) # include # include # include typedef NewDevDesc* pDevDesc; typedef GEDevDesc* pGEDevDesc; typedef R_GE_gcontext* pGEcontext; #endif #include typedef struct { /* R Graphics Parameters */ /* Local device copy so that we can detect */ /* when parameter changes. */ double cex; /* Character expansion */ double srt; /* String rotation */ /* gint bg; */ /* Background */ int fill; int col; gint lty, lwd; /* line params */ /* GTK Driver Specific */ int windowWidth; /* Window width (pixels) */ int windowHeight; /* Window height (pixels) */ gboolean resize; /* Window resized */ GtkWidget *window; /* Graphics frame */ GtkWidget *drawing; /* Drawable window */ GdkPixmap *pixmap; /* Backing store */ GdkGC *wgc; GdkColor gcol_bg; GdkRectangle clip; GdkCursor *gcursor; int fontface; /* Typeface */ int fontsize; /* Size in points */ gboolean usefixed; PangoFont *font; PangoFontDescription *fontdesc; PangoContext *context; /* NOT USED YET */ } gtkDesc; Rboolean GTKDeviceDriver(pDevDesc dd, char *display, double width, double height, double pointsize); Rboolean GTKDeviceFromWidget(pDevDesc dd, char *w, double width, double height, double pointsize); #endif /* ifndef R_DEV_GTK_H */