comparison lwlib/xlwtabs.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 ad2f4ae9895b
children 6aa26bef0527
comparison
equal deleted inserted replaced
3373:f18cee92b433 3374:174eb4da74fb
1706 XftDraw *xftDraw = XftDrawCreate (dpy, win, visual, cmap); 1706 XftDraw *xftDraw = XftDrawCreate (dpy, win, visual, cmap);
1707 XftFont *renderFont = tw->tabs.renderFont; 1707 XftFont *renderFont = tw->tabs.renderFont;
1708 XGlyphInfo glyphinfo; 1708 XGlyphInfo glyphinfo;
1709 XftColor colorDBG; 1709 XftColor colorDBG;
1710 XftColorAllocName (dpy, visual, cmap, "wheat", &colorDBG); 1710 XftColorAllocName (dpy, visual, cmap, "wheat", &colorDBG);
1711 XftTextExtents8 (dpy, renderFont, lbl, (int) strlen (lbl), 1711 XftTextExtents8 (dpy, renderFont, (FcChar8 *) lbl,
1712 &glyphinfo); 1712 (int) strlen (lbl), &glyphinfo);
1713 /* #### unnecessary? for the moment, give visual extent */ 1713 /* #### unnecessary? for the moment, give visual extent */
1714 /* draw background rect */ 1714 /* draw background rect */
1715 #if 1 1715 #if 1
1716 if (debug_tabs > 2) 1716 if (debug_tabs > 2)
1717 { 1717 {
1752 name.u.s, size.u.d, renderFont->height, 1752 name.u.s, size.u.d, renderFont->height,
1753 renderFont->ascent, renderFont->descent); 1753 renderFont->ascent, renderFont->descent);
1754 } 1754 }
1755 XftDrawString8 (xftDraw, &color, renderFont, 1755 XftDrawString8 (xftDraw, &color, renderFont,
1756 x+tab->tabs.l_x, y+tab->tabs.l_y, 1756 x+tab->tabs.l_x, y+tab->tabs.l_y,
1757 lbl, (int) strlen (lbl)); 1757 (FcChar8 *) lbl, (int) strlen (lbl));
1758 XftDrawDestroy (xftDraw); 1758 XftDrawDestroy (xftDraw);
1759 #else 1759 #else
1760 XDrawString(dpy,win,gc, 1760 XDrawString(dpy,win,gc,
1761 x+tab->tabs.l_x, y+tab->tabs.l_y, 1761 x+tab->tabs.l_x, y+tab->tabs.l_y,
1762 lbl, (int)strlen(lbl)); 1762 lbl, (int)strlen(lbl));
1986 1986
1987 if( lbl != NULL && font != NULL ) 1987 if( lbl != NULL && font != NULL )
1988 { 1988 {
1989 #ifdef USE_XFT_TABS 1989 #ifdef USE_XFT_TABS
1990 tab->tabs.width += x_xft_text_width (XtDisplay(tw), font, 1990 tab->tabs.width += x_xft_text_width (XtDisplay(tw), font,
1991 lbl, (int)strlen(lbl)) + iw; 1991 (FcChar8 *) lbl,
1992 (int)strlen(lbl)) + iw;
1992 tab->tabs.l_y = (tw->tabs.tab_height 1993 tab->tabs.l_y = (tw->tabs.tab_height
1993 + tw->tabs.renderFont->ascent 1994 + tw->tabs.renderFont->ascent
1994 /* #### how can this subtraction be correct? */ 1995 /* #### how can this subtraction be correct? */
1995 - tw->tabs.renderFont->descent)/2; 1996 - tw->tabs.renderFont->descent)/2;
1996 if (debug_tabs > 2) 1997 if (debug_tabs > 2)