4 #include <X11/Xlib.h> /* some platforms dont include this as needed for Xft */
5 #define _XFT_NO_COMPAT_ /* no Xft 1 API */
6 #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 _RrTextureLineArt RrTextureLineArt
;
18 typedef struct _RrPixmapMask RrPixmapMask
;
19 typedef struct _RrInstance RrInstance
;
20 typedef struct _RrColor RrColor
;
22 typedef guint32 RrPixel32
;
23 typedef guint16 RrPixel16
;
40 RR_SURFACE_HORIZONTAL
,
43 RR_SURFACE_CROSS_DIAGONAL
,
62 RrSurfaceColorType grad
;
67 RrColor
*border_color
;
70 RrColor
*interlace_color
;
76 RrPixel32
*pixel_data
;
79 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 struct _RrTextureLineArt
{
117 union _RrTextureData
{
121 RrTextureLineArt lineart
;
129 struct _RrAppearance
{
130 const RrInstance
*inst
;
138 /* cached for internal use */
142 /* these are the same on all endian machines because it seems to be dependant
143 on the endianness of the gfx card, not the cpu. */
144 #define RrDefaultAlphaOffset 24
145 #define RrDefaultRedOffset 16
146 #define RrDefaultGreenOffset 8
147 #define RrDefaultBlueOffset 0
149 RrInstance
* RrInstanceNew (Display
*display
, gint screen
);
150 void RrInstanceFree (RrInstance
*inst
);
152 Display
* RrDisplay (const RrInstance
*inst
);
153 gint
RrScreen (const RrInstance
*inst
);
154 Window
RrRootWindow (const RrInstance
*inst
);
155 Visual
* RrVisual (const RrInstance
*inst
);
156 gint
RrDepth (const RrInstance
*inst
);
157 Colormap
RrColormap (const RrInstance
*inst
);
158 gint
RrRedOffset (const RrInstance
*inst
);
159 gint
RrGreenOffset (const RrInstance
*inst
);
160 gint
RrBlueOffset (const RrInstance
*inst
);
161 gint
RrRedShift (const RrInstance
*inst
);
162 gint
RrGreenShift (const RrInstance
*inst
);
163 gint
RrBlueShift (const RrInstance
*inst
);
164 gint
RrRedMask (const RrInstance
*inst
);
165 gint
RrGreenMask (const RrInstance
*inst
);
166 gint
RrBlueMask (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 gint
RrColorRed (const RrColor
*c
);
173 gint
RrColorGreen (const RrColor
*c
);
174 gint
RrColorBlue (const RrColor
*c
);
175 gulong
RrColorPixel (const RrColor
*c
);
176 GC
RrColorGC (RrColor
*c
);
178 RrAppearance
*RrAppearanceNew (const RrInstance
*inst
, gint numtex
);
179 RrAppearance
*RrAppearanceCopy (RrAppearance
*a
);
180 void RrAppearanceFree (RrAppearance
*a
);
182 int RrFontMeasureString (const RrFont
*f
, const gchar
*str
);
183 int RrFontHeight (const RrFont
*f
);
184 int RrFontMaxCharWidth (const RrFont
*f
);
186 void RrPaint (RrAppearance
*a
, Window win
, gint w
, gint h
);
187 void RrMinsize (RrAppearance
*a
, gint
*w
, gint
*h
);
188 void RrMargins (RrAppearance
*a
, gint
*l
, gint
*t
, gint
*r
, gint
*b
);
190 gboolean
RrPixmapToRGBA(const RrInstance
*inst
,
191 Pixmap pmap
, Pixmap mask
,
192 gint
*w
, gint
*h
, RrPixel32
**data
);
194 #endif /*__render_h*/