]> Dogcows Code - chaz/openbox/blobdiff - render/render.h
change the menu plugin interface, no need for the create/destroy functions any more.
[chaz/openbox] / render / render.h
index 30bf484698e8ae3cc021f0cd4c002b891926c36c..3ddde716ee42b6ec8f0cfb8bc08a658f8ab267b8 100644 (file)
@@ -1,9 +1,9 @@
 #ifndef __render_h
 #define __render_h
 
+#include <X11/Xlib.h> /* some platforms dont include this as needed for Xft */
 #define _XFT_NO_COMPAT_ /* no Xft 1 API */
 #include <X11/Xft/Xft.h>
-#include <X11/Xlib.h>
 #include <glib.h>
 
 typedef union  _RrTextureData      RrTextureData;
@@ -40,8 +40,6 @@ typedef enum {
     RR_SURFACE_VERTICAL,
     RR_SURFACE_DIAGONAL,
     RR_SURFACE_CROSS_DIAGONAL,
-    RR_SURFACE_PIPECROSS,
-    RR_SURFACE_RECTANGLE,
     RR_SURFACE_PYRAMID
 } RrSurfaceColorType;
 
@@ -72,15 +70,12 @@ struct _RrSurface {
     RrAppearance *parent;
     gint parentx;
     gint parenty;
-    RrPixel32 *RrPixel_data;
+    RrPixel32 *pixel_data;
 };
 
 struct _RrTextureText {
     RrFont *font;
     RrJustify justify;
-    gint shadow;
-    gchar tint;
-    guchar offset;
     RrColor *color;
     gchar *string;
 };
@@ -132,6 +127,13 @@ struct _RrAppearance {
     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
+
 RrInstance* RrInstanceNew (Display *display, gint screen);
 void        RrInstanceFree (RrInstance *inst);
 
@@ -157,10 +159,19 @@ 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);
+
 RrAppearance *RrAppearanceNew  (const RrInstance *inst, gint numtex);
 RrAppearance *RrAppearanceCopy (RrAppearance *a);
 void          RrAppearanceFree (RrAppearance *a);
 
+int RrFontMeasureString (const RrFont *f, const gchar *str);
+int RrFontHeight        (const RrFont *f);
+int RrFontMaxCharWidth  (const RrFont *f);
+
 void RrPaint   (RrAppearance *l, Window win, gint w, gint h);
 void RrMinsize (RrAppearance *l, gint *w, gint *h);
 
This page took 0.021139 seconds and 4 git commands to generate.