head	1.16;
access;
symbols
	core-8-5-9:1.10
	core-8-5-8:1.10
	macosx-cocoa-merge:1.13
	macosx-cocoa-premerge:1.13
	macosx-carbon-freeze:1.13
	core-8-5-7:1.10
	core-8-5-6:1.10
	core-8-6-b1:1.13
	core-8-6-a3:1.11
	core-8-5-5:1.10
	core-8-6-a2:1.11
	core-8-5-4:1.10
	core-8-5-3:1.10
	core-8-6-a1:1.11
	core-8-4-19:1.5.20.1
	core-8-5-branch:1.10.0.4
	core-8-5-2:1.10
	core-8-4-18:1.5.20.1
	core-8-5-1:1.10
	core-8-4-17:1.5.20.1
	core-8-5-0:1.10
	core-8-5-b3:1.10
	core-8-5-b2:1.10
	core-8-4-16:1.5.20.1
	core-8-5-b1:1.10
	core-stablilizer-merge:1.10
	core-stabilizer-branch:1.10.0.2
	core-stabilizer-merge:1.10
	core-8-4-15:1.5.20.1
	core-8-5-a6:1.9
	core-8-5-a5:1.8
	core-8-4-14:1.5.20.1
	core-8-5-a4:1.8
	core-8-4-13:1.5.20.1
	core-8-4-12:1.5
	core-8-4-11:1.5
	core-8-5-a3:1.5
	core-8-4-10:1.5
	core-8-4-9-branch:1.5.0.24
	core-8-5-a2:1.5
	core-8-4-9:1.5
	core-8-4-8:1.5
	core-8-4-7:1.5
	core-8-5-a1:1.5
	core-8-4-6:1.5
	core-8-4-5:1.5
	mistachkin-dev-branch:1.5.0.22
	core-8-4-4:1.5
	core-8-4-3:1.5
	core-8-4-branch:1.5.0.20
	core-8-4-2:1.5
	core-8-4-1:1.5
	core-8-3-5:1.5
	core-8-4-0:1.5
	macosx-8-4-merge-2002-08-31-trunk:1.5
	macosx-8-4-premerge-2002-08-31-branch:1.5
	macosx-8-4-premerge-2002-08-31-trunk:1.5
	macosx-8-4-merge-2002-08-30-branch:1.5
	macosx-8-4-merge-2002-08-30-trunk:1.5
	macosx-8-4-merge-2002-08-20-branch:1.5
	macosx-8-4-merge-2002-08-20-trunk:1.5
	core-8-4-b2:1.5
	core-8-4-b1:1.5
	macosx-premerge-6-9-02:1.5
	core-8-4-a4:1.5
	core-8-3-4:1.5
	macosx-8-4-branch:1.5.0.18
	macosx-8-4-branchpoint:1.5
	core-8-4-a3:1.5
	core-8-3-3:1.5
	dgp-privates-into-namespace:1.5.0.16
	tclpro-1-5-0:1.5
	core-8-4-win-speedup:1.5.0.14
	core-8-4-a2:1.5
	tclpro-1-4-1:1.5
	tclpro-1-4-0:1.5
	core-8-3-2:1.5
	ajuba-ajuba2-2-1-base:1.5
	ajuba-ajuba2-2-0:1.5
	core-8-4-a1:1.5
	core-8-3-1-branch:1.5.0.12
	core-8-3-1:1.5
	scriptics-sc-2-0-b5:1.5
	scriptics-sc-2-0-fixed:1.5
	scriptics-sc-2-0-b2:1.5
	scriptics-sc-2-0-b1:1.5
	core-8-3-0:1.5
	core-8-3-b2:1.5
	core-8-3-b1:1.5
	scriptics-sc-1-1:1.5
	scriptics-sc-1-1-b1:1.5
	core-8-2-3:1.5
	scriptics-sc-1-1-branch:1.5.0.10
	scriptics-sc-1-1-base:1.5
	scriptics-sc-1-0:1.5
	scriptics-sc-1-0-branch:1.5.0.8
	scriptics-sc-1-0-base:1.5
	core-8-2-2:1.5
	core-8-2-1:1.5
	scriptics-bc-1-0-b1:1.5
	core-8-2-1-branch:1.5.0.6
	scriptics-tclpro-1-3-0:1.5
	core-8-2-0:1.5
	core-8-2-b3-branch:1.5.0.4
	core-8-2-b3-base:1.5
	scriptics-tclpro-1-3-b4:1.5
	core-8-2-b2:1.5
	scriptics-tclpro-1-3-b3:1.5
	core-8-2-b1:1.5
	scriptics-tclpro-1-3-b2:1.5
	merge-to-mainline-5/21/99:1.5
	scriptics-tclpro-1-3-b2-branch:1.5.0.2
	core-8-1-1:1.5
	scriptics-tclpro-1-3-b1:1.5
	core-8-1-1-base:1.5
	core-8-1-0:1.5
	merge-to-mainline-4-29-99:1.5
	merge-to-mainline-4-23-99:1.5
	core-8-1-branch-old:1.1.0.4
	core-8-0-6-branch:1.4.0.6
	core-8-0-6-base:1.4
	core-8-0-5:1.4
	core-8-1-b3:1.1.4.2
	core-8-1-b2:1.1.4.2
	dev-8-1-stubs-branch:1.1.4.2.0.2
	dev-stubs-branch:1.4.0.4
	scriptics-tclpro-1-2:1.4
	scriptics-tclpro-1-2-b2:1.4
	core-8-1-merge-2/10/99:1.4
	core-8-0-5-branch:1.4.0.2
	core-8-0-5-base:1.4
	scriptics-tclpro-1-2-b1:1.4
	scriptics-tclpro-1-2-a1:1.4
	core-8-1-b1:1.1.4.2
	core-8-0-4:1.4
	core-8-1-a2:1.1.4.1
	core-8-0-2:1.1
	core-8-0-3:1.4;
