Mercurial > hg > xemacs-beta
comparison lwlib/xlwmenu.c @ 3374:174eb4da74fb
[xemacs-hg @ 2006-05-02 15:30:31 by james]
Quiet some warnings when building lwlib. See xemacs-patches message with
ID <m3d5f6yibr.fsf@jerrypc.cs.usu.edu>.
author | james |
---|---|
date | Tue, 02 May 2006 15:30:32 +0000 |
parents | 44a63e4a23cd |
children | 6aa26bef0527 |
comparison
equal
deleted
inserted
replaced
3373:f18cee92b433 | 3374:174eb4da74fb |
---|---|
331 XmbTextExtents (mw->menu.font_set, s, strlen (s), &ri, &rl); | 331 XmbTextExtents (mw->menu.font_set, s, strlen (s), &ri, &rl); |
332 return rl.width; | 332 return rl.width; |
333 # else | 333 # else |
334 #ifdef USE_XFT_MENUBARS | 334 #ifdef USE_XFT_MENUBARS |
335 XGlyphInfo glyphinfo; | 335 XGlyphInfo glyphinfo; |
336 XftTextExtents8 (XtDisplay (mw), mw->menu.renderFont, s, strlen (s), | 336 XftTextExtents8 (XtDisplay (mw), mw->menu.renderFont, (FcChar8 *) s, |
337 &glyphinfo); | 337 strlen (s), &glyphinfo); |
338 return glyphinfo.xOff; | 338 return glyphinfo.xOff; |
339 #else | 339 #else |
340 XCharStruct xcs; | 340 XCharStruct xcs; |
341 int drop; | 341 int drop; |
342 XTextExtents (mw->menu.font, s, strlen (s), &drop, &drop, &drop, &xcs); | 342 XTextExtents (mw->menu.font, s, strlen (s), &drop, &drop, &drop, &xcs); |
422 # ifdef USE_XFONTSET | 422 # ifdef USE_XFONTSET |
423 XmbTextExtents (mw->menu.font_set, newchars, j, &ri, &rl); | 423 XmbTextExtents (mw->menu.font_set, newchars, j, &ri, &rl); |
424 return rl.width; | 424 return rl.width; |
425 # else /* ! USE_XFONTSET */ | 425 # else /* ! USE_XFONTSET */ |
426 #ifdef USE_XFT_MENUBARS | 426 #ifdef USE_XFT_MENUBARS |
427 XftTextExtents8 (XtDisplay (mw), mw->menu.renderFont, newchars, j, | 427 XftTextExtents8 (XtDisplay (mw), mw->menu.renderFont, (FcChar8 *) newchars, |
428 &glyphinfo); | 428 j, &glyphinfo); |
429 return glyphinfo.xOff; | 429 return glyphinfo.xOff; |
430 #else | 430 #else |
431 XTextExtents (mw->menu.font, newchars, j, &drop, &drop, &drop, &xcs); | 431 XTextExtents (mw->menu.font, newchars, j, &drop, &drop, &drop, &xcs); |
432 return xcs.width; | 432 return xcs.width; |
433 #endif | 433 #endif |
754 { | 754 { |
755 static XGlyphInfo glyphinfo; | 755 static XGlyphInfo glyphinfo; |
756 | 756 |
757 XftTextExtents8 (dpy, | 757 XftTextExtents8 (dpy, |
758 xft_font, | 758 xft_font, |
759 run, len, &glyphinfo); | 759 (FcChar8 *) run, len, &glyphinfo); |
760 return glyphinfo.xOff; | 760 return glyphinfo.xOff; |
761 } | 761 } |
762 #endif | 762 #endif |
763 | 763 |
764 /* Code for drawing strings. */ | 764 /* Code for drawing strings. */ |
799 XftDrawRect (xftDraw, colorBg, | 799 XftDrawRect (xftDraw, colorBg, |
800 x, y, | 800 x, y, |
801 x_xft_text_width (display, renderFont, string, strlen (string)), | 801 x_xft_text_width (display, renderFont, string, strlen (string)), |
802 renderFont->ascent + renderFont->descent); /* XXX */ | 802 renderFont->ascent + renderFont->descent); /* XXX */ |
803 /* draw text */ | 803 /* draw text */ |
804 XftDrawString8 (xftDraw, color, renderFont, | 804 XftDrawString8 (xftDraw, color, renderFont, x, y + mw->menu.font_ascent, |
805 x, y + mw->menu.font_ascent, string, strlen (string)); | 805 (FcChar8 *) string, strlen (string)); |
806 XftDrawDestroy (xftDraw); | 806 XftDrawDestroy (xftDraw); |
807 # else | 807 # else |
808 # ifdef USE_XFONTSET | 808 # ifdef USE_XFONTSET |
809 XmbDrawString (XtDisplay (mw), window, mw->menu.font_set, gc, | 809 XmbDrawString (XtDisplay (mw), window, mw->menu.font_set, gc, |
810 x, y + mw->menu.font_ascent, string, strlen (string)); | 810 x, y + mw->menu.font_ascent, string, strlen (string)); |
888 renderFont, &string[start], end - start), | 888 renderFont, &string[start], end - start), |
889 renderFont->ascent + renderFont->descent); /* XXX */ | 889 renderFont->ascent + renderFont->descent); /* XXX */ |
890 /* draw text */ | 890 /* draw text */ |
891 XftDrawString8 (xftDraw, color, renderFont, | 891 XftDrawString8 (xftDraw, color, renderFont, |
892 x, y + mw->menu.font_ascent, | 892 x, y + mw->menu.font_ascent, |
893 &string[start], end - start); | 893 (FcChar8 *) &string[start], end - start); |
894 | 894 |
895 XftTextExtents8 (display, renderFont, &string[start], end - start, | 895 XftTextExtents8 (display, renderFont, (FcChar8 *) &string[start], |
896 &glyphinfo); | 896 end - start, &glyphinfo); |
897 | 897 |
898 /* #### should use parent frame's .xftDraw */ | 898 /* #### should use parent frame's .xftDraw */ |
899 XftDrawDestroy (xftDraw); | 899 XftDrawDestroy (xftDraw); |
900 return glyphinfo.xOff; | 900 return glyphinfo.xOff; |
901 } | 901 } |