1 /*
2 * tkcompat.c --
3 *
4 * These are functions that are required for compiling with previous
5 * versions of tcl or tk.
6 *
7 * Copyright (c) 1997-2002 The Regents of the University of California.
8 * All rights reserved.
9 *
10 * Redistribution and use in source and binary forms, with or without
11 * modification, are permitted provided that the following conditions are met:
12 *
13 * A. Redistributions of source code must retain the above copyright notice,
14 * this list of conditions and the following disclaimer.
15 * B. Redistributions in binary form must reproduce the above copyright notice,
16 * this list of conditions and the following disclaimer in the documentation
17 * and/or other materials provided with the distribution.
18 * C. Neither the names of the copyright holders nor the names of its
19 * contributors may be used to endorse or promote products derived from this
20 * software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS
23 * IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
24 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
25 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE
26 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
27 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
28 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
29 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
30 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
31 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32 * POSSIBILITY OF SUCH DAMAGE.
33 */
34
35 #ifndef lint
36 static const char rcsid[] = "$Header: /usr/mash/src/repository/mash/mash-1/compat/tkcompat.c,v 1.7 2002/02/03 03:14:22 lim Exp $";
37 #endif
38
39 #ifndef TKCOMPAT_C
40 #define TKCOMPAT_C
41
42 #include "tk.h"
43
44 #if TK_MAJOR_VERSION < 8
45 #include "tkcompat.h"
46
47 /*
48 *---------------------------------------------------------------------------
49 *
50 * Tk_GetFontMetrics --
51 *
52 * Returns overall ascent and descent metrics for the given font.
53 * These values can be used to space multiple lines of text and
54 * to align the baselines of text in different fonts.
55 *
56 */
57 void Tk_GetFontMetrics(Tk_Font pf, Tk_FontMetrics *fmPtr)
58 {
59 fmPtr->ascent = pf->ascent;
60 fmPtr->descent = pf->descent;
61 fmPtr->linespace = pf->ascent + pf->descent;
62 }
63 #endif /* (TK_MAJOR_VERSION < 8) */
64
65 #endif /* #ifdef TKCOMPAT_C */
66
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.