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
{
83 struct _RrPixmapMask
{
84 const RrInstance
*inst
;
91 struct _RrTextureMask
{
96 struct _RrTextureRGBA
{
100 /* cached scaled so we don't have to scale often */
106 union _RrTextureData
{
117 struct _RrAppearance
{
118 const RrInstance
*inst
;
126 /* cached for internal use */
130 #if (G_BYTE_ORDER == G_BIG_ENDIAN)
131 #define RrDefaultRedOffset 0
132 #define RrDefaultGreenOffset 8
133 #define RrDefaultBlueOffset 16
134 #define RrDefaultAlphaOffset 24
135 #define RrEndian MSBFirst
137 #define RrDefaultAlphaOffset 24
138 #define RrDefaultRedOffset 16
139 #define RrDefaultGreenOffset 8
140 #define RrDefaultBlueOffset 0
141 #define RrEndian LSBFirst
142 #endif /* G_BYTE_ORDER == G_BIG_ENDIAN */
144 RrInstance
* RrInstanceNew (Display
*display
, gint screen
);
145 void RrInstanceFree (RrInstance
*inst
);
147 Display
* RrDisplay (const RrInstance
*inst
);
148 gint
RrScreen (const RrInstance
*inst
);
149 Window
RrRootWindow (const RrInstance
*inst
);
150 Visual
* RrVisual (const RrInstance
*inst
);
151 gint
RrDepth (const RrInstance
*inst
);
152 Colormap
RrColormap (const RrInstance
*inst
);
153 gint
RrRedOffset (const RrInstance
*inst
);
154 gint
RrGreenOffset (const RrInstance
*inst
);
155 gint
RrBlueOffset (const RrInstance
*inst
);
156 gint
RrRedShift (const RrInstance
*inst
);
157 gint
RrGreenShift (const RrInstance
*inst
);
158 gint
RrBlueShift (const RrInstance
*inst
);
159 gint
RrRedMask (const RrInstance
*inst
);
160 gint
RrGreenMask (const RrInstance
*inst
);
161 gint
RrBlueMask (const RrInstance
*inst
);
162 guint
RrPseudoBPC (const RrInstance
*inst
);
163 XColor
* RrPseudoColors (const RrInstance
*inst
);
165 RrColor
*RrColorNew (const RrInstance
*inst
, gint r
, gint g
, gint b
);
166 RrColor
*RrColorParse (const RrInstance
*inst
, gchar
*colorname
);
167 void RrColorFree (RrColor
*in
);
169 RrAppearance
*RrAppearanceNew (const RrInstance
*inst
, gint numtex
);
170 RrAppearance
*RrAppearanceCopy (RrAppearance
*a
);
171 void RrAppearanceFree (RrAppearance
*a
);
173 int RrFontMeasureString (const RrFont
*f
, const gchar
*str
);
174 int RrFontHeight (const RrFont
*f
);
175 int RrFontMaxCharWidth (const RrFont
*f
);
177 void RrPaint (RrAppearance
*l
, Window win
, gint w
, gint h
);
178 void RrMinsize (RrAppearance
*l
, gint
*w
, gint
*h
);
180 gboolean
RrPixmapToRGBA(const RrInstance
*inst
,
181 Pixmap pmap
, Pixmap mask
,
182 gint
*w
, gint
*h
, RrPixel32
**data
);
184 #endif /*__render_h*/