4 #define _XFT_NO_COMPAT_ /* no Xft 1 API */
5 #include <X11/Xft/Xft.h>
9 typedef union _RrTextureData RrTextureData;
10 typedef struct _RrAppearance RrAppearance;
11 typedef struct _RrSurface RrSurface;
12 typedef struct _RrFont RrFont;
13 typedef struct _RrTexture RrTexture;
14 typedef struct _RrTextureMask RrTextureMask;
15 typedef struct _RrTextureRGBA RrTextureRGBA;
16 typedef struct _RrTextureText RrTextureText;
17 typedef struct _RrPixmapMask RrPixmapMask;
18 typedef struct _RrInstance RrInstance;
19 typedef struct _RrColor RrColor;
21 typedef guint32 RrPixel32;
22 typedef guint16 RrPixel16;
39 RR_SURFACE_HORIZONTAL,
42 RR_SURFACE_CROSS_DIAGONAL,
60 RrSurfaceColorType grad;
65 RrColor *border_color;
73 RrPixel32 *RrPixel_data;
76 struct _RrTextureText {
86 struct _RrPixmapMask {
87 const RrInstance *inst;
94 struct _RrTextureMask {
99 struct _RrTextureRGBA {
103 /* cached scaled so we don't have to scale often */
109 union _RrTextureData {
120 struct _RrAppearance {
121 const RrInstance *inst;
129 /* cached for internal use */
133 #if (G_BYTE_ORDER == G_BIG_ENDIAN)
134 #define RrDefaultRedOffset 0
135 #define RrDefaultGreenOffset 8
136 #define RrDefaultBlueOffset 16
137 #define RrDefaultAlphaOffset 24
138 #define RrEndian MSBFirst
140 #define RrDefaultAlphaOffset 24
141 #define RrDefaultRedOffset 16
142 #define RrDefaultGreenOffset 8
143 #define RrDefaultBlueOffset 0
144 #define RrEndian LSBFirst
145 #endif /* G_BYTE_ORDER == G_BIG_ENDIAN */
147 RrInstance* RrInstanceNew (Display *display, gint screen);
148 void RrInstanceFree (RrInstance *inst);
150 Display* RrDisplay (const RrInstance *inst);
151 gint RrScreen (const RrInstance *inst);
152 Window RrRootWindow (const RrInstance *inst);
153 Visual* RrVisual (const RrInstance *inst);
154 gint RrDepth (const RrInstance *inst);
155 Colormap RrColormap (const RrInstance *inst);
156 gint RrRedOffset (const RrInstance *inst);
157 gint RrGreenOffset (const RrInstance *inst);
158 gint RrBlueOffset (const RrInstance *inst);
159 gint RrRedShift (const RrInstance *inst);
160 gint RrGreenShift (const RrInstance *inst);
161 gint RrBlueShift (const RrInstance *inst);
162 gint RrRedMask (const RrInstance *inst);
163 gint RrGreenMask (const RrInstance *inst);
164 gint RrBlueMask (const RrInstance *inst);
165 guint RrPseudoBPC (const RrInstance *inst);
166 XColor* RrPseudoColors (const RrInstance *inst);
168 RrColor *RrColorNew (const RrInstance *inst, gint r, gint g, gint b);
169 RrColor *RrColorParse (const RrInstance *inst, gchar *colorname);
170 void RrColorFree (RrColor *in);
172 RrAppearance *RrAppearanceNew (const RrInstance *inst, gint numtex);
173 RrAppearance *RrAppearanceCopy (RrAppearance *a);
174 void RrAppearanceFree (RrAppearance *a);
176 int RrFontMeasureString (const RrFont *f, const gchar *str,
177 gint shadow, gint offset);
178 int RrFontHeight (const RrFont *f, gint shadow, gint offset);
179 int RrFontMaxCharWidth (const RrFont *f);
181 void RrPaint (RrAppearance *l, Window win, gint w, gint h);
182 void RrMinsize (RrAppearance *l, gint *w, gint *h);
184 gboolean RrPixmapToRGBA(const RrInstance *inst,
185 Pixmap pmap, Pixmap mask,
186 gint *w, gint *h, RrPixel32 **data);
188 #endif /*__render_h*/