diff options
author | fluxgen <fluxgen> | 2004-09-11 23:01:34 (GMT) |
---|---|---|
committer | fluxgen <fluxgen> | 2004-09-11 23:01:34 (GMT) |
commit | 049e40c9eb6e6e8651b171a2a78465398c87f6a1 (patch) | |
tree | 7aef9d57e82336221d6d953617c7a5d53ee95db0 /src/FbTk/XmbFontImp.cc | |
parent | acd2176355876a7bb7afe9d026f9780a3d1c2737 (diff) | |
download | fluxbox_pavel-049e40c9eb6e6e8651b171a2a78465398c87f6a1.zip fluxbox_pavel-049e40c9eb6e6e8651b171a2a78465398c87f6a1.tar.bz2 |
Font::drawText takes reference to FbDrawable instead of X Drawable + some code cleaning
Diffstat (limited to 'src/FbTk/XmbFontImp.cc')
-rw-r--r-- | src/FbTk/XmbFontImp.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/FbTk/XmbFontImp.cc b/src/FbTk/XmbFontImp.cc index 0f66802..eb01596 100644 --- a/src/FbTk/XmbFontImp.cc +++ b/src/FbTk/XmbFontImp.cc | |||
@@ -19,12 +19,13 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: XmbFontImp.cc,v 1.12 2004/09/10 16:12:01 akir Exp $ | 22 | // $Id: XmbFontImp.cc,v 1.13 2004/09/11 22:58:20 fluxgen Exp $ |
23 | 23 | ||
24 | #include "XmbFontImp.hh" | 24 | #include "XmbFontImp.hh" |
25 | 25 | ||
26 | #include "App.hh" | 26 | #include "App.hh" |
27 | #include "StringUtil.hh" | 27 | #include "StringUtil.hh" |
28 | #include "FbDrawable.hh" | ||
28 | 29 | ||
29 | #ifdef HAVE_CONFIG_H | 30 | #ifdef HAVE_CONFIG_H |
30 | #include "config.h" | 31 | #include "config.h" |
@@ -224,22 +225,21 @@ bool XmbFontImp::load(const std::string &fontname) { | |||
224 | return true; | 225 | return true; |
225 | } | 226 | } |
226 | 227 | ||
227 | void XmbFontImp::drawText(Drawable w, int screen, GC gc, const char *text, | 228 | void XmbFontImp::drawText(const FbDrawable &w, int screen, GC gc, const char *text, |
228 | size_t len, int x, int y) const { | 229 | size_t len, int x, int y) const { |
229 | 230 | ||
230 | if (text == 0 || len == 0 || w == 0 || m_fontset == 0) | 231 | if (m_fontset == 0) |
231 | return; | 232 | return; |
232 | 233 | ||
233 | Display* disp = App::instance()->display(); | ||
234 | #ifdef X_HAVE_UTF8_STRING | 234 | #ifdef X_HAVE_UTF8_STRING |
235 | if (m_utf8mode) { | 235 | if (m_utf8mode) { |
236 | Xutf8DrawString(disp, w, m_fontset, | 236 | Xutf8DrawString(w.display(), w.drawable(), m_fontset, |
237 | gc, x, y, | 237 | gc, x, y, |
238 | text, len); | 238 | text, len); |
239 | } else | 239 | } else |
240 | #endif //X_HAVE_UTF8_STRING | 240 | #endif //X_HAVE_UTF8_STRING |
241 | { | 241 | { |
242 | XmbDrawString(disp, w, m_fontset, | 242 | XmbDrawString(w.display(), w.drawable(), m_fontset, |
243 | gc, x, y, | 243 | gc, x, y, |
244 | text, len); | 244 | text, len); |
245 | } | 245 | } |