locks; strict;
comment	@ * @;


1.16
date	2010.04.23.08.32.56;	author nijtmans;	state Exp;
branches;
next	1.15;

1.15
date	2010.01.05.19.06.09;	author dkf;	state Exp;
branches;
next	1.14;

1.14
date	2010.01.05.08.49.49;	author dkf;	state Exp;
branches;
next	1.13;

1.13
date	2008.11.05.23.29.58;	author nijtmans;	state Exp;
branches;
next	1.12;

1.12
date	2008.11.02.09.54.02;	author nijtmans;	state Exp;
branches;
next	1.11;

1.11
date	2008.05.02.10.28.18;	author dkf;	state Exp;
branches;
next	1.10;

1.10
date	2007.05.04.21.29.22;	author patthoyts;	state Exp;
branches;
next	1.9;

1.9
date	2006.12.01.20.14.23;	author kennykb;	state Exp;
branches;
next	1.8;

1.8
date	2006.03.22.00.21.16;	author das;	state Exp;
branches;
next	1.7;

1.7
date	2005.11.27.02.36.13;	author das;	state Exp;
branches;
next	1.6;

1.6
date	2005.11.07.15.43.51;	author dkf;	state Exp;
branches;
next	1.5;

1.5
date	99.04.16.01.51.14;	author stanton;	state Exp;
branches
	1.5.20.1;
next	1.4;

1.4
date	98.09.14.18.23.10;	author stanton;	state Exp;
branches;
next	1.3;

1.3
date	98.08.04.12.19.16;	author escoffon;	state Exp;
branches;
next	1.2;

1.2
date	98.07.29.12.38.53;	author escoffon;	state Exp;
branches;
next	1.1;

1.1
date	98.04.01.09.51.47;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.29.00.25.18;	author stanton;	state Exp;
branches;
next	1.1.4.2;

1.1.4.2
date	98.09.30.02.16.58;	author stanton;	state Exp;
branches;
next	;

1.5.20.1
date	2006.03.28.02.43.45;	author das;	state Exp;
branches;
next	;


desc
@@


1.16
log
@Formatting
typo fixes
remove not existing tkDisplayList;
Useless re-definitions of TCL_STORAGE_CLASS
@
text
@/*
 * tkFont.h --
 *
 *	Declarations for interfaces between the generic and platform-specific
 *	parts of the font package. This information is not visible outside of
 *	the font package.
 *
 * Copyright (c) 1996-1997 Sun Microsystems, Inc.
 *
 * See the file "license.terms" for information on usage and redistribution of
 * this file, and for a DISCLAIMER OF ALL WARRANTIES.
 *
 * RCS: @@(#) $Id: tkFont.h,v 1.15 2010/01/05 19:06:09 dkf Exp $
 */

#ifndef _TKFONT
#define _TKFONT

/*
 * The following structure keeps track of the attributes of a font. It can be
 * used to keep track of either the desired attributes or the actual
 * attributes gotten when the font was instantiated.
 */

struct TkFontAttributes {
    Tk_Uid family;		/* Font family, or NULL to represent plaform-
				 * specific default system font. */
    int size;			/* Pointsize of font, 0 for default size, or
				 * negative number meaning pixel size. */
    int weight;			/* Weight flag; see below for def'n. */
    int slant;			/* Slant flag; see below for def'n. */
    int underline;		/* Non-zero for underline font. */
    int overstrike;		/* Non-zero for overstrike font. */
};

/*
 * Possible values for the "weight" field in a TkFontAttributes structure.
 * Weight is a subjective term and depends on what the company that created
 * the font considers bold.
 */

#define TK_FW_NORMAL	0
#define TK_FW_BOLD	1

#define TK_FW_UNKNOWN	-1	/* Unknown weight. This value is used for
				 * error checking and is never actually stored
				 * in the weight field. */

/*
 * Possible values for the "slant" field in a TkFontAttributes structure.
 */

#define TK_FS_ROMAN	0
#define TK_FS_ITALIC	1
#define TK_FS_OBLIQUE	2	/* This value is only used when parsing X font
				 * names to determine the closest match. It is
				 * only stored in the XLFDAttributes
				 * structure, never in the slant field of the
				 * TkFontAttributes. */

#define TK_FS_UNKNOWN	-1	/* Unknown slant. This value is used for error
				 * checking and is never actually stored in
				 * the slant field. */

/*
 * The following structure keeps track of the metrics for an instantiated
 * font. The metrics are the physical properties of the font itself.
 */

typedef struct TkFontMetrics {
    int	ascent;			/* From baseline to top of font. */
    int	descent;		/* From baseline to bottom of font. */
    int maxWidth;		/* Width of widest character in font. */
    int fixed;			/* Non-zero if this is a fixed-width font,
				 * 0 otherwise. */
} TkFontMetrics;

