root/lwlib/lwlib-utils.h

/* [<][>][^][v][top][bottom][index][help] */

INCLUDED FROM


     1 #ifndef _LWLIB_UTILS_H_
     2 #define _LWLIB_UTILS_H_
     3 
     4 void XtNoClearRefreshWidget (Widget);
     5 
     6 typedef void (*XtApplyToWidgetsProc) (Widget, XtPointer);
     7 typedef void* (*XtApplyUntilToWidgetsProc) (Widget, XtPointer);
     8 
     9 void XtApplyToWidgets (Widget, XtApplyToWidgetsProc, XtPointer);
    10 void *XtApplyUntilToWidgets (Widget, XtApplyUntilToWidgetsProc, XtPointer);
    11 
    12 Widget *XtCompositeChildren (Widget, unsigned int *);
    13 
    14 /* returns True is the widget is being destroyed, False otherwise */
    15 Boolean
    16 XtWidgetBeingDestroyedP (Widget widget);
    17 
    18 #ifdef USE_CAIRO
    19 
    20 #include <cairo.h>
    21 #include <fontconfig/fontconfig.h>
    22 
    23 typedef struct {
    24   cairo_scaled_font_t *scaled_font;
    25   int ascent, descent, height, max_advance_width;
    26 } XftFont;
    27 
    28 typedef cairo_t XftDraw;
    29 
    30 typedef struct {
    31   unsigned long pixel;
    32   struct {unsigned short red, green, blue, alpha;} color;
    33 } XftColor;
    34 
    35 #ifdef HAVE_XRENDER
    36 #include <X11/extensions/Xrender.h>
    37 #else
    38 typedef struct {
    39   unsigned short width, height;
    40   short x, y, xOff, yOff;
    41 } XGlyphInfo;
    42 #endif
    43 
    44 #define XftFontOpenName crxft_font_open_name
    45 extern XftFont *crxft_font_open_name (Display *, int, const char *);
    46 #define XftFontClose(dpy, pub) crxft_font_close (pub)
    47 extern void crxft_font_close (XftFont *);
    48 #define XftDrawCreate(dpy, drawable, visual, colormap) \
    49   crxft_draw_create (dpy, drawable, visual)
    50 extern cairo_t *crxft_draw_create (Display *, Drawable, Visual *);
    51 #define XftDrawDestroy cairo_destroy
    52 #define XftDrawRect crxft_draw_rect
    53 extern void crxft_draw_rect (cairo_t *, const XftColor *, int, int,
    54                              unsigned int, unsigned int);
    55 #define XftDrawStringUtf8 crxft_draw_string
    56 extern void crxft_draw_string (cairo_t *, const XftColor *, XftFont *,
    57                                int, int, const FcChar8 *, int);
    58 #define XftTextExtentsUtf8(dpy, pub, string, len, extents) \
    59   crxft_text_extents (pub, string, len, extents)
    60 extern void crxft_text_extents (XftFont *, const FcChar8 *, int, XGlyphInfo *);
    61 
    62 #endif  /* USE_CAIRO */
    63 #endif /* _LWLIB_UTILS_H_ */

/* [<][>][^][v][top][bottom][index][help] */