]> Dogcows Code - chaz/openbox/blobdiff - otk/font.cc
add a focused() member
[chaz/openbox] / otk / font.cc
index 21b9bfb060d505d9cf2e9e66958c01bd197a286a..4c3a347670b321cb6d4415e06a52d9e4bdd14b03 100644 (file)
@@ -24,7 +24,7 @@ extern "C" {
 #  include <stdio.h>
 #endif // HAVE_STDIO_H
 
-#include "gettext.h"
+#include "../src/gettext.h"
 #define _(str) gettext(str)
 }
 
@@ -82,7 +82,7 @@ Font::~Font(void)
 }
 
 
-unsigned int Font::measureString(const ustring &string) const
+int Font::measureString(const ustring &string) const
 {
   XGlyphInfo info;
 
@@ -93,19 +93,19 @@ unsigned int Font::measureString(const ustring &string) const
     XftTextExtents8(**display, _xftfont,
                     (FcChar8*)string.c_str(), string.bytes(), &info);
 
-  return info.xOff + (_shadow ? _offset : 0);
+  return (signed) info.xOff + (_shadow ? _offset : 0);
 }
 
 
-unsigned int Font::height(void) const
+int Font::height(void) const
 {
-  return _xftfont->height + (_shadow ? _offset : 0);
+  return (signed) _xftfont->height + (_shadow ? _offset : 0);
 }
 
 
-unsigned int Font::maxCharWidth(void) const
+int Font::maxCharWidth(void) const
 {
-  return _xftfont->max_advance_width;
+  return (signed) _xftfont->max_advance_width;
 }
 
 }
This page took 0.023446 seconds and 4 git commands to generate.