summary refs log tree commit diff
diff options
context:
space:
mode:
authorokan <okan>2009-12-15 03:26:22 +0000
committerokan <okan>2009-12-15 03:26:22 +0000
commit2ad2b5f31d01d8c0c3a45c542fc525ae79b4ae29 (patch)
treeb7a45d8e1e99593e04e273b1b869f11d35830c4c
parent597cb25820b9b89d6876d37bcdae6ba49f67de30 (diff)
downloadcwm-2ad2b5f31d01d8c0c3a45c542fc525ae79b4ae29.tar.gz
cwm-2ad2b5f31d01d8c0c3a45c542fc525ae79b4ae29.tar.xz
cwm-2ad2b5f31d01d8c0c3a45c542fc525ae79b4ae29.zip
rid ourselves of these functional macros; convert to real functions.
ok oga@
-rw-r--r--calmwm.h7
-rw-r--r--font.c18
2 files changed, 21 insertions, 4 deletions
diff --git a/calmwm.h b/calmwm.h
index 38a3166..16a834d 100644
--- a/calmwm.h
+++ b/calmwm.h
@@ -516,16 +516,15 @@ void			 group_sticky_toggle_exit(struct client_ctx *);
 void			 group_autogroup(struct client_ctx *);
 void			 group_movetogroup(struct client_ctx *, int);
 
+int			 font_ascent(struct screen_ctx *);
+int			 font_descent(struct screen_ctx *);
+u_int			 font_height(struct screen_ctx *);
 void			 font_init(struct screen_ctx *);
 int			 font_width(struct screen_ctx *, const char *, int);
 void			 font_draw(struct screen_ctx *, const char *, int,
 			     Drawable, int, int);
 XftFont			*font_make(struct screen_ctx *, const char *);
 
-#define	font_ascent(sc)		sc->font->ascent
-#define	font_descent(sc)	sc->font->descent
-#define	font_height(sc)		sc->fontheight
-
 /* Externs */
 
 extern Display				*X_Dpy;
diff --git a/font.c b/font.c
index 8e1476e..90ffe24 100644
--- a/font.c
+++ b/font.c
@@ -18,6 +18,24 @@
 
 #include "calmwm.h"
 
+int
+font_ascent(struct screen_ctx *sc)
+{
+	return (sc->font->ascent);
+}
+
+int
+font_descent(struct screen_ctx *sc)
+{
+	return (sc->font->descent);
+}
+
+u_int
+font_height(struct screen_ctx *sc)
+{
+	return (sc->fontheight);
+}
+
 void
 font_init(struct screen_ctx *sc)
 {