4 #define _XFT_NO_COMPAT_ /* no Xft 1 API */
5 #include <X11/Xlib.h> /* some platforms dont include this as needed for Xft */
6 #include <X11/Xft/Xft.h>
10 typedef union _RrTextureData RrTextureData
;
11 typedef struct _RrAppearance RrAppearance
;
12 typedef struct _RrSurface RrSurface
;
13 typedef struct _RrFont RrFont
;
14 typedef struct _RrTexture RrTexture
;
15 typedef struct _RrTextureMask RrTextureMask
;
16 typedef struct _RrTextureRGBA RrTextureRGBA
;
17 typedef struct _RrTextureText RrTextureText
;
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
,
61 RrSurfaceColorType grad
;
66 RrColor
*border_color
;
74 RrPixel32
*pixel_data
;
77 struct _RrTextureText
{
84 struct _RrPixmapMask
{
85 const RrInstance
*inst
;
92 struct _RrTextureMask
{
97 struct _RrTextureRGBA
{
101 /* cached scaled so we don't have to scale often */
107 union _RrTextureData
{
118 struct _RrAppearance
{
119 const RrInstance
*inst
;
127 /* cached for internal use */
131 /* these are the same on all endian machines because it seems to be dependant
132 on the endianness of the gfx card, not the cpu. */
133 #define RrDefaultAlphaOffset 24
134 #define RrDefaultRedOffset 16
135 #define RrDefaultGreenOffset 8
136 #define RrDefaultBlueOffset 0
138 RrInstance
* RrInstanceNew (Display
*display
, gint screen
);
139 void RrInstanceFree (RrInstance
*inst
);
141 Display
* RrDisplay (const RrInstance
*inst
);
142 gint
RrScreen (const RrInstance
*inst
);
143 Window
RrRootWindow (const RrInstance
*inst
);
144 Visual
* RrVisual (const RrInstance
*inst
);
145 gint
RrDepth (const RrInstance
*inst
);
146 Colormap
RrColormap (const RrInstance
*inst
);
147 gint
RrRedOffset (const RrInstance
*inst
);
148 gint
RrGreenOffset (const RrInstance
*inst
);
149 gint
RrBlueOffset (const RrInstance
*inst
);
150 gint
RrRedShift (const RrInstance
*inst
);
151 gint
RrGreenShift (const RrInstance
*inst
);
152 gint
RrBlueShift (const RrInstance
*inst
);
153 gint
RrRedMask (const RrInstance
*inst
);
154 gint
RrGreenMask (const RrInstance
*inst
);
155 gint
RrBlueMask (const RrInstance
*inst
);
156 guint
RrPseudoBPC (const RrInstance
*inst
);
157 XColor
* RrPseudoColors (const RrInstance
*inst
);
159 RrColor
*RrColorNew (const RrInstance
*inst
, gint r
, gint g
, gint b
);
160 RrColor
*RrColorParse (const RrInstance
*inst
, gchar
*colorname
);
161 void RrColorFree (RrColor
*in
);
163 gint
RrColorRed (const RrColor
*c
);
164 gint
RrColorGreen (const RrColor
*c
);
165 gint
RrColorBlue (const RrColor
*c
);
166 gulong
RrColorPixel (const RrColor
*c
);
168 RrAppearance
*RrAppearanceNew (const RrInstance
*inst
, gint numtex
);
169 RrAppearance
*RrAppearanceCopy (RrAppearance
*a
);
170 void RrAppearanceFree (RrAppearance
*a
);
172 int RrFontMeasureString (const RrFont
*f
, const gchar
*str
);
173 int RrFontHeight (const RrFont
*f
);
174 int RrFontMaxCharWidth (const RrFont
*f
);
176 void RrPaint (RrAppearance
*l
, Window win
, gint w
, gint h
);
177 void RrMinsize (RrAppearance
*l
, gint
*w
, gint
*h
);
179 gboolean
RrPixmapToRGBA(const RrInstance
*inst
,
180 Pixmap pmap
, Pixmap mask
,
181 gint
*w
, gint
*h
, RrPixel32
**data
);
183 #endif /*__render_h*/