/*
 * The following structure is used to keep track of the generic information
 * about a font. Each platform-specific font is represented by a structure
 * with the following structure at its beginning, plus any platform-specific
 * stuff after that.
 */

typedef struct TkFont {
    /*
     * Fields used and maintained exclusively by generic code.
     */

    int resourceRefCount;	/* Number of active uses of this font (each
				 * active use corresponds to a call to
				 * Tk_AllocFontFromTable or Tk_GetFont). If
				 * this count is 0, then this TkFont structure
				 * is no longer valid and it isn't present in
				 * a hash table: it is being kept around only
				 * because there are objects referring to it.
				 * The structure is freed when
				 * resourceRefCount and objRefCount are both
				 * 0. */
    int objRefCount;		/* The number of Tcl objects that reference
				 * this structure. */
    Tcl_HashEntry *cacheHashPtr;/* Entry in font cache for this structure,
				 * used when deleting it. */
    Tcl_HashEntry *namedHashPtr;/* Pointer to hash table entry that
				 * corresponds to the named font that the
				 * tkfont was based on, or NULL if the tkfont
				 * was not based on a named font. */
    Screen *screen;		/* The screen where this font is valid. */
    int tabWidth;		/* Width of tabs in this font (pixels). */
    int	underlinePos;		/* Offset from baseline to origin of underline
				 * bar (used for drawing underlines on a
				 * non-underlined font). */
    int underlineHeight;	/* Height of underline bar (used for drawing
				 * underlines on a non-underlined font). */

    /*
     * Fields used in the generic code that are filled in by
     * platform-specific code.
     */

    Font fid;			/* For backwards compatibility with XGCValues
				 * structures. Remove when TkGCValues is
				 * implemented. */
    TkFontAttributes fa;	/* Actual font attributes obtained when the
				 * the font was created, as opposed to the
				 * desired attributes passed in to
				 * TkpGetFontFromAttributes(). The desired
				 * metrics can be determined from the string
				 * that was used to create this font. */
    TkFontMetrics fm;		/* Font metrics determined when font was
				 * created. */
    struct TkFont *nextPtr;	/* Points to the next TkFont structure with
				 * the same name. All fonts with the same name
				 * (but different displays) are chained
				 * together off a single entry in a hash
				 * table. */
} TkFont;

/*
 * The following structure is used to return attributes when parsing an XLFD.
 * The extra information is of interest to the Unix-specific code when
 * attempting to find the closest matching font.
 */

typedef struct TkXLFDAttributes {
    Tk_Uid foundry;		/* The foundry of the font. */
    int slant;			/* The tristate value for the slant, which is
				 * significant under X. */
    int setwidth;		/* The proportionate width, see below for
				 * definition. */
    Tk_Uid charset;		/* The actual charset string. */
} TkXLFDAttributes;

/*
 * Possible values for the "setwidth" field in a TkXLFDAttributes structure.
 * The setwidth is whether characters are considered wider or narrower than
 * normal.
 */

#define TK_SW_NORMAL	0
#define TK_SW_CONDENSE	1
#define TK_SW_EXPAND	2
#define TK_SW_UNKNOWN	3	/* Unknown setwidth. This value may be stored
				 * in the setwidth field. */

/*
 * The following defines specify the meaning of the fields in a fully
 * qualified XLFD.
 */

#define XLFD_FOUNDRY	    0
#define XLFD_FAMILY	    1
#define XLFD_WEIGHT	    2
#define XLFD_SLANT	    3
#define XLFD_SETWIDTH	    4
#define XLFD_ADD_STYLE	    5
#define XLFD_PIXEL_SIZE	    6
#define XLFD_POINT_SIZE	    7
#define XLFD_RESOLUTION_X   8
#define XLFD_RESOLUTION_Y   9
#define XLFD_SPACING	    10
#define XLFD_AVERAGE_WIDTH  11
#define XLFD_CHARSET	    12
#define XLFD_NUMFIELDS	    13	/* Number of fields in XLFD. */

/*
 * Helper macro. How to correctly round a double to a short.
 */

#define ROUND16(x)	((short) floor((x) + 0.5))

/*
 * Low-level API exported by generic code to platform-specific code.
 */

#define TkInitFontAttributes(fa)   memset((fa), 0, sizeof(TkFontAttributes));
#define TkInitXLFDAttributes(xa)   memset((xa), 0, sizeof(TkXLFDAttributes));

MODULE_SCOPE int	TkFontParseXLFD(const char *string,
			    TkFontAttributes *faPtr, TkXLFDAttributes *xaPtr);
MODULE_SCOPE const char *const * TkFontGetAliasList(const char *faceName);
MODULE_SCOPE const char *const *const * TkFontGetFallbacks(void);
MODULE_SCOPE int	TkFontGetPixels(Tk_Window tkwin, int size);
MODULE_SCOPE int	TkFontGetPoints(Tk_Window tkwin, int size);
MODULE_SCOPE const char *const * TkFontGetGlobalClass(void);
MODULE_SCOPE const char *const * TkFontGetSymbolClass(void);
MODULE_SCOPE int	TkCreateNamedFont(Tcl_Interp *interp, Tk_Window tkwin,
			    const char *name, TkFontAttributes *faPtr);
