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
,
62 RrSurfaceColorType grad
;
67 RrColor
*border_color
;
75 RrPixel32
*RrPixel_data
;
78 struct _RrTextureText
{
88 struct _RrPixmapMask
{
89 const RrInstance
*inst
;
96 struct _RrTextureMask
{
101 struct _RrTextureRGBA
{
105 /* cached scaled so we don't have to scale often */
111 union _RrTextureData
{
122 struct _RrAppearance
{
123 const RrInstance
*inst
;
131 /* cached for internal use */
135 #if (G_BYTE_ORDER == G_BIG_ENDIAN)
136 #define RrDefaultRedOffset 0
137 #define RrDefaultGreenOffset 8
138 #define RrDefaultBlueOffset 16
139 #define RrDefaultAlphaOffset 24
140 #define RrEndian MSBFirst
142 #define RrDefaultAlphaOffset 24
143 #define RrDefaultRedOffset 16
144 #define RrDefaultGreenOffset 8
145 #define RrDefaultBlueOffset 0
146 #define RrEndian LSBFirst
147 #endif /* G_BYTE_ORDER == G_BIG_ENDIAN */
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
);
167 guint
RrPseudoBPC (const RrInstance
*inst
);
168 XColor
* RrPseudoColors (const RrInstance
*inst
);
170 RrColor
*RrColorNew (const RrInstance
*inst
, gint r
, gint g
, gint b
);
171 RrColor
*RrColorParse (const RrInstance
*inst
, gchar
*colorname
);
172 void RrColorFree (RrColor
*in
);
174 RrAppearance
*RrAppearanceNew (const RrInstance
*inst
, gint numtex
);
175 RrAppearance
*RrAppearanceCopy (RrAppearance
*a
);
176 void RrAppearanceFree (RrAppearance
*a
);
178 int RrFontMeasureString (const RrFont
*f
, const gchar
*str
,
179 gint shadow
, gint offset
);
180 int RrFontHeight (const RrFont
*f
, gint shadow
, gint offset
);
181 int RrFontMaxCharWidth (const RrFont
*f
);
183 void RrPaint (RrAppearance
*l
, Window win
, gint w
, gint h
);
184 void RrMinsize (RrAppearance
*l
, gint
*w
, gint
*h
);
186 gboolean
RrPixmapToRGBA(const RrInstance
*inst
,
187 Pixmap pmap
, Pixmap mask
,
188 gint
*w
, gint
*h
, RrPixel32
**data
);
190 #endif /*__render_h*/