From 92b81d3df5d28e86e849a414eb9bc6cebe0c5f3f Mon Sep 17 00:00:00 2001 From: okan Date: Wed, 28 Sep 2016 17:06:33 +0000 Subject: Inline Xft draw and extents wrappers; too much abstraction. --- xutil.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'xutil.c') diff --git a/xutil.c b/xutil.c index eaaa0a4..39639ef 100644 --- a/xutil.c +++ b/xutil.c @@ -531,21 +531,3 @@ xu_xorcolor(XftColor a, XftColor b, XftColor *r) r->color.blue = a.color.blue ^ b.color.blue; r->color.alpha = 0xffff; } - -int -xu_xft_width(XftFont *xftfont, const char *text, int len) -{ - XGlyphInfo extents; - - XftTextExtentsUtf8(X_Dpy, xftfont, (const FcChar8*)text, - len, &extents); - - return(extents.xOff); -} - -void -xu_xft_draw(struct screen_ctx *sc, const char *text, int color, int x, int y) -{ - XftDrawStringUtf8(sc->xftdraw, &sc->xftcolor[color], sc->xftfont, - x, y, (const FcChar8*)text, strlen(text)); -} -- cgit 1.4.1