MODULE_SCOPE int	TkDeleteNamedFont(Tcl_Interp *interp,
			    Tk_Window tkwin, const char *name);
MODULE_SCOPE int	TkFontGetFirstTextLayout(Tk_TextLayout layout,
			    Tk_Font *font, char *dst);

/*
 * Low-level API exported by platform-specific code to generic code.
 */

MODULE_SCOPE void	TkpDeleteFont(TkFont *tkFontPtr);
MODULE_SCOPE void	TkpFontPkgInit(TkMainInfo *mainPtr);
MODULE_SCOPE TkFont *	TkpGetFontFromAttributes(TkFont *tkFontPtr,
			    Tk_Window tkwin, const TkFontAttributes *faPtr);
MODULE_SCOPE void	TkpGetFontFamilies(Tcl_Interp *interp,
			    Tk_Window tkwin);
MODULE_SCOPE TkFont *	TkpGetNativeFont(Tk_Window tkwin, const char *name);

#endif	/* _TKFONT */
@


1.15
log
@Win doesn't have round(), but does have floor()
@
text
@d13 1
a13 1
 * RCS: @@(#) $Id: tkFont.h,v 1.14 2010/01/05 08:49:49 dkf Exp $
a18 5
#ifdef BUILD_tk
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLEXPORT
#endif

a225 3
#undef TCL_STORAGE_CLASS
#define TCL_STORAGE_CLASS DLLIMPORT

@


1.14
log
@Corrected rounding of coordinates when working with fonts. [Bug 2824916]
@
text
@d13 1
a13 1
 * RCS: @@(#) $Id: tkFont.h,v 1.13 2008/11/05 23:29:58 nijtmans Exp $
d195 1
a195 1
#define ROUND16(x)	((short) round(x))
@


1.13
log
@no need to use CONST in internal header files
@
text
@d13 1
a13 1
 * RCS: @@(#) $Id: tkFont.h,v 1.12 2008/11/02 09:54:02 nijtmans Exp $
d192 6
@


1.12
log
@more internal -Wwrite-strings warning fixes
@
text
@d13 1
a13 1
 * RCS: @@(#) $Id: tkFont.h,v 1.11 2008/05/02 10:28:18 dkf Exp $
d200 2
a201 2
MODULE_SCOPE CONST86 char *CONST86 * TkFontGetAliasList(const char *faceName);
MODULE_SCOPE CONST86 char *CONST86 *CONST86 * TkFontGetFallbacks(void);
d204 2
a205 2
MODULE_SCOPE CONST86 char *CONST86 * TkFontGetGlobalClass(void);
MODULE_SCOPE CONST86 char *CONST86 * TkFontGetSymbolClass(void);
@


1.11
log
@More elimination of pre-C89-isms.
@
text
@d13 1
a13 1
 * RCS: @@(#) $Id: tkFont.h,v 1.10 2007/05/04 21:29:22 patthoyts Exp $
d200 2
a201 2
MODULE_SCOPE char **	TkFontGetAliasList(const char *faceName);
MODULE_SCOPE char ***	TkFontGetFallbacks(void);
d204 2
a205 2
MODULE_SCOPE char **	TkFontGetGlobalClass(void);
MODULE_SCOPE char **	TkFontGetSymbolClass(void);
@


1.10
log
@TIP #145 implementation
@
text
@d13 1
a13 1
 * RCS: @@(#) $Id: tkFont.h,v 1.9 2006/12/01 20:14:23 kennykb Exp $
d198 1
a198 1
MODULE_SCOPE int	TkFontParseXLFD(CONST char *string,
d200 1
a200 1
MODULE_SCOPE char **	TkFontGetAliasList(CONST char *faceName);
d207 1
a207 1
			    CONST char *name, TkFontAttributes *faPtr);
d209 1
a209 1
			    Tk_Window tkwin, CONST char *name);
d220 1
a220 1
			    Tk_Window tkwin, CONST TkFontAttributes *faPtr);
d223 1
a223 1
MODULE_SCOPE TkFont *	TkpGetNativeFont(Tk_Window tkwin, CONST char *name);
@


1.9
log
@TIP 300 IMPLEMENTATION
@
text
@d13 1
a13 1
 * RCS: @@(#) $Id: tkFont.h,v 1.8 2006/03/22 00:21:16 das Exp $
d206 4
@


1.8
log
@	* generic/tkFont.c:             implementation of ATSUI text rendering
	* generic/tkInt.h:              in TkAqua provided by Benjamin
	* generic/tkTextDisp.c:         Riefenstahl. [Patch 638966]
	* library/demos/unicodeout.tcl:
	* macosx/tkMacOSXFont.h (new file):
	* macosx/tkMacOSXFont.c:
	* tests/font.test:
	* unix/tkUnixFont.c:
	* win/tkWinFont.c:

	* generic/tkFont.c:             moved MODULE_SCOPE declarations of
	* generic/tkFont.h:             font helper procs into header files.
	* macosx/tkMacOSXButton.c:
	* macosx/tkMacOSXFont.h:
	* macosx/tkMacOSXMenubutton.c:

	* macosx/Wish.xcode/project.pbxproj:     add new tkMacOSXFont.h file,
	* macosx/Wish.xcodeproj/project.pbxproj: turn off dead code stripping
	as it interferes with -sectcreate (rdar://4486223).

	* macosx/Wish.xcode/default.pbxuser:     add TCLLIBPATH=/Library/Tcl
	* macosx/Wish.xcodeproj/default.pbxuser: env var setting to tktest.

	* unix/configure.in: fix detection of symbols build when enabling
	TkAqua debug code; filter nm output of libtclstub better to avoid
	error on intel macs [Bug 1415789].
	* unix/configure: autoconf-2.59
@
text
@d13 1
a13 1
 * RCS: @@(#) $Id: tkFont.h,v 1.7 2005/11/27 02:36:13 das Exp $
d30 1
a30 1
typedef struct TkFontAttributes {
d39 1
a39 1
} TkFontAttributes;
@


1.7
log
@	* unix/tcl.m4 (Darwin): add 64bit support, check for Tiger copyfile(),
	add CFLAGS to SHLIB_LD to support passing -isysroot in env(CFLAGS) to
	configure (flag can't be present twice, so can't be in both CFLAGS and
	LDFLAGS during configure), don't use -prebind when deploying on 10.4,
	define TCL_IO_TRACK_OS_FOR_DRIVER_WITH_BAD_BLOCKING (rdar://3171542).
	(SC_ENABLE_LANGINFO, SC_TIME_HANDLER): add/fix caching, fix obsolete
	autoconf macros. Sync with tcl/unix/tcl.m4.

	* unix/configure.in: fix obsolete autoconf macros, sync gratuitous
	formatting/ordering differences with tcl/unix/configure.in.

	* unix/Makefile.in: add CFLAGS to wish/tktest link to make executable
	linking the same as during configure (needed to avoid loosing any linker
	relevant flags in CFLAGS, in particular flags that can't be in LDFLAGS).
	Avoid concurrent linking of wish and compiling of tkTestInit.o during
	parallel make, fix dependencies and flags for building tkMacOSXInit.o
	(checkstubs, checkexports): dependency and Darwin fixes
	(dist): add new macosx files.

	* macosx/tkMacOSXEvent.c (TkMacOSXProcessEvent):
	* macosx/tkMacOSXEvent.h:
	* macosx/tkMacOSXMouseEvent.c (TkMacOSXProcessMouseEvent):
	* macosx/tkMacOSXCarbonEvents.c: install standard application event
	handler, add & call functions to start and stop carbon even timer that
	runs the tcl event loop periodically during a nested carbon event loop
	in the toolbox (e.g. during menutracking) to ensure tcl timers etc
	continue to fire, register app event handler for menu tracking and HI
	command carbon events, move menu event handling to new handlers for
	those carbon events, no longer register for/handle appleevent carbon
	event (now dealt with by standard application event handler), event
	debugging code dynamically acquires carbon event debugging functions to
	allow use on Tiger where they are no longer exported from HIToolbox.

	* macosx/tkMacOSXFont.c (TkMacOSXUseAntialiasedText):
	* macosx/tkMacOSXKeyEvent.c (GetKeyboardLayout):
	* macosx/tkMacOSXCarbonEvents.c (TkMacOSXInitCarbonEvents):
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXInt.h: abstract common code to dynamically acquire
	address of a named symbol (from a loaded dynamic library) into new
	function TkMacOSXGetNamedSymbol() and macro TkMacOSXInitNamedSymbol.

	* macosx/tkMacOSXMenu.c (TkpNewMenu):
	* macosx/tkMacOSXMenubutton.c (MenuButtonInitControl):
	* macosx/tkMacOSXMenus.c (TkMacOSXHandleMenuSelect): switch to  modern
	utf8 aware menu manager API, remove obsolete code, add error handling.

	* macosx/tkMacOSXMouseEvent.c: define OSX 10.3 or later only constants
	if necessary to allow compilation on OSX 10.2

	* macosx/tkMacOSXWm.c (UpdateSizeHints): remove code that is never
	executed.

	* xlib/xgc.c (XCreateGC): sync with core-8-4-branch change.

	* generic/tk.h: add/correct location of version numbers in macosx files.

	* generic/tkInt.h: clarify fat compile comment.

	* macosx/Wish.pbproj/default.pbxuser (new file):
	* macosx/Wish.pbproj/jingham.pbxuser:
	* macosx/Wish.pbproj/project.pbxproj:
	* macosx/Wish.xcode/default.pbxuser:
	* macosx/Wish.xcode/project.pbxproj:
	* macosx/Wish.xcodeproj/default.pbxuser (new file):
	* macosx/Wish.xcodeproj/project.pbxproj (new file): new/updated projects
	for Xcode 2.2 on 10.4, Xcode 1.5 on 10.3 & ProjectBuilder on 10.2, with
	native tktest targets and support for universal (fat) compiles.

	* macosx/Tk-Info.plist (removed):
	* macosx/Wish-Info.plist (removed):
	* macosx/buildTkConfig.tcl (removed): remove obsolete build files.

	* macosx/README: clarification/cleanup, document new Xcode projects and
	universal (fat) builds via CFLAGS (i.e. ppc and i386 at the same time).

	* unix/Makefile.in:
	* unix/aclocal.m4:
	* unix/configure.in:
	* macosx/configure.ac (new file): add support for inclusion of
	unix/configure.in by macosx/configure.ac, allows generation of a config
	headers enabled configure script in macosx (required by Xcode projects).

	* macosx/GNUmakefile: rename from Makefile to avoid overwriting by
	configure run in tk/macosx, add support for reusing configure cache,
	build target fixes.

	* generic/tk3d.h:
	* generic/tkButton.h:
	* generic/tkCanvas.c:
	* generic/tkCanvas.h:
	* generic/tkColor.h:
	* generic/tkEntry.h:
	* generic/tkFileFilter.h:
	* generic/tkFont.c:
	* generic/tkFont.h:
	* generic/tkImage.c:
	* generic/tkImgPhoto.c:
	* generic/tkInt.h:
	* generic/tkMenu.c:
	* generic/tkMenu.h:
	* generic/tkMenubutton.h:
	* generic/tkScale.h:
	* generic/tkScrollbar.h:
	* generic/tkSelect.h:
	* generic/tkStubInit.c:
	* generic/tkStubLib.c:
	* generic/tkText.h:
	* generic/tkUndo.h:
	* macosx/tkMacOSXButton.c:
	* macosx/tkMacOSXDebug.c:
	* macosx/tkMacOSXDebug.h:
	* macosx/tkMacOSXDialog.c:
	* macosx/tkMacOSXDraw.c:
	* macosx/tkMacOSXEntry.c:
	* macosx/tkMacOSXFont.c:
	* macosx/tkMacOSXInt.h:
	* macosx/tkMacOSXMenu.c:
	* macosx/tkMacOSXMenubutton.c:
	* macosx/tkMacOSXMouseEvent.c:
	* macosx/tkMacOSXSend.c:
	* macosx/tkMacOSXSubwindows.c:
	* macosx/tkMacOSXWindowEvent.c:
	* macosx/tkMacOSXWm.c:
	* macosx/tkMacOSXXStubs.c:
	* unix/tkUnixButton.c:
	* unix/tkUnixMenu.c:
	* xlib/xgc.c: ensure externally visible symbols not contained in stubs
	table are declared as MODULE_SCOPE (or as static if not used outside of
	own source file), #ifdef out a few Xlib and aqua functions that are
	never called. These changes allow 'make checkstubs' to complete without
	error on Darwin with gcc 4.

	* macosx/tkMacOSXTest.c:
	* macosx/tkMacOSXPort.h:
	* win/tkWinTest.c:
	* generic/tkInt.decls: add functions needed by tktest to internal stubs
	table, correct signature of TkMacOSXHandleMenuSelect, add XSync to aqua
	Xlib stubs.

	* unix/tkUnixSend.c:
	* generic/tkText.c:
	* generic/tkTest.c: #ifdef unix only declarations.
	(TestmetricsCmd): unify win and mac implementation.
	(TestsendCmd): move to tkUnixSend.c to avoid access to global var.
	(TesttextCmd): move to tkText.c to avoid having to put all the internal
	text functions it uses into the stubs table.

	* generic/tkTextDisp.c:
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXKeyEvent.c:
	* macosx/tkMacOSXWindowEvent.c:
	* macosx/tkMacOSXXStubs.c: fix gcc 4 warnings.

	* macosx/tkMacOSXNotify.c:
	* macosx/tkMacOSXScrlbr.c: sync with core-8-4-branch.

	* generic/tkIntDecls.h:
	* generic/tkIntPlatDecls.h:
	* generic/tkIntXlibDecls.h:
	* generic/tkStubInit.c:
	* unix/configure:
	* unix/tkConfig.h.in: regen.
@
text
@d13 1
a13 1
 * RCS: @@(#) $Id: tkFont.h,v 1.6 2005/11/07 15:43:51 dkf Exp $
d206 2
@


1.6
log
@ANSIfy
@
text
@d13 1
a13 1
 * RCS: @@(#) $Id: tkFont.h,v 1.5 1999/04/16 01:51:14 stanton Exp $
d198 1
a198 1
EXTERN int		TkFontParseXLFD(CONST char *string,
d200 6
a205 6
EXTERN char **		TkFontGetAliasList(CONST char *faceName);
EXTERN char ***		TkFontGetFallbacks(void);
EXTERN int		TkFontGetPixels(Tk_Window tkwin, int size);
EXTERN int		TkFontGetPoints(Tk_Window tkwin, int size);
EXTERN char **		TkFontGetGlobalClass(void);
EXTERN char **		TkFontGetSymbolClass(void);
d211 3
a213 3
EXTERN void		TkpDeleteFont(TkFont *tkFontPtr);
EXTERN void		TkpFontPkgInit(TkMainInfo *mainPtr);
EXTERN TkFont *		TkpGetFontFromAttributes(TkFont *tkFontPtr,
d215 1
a215 1
EXTERN void		TkpGetFontFamilies(Tcl_Interp *interp,
d217 1
a217 1
EXTERN TkFont *		TkpGetNativeFont(Tk_Window tkwin, CONST char *name);
@


1.5
log
@* Merged 8.1 branch into the main trunk
@
text
@d4 3
a6 3
 *	Declarations for interfaces between the generic and platform-
 *	specific parts of the font package.  This information is not
 *	visible outside of the font package.
d10 2
a11 2
 * See the file "license.terms" for information on usage and redistribution
 * of this file, and for a DISCLAIMER OF ALL WARRANTIES.
d13 1
a13 1
 * RCS: @@(#) $Id$
d20 2
a21 2
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLEXPORT
d25 2
a26 2
 * The following structure keeps track of the attributes of a font.  It can
 * be used to keep track of either the desired attributes or the actual
d31 2
a32 2
    Tk_Uid family;		/* Font family, or NULL to represent
				 * plaform-specific default system font. */
d50 1
a50 1
#define TK_FW_UNKNOWN	-1	/* Unknown weight.  This value is used for
d58 1
a58 1
#define TK_FS_ROMAN	0	
d60 9
a68 9
#define TK_FS_OBLIQUE	2	/* This value is only used when parsing X
				 * font names to determine the closest
				 * match.  It is only stored in the
				 * XLFDAttributes structure, never in the
				 * slant field of the TkFontAttributes. */

#define TK_FS_UNKNOWN	-1	/* Unknown slant.  This value is used for
				 * error checking and is never actually stored
				 * in the slant field. */
d72 1
a72 1
 * font.  The metrics are the physical properties of the font itself.
d85 3
a87 3
 * about a font.  Each platform-specific font is represented by a structure
 * with the following structure at its beginning, plus any platform-
 * specific stuff after that.
d97 8
a104 8
				 * Tk_AllocFontFromTable or Tk_GetFont).
				 * If this count is 0, then this TkFont
				 * structure is no longer valid and it isn't
				 * present in a hash table: it is being
				 * kept around only because there are objects
				 * referring to it.  The structure is freed
				 * when resourceRefCount and objRefCount
				 * are both 0. */
d115 3
a117 3
    int	underlinePos;		/* Offset from baseline to origin of
				 * underline bar (used for drawing underlines
				 * on a non-underlined font). */
d127 2
a128 2
				 * structures.  Remove when TkGCValues is
				 * implemented.  */
d132 1
a132 1
				 * TkpGetFontFromAttributes().  The desired
d138 4
a141 4
				 * the same name.  All fonts with the
				 * same name (but different displays) are
				 * chained together off a single entry in
				 * a hash table. */
d145 3
a147 3
 * The following structure is used to return attributes when parsing an
 * XLFD.  The extra information is of interest to the Unix-specific code
 * when attempting to find the closest matching font.
d152 2
a153 2
    int slant;			/* The tristate value for the slant, which
				 * is significant under X. */
d168 2
a169 2
#define TK_SW_UNKNOWN	3	/* Unknown setwidth.  This value may be
				 * stored in the setwidth field. */
d198 20
a217 24
EXTERN int		TkFontParseXLFD _ANSI_ARGS_((CONST char *string,
			    TkFontAttributes *faPtr, TkXLFDAttributes *xaPtr));
EXTERN char **		TkFontGetAliasList _ANSI_ARGS_((CONST char *faceName));
EXTERN char ***		TkFontGetFallbacks _ANSI_ARGS_((void));
EXTERN int		TkFontGetPixels _ANSI_ARGS_((Tk_Window tkwin, 
			    int size));
EXTERN int		TkFontGetPoints _ANSI_ARGS_((Tk_Window tkwin, 
			    int size));
EXTERN char **		TkFontGetGlobalClass _ANSI_ARGS_((void));
EXTERN char **		TkFontGetSymbolClass _ANSI_ARGS_((void));

/*
 * Low-level API exported by platform-specific code to generic code. 
 */

EXTERN void		TkpDeleteFont _ANSI_ARGS_((TkFont *tkFontPtr));
EXTERN void		TkpFontPkgInit _ANSI_ARGS_((TkMainInfo *mainPtr));
EXTERN TkFont *		TkpGetFontFromAttributes _ANSI_ARGS_((
			    TkFont *tkFontPtr, Tk_Window tkwin,
			    CONST TkFontAttributes *faPtr));
EXTERN void		TkpGetFontFamilies _ANSI_ARGS_((Tcl_Interp *interp,
			    Tk_Window tkwin));
EXTERN TkFont *		TkpGetNativeFont _ANSI_ARGS_((Tk_Window tkwin,
			    CONST char *name));
d219 2
a220 2
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT
@


1.5.20.1
log
@	* generic/tkFont.h: added prototype for TkFontGetFirstTextLayout()
	needed by tkMacOSXButton.c and tkMacOSXMenubutton.c.
@
text
@d13 1
a13 1
 * RCS: @@(#) $Id: tkFont.h,v 1.5 1999/04/16 01:51:14 stanton Exp $
a207 2
EXTERN int		TkFontGetFirstTextLayout _ANSI_ARGS_((
			    Tk_TextLayout layout, Tk_Font *font, char *dst));
@


1.4
log
@Replaced SCCS strings, fixed binary files
@
text
@d8 1
a8 1
 * Copyright (c) 1996 Sun Microsystems, Inc.
d31 3
a33 2
    Tk_Uid family;		/* Font family. The most important field. */
    int pointsize;		/* Pointsize of font, 0 for default size, or
d95 12
a106 1
    int refCount;		/* Number of users of the TkFont. */
d113 1
d122 1
a122 1
     * Fields in the generic font structure that are filled in by
d137 5
a150 1
    TkFontAttributes fa;	/* Standard set of font attributes. */
d156 1
a156 4
    int charset;		/* The character set encoding (the glyph
				 * family), see below for definition. */
    int encoding;		/* Variations within a charset for the
				 * glyphs above character 127. */
a171 9
 * Possible values for the "charset" field in a TkXLFDAttributes structure.
 * The charset is the set of glyphs that are used in the font.
 */

#define TK_CS_NORMAL	0
#define TK_CS_SYMBOL	1
#define TK_CS_OTHER	2

/*
d188 2
a189 3
#define XLFD_REGISTRY	    12
#define XLFD_ENCODING	    13
#define XLFD_NUMFIELDS	    14	/* Number of fields in XLFD. */
d192 1
a192 1
 * Exported from generic code to platform-specific code.
d195 13
a207 7
EXTERN int		TkCreateNamedFont _ANSI_ARGS_((Tcl_Interp *interp,
			    Tk_Window tkwin, CONST char *name,
			    TkFontAttributes *faPtr));
EXTERN void		TkInitFontAttributes _ANSI_ARGS_((
			    TkFontAttributes *faPtr));
EXTERN int		TkParseXLFD _ANSI_ARGS_((CONST char *string, 
			    TkXLFDAttributes *xaPtr));
d210 1
a210 2
 * Common APIs exported to tkFont.c from all platform-specific
 * implementations. 
d214 1
@


1.3
log
@EXPORT is now TCL_STORAGE_CLASS
@
text
@d13 1
a13 1
 * SCCS: @@(#) tkFont.h 1.11 97/05/07 14:44:13
@


1.2
log
@added support for export/import of DLL symbols. If BUILD_tk is defined,
EXPORT is mapped to DLLEXPORT, otherwise it is DLLIMPORT.
@
text
@d20 2
a21 2
# undef EXPORT
# define EXPORT DLLEXPORT
d213 2
a214 2
#undef EXPORT
#define EXPORT DLLIMPORT
@


1.1
log
@Initial revision
@
text
@d19 5
d213 3
@


1.1.4.1
log
@initial tk8.1a2 version
@
text
@d8 1
a8 1
 * Copyright (c) 1996-1997 Sun Microsystems, Inc.
d13 1
a13 1
 * SCCS: @@(#) tkFont.h 1.16 97/12/23 15:00:07
d26 2
a27 3
    Tk_Uid family;		/* Font family, or NULL to represent
				 * plaform-specific default system font. */
    int size;			/* Pointsize of font, 0 for default size, or
d89 1
a89 12
    int resourceRefCount;	/* Number of active uses of this font (each
				 * active use corresponds to a call to
				 * Tk_AllocFontFromTable or Tk_GetFont).
				 * If this count is 0, then this TkFont
				 * structure is no longer valid and it isn't
				 * present in a hash table: it is being
				 * kept around only because there are objects
				 * referring to it.  The structure is freed
				 * when resourceRefCount and objRefCount
				 * are both 0. */
    int objRefCount;		/* The number of Tcl objects that reference
				 * this structure. */
a95 1
    Screen *screen;		/* The screen where this font is valid. */
d104 1
a104 1
     * Fields used in the generic code that are filled in by
a118 5
    struct TkFont *nextPtr;	/* Points to the next TkFont structure with
				 * the same name.  All fonts with the
				 * same name (but different displays) are
				 * chained together off a single entry in
				 * a hash table. */
d128 1
d134 4
a137 1
    Tk_Uid charset;		/* The actual charset string. */
d153 9
d178 3
a180 2
#define XLFD_CHARSET	    12
#define XLFD_NUMFIELDS	    13	/* Number of fields in XLFD. */
d183 1
a183 1
 * Low-level API exported by generic code to platform-specific code.
d186 7
a192 13
#define TkInitFontAttributes(fa)   memset((fa), 0, sizeof(TkFontAttributes));
#define TkInitXLFDAttributes(xa)   memset((xa), 0, sizeof(TkXLFDAttributes));

EXTERN int		TkFontParseXLFD _ANSI_ARGS_((CONST char *string,
			    TkFontAttributes *faPtr, TkXLFDAttributes *xaPtr));
EXTERN char **		TkFontGetAliasList _ANSI_ARGS_((CONST char *faceName));
EXTERN char ***		TkFontGetFallbacks _ANSI_ARGS_((void));
EXTERN int		TkFontGetPixels _ANSI_ARGS_((Tk_Window tkwin, 
			    int size));
EXTERN int		TkFontGetPoints _ANSI_ARGS_((Tk_Window tkwin, 
			    int size));
EXTERN char **		TkFontGetGlobalClass _ANSI_ARGS_((void));
EXTERN char **		TkFontGetSymbolClass _ANSI_ARGS_((void));
d195 2
a196 1
 * Low-level API exported by platform-specific code to generic code. 
a199 1
EXTERN void		TkpFontPkgInit _ANSI_ARGS_((TkMainInfo *mainPtr));
@


1.1.4.2
log
@Merged 8.0.3 changes into 8.1
@
text
@d13 1
a13 1
 * RCS: @@(#) $Id: tkFont.h,v 1.4 1998/09/14 18:23:10 stanton Exp $
a18 5
#ifdef BUILD_tk
# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLEXPORT
#endif

a216 3

# undef TCL_STORAGE_CLASS
# define TCL_STORAGE_CLASS DLLIMPORT
@


