-} Appearance;
-
-extern Visual *render_visual;
-extern int render_depth;
-extern Colormap render_colormap;
-
-void (*paint)(Window win, Appearance *l, int x, int y, int w, int h);
-
-void render_startup(void);
-void init_appearance(Appearance *l);
-void x_paint(Window win, Appearance *l, int x, int y, int w, int h);
-void render_shutdown(void);
-Appearance *appearance_new(SurfaceType type, int numtex);
-Appearance *appearance_copy(Appearance *a);
-void appearance_free(Appearance *a);
-void truecolor_startup(void);
+
+ /* cached for internal use */
+ gint w, h;
+};
+
+/* these are the same on all endian machines because it seems to be dependant
+ on the endianness of the gfx card, not the cpu. */
+#define RrDefaultAlphaOffset 24
+#define RrDefaultRedOffset 16
+#define RrDefaultGreenOffset 8
+#define RrDefaultBlueOffset 0
+
+#define RrDefaultFontFamily "arial,sans"
+#define RrDefaultFontSize 8
+#define RrDefaultFontWeight RR_FONTWEIGHT_NORMAL
+#define RrDefaultFontSlant RR_FONTSLANT_NORMAL
+
+RrInstance* RrInstanceNew (Display *display, gint screen);
+void RrInstanceFree (RrInstance *inst);
+
+Display* RrDisplay (const RrInstance *inst);
+gint RrScreen (const RrInstance *inst);
+Window RrRootWindow (const RrInstance *inst);
+Visual* RrVisual (const RrInstance *inst);
+gint RrDepth (const RrInstance *inst);
+Colormap RrColormap (const RrInstance *inst);
+gint RrRedOffset (const RrInstance *inst);
+gint RrGreenOffset (const RrInstance *inst);
+gint RrBlueOffset (const RrInstance *inst);
+gint RrRedShift (const RrInstance *inst);
+gint RrGreenShift (const RrInstance *inst);
+gint RrBlueShift (const RrInstance *inst);
+gint RrRedMask (const RrInstance *inst);
+gint RrGreenMask (const RrInstance *inst);
+gint RrBlueMask (const RrInstance *inst);
+
+RrColor *RrColorNew (const RrInstance *inst, gint r, gint g, gint b);
+RrColor *RrColorParse (const RrInstance *inst, gchar *colorname);
+void RrColorFree (RrColor *in);
+
+gint RrColorRed (const RrColor *c);
+gint RrColorGreen (const RrColor *c);
+gint RrColorBlue (const RrColor *c);
+gulong RrColorPixel (const RrColor *c);
+GC RrColorGC (RrColor *c);
+
+RrAppearance *RrAppearanceNew (const RrInstance *inst, gint numtex);
+RrAppearance *RrAppearanceCopy (RrAppearance *a);
+void RrAppearanceFree (RrAppearance *a);
+void RrAppearanceAddTextures(RrAppearance *a, gint numtex);
+
+RrFont *RrFontOpen (const RrInstance *inst, const gchar *name,
+ gint size, RrFontWeight weight, RrFontSlant slant);
+RrFont *RrFontOpenDefault (const RrInstance *inst);
+void RrFontClose (RrFont *f);
+RrSize *RrFontMeasureString (const RrFont *f, const gchar *str,
+ gint shadow_offset_x, gint shadow_offset_y);
+gint RrFontHeight (const RrFont *f, gint shadow_offset_y);
+gint RrFontMaxCharWidth (const RrFont *f);
+
+/* Paint into the appearance. The old pixmap is returned (if there was one). It
+ is the responsibility of the caller to call XFreePixmap on the return when
+ it is non-null. */
+Pixmap RrPaintPixmap (RrAppearance *a, gint w, gint h);
+void RrPaint (RrAppearance *a, Window win, gint w, gint h);
+void RrMinSize (RrAppearance *a, gint *w, gint *h);
+gint RrMinWidth (RrAppearance *a);
+gint RrMinHeight (RrAppearance *a);
+void RrMargins (RrAppearance *a, gint *l, gint *t, gint *r, gint *b);
+
+gboolean RrPixmapToRGBA(const RrInstance *inst,
+ Pixmap pmap, Pixmap mask,
+ gint *w, gint *h, RrPixel32 **data);
+
+G_END_DECLS
+