head	1.31;
access;
symbols
	core-8-5-9:1.27.2.1
	core-8-5-8:1.27.2.1
	macosx-cocoa-merge:1.30
	macosx-cocoa-premerge:1.29
	macosx-carbon-freeze:1.29
	core-8-5-7:1.27.2.1
	core-8-5-6:1.27.2.1
	core-8-6-b1:1.29
	core-8-6-a3:1.29
	core-8-5-5:1.27.2.1
	core-8-6-a2:1.29
	core-8-5-4:1.27.2.1
	core-8-5-3:1.27.2.1
	core-8-6-a1:1.29
	core-8-4-19:1.6.2.15
	core-8-5-branch:1.27.0.2
	core-8-5-2:1.27
	core-8-4-18:1.6.2.15
	core-8-5-1:1.27
	core-8-4-17:1.6.2.15
	core-8-5-0:1.27
	core-8-5-b3:1.26
	core-8-5-b2:1.26
	core-8-4-16:1.6.2.15
	core-8-5-b1:1.26
	core-stablilizer-merge:1.24
	core-stabilizer-branch:1.23.0.2
	core-stabilizer-merge:1.27.2.1
	core-8-4-15:1.6.2.15
	core-8-5-a6:1.23
	core-8-5-a5:1.21
	core-8-4-14:1.6.2.14
	core-8-5-a4:1.17
	core-8-4-13:1.6.2.10
	core-8-4-12:1.6.2.10
	core-8-4-11:1.6.2.8
	core-8-5-a3:1.13
	core-8-4-10:1.6.2.8
	core-8-4-9-branch:1.6.2.6.0.2
	core-8-5-a2:1.10
	core-8-4-9:1.6.2.6
	core-8-4-8:1.6.2.6
	core-8-4-7:1.6.2.5
	core-8-5-a1:1.9
	core-8-4-6:1.6.2.3
	core-8-4-5:1.6.2.3
	mistachkin-dev-branch:1.9.0.2
	core-8-4-4:1.6.2.2
	core-8-4-3:1.6.2.1
	core-8-4-branch:1.6.0.2
	core-8-4-2:1.6
	core-8-4-1:1.2;
locks; strict;
comment	@# @;


1.31
date	2011.01.04.22.36.58;	author wordtech;	state Exp;
branches;
next	1.30;

1.30
date	2009.06.29.14.35.01;	author das;	state Exp;
branches;
next	1.29;

1.29
date	2008.06.12.06.31.10;	author das;	state Exp;
branches;
next	1.28;

1.28
date	2008.06.01.00.29.29;	author das;	state Exp;
branches;
next	1.27;

1.27
date	2007.12.13.15.27.08;	author dgp;	state Exp;
branches
	1.27.2.1;
next	1.26;

1.26
date	2007.09.06.09.36.57;	author das;	state Exp;
branches;
next	1.25;

1.25
date	2007.09.06.08.07.24;	author das;	state Exp;
branches;
next	1.24;

1.24
date	2007.06.29.03.19.05;	author das;	state Exp;
branches;
next	1.23;

1.23
date	2007.04.23.21.24.32;	author das;	state Exp;
branches
	1.23.2.1;
next	1.22;

1.22
date	2007.01.28.01.42.16;	author das;	state Exp;
branches;
next	1.21;

1.21
date	2006.10.16.15.56.54;	author das;	state Exp;
branches;
next	1.20;

1.20
date	2006.08.18.07.47.10;	author das;	state Exp;
branches;
next	1.19;

1.19
date	2006.07.21.06.03.20;	author das;	state Exp;
branches;
next	1.18;

1.18
date	2006.07.20.06.25.19;	author das;	state Exp;
branches;
next	1.17;

1.17
date	2006.04.11.10.19.51;	author das;	state Exp;
branches;
next	1.16;

1.16
date	2005.12.01.05.47.17;	author das;	state Exp;
branches;
next	1.15;

1.15
date	2005.11.27.06.44.05;	author das;	state Exp;
branches;
next	1.14;

1.14
date	2005.11.27.02.36.14;	author das;	state Exp;
branches;
next	1.13;

1.13
date	2005.05.23.20.24.59;	author das;	state Exp;
branches;
next	1.12;

1.12
date	2005.04.09.15.39.09;	author das;	state Exp;
branches;
next	1.11;

1.11
date	2005.03.09.19.40.52;	author wolfsuit;	state Exp;
branches;
next	1.10;

1.10
date	2004.11.11.01.24.32;	author das;	state Exp;
branches;
next	1.9;

1.9
date	2003.10.01.14.35.32;	author das;	state Exp;
branches;
next	1.8;

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

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

1.6
date	2003.02.27.00.09.26;	author hobbs;	state Exp;
branches
	1.6.2.1;
next	1.5;

1.5
date	2003.02.21.03.34.29;	author das;	state Exp;
branches;
next	1.4;

1.4
date	2003.02.11.07.26.18;	author wolfsuit;	state Exp;
branches;
next	1.3;

1.3
date	2002.10.29.00.51.12;	author das;	state Exp;
branches;
next	1.2;

1.2
date	2002.10.21.04.37.34;	author das;	state Exp;
branches;
next	1.1;

1.1
date	2002.10.16.23.56.02;	author das;	state Exp;
branches;
next	;

1.6.2.1
date	2003.03.18.13.55.51;	author das;	state Exp;
branches;
next	1.6.2.2;

1.6.2.2
date	2003.07.18.01.06.33;	author das;	state Exp;
branches;
next	1.6.2.3;

1.6.2.3
date	2003.10.01.14.35.39;	author das;	state Exp;
branches;
next	1.6.2.4;

1.6.2.4
date	2004.07.25.01.57.41;	author wolfsuit;	state Exp;
branches;
next	1.6.2.5;

1.6.2.5
date	2004.07.27.18.52.26;	author wolfsuit;	state Exp;
branches;
next	1.6.2.6;

1.6.2.6
date	2004.09.18.00.48.14;	author das;	state Exp;
branches;
next	1.6.2.7;

1.6.2.7
date	2005.04.09.15.39.39;	author das;	state Exp;
branches;
next	1.6.2.8;

1.6.2.8
date	2005.05.24.04.21.32;	author das;	state Exp;
branches;
next	1.6.2.9;

1.6.2.9
date	2005.11.27.02.36.46;	author das;	state Exp;
branches;
next	1.6.2.10;

1.6.2.10
date	2005.11.27.06.44.16;	author das;	state Exp;
branches;
next	1.6.2.11;

1.6.2.11
date	2006.07.20.06.27.34;	author das;	state Exp;
branches;
next	1.6.2.12;

1.6.2.12
date	2006.07.21.06.03.24;	author das;	state Exp;
branches;
next	1.6.2.13;

1.6.2.13
date	2006.08.18.07.47.25;	author das;	state Exp;
branches;
next	1.6.2.14;

1.6.2.14
date	2006.10.16.15.57.13;	author das;	state Exp;
branches;
next	1.6.2.15;

1.6.2.15
date	2007.04.29.02.26.47;	author das;	state Exp;
branches;
next	;

1.23.2.1
date	2007.07.01.17.31.30;	author dgp;	state Exp;
branches;
next	1.23.2.2;

1.23.2.2
date	2007.09.06.18.23.54;	author dgp;	state Exp;
branches;
next	1.23.2.3;

1.23.2.3
date	2008.06.25.16.46.06;	author dgp;	state Exp;
branches;
next	;

1.27.2.1
date	2008.06.12.06.35.03;	author das;	state Exp;
branches;
next	;


desc
@@


1.31
log
@Textured background windows
@
text
@Tcl/Tk Mac OS X README
----------------------

RCS: @@(#) $Id: README,v 1.30 2009/06/29 14:35:01 das Exp $

This is the README file for the Mac OS X/Darwin version of Tcl/Tk.


1. Where to go for support
--------------------------

- The tcl-mac mailing list on sourceforge is the best place to ask questions
specific to Tcl & Tk on Mac OS X:
	http://lists.sourceforge.net/lists/listinfo/tcl-mac
(this page also has a link to searchable archives of the list, please check them
before asking on the list, many questions have already been answered).

- For general Tcl/Tk questions, the newsgroup comp.lang.tcl is your best bet:
	http://groups.google.com/group/comp.lang.tcl/

- The Tcl'ers Wiki also has many pages dealing with Tcl & Tk on Mac OS X, see
	http://wiki.tcl.tk/references/3753!
	http://wiki.tcl.tk/references/8361!

- Please report bugs with Tcl or Tk on Mac OS X to the sourceforge bug trackers:
	Tcl: http://sf.net/tracker/?func=add&group_id=10894&atid=110894
	Tk:  http://sf.net/tracker/?func=add&group_id=12997&atid=112997
please make sure that your report Tk specific bugs to the tktoolkit project bug
tracker rather than the tcl project bug tracker.
Mac OS X specific bugs should in general be assigned to user 'das'.


2. Using Tcl/Tk on Mac OS X
---------------------------

- There are two versions of Tk available on Mac OS X: TkAqua using the native
aqua widgets and look&feel, and TkX11 using the traditional unix X11 wigets.
TkX11 requires an X11 server to be installed, such as Apple's X11 (which is
available as an optional or default install on recent Mac OS X).
TkAqua and TkX11 can be distinguished at runtime via [tk windowingsystem].

- At a minimum, Mac OS X 10.3 is required to run Tcl and TkX11.
TkAqua requires Mac OS X 10.5 or later (starting with Tk 8.6b2).

- Unless weak-linking is used, Tcl/Tk built on Mac OS X 10.x will not run on
10.y with y < x; on the other hand Tcl/Tk built on 10.y will always run on 10.x
with y <= x (but without any of the fixes and optimizations that would be
available in a binary built on 10.x).
Weak-linking is available on OS X 10.2 or later, it additionally allows Tcl/Tk
built on 10.x to run on any 10.y with x > y >= z (for a chosen z >= 2).

- Wish checks the Resources/Scripts directory in its application bundle for a
file called AppMain.tcl, if found it is used as the startup script and the
Scripts folder is added to the auto_path. This can be used to emulate the old
OS9 TclTk droplets.

- If standard input is a special file of zero length (e.g. /dev/null), Wish
brings up the Tk console window at startup. This is the case when double
clicking Wish in the Finder (or using 'open Wish.app' from the Terminal).

- Tcl extensions can be installed in any of:
	$HOME/Library/Tcl /Library/Tcl /System/Library/Tcl
	$HOME/Library/Frameworks /Library/Frameworks /System/Library/Frameworks
	(searched in that order).
Given a potential package directory $pkg, Tcl on OSX checks for the file
$pkg/Resources/Scripts/pkgIndex.tcl as well as the usual $pkg/pkgIndex.tcl.
This allows building extensions as frameworks with all script files contained in
the Resources/Scripts directory of the framework.

- [load]able binary extensions can linked as either ordinary shared libraries
(.dylib) or as MachO bundles (since 8.4.10/8.5a3); bundles have the advantage
that they are [load]ed more efficiently from a tcl VFS (no temporary copy to the
native filesystem required), and prior to Mac OS X 10.5, only bundles can be
[unload]ed.

- The 'deploy' target of macosx/GNUmakefile installs the html manpages into the
standard documentation location in the Tcl/Tk frameworks:
	Tcl.framework/Resources/Documentation/Reference/Tcl
	Tk.framework/Resources/Documentation/Reference/Tk
No nroff manpages are installed by default by the GNUmakefile.

- The Tcl and Tk frameworks can be installed in any of the system's standard
framework directories:
	$HOME/Library/Frameworks /Library/Frameworks /System/Library/Frameworks

- ${prefix}/bin/wish8.x is a script that calls a copy of 'Wish' contained in
	Tk.framework/Resources

- if 'Wish' is started from the Finder or via 'open', $argv may contain a
"-psn_XXXX" argument. This is the process serial number, you may need to filter
it out for cross platform compatibility of your scripts.

- the env array is different when Wish is started from the Finder (i.e. via
LaunchServices) than when it (or tclsh) is invoked from the Terminal, in
particular PATH may not be what you expect. (Wish started by LaunchServices
inherits loginwindow's environment variables, which are essentially those set in
$HOME/.MacOSX/environment.plist, and are unrelated to those set in your shell).

- TkAqua drawing is antialiased by default, but (outline) linewidth can be used
to control whether a line/shape is drawn antialiased. The antialiasing threshold
is 0 by default (i.e. antialias everything), it can be changed by setting
	set tk::mac::CGAntialiasLimit <limit>
in your script before drawing, in which case lines (or shapes with outlines)
thinner than <limit> pixels will not be antialiased.

- Text antialiasing by default uses the standard OS antialising settings.
Setting the global variable '::tk::mac::antialiasedtext' allows to control text
antialiasing from Tcl: a value of 1 enables AA, 0 disables AA and -1 restores
the default behaviour of respecting the OS settings.

- Scrollbars: There are two scrollbar variants in Aqua, normal & small. The
normal scrollbar has a small dimension of 15, the small variant 11.
Access to the small variant was added in Tk 8.4.2.

- The default metrics of native buttons, radiobuttons, checkboxes and
menubuttons in the Cocoa-based Tk 8.6b2 and later preserve compatibility with
the older Carbon-based implementation, you can turn off the compatibility
metrics to get more native-looking spacing by setting:
	set tk::mac::useCompatibilityMetrics 0

- TkAqua provides access to native OS X images via the Tk native bitmap facility
(including any image file readable by NSImage). A native bitmap name is
interpreted as follows (in order):
    - predefined builtin 32x32 icon name (stop, caution, document, etc)
    - name defined by [tk::mac::iconBitmap]
    - NSImage named image name
    - NSImage url string
    - 4-char OSType of IconServices icon
the syntax of [tk::mac::iconBitmap] is as follows:
	tk::mac::iconBitmap name width height -kind value
where -kind is one of
    -file	    icon of file at given path
    -fileType	    icon of given file type
    -osType	    icon of given 4-char OSType file type
    -systemType	    icon for given IconServices 4-char OSType
    -namedImage	    named NSImage for given name
    -imageFile	    image at given path
This support was added with the Cocoa-based Tk 8.6b2.

- TkAqua cursor names are interpred as follows (in order):
    - standard or platform-specific Tk cursor name (c.f. cursors.n)
    - @@path to any image file readable by NSImage
    - NSImage named image name
Support for the latter two was added with the Cocoa-based Tk 8.6b2.

- The standard Tk dialog commands [tk_getOpenFile], [tk_chooseDirectory],
[tk_getSaveFile] and [tk_messageBox] all take an additional optional -command
parameter on TkAqua. If it is present, the given command prefix is evaluated at
the global level when the dialog closes, with the dialog command's result
appended (the dialog command itself returning an emtpy result). If the -parent
option is also present, the dialog is configured as a modeless (window-modal)
sheet attached to the parent window and the dialog command returns immediately.
Support for -command was added with the Cocoa-based Tk 8.6b2.

- The TkAqua-specific [tk::mac::standardAboutPanel] command brings the standard
Cocoa about panel to the front, with all its information filled in from your
application bundle files (i.e. standard about panel with no options specified).
See Apple Technote TN2179 and the AppKit documentation for -[NSApplication
orderFrontStandardAboutPanelWithOptions:] for details on the Info.plist keys and
app bundle files used by the about panel.
This support was added with the Cocoa-based Tk 8.6b2.

- TkAqua has three special menu names that give access to the standard
Application, Window and Help menus, see menu.n for details.
By default, the platform-specific standard Help menu item "YourApp Help" peforms
the default Cocoa action of showing the Help Book configured in the
application's Info.plist (or displaying an alert if no Help Book is set). This
action can be customized by defining a procedure named [tk::mac::ShowHelp], if
present, this procedure is invoked instead by the standard Help menu item.
Support for the Window menu and [tk::mac::ShowHelp] was added with the
Cocoa-based Tk 8.6b2.

- The TkAqua-specific command [tk::unsupported::MacWindowStyle style] is used to
get and set Mac OS X-specific toplevel window class and attributes. Note that
the window class and many attributes have to be set before the window is first
mapped for the change to have any effect.
The command has the following syntax:
	tk::unsupported::MacWindowStyle style window ?class? ?attributes?
The 2 argument form returns a list of the current class and attributes for the
given window. The 3 argument form sets the class for the given window using the
default attributes for that class. The 4 argument form sets the class and the
list of attributes for the given window.
Window class names:
    document, modal, floating, utility, toolbar, simple, help, overlay
Window attribute names:
    standardDocument, standardFloating, resizable, fullZoom, horizontalZoom,
    verticalZoom, closeBox, collapseBox, toolbarButton, sideTitlebar,
    noTitleBar, unifiedTitleAndToolbar, metal, hud, noShadow, doesNotCycle,
    noActivates, hideOnSuspend, inWindowMenu, ignoreClicks, doesNotHide,
    canJoinAllSpaces, moveToActiveSpace, nonActivating, black, dark, light,   
    gray, red, green, blue, cyan, yellow, magenta, orange, purple,
    brown, clear, opacity

Note that not all attributes are valid for all window classes.
Support for the 3 argument form was added with the Cocoa-based Tk 8.6b2, at the
same time support for some legacy Carbon-specific classes and attributes was
removed (they are still accepted by the command but no longer have any effect).

The color window attributes (black, dark, red, etc.) and the "opacity" allow  one to set the background and opacity of a textured ("metal") window. This allows a Tk window to implement a window without the dividing line between the titlebar and the rest of the window, or the "unified toolbar" effect, which is increasingly standard in Mac applications. An example:

toplevel .f
tk::unsupported::MacWindowStyle style .f document {metal light opaque closeBox collapseBox resizable standardDocument }

pack [label .f.f -bg  #ababab -text "This is a textured window\nwith opacity and a gray background\nsimilar to other Mac applications"] -fill both -expand yes

The color attributes correspond to system-defined NSColor constants (e.g., red is [NSColor redColor]. The "light" and "dark" attributes correspond to lightGrayColor and darkGrayColor, respectively (because of the way the attributes are parsed, using "lightgray" and "darkgray" would cause a conflict with the core "gray" attribute). 

Below are the corresponding hex and/or Tk-defined colors that can be used from Tk widgets to match the NSColor-based attributes:

black	#000000
dark	#545454
light	#ababab
white	#ffffff
gray	#7f7f7f
red 	#ff0000
green	#00ff00
blue	#0000ff
cyan	#00ffff
yellow	#ffff00
magenta	#ff00ff
orange	#ff8000
purple 	#800080
brown	#996633
clear	systemTransparent

- The Cocoa-based TkAqua can be distinguished from the older Carbon-based
version via the [winfo server .] command, example output on Mac OS X 10.5.7:
    Cocoa-based:	CG409.3 Apple AppKit GC 949.46 Mac OS X 1057
    Carbon-based:	QD10R30 Apple 1057

- If you want to use Remote Debugging with Xcode, you need to set the
environment variable XCNOSTDIN to 1 in the Executable editor for Wish. That will
cause us to force closing stdin & stdout.  Otherwise, given how Xcode launches
Wish remotely, they will be left open and then Wish & gdb will fight for stdin.


3. Building Tcl/Tk on Mac OS X
------------------------------

- At least Mac OS X 10.3 is required to build Tcl and TkX11, and Mac OS X 10.5
is required to build TkAqua.
Apple's Xcode Developer Tools need to be installed (only the most recent version
matching your OS release is supported), the Xcode installer is available on Mac
OS X install media or may be present in /Applications/Installers on Macs that
came with OS X preinstalled. The most recent version can always be downloaded
from the ADC website http://connect.apple.com (free ADC membership required).

- Tcl/Tk are most easily built as Mac OS X frameworks via GNUmakefile in
tcl/macosx and tk/macosx (see below for details), but can also be built with the
standard unix configure and make buildsystem in tcl/unix resp. tk/unix as on any
other unix platform (indeed, the GNUmakefiles are just wrappers around the unix
buildsystem).
The Mac OS X specific configure flags are --enable-aqua, --enable-framework and
--disable-corefoundation (which disables CF and notably reverts to the standard
select based notifier). Note that --enable-aqua is incompatible with
--disable-corefoundation (for both Tcl and Tk configure).

- It is also possible to build with the Xcode IDE via the projects in
tk/macosx, take care to use the project matching your DevTools and OS version:
	Tk.xcode: 		    for Xcode 3.1 on 10.5
	Tk.xcodeproj:		    for Xcode 3.2 on 10.6
These have the following targets:
	Tk:			    calls through to tk/macosx/GNUMakefile,
				    requires a corresponding build of the Tcl
				    target of tcl/macosx/Tcl.xcode.
	tktest:			    static build of TkAqua tktest for debugging.
	tktest-X11:		    static build of TkX11 tktest for debugging.
The following build configurations are available:
	Debug:			    debug build for the active architecture,
				    with Fix & Continue enabled.
	Debug clang:		    use clang compiler.
	Debug llvm-gcc:		    use llvm-gcc compiler.
	Debug gcc40:		    use gcc 4.0 compiler.
	DebugNoGC:		    disable Objective-C garbage collection.
	DebugNoFixAndContinue:      disable Fix & Continue.
	DebugUnthreaded:	    disable threading.
	DebugNoCF:		    disable corefoundation (X11 only).
	DebugNoCFUnthreaded:	    disable corefoundation an threading.
	DebugMemCompile:	    enable memory and bytecode debugging.
	DebugLeaks:		    define PURIFY.
	DebugGCov:		    enable generation of gcov data files.
	Debug64bit:		    configure with --enable-64bit (requires
				    building on a 64bit capable processor).
	Release:		    release build for the active architecture.
	ReleaseUniversal:	    32/64-bit universal build.
	ReleaseUniversal clang:	    use clang compiler.
	ReleaseUniversal llvm-gcc:  use llvm-gcc compiler.
	ReleaseUniversal gcc40:	    use gcc 4.0 compiler.
	ReleaseUniversal10.5SDK:    build against the 10.5 SDK (with 10.5
				    deployment target).
	Note that the non-SDK configurations have their deployment target set to
	10.5 (Tk.xcode) resp. 10.6 (Tk.xcodeproj).
The Xcode projects refer to the toplevel tcl and tk source directories via the
the TCL_SRCROOT and TK_SRCROOT user build settings, by default these are set to
the project-relative paths '../../tcl' and '../../tk', if your source
directories are named differently, e.g. '../../tcl8.6' and '../../tk8.6', you
need to manually change the TCL_SRCROOT and TK_SRCROOT settings by editing your
${USER}.pbxuser file (located inside the Tk.xcodeproj bundle directory) with a
text editor.

- To build universal binaries outside of the Xcode IDE, set CFLAGS as follows:
	export CFLAGS="-arch i386 -arch x86_64 -arch ppc"
This requires Mac OS X 10.4 and Xcode 2.4 (or Xcode 2.2 if -arch x86_64 is
omitted, but _not_ Xcode 2.1) and will work on any architecture (on PowerPC
Tiger you need to add "-isysroot /Developer/SDKs/MacOSX10.4u.sdk").
Note that configure requires CFLAGS to contain a least one architecture that can
be run on the build machine (i.e. ppc on G3/G4, ppc or ppc64 on G5, ppc or i386
on Core and ppc, i386 or x86_64 on Core2/Xeon).
Universal builds of Tcl TEA extensions are also possible with CFLAGS set as
above, they will be [load]able by universal as well as thin binaries of Tcl.

- To enable weak-linking, set the MACOSX_DEPLOYMENT_TARGET environment variable
to the minimal OS version the binaries should be able to run on, e.g:
	export MACOSX_DEPLOYMENT_TARGET=10.4
This requires at least gcc 3.1; with gcc 4 or later, set/add to CFLAGS instead:
	export CFLAGS="-mmacosx-version-min=10.4"
Support for weak-linking was added with 8.4.14/8.5a5.

Detailed Instructions for building with macosx/GNUmakefile
----------------------------------------------------------

- Unpack the Tcl and Tk source release archives and place the tcl and tk source
trees in a common parent directory.
[ If you don't want have the two source trees in one directory, you'll need to ]
[ create the following symbolic link for the build to work as setup by default ]
[      ln -fs /path_to_tcl/build /path_to_tk/build			       ]
[ (where /path_to_{tcl,tk} is the directory containing the tcl resp. tk tree)  ]
[ or you can pass an argument of BUILD_DIR=/somewhere to the tcl and tk make.  ]

- The following instructions assume the Tcl and Tk source trees are named
"tcl${ver}" and "tk${ver}" (where ${ver} is a shell variable containing the
Tcl/Tk version number, e.g. '8.6').
Setup this shell variable as follows:
	ver="8.6"
If you are building from CVS, omit this step (CVS source tree names usually do
not contain a version number).

- Setup environment variables as desired, e.g. for a universal build on 10.5:
	CFLAGS="-arch i386 -arch x86_64 -arch ppc -mmacosx-version-min=10.5"
	export CFLAGS

- Change to the directory containing the Tcl and Tk source trees and build:
	make -C tcl${ver}/macosx
	make -C tk${ver}/macosx

- Install Tcl and Tk onto the root volume (admin password required):
	sudo make -C tcl${ver}/macosx install
	sudo make -C tk${ver}/macosx  install
if you don't have an admin password, you can install into your home directory
instead by passing an INSTALL_ROOT argument to make:
	make -C tcl${ver}/macosx install INSTALL_ROOT="${HOME}/"
	make -C tk${ver}/macosx  install INSTALL_ROOT="${HOME}/"

- The default GNUmakefile targets will build _both_ debug and optimized versions
of the Tcl and Tk frameworks with the standard convention of naming the debug
library Tcl.framework/Tcl_debug resp. Tk.framework/Tk_debug.
This allows switching to the debug libraries at runtime by setting
	export DYLD_IMAGE_SUFFIX=_debug
(c.f. man dyld for more details)

If you only want to build and install the debug or optimized build, use the
'develop' or 'deploy' target variants of the GNUmakefile, respectively.
For example, to build and install only the optimized versions:
	make -C tcl${ver}/macosx deploy
	make -C tk${ver}/macosx deploy
	sudo make -C tcl${ver}/macosx install-deploy
	sudo make -C tk${ver}/macosx  install-deploy

- The GNUmakefile can also build a version of Wish.app that has the Tcl and Tk
frameworks embedded in its application package. This allows for standalone
deployment of the application with no installation required, e.g. from read-only
media. To build & install in this manner, use the 'embedded' variants of
the GNUmakefile targets.
For example, to build a standalone 'Wish.app' in ./emb/Applications/Utilities:
	make -C tcl${ver}/macosx embedded
	make -C tk${ver}/macosx embedded
	sudo make -C tcl${ver}/macosx install-embedded INSTALL_ROOT=`pwd`/emb/
	sudo make -C tk${ver}/macosx  install-embedded INSTALL_ROOT=`pwd`/emb/
Notes:
  * if you've already built standard TclTkAqua, building embedded does not
  require any new compiling or linking, so you can skip the first two makes.
  (making relinking unnecessary was added with 8.4.2)
  * the embedded frameworks include only optimized builds and no documentation.
  * the standalone Wish has the directory Wish.app/Contents/lib in its
  auto_path. Thus you can place tcl extensions in this directory (i.e. embed
  them in the app package) and load them with [package require].

- It is possible to build Tk against an installed Tcl.framework; but you will
still need a tcl sourcetree in the location specified in TCL_SRC_DIR in
Tcl.framework/tclConfig.sh. Also, linking with Tcl.framework has to work exactly
as indicated in TCL_LIB_SPEC in Tcl.framework/tclConfig.sh.
If you used non-default install locations for Tcl.framework, specify them as
make overrides to the tk/macosx GNUmakefile, e.g.
	make -C tk${ver}/macosx \
	    TCL_FRAMEWORK_DIR=$HOME/Library/Frameworks TCLSH_DIR=$HOME/usr/bin
	sudo make -C tk${ver}/macosx install \
	    TCL_FRAMEWORK_DIR=$HOME/Library/Frameworks TCLSH_DIR=$HOME/usr/bin
The Makefile variables TCL_FRAMEWORK_DIR and TCLSH_DIR were added with Tk 8.4.3.
@


1.30
log
@Merge of TkAqua Cocoa port
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.29 2008/06/12 06:31:10 das Exp $
d190 4
a193 1
    canJoinAllSpaces, moveToActiveSpace, nonActivating
d199 27
@


1.29
log
@	* macosx/Wish.xcodeproj/project.pbxproj: add tclIORTrans.c; add tclOO
	* macosx/Wish.xcodeproj/default.pbxuser: files to tktest-X11 target;
	add debug targets for 64bit and with corefoundation disabled; updates
	and cleanup for Xcode 3.1 and for Leopard; sync with Tcl.xcodeproj.
	* macosx/Wish.xcode/project.pbxproj:	sync Wish.xcodeproj changes.
	* macosx/Wish.xcode/default.pbxuser:
	* macosx/README:			document new build configs.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.28 2008/06/01 00:29:29 das Exp $
d30 1
a30 1
Mac OS X specific bugs should usually be assigned to 'das' or 'wolfsuit'.
d39 1
a39 1
available as an optional install on recent Mac OS X retail disks).
d42 2
a43 3
- At a minimum, Mac OS X 10.1 is required to run Tcl and TkX11, and OS X 10.2 is
required to run TkAqua. However OS X 10.3 or higher is recommended (certain
[file] operations behave incorrectly on earlier releases).
d62 3
a64 3
	$HOME/Library/Tcl /Library/Tcl /Network/Library/Tcl /System/Library/Tcl
	$HOME/Library/Frameworks /Library/Frameworks /Network/Library/Frameworks
	/System/Library/Frameworks (searched in that order).
d71 4
a74 3
(.dylib) or as MachO bundles (since 8.4.10/8.5a3); only bundles can be unloaded,
and bundles are also loaded more efficiently from VFS (no temporary copy to the
native filesystem required).
d80 1
a80 1
No nroff manpages are installed by default by the GNUmakefiles.
d84 1
a84 2
	$HOME/Library/Frameworks /Library/Frameworks
	/Network/Library/Frameworks /System/Library/Frameworks
d86 1
a86 1
- /usr/bin/wish8.x is a script that calls a copy of 'Wish' contained in
d89 3
a91 3
- if 'Wish' is started from the Finder or via 'open', $argv contains a
"-psn_XXXX" argument. This is the Wish's carbon process serial number, you may
need to filter it out for cross platform compatibility of your scripts.
d99 3
a101 11
- As of Tk 8.4.7, TkAqua has a version of the low-level drawing primitives using
the CoreGraphics routines - the code is primarily due to James Tittle. There
were numerous problems with the QD version, mostly due to the different drawing
model of QD & Tk. CG also trivially supports dashed lines, and the various end
caps & miters. The old QD code is retained for now, just in case there are any
compatibility problems. To switch back to the QD drawing, put
    set tk::mac::useCGDrawing 0
in your script before you do drawing.
All CG drawing is antialiased by default, but (outline) linewidth can be used to
control whether a line/shape is drawn antialiased. The antialiasing threshold is
0 by default (i.e. antialias everything), it can be changed by setting
d106 1
a106 1
- ATSUI text antialiasing by default uses the standard OS antialising settings.
d112 2
a113 2
normal scrollbar has a small dimension of 15, the small variant 11. Access to
the small variant was added in Tk 8.4.2.
d115 85
a199 15
- Cursors: You can now put up and spin the Classic MacOS spinner, and the
counting hands and watch cursor. The way this is done is each of the spinners
have a base name:
    spinning: The circular B&W circular spinner
    countinguphand: The counting up hand
    countingdownhand: The counting down hand
    countingupanddownhand: The counting up then down hand
    watch: The watch cursor
Then to get the sequential variants, add an integer to the end of the base name.
So, for instance this code will spin the spinner:
    proc spinCursor {widget count} {
	$widget configure -cursor spinning$count
	after 100 spinCursor [incr count]
    }
This was added in Tk 8.4.2
d201 1
a201 1
- If you want to use Remote Debugging with Xcode 1.5 or 2.2, you need to set the
d210 7
a216 7
- At least Mac OS X 10.1 is required to build Tcl and TkX11 and OS X 10.2 is
required to build TkAqua. Apple's Developer Tools need to be installed (only the
most recent version matching your OS release is supported). The Developer Tools
installer is available on Mac OS X retail disks or is present in
/Applications/Installers on Macs that came with OS X preinstalled. The most
recent version can be downloaded from the ADC website http://connect.apple.com
(after you register for free ADC membership).
d228 48
a275 67
- It is also possible to build with Apple's IDE via the projects in tk/macosx,
take care to only use the project matching your DevTools and OS version:
    * Wish.pbproj for Xcode or ProjectBuilder on 10.3 and earlier, this has a
	'Tk' target that simply calls through to the tcl/macosx/GNUMakefile. It
	requires a build of the 'Tcl' target of tcl/macosx/Tcl.pbproj.
    * Wish.xcode Xcode 2.4 on 10.4 and Xcode 2.5 on 10.4 and later, which
	additionally has native 'tktest' and 'tktest-X11' targets for
	debugging, these targets' 'Debug' build configuration has ZeroLink and
	Fix&Continue enabled, use the 'DebugNoFixZL' build configuration if you
	need a debug build without these features. The following build
	configurations are available:
	'DebugUnthreaded': debug build with threading turned off.
	'DebugNoCF': debug build with corefoundation turned off
		(for 'tktest-X11' only).
	'DebugNoCFUnthreaded': debug build with corefoundation turned off
		(for 'tktest-X11' only) and with threading turned off.
	'DebugMemCompile': debug build with memory and bytecode debugging on.
	'DebugLeaks': debug build with PURIFY defined.
	'DebugGCov': debug build with generation of gcov data files enabled.
	'ReleaseUniversal': builds the targets as universal binaries for the
		ppc and i386 architectures.
	'ReleaseUniversal10.4uSDK': same as 'ReleaseUniversal' but builds
		against the 10.4u SDK, required to build universal binaries on
		PowerPC Tiger (where the system libraries are not universal).
	'ReleasePPC10.3.9SDK': builds for PowerPC against the 10.3.9 SDK, useful
		for verifying on Tiger that building on Panther would succeed.
	'ReleasePPC10.2.8SDK': builds for PowerPC with gcc-3.3 against the
		10.2.8 SDK, useful to verify on Tiger that building on Jaguar
		would succeed.
    * Wish.xcodeproj for Xcode 3.1 on 10.5 and later, which has the following
	additional build configurations:
	'ReleaseUniversal10.5SDK': same as 'ReleaseUniversal' but builds
		against the 10.5 SDK on Leopard (with 10.5 deployment target).
	'Debug gcc42':  same as 'Debug' but builds with gcc 4.2.
	'Debug llvmgcc42': same as 'Debug' but builds with llvm-gcc 4.2.
	'ReleaseUniversal gcc42': same as 'ReleaseUniversal' but builds with
		gcc 4.2.
	'ReleaseUniversal llvmgcc42': same as 'ReleaseUniversal' but builds
		with llvm-gcc 4.2.
	'Debug64bit': builds the 'tktest-X11' target as 64bit with debugging
		 enabled (requires a 64bit capable processor).
	Note that all non-SDK configurations have 10.5 deployment target and
		that all Universal configurations build the 'tktest-X11' target
		also for the ppc64 and x86_64 architectures.

Notes about the native targets of the Xcode projects:
    * the Xcode projects refer to the toplevel tcl and tk source dirs through
	the TCL_SRCROOT and TK_SRCROOT user build settings, by default these are
	set to the project-relative paths '../../tcl' and '../../tk', if your
	source directories are named differently, e.g. '../../tcl8.5', you'll
	need to manually change the TCL_SRCROOT and TK_SRCROOT settings by
	editing your ${USER}.pbxuser file (located inside the Wish.xcodeproj
	bundle directory) with a text editor.
    * the native targets need a version of the unix configure scripts with config
	headers enabled, this is automatically generated as tcl/macosx/configure
	and tk/macosx/configure by the project but that requires 2.59 versions
	of autoconf & autoheader. These are not available on Mac OS X 10.5 by
	default and need to be installed manually. By default they are assumed
	to be installed as /usr/local/bin/autoconf-2.59 and
	/usr/local/bin/autoheader-2.59, set the AUTOCONF and AUTOHEADER build
	settings in ${USER}.pbxuser to their true locations if necessary.

- To build universal binaries outside of Wish.xcodeproj, set CFLAGS as follows:
    export CFLAGS="-arch ppc -arch i386 \
	-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4"
This requires Mac OS X 10.4 and Xcode 2.2 (_not_ Xcode 2.1) and will work on any
of the architectures (the -isysroot flag is only required on PowerPC Tiger).
d277 4
a280 10
be run on the build machine (i.e. ppc on PowerPC, ppc or i386 on Intel).
Universal builds of Tk TEA extensions are also possible with CFLAGS set as
above, they will be [load]able by universal as well as thin binaries of Tk.
Note that while Tcl can be built for 64-bit architectures, neither TkAqua nor
TkX11 can be built for 64-bit as the corresponding GUI libraries are not
available for 64bit at present. However, linking a universal 'ppc i386' Tk
binary against a universal 'ppc ppc64 i386 x86_64' Tcl binary works just fine.
The Tk configure script automatically removes the 64-bit -arch flags from CFLAGS
to facilitate universal building of both Tcl and Tk with the same CFLAGS; the
same happens with configure in Tk extensions based on TEA 3.5 or later.
d283 5
a287 8
to the minimal OS version (>= 10.2) the binaries should be able to run on, e.g:
    export MACOSX_DEPLOYMENT_TARGET=10.2
This requires Mac OS X 10.2 and gcc 3.1; if you have gcc 4 or later you can set
CFLAGS instead:
    export CFLAGS="-mmacosx-version-min=10.2"
The Wish.xcode project is setup to produce binaries that can run on 10.2 or
later (except for the Universal and SDK configurations).
Support for weak-linking was added to the code for 8.4.14/8.5a5.
d301 10
a310 10
"tcl${ver}" and "tk${ver}", respectively, where ${ver} is a shell variable
containing the Tcl and Tk version number (for example '8.4.12').
Setup the shell variable as follows:
	set ver="8.4.12" ;: if your shell is csh
	ver="8.4.12"	 ;: if your shell is sh
The source trees will be named this way only if you are building from a release
archive, if you are building from CVS, the version numbers will be missing; so
set ${ver} to the empty string instead:
	set ver=""	 ;: if your shell is csh
	ver=""		 ;: if your shell is sh
d312 1
a312 2
- The following steps will build Tcl and Tk from the Terminal, assuming you are
located in the directory containing the tcl and tk source trees:
d315 2
a316 2
and the following will then install Tcl and Tk onto the root volume (admin
password required):
d319 1
a319 1
if you don't have the admin password, you can install into your home directory,
d332 1
a332 1
'develop' or 'deploy' target variants of the GNUmakefiles, respectively.
d339 1
a339 1
- The GNUmakefiles can also build a version of 'Wish' that has the Tcl and Tk
d342 3
a344 3
media. To build & install in this manner, use the 'embedded' target variants of
the GNUmakefiles. For example, to build a standalone 'Wish.app'
in ./embedded/Applications/Utilities:
d347 2
a348 2
	sudo make -C tcl${ver}/macosx install-embedded INSTALL_ROOT=`pwd`/embedded/
	sudo make -C tk${ver}/macosx  install-embedded INSTALL_ROOT=`pwd`/embedded/
d352 1
a352 1
  (making relinking unnecessary was added in 8.4.2)
d368 1
a368 1
The Makefile variables TCL_FRAMEWORK_DIR and TCLSH_DIR were added in Tk 8.4.3.
@


1.28
log
@	* macosx/Wish.xcodeproj/project.pbxproj: add new tclOO files; add debug
	* macosx/README:			targets with gcov; update to
						Xcode 3.1.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.27 2007/12/13 15:27:08 dgp Exp $
d173 5
a177 5
	additionally has a native 'tktest' target useful for debugging, this
	target's 'Debug' build configuration has ZeroLink and Fix&Continue
	enabled, use the 'DebugNoFixZL' build configuration if you need a debug
	build without these features. The following additional build
	configurations are available for the 'Tk' and 'tktest' targets:
d179 4
d185 1
d197 1
a197 1
	additional build configuration:
d200 11
@


1.27
log
@merge stable branch onto HEAD
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.23.2.2 2007/09/06 18:23:54 dgp Exp $
d191 1
a191 1
    * Wish.xcodeproj for Xcode 3.0 on 10.5 and later, which has the following
@


1.27.2.1
log
@	* macosx/Wish.xcodeproj/project.pbxproj: add debug configs for 64bit,
	* macosx/Wish.xcodeproj/default.pbxuser: with gcov, and with
	corefoundation disabled; updates & cleanup for Xcode 3.1 and for
	Leopard; sync with Tcl.xcodeproj.
	* macosx/Wish.xcode/project.pbxproj:	sync Wish.xcodeproj changes.
	* macosx/Wish.xcode/default.pbxuser:
	* macosx/README:			document new build configs.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.27 2007/12/13 15:27:08 dgp Exp $
d173 5
a177 5
	additionally has native 'tktest' and 'tktest-X11' targets for
	debugging, these targets' 'Debug' build configuration has ZeroLink and
	Fix&Continue enabled, use the 'DebugNoFixZL' build configuration if you
	need a debug build without these features. The following build
	configurations are available:
a178 4
	'DebugNoCF': debug build with corefoundation turned off
		(for 'tktest-X11' only).
	'DebugNoCFUnthreaded': debug build with corefoundation turned off
		(for 'tktest-X11' only) and with threading turned off.
a180 1
	'DebugGCov': debug build with generation of gcov data files enabled.
d191 2
a192 2
    * Wish.xcodeproj for Xcode 3.1 on 10.5 and later, which has the following
	additional build configurations:
a194 11
	'Debug gcc42':  same as 'Debug' but builds with gcc 4.2.
	'Debug llvmgcc42': same as 'Debug' but builds with llvm-gcc 4.2.
	'ReleaseUniversal gcc42': same as 'ReleaseUniversal' but builds with
		gcc 4.2.
	'ReleaseUniversal llvmgcc42': same as 'ReleaseUniversal' but builds
		with llvm-gcc 4.2.
	'Debug64bit': builds the 'tktest-X11' target as 64bit with debugging
		 enabled (requires a 64bit capable processor).
	Note that all non-SDK configurations have 10.5 deployment target and
		that all Universal configurations build the 'tktest-X11' target
		also for the ppc64 and x86_64 architectures.
@


1.26
log
@typo
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.25 2007/09/06 08:07:24 das Exp $
@


1.25
log
@	* macosx/Wish.xcode/project.pbxproj: discontinue unmaintained support
	* macosx/Wish.xcode/default.pbxuser: for Xcode 1.5; replace by Xcode2
	project for use on Tiger (with Wish.xcodeproj to be used on Leopard).

	* macosx/Wish.xcodeproj/project.pbxproj: updates for Xcode 2.5 and 3.0.
	* macosx/Wish.xcodeproj/default.pbxuser:
	* macosx/Wish.xcode/project.pbxproj:
	* macosx/Wish.xcode/default.pbxuser:
	* macosx/Wish-Common.xcconfig:

	* macosx/README: document project changes.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.24 2007/06/29 03:19:05 das Exp $
d237 1
a237 1
later (except for the Univerasl and SDK configurations).
@


1.24
log
@	* macosx/Wish.xcodeproj/project.pbxproj: improve support for renamed
	* macosx/Wish.xcodeproj/default.pbxuser: tcl and tk source dirs; add
	* macosx/Wish-Common.xcconfig:		 10.5 SDK build config; remove
						 tclMathOp.c.

	* macosx/README: document Wish.xcodeproj changes.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.23 2007/04/23 21:24:32 das Exp $
d169 9
a177 9
    * Wish.pbproj for ProjectBuilder on 10.2 and earlier, this has a 'Tk' target
	that simply calls through to the tcl/macosx/GNUMakefile. It requires a
	build of the 'Tcl' target of the tcl/macosx/Tcl.pbproj project.
    * Wish.xcode for Xcode 1.5 on 10.3, this additionally has a native 'tktest'
	target useful for debugging, this target's 'Development' buildstyle
	has ZeroLink and Fix&Continue enabled, use the 'DevelNoFixZL' buildstyle
	if you need a debug build without these features.
    * Wish.xcodeproj for Xcode 2.4 on 10.4 or later, which has the following
	additional build configurations for the 'Tk' and 'tktest' targets:
a182 2
	'ReleaseUniversal10.5SDK': same as 'ReleaseUniversal' but builds
		against the 10.5 SDK on Leopard (with 10.5 deployment target).
d191 5
d197 1
a197 1
    * the Xcode 2 project refers to the toplevel tcl and tk source dirs through
a203 5
    * XCode 1.5 has a bug that causes Fix&Continue and the Build menu items
	Compile/Preprocess/ShowAssembly to fail in presence of relative paths to
	source files, as a workaround change the Path Type of the 'Tcl Sources'
	and 'Tk Sources' groups to 'Absolute Path' in the groups' Info panel.
	(fixed in Xcode 2.2)
d207 1
a207 1
	of autoconf & autoheader. These are not available on on Mac OS X 10.3 by
d210 2
a211 2
	/usr/local/bin/autoheader-2.59, set the env vars AUTOCONF and AUTOHEADER
	to their true locations if necessary.
d236 2
a237 2
The Wish.xcodeproj is setup to produce binaries that can run on 10.2 or later,
except for the 'ReleaseUniversal*' configurations, where they require 10.4.
@


1.23
log
@	* macosx/tkMacOSXCarbonEvents.c: add window event target carbon event
	* macosx/tkMacOSXEvent.c:	 handler for all kEventClassWindow and
	* macosx/tkMacOSXEvent.h:	 kEventClassMouse events;
	* macosx/tkMacOSXNotify.c:	 move all remaining events except for
	* macosx/tkMacOSXWindowEvent.c:	 kEventClassKeyboard from dispatcher to
	application event handler; pass event handler callRef downstream; fix
	debug event tracing; process all tcl event types in carbon event timer;
	delay carbon event timer first fire; add TkMacOSXTrackingLoop() to mark
	enter/exit of event tracking loop during which all tcl events but only
	carbon update events should be processed by the timer (replaces various
	calls to Tcl_SetServiceMode()); rename TkMacOSXReceiveAndProcessEvent()
	to TkMacOSXReceiveAndDispatchEvent(), move it from tkMacOSXEvent.c to
	tkMacOSXCarbonEvents.c and modify it to dequeue only update events
	during a tracking loop; add TkMacOSXRunTclEventLoop() to standardize
	the various ways in use to run the tcl event loop; add handling of
	kEventClassAppearance events (for ScrollBarVariantChanged event).

	* macosx/tkMacOSXDialog.c:	use new TkMacOSXTrackingLoop() around
	* macosx/tkMacOSXEvent.c:	blocking API that puts up modal dialogs
	* macosx/tkMacOSXMenu.c:	or when entering/exiting menu/control
	* macosx/tkMacOSXMouseEvent.c:	tracking, window dragging and other
	* macosx/tkMacOSXScale.c:	mouse tracking loops.
	* macosx/tkMacOSXScrlbr.c:
	* macosx/tkMacOSXWindowEvent.c:
	* macosx/tkMacOSXWm.c:

	* macosx/tkMacOSXDialog.c:	use new TkMacOSXRunTclEventLoop()
	* macosx/tkMacOSXScale.c:	instead of Tcl_DoOneEvent(),
	* macosx/tkMacOSXScrlbr.c:	Tcl_ServiceAll(), TclServiceIdle()
	* macosx/tkMacOSXWindowEvent.c:	and Tcl_GlobalEval("update idletasks").

	* macosx/tkMacOSXColor.c: make available as Tk system colors all
	* macosx/tkMacOSXPort.h:  appearance manager brushes, text colors and
	backgrounds with new and legacy names, as well as the fully transparent
	color "systemTransparent"; add TkMacOSXSetColorIn{Port,Context}() to
	directly set an X pixel color value in the current QD port resp. the
	given CG context without requiring passage through rgb representation
	(lossy for most system colors); modernize/remove Classic-era code;
	replace crufty strcmp() elseifs by Tcl_GetIndexFromObjStruct().

	* macosx/tkMacOSXButton.c:	use new TkMacOSXSetColorInPort()
	* macosx/tkMacOSXDraw.c:	instead of setting rgb color directly
	* macosx/tkMacOSXMenubutton.c:	to allow for non-rgb system colors.

	* macosx/tkMacOSXCursor.c: implement "none" cursor as on other
	platforms [Patch 1615427]; add all missing appearance manager cursors.

	* macosx/tkMacOSXDefault.h: set SELECT_FG_COLORs to None to match aqua
	L&F; use standard system color names; use new 'menu' system font;
	correct default scrollbar width.

	* macosx/tkMacOSXDraw.c:	standardize initialization, use and
	* macosx/tkMacOSXInt.h:		emptying of various static temp rgns
	* macosx/tkMacOSXRegion.c:	onto two global RgnHandles; in debug
	* macosx/tkMacOSXSubwindows.c:	builds, verify emptiness of these temp
	* macosx/tkMacOSXWindowEvent.c:	rgns before use.

	* macosx/tkMacOSXDraw.c: add TkMacOSX{Setup,Restore}DrawingContext() to
	* macosx/tkMacOSXInt.h:  abstract common setup & teardown of drawing
	environment (for both CG and QD); save/restore QD theme drawing state;
	handle GC clip region; add TkpClipDrawableToRect() to allow clipped
	drawing into drawable regardless of GC used; use new system color
	"systemWindowHeaderBackground" to setup background in themed toplevels;
	correct implementation of TkMacOSXMakeStippleMap().

	* macosx/tkMacOSXEntry.c:  use new TkMacOSXSetupDrawingContext() and
	* macosx/tkMacOSXFont.c:   TkMacOSXRestoreDrawingContext() instead of
	* macosx/ttkMacOSXTheme.c: various setup/teardown procs like
	TkMacOSX{SetUp,Release}CGContext(), TkMacOSXQuarz{Start,End}Draw(),
	TkMacOSXSetUpGraphicsPort() etc.

	* macosx/tkMacOSXEmbed.c: add CG context and drawable clip rgn fields
	* macosx/tkMacOSXInt.h:   to MacDrawable struct.
	* macosx/tkMacOSXSubwindows.c:

	* macosx/tkMacOSXDialog.c: make -parent option of tk_getOpenFile et al.
	use the sheet version of NavServices dialogs; ensure native parent win
	exists before using StandardSheet API for tk_messageBox [Bug 1677611];
	force sheets to behave like app-modal dialogs via WindowModality() API;
	use more modern ColorPicker API.

	* macosx/tkAboutDlg.r: use themed movable modal dialog, fix (c) year.

	* macosx/tkMacOSXEntry.c:  take xOff/yOff of MacDrawable into account
	* macosx/ttkMacOSXTheme.c: when computing locations/bounds to ensure
	correct posititioning when not drawing into intermediate pixmap.

	* macosx/tkMacOSXFont.c: use appearance manager API to map system font
	* macosx/tkMacOSXFont.h: names to TkFonts; add "menu" system font for
	menu item text drawing from MDEF; always draw with CG; remove QD
	dependent stippling algorithm; move most header declarations into the
	source file (as they were not used anywhere else).

	* macosx/tkMacOSXMenu.c:		 large-scale rewrite of custom
	* macosx/tkMacOSXMenu.r (removed):	 MDEF and related code that
	* macosx/Wish.xcode/project.pbxproj:	 restores many longtime-MIA
	* macosx/Wish.xcodeproj/project.pbxproj: features to working order
	* unix/Makefile.in:			 (e.g. images, custom colors &
	fonts in menus etc); implement compound menu items; use Appearance Mgr
	and ThemeText APIs to mimic native MDEF as closely as possible when
	default "menu" system font is used; remove now obsolete SICN drawing
	code and resources.

	* macosx/tkMacOSXCarbonEvents.c: handle additional menu carbon events
	* macosx/tkMacOSXEvent.c:	 in order to support <<MenuSelect>> in
	* macosx/tkMacOSXMenu.c:	 the menubar and in menus that are not
	* macosx/tkMacOSXMenus.c:	 using the custom MDEF [Bug 1620826];
	fix early and missing clearing of current Tk active menu entry; fix
	extraneous sending of <<MenuSelect>> during active menu entry clearing.

	* macosx/tkMacOSXMouseEvent.c: add support for async window dragging by
	the window server; set the corresponding window attribute by default.

	* macosx/tkMacOSXMouseEvent.c: rationalized handling order of
	non-mousedown events; add TkMacOSXModifierState() to retrieve the
	current key modifiers in carbon format.

	* macosx/tkMacOSXScrlbr.c: use appearance manager API to retrieve
	scrollbar component metrics; add awareness of multiple possibilites for
	scrollbar arrow position in aqua and handle user changes to arrow
	position pref; handle difference in metrics of small & large scrollbar
	variants; handle aqua "jump to here" scrollbar behaviour; correct
	computation of scroll view size and position; enforce min scrollbar
	height to avoid scrollbar component overlap; erase scrollbar area
	outside of standard width; remove broken auto-adjust code; account for
	window class when leaving space for grow box; remove code to manually
	draw grow box; use modern API for thumb scroll proc; replace
	HiliteControl() by modern API; replace control mgr constants with
	appearance mgr equivalents.

	* macosx/tkMacOSXSubwindows.c: use SetWindowBounds() API instead of
	SizeWindow(); invalidate clip regions after X{Map,Unmap}Window as fix
	for [Bug 940117] made them dependent on mapping state; remove unneeded
	calls to TkMacOSXInvalClipRgns() and unnecessary setting of QD port;
	use native-endian pixmap on intel; remove obsolete pixmap pix locking.

	* macosx/tkMacOSXWindowEvent.c: handle only the first of a batch of
	kEventAppAvailableWindowBoundsChanged events sent per transaction;
	handle kEventWindowBoundsChanged event to support live window resizing
	and centralized sending of location/size changed ConfigureNotify
	events; ensure HIGrowBox is redrawn after bounds change; constrain
	window after dragging to ensure titlebar is not inacessible
	offscreen or under dock/menubar; handle kEventWindowGetRegion and
	kEventWindowDrawContent for transparent windows to mark resp. paint
	content region as transparent; handle kEventWindowConstrain for
	fullscreen windows to ensure bounds match new screen size; enter/exit
	fullscreen UIMode upon activation/deactivation of fullscreen window.

	* macosx/tkMacOSXWm.c: use live-resize and async-drag carbon window
	* macosx/tkMacOSXWm.h: attributes for toplevels by default; implement
	new [wm attributes] -topmost, -transparent and -fullscreen; refactor
	WmAttributesCmd() parallelling the tkUnixWm.c implementation, use thus
	factored proc to set proxy icon from [wm iconbitmap]; dynamically
	determine default values for toplevel min and max sizes (similar to
	tkWinWm.c impl): min sizes depend on window class & attributes to
	ensure visibility of all titlebar widgets and grow box, max sizes
	depend on maximal window bounds for all active displays; factor out
	code that puts into effect changes to master or override_redirect; use
	RepositionWindow() API to determine staggered initial window bounds;
	correct resize limit calculations, handle gridding and use modern
	resize API in TkMacOSXGrowToplevel(); remove sending of ConfigureNotify
	after resize or zoom (now handled by BoundsChanged handler); correct
	composite carbon window attribute handling, remove currently unusable
	attributes and add new attributes in [tk::unsupported::MacWindowStyle];
	ensure validity of window class and attributes before use; apply
	changes to window class when handling carbon window attribute changes
	(if HIWindowChangeClass() API available); add debug build warning
	message when deprecated window style is used instead of window class;
	use transparent HIGrowBox for resizable windows; avoid unnecessary
	calls to window structure width API; use tcl time API in TkpGetMS();
	add TkMacOSXEnterExitFullscreen() to enter/exit UIMode with dock and
	menubar hidden; restrict wmTracing output to debug builds; remove
	unneeded calls to TkMacOSXInvalClipRgns() and unnecessary setting of QD
	port; workaround GetWindowStructureWidths() Carbon bug (bogus results
	for never-mapped floating windows).

	* macosx/tkMacOSXXStubs.c (TkMacOSXDisplayChanged): add maximal window
	bounds field to Screen record (in ext_data), computed as the union of
	available window positioning bounds of all graphics devices (displays).

	* macosx/tkMacOSXBitmap.c: fix macRoman encoding leak.
	* macosx/tkMacOSXCursor.c:

	* macosx/tkMacOSXDebug.c (TkMacOSXCarbonEventToAscii): use static
	* macosx/tkMacOSXDebug.h: buffer to simplify callers; const fixes.

	* macosx/tkMacOSXBitmap.c: use more efficient QDSwapPort() instead of
	* macosx/tkMacOSXButton.c: GetPort()/SetPort()/GetGWorld()/SetGWorld().
	* macosx/tkMacOSXDraw.c:
	* macosx/tkMacOSXMenubutton.c:
	* macosx/tkMacOSXScale.c:
	* macosx/tkMacOSXScrlbr.c:
	* macosx/tkMacOSXXStubs.c:

	* macosx/tkMacOSXColor.c: use kHIToolboxVersionNumber for runtime OS
	* macosx/tkMacOSXEntry.c: version check rather than Gestalt() etc.
	* macosx/tkMacOSXInt.h:
	* macosx/tkMacOSXWm.c:

	* macosx/tkMacOSXDraw.c: remove obsolete and now incorrect
	* macosx/tkMacOSXInt.h:  tkMenuCascadeRgn clipping code.
	* macosx/tkMacOSXMenu.c:

	* macosx/tkMacOSXHLEvents.c: replace Tcl_GlobalEval() resp. Tcl_Eval()
	* macosx/tkMacOSXScrlbr.c:   by Tcl_EvalEx().
	* macosx/tkMacOSXInit.c:

	* macosx/tkMacOSXInit.c (TkpInit): reorder initialization steps.

	* macosx/tkMacOSXKeyEvent.c: remove pre-10.2 support.

	* macosx/tkMacOSXMenus.c: remove now useless call to
	TkMacOSXHandleTearoffMenu(); use \x.. quoting for non-latin1 macroman
	literar chars to allow file to be edited as utf-8.

	* macosx/tkMacOSXScale.c: replace TrackControl() by modern
	* macosx/tkMacOSXScrlbr.c: HandleControlClick() API (using new
	TkMacOSXModifierState()).

	* macosx/tkMacOSXInt.h:		move all constant #defines needed to
	* macosx/tkMacOSXColor.c:	support building on older OS X releases
	* macosx/tkMacOSXEvent.h:	to a central location in tkMacOSXInt.h.
	* macosx/tkMacOSXFont.c:
	* macosx/tkMacOSXMenu.c:
	* macosx/tkMacOSXMenubutton.c:
	* macosx/tkMacOSXMenus.c:
	* macosx/tkMacOSXMouseEvent.c:
	* macosx/tkMacOSXWm.c:
	* macosx/ttkMacOSXTheme.c:

	* macosx/tkMacOSXInt.h:		 add ChkErr() macro to factor out
	* macosx/tkMacOSXButton.c:	 Carbon OSStatus return value checking
	* macosx/tkMacOSXCarbonEvents.c: and TkMacOSXDbgMsg() macro to factour
	* macosx/tkMacOSXClipboard.c:	 out debug message output; use these
	* macosx/tkMacOSXColor.c:	 macros to replace #ifdef TK_MAC_DEBUG
	* macosx/tkMacOSXCursor.c:	 blocks & direct printing to stderr,
	* macosx/tkMacOSXDebug.c:	 and to do additional OSStatus return
	* macosx/tkMacOSXDialog.c:	 checking, and to standardize OSStatus
	* macosx/tkMacOSXDraw.c:	 usage.
	* macosx/tkMacOSXEntry.c:
	* macosx/tkMacOSXEvent.c:
	* macosx/tkMacOSXFont.c:
	* macosx/tkMacOSXHLEvents.c:
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXKeyEvent.c:
	* macosx/tkMacOSXMenu.c:
	* macosx/tkMacOSXMenubutton.c:
	* macosx/tkMacOSXMenus.c:
	* macosx/tkMacOSXMouseEvent.c:
	* macosx/tkMacOSXScrlbr.c:
	* macosx/tkMacOSXSubwindows.c:
	* macosx/tkMacOSXWindowEvent.c:
	* macosx/tkMacOSXWm.c:
	* macosx/tkMacOSXXStubs.c:

	* macosx/tkMacOSXSend.c:	remove duplicate/unused declarations
	* macosx/tkMacOSXXStubs.c:

	* macosx/tkMacOSXDebug.c:	const fixes.
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXTest.c:
	* macosx/tkMacOSXWm.c:
	* macosx/tkMacOSXXStubs.c:

	* macosx/Wish-Info.plist.in: add tcl document extensions/mime types and
	LSMinimumSystemVersion, LSRequiresCarbon & NSAppleScriptEnabled keys.

	* macosx/Wish-Common.xcconfig: add Wish's Info.plist as __info_plist
	section to tktest; enable more warnings.

	* macosx/Wish.xcodeproj/project.pbxproj: add 'DebugMemCompile' build
	configuration that calls configure with --enable-symbols=all; disable
	configure check for __attribute__((__visibility__("hidden"))) in Debug
	configuration to restore availability of ZeroLink.

	* macosx/Wish-Common.xcconfig:	fix whitespace.
	* macosx/Wish-Debug.xcconfig:
	* macosx/Wish-Release.xcconfig:
	* macosx/tkMacOSXAETE.r:
	* macosx/tkMacOSXConfig.c:
	* macosx/tkMacOSXCursors.r:
	* macosx/tkMacOSXKeyboard.c:
	* macosx/tkMacOSXSend.c:
	* macosx/ttkMacOSXTheme.c:
	* macosx/tkMacOSXXCursors.r:
	* macosx/README:

	* macosx/GNUmakefile:		fix/add copyright and license refs.
	* macosx/Tk-Info.plist.in:
	* macosx/Wish-Info.plist.in:
	* macosx/Wish.xcode/project.pbxproj:
	* macosx/Wish.xcodeproj/project.pbxproj:
	* macosx/tkMacOSX.h:
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.22 2007/01/28 01:42:16 das Exp $
d176 5
a180 2
    * Wish.xcodeproj for Xcode 2.4 on 10.4, which has the following
	additional configurations for the 'Tk' and 'tktest' targets:
d183 2
d194 7
a200 4
    * the Xcode projects refer to the tcl and tk source dirs with a relative
	path of ../../tcl and ../../tk to the project location, if your source
	directories are named differently you'll need to enter the correct path
	in the info panel of the 'Tcl Sources' and 'Tk Sources' groups.
d206 8
a213 8
    * the native targets need a version of the unix configure scripts with
	config headers enabled, this is automatically generated as
	tcl/macosx/configure and tk/macosx/configure by the project but this
	requires 2.59 versions of autoconf & autoheader, which are not available
	on on Mac OS X 10.3 by default, and so need to be installed manually. By
	default they are assumed to be installed as /usr/local/bin/autoconf-2.59
	and /usr/local/bin/autoheader-2.59, set the env vars AUTOCONF and
	AUTOHEADER to their true locations if necessary.
@


1.23.2.1
log
@merge updates from HEAD
@
text
@d4 1
a4 1
RCS: @@(#) $Id$
d176 2
a177 5
    * Wish.xcodeproj for Xcode 2.4 on 10.4 or later, which has the following
	additional build configurations for the 'Tk' and 'tktest' targets:
	'DebugUnthreaded': debug build with threading turned off.
	'DebugMemCompile': debug build with memory and bytecode debugging on.
	'DebugLeaks': debug build with PURIFY defined.
a179 2
	'ReleaseUniversal10.5SDK': same as 'ReleaseUniversal' but builds
		against the 10.5 SDK on Leopard (with 10.5 deployment target).
d189 4
a192 7
    * the Xcode 2 project refers to the toplevel tcl and tk source dirs through
	the TCL_SRCROOT and TK_SRCROOT user build settings, by default these are
	set to the project-relative paths '../../tcl' and '../../tk', if your
	source directories are named differently, e.g. '../../tcl8.5', you'll
	need to manually change the TCL_SRCROOT and TK_SRCROOT settings by
	editing your ${USER}.pbxuser file (located inside the Wish.xcodeproj
	bundle directory) with a text editor.
d198 8
a205 8
    * the native targets need a version of the unix configure scripts with config
	headers enabled, this is automatically generated as tcl/macosx/configure
	and tk/macosx/configure by the project but that requires 2.59 versions
	of autoconf & autoheader. These are not available on on Mac OS X 10.3 by
	default and need to be installed manually. By default they are assumed
	to be installed as /usr/local/bin/autoconf-2.59 and
	/usr/local/bin/autoheader-2.59, set the env vars AUTOCONF and AUTOHEADER
	to their true locations if necessary.
@


1.23.2.2
log
@merge updates from HEAD
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.23.2.1 2007/07/01 17:31:30 dgp Exp $
d169 9
a177 9
    * Wish.pbproj for Xcode or ProjectBuilder on 10.3 and earlier, this has a
	'Tk' target that simply calls through to the tcl/macosx/GNUMakefile. It
	requires a build of the 'Tcl' target of tcl/macosx/Tcl.pbproj.
    * Wish.xcode Xcode 2.4 on 10.4 and Xcode 2.5 on 10.4 and later, which
	additionally has a native 'tktest' target useful for debugging, this
	target's 'Debug' build configuration has ZeroLink and Fix&Continue
	enabled, use the 'DebugNoFixZL' build configuration if you need a debug
	build without these features. The following additional build
	configurations are available for the 'Tk' and 'tktest' targets:
d183 2
a192 5
    * Wish.xcodeproj for Xcode 3.0 on 10.5 and later, which has the following
	additional build configuration:
	'ReleaseUniversal10.5SDK': same as 'ReleaseUniversal' but builds
		against the 10.5 SDK on Leopard (with 10.5 deployment target).

d194 1
a194 1
    * the Xcode projects refer to the toplevel tcl and tk source dirs through
d201 5
d209 1
a209 1
	of autoconf & autoheader. These are not available on Mac OS X 10.5 by
d212 2
a213 2
	/usr/local/bin/autoheader-2.59, set the AUTOCONF and AUTOHEADER build
	settings in ${USER}.pbxuser to their true locations if necessary.
d238 2
a239 2
The Wish.xcode project is setup to produce binaries that can run on 10.2 or
later (except for the Universal and SDK configurations).
@


1.23.2.3
log
@merge updates from 8.5 branch
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.23.2.2 2007/09/06 18:23:54 dgp Exp $
d173 5
a177 5
	additionally has native 'tktest' and 'tktest-X11' targets for
	debugging, these targets' 'Debug' build configuration has ZeroLink and
	Fix&Continue enabled, use the 'DebugNoFixZL' build configuration if you
	need a debug build without these features. The following build
	configurations are available:
a178 4
	'DebugNoCF': debug build with corefoundation turned off
		(for 'tktest-X11' only).
	'DebugNoCFUnthreaded': debug build with corefoundation turned off
		(for 'tktest-X11' only) and with threading turned off.
a180 1
	'DebugGCov': debug build with generation of gcov data files enabled.
d191 2
a192 2
    * Wish.xcodeproj for Xcode 3.1 on 10.5 and later, which has the following
	additional build configurations:
a194 11
	'Debug gcc42':  same as 'Debug' but builds with gcc 4.2.
	'Debug llvmgcc42': same as 'Debug' but builds with llvm-gcc 4.2.
	'ReleaseUniversal gcc42': same as 'ReleaseUniversal' but builds with
		gcc 4.2.
	'ReleaseUniversal llvmgcc42': same as 'ReleaseUniversal' but builds
		with llvm-gcc 4.2.
	'Debug64bit': builds the 'tktest-X11' target as 64bit with debugging
		 enabled (requires a 64bit capable processor).
	Note that all non-SDK configurations have 10.5 deployment target and
		that all Universal configurations build the 'tktest-X11' target
		also for the ppc64 and x86_64 architectures.
@


1.22
log
@	* macosx/Wish.xcodeproj/project.pbxproj:   extract build settings that
	* macosx/Wish.xcodeproj/default.pbxuser:   were common to multiple
	* macosx/Wish-Common.xcconfig (new file):  configurations into external
	* macosx/Wish-Debug.xcconfig (new file):   xcconfig files; add extra
	* macosx/Wish-Release.xcconfig (new file): configurations for building
	with SDKs; convert legacy jam-based 'Tk' target to native target with
	single script phase; correct syntax of build setting references to use
	$() throughout; remove unused tcltest sources from 'tktest' target.

	* macosx/README: document new Wish.xcodeproj configurations; other
	minor updates/corrections.

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

	* macosx/Wish.xcode/project.pbxproj: restore 'tktest' target to working
	* macosx/Wish.xcode/default.pbxuser: order by replicating applicable
	changes to Wish.xcodeproj since 2006-07-20.
@
text
@d1 1
a1 1
Tcl/Tk Mac OS X README 
d4 1
a4 1
RCS: @@(#) $Id: README,v 1.21 2006/10/16 15:56:54 das Exp $
d101 1
a101 1
the CoreGraphics routines - the code is primarily due to James Tittle.  There
d135 2
a136 2
        $widget configure -cursor spinning$count
        after 100 spinCursor [incr count]
d241 1
a241 1
[      ln -fs /path_to_tcl/build /path_to_tk/build                             ]
d250 1
a250 1
	ver="8.4.12"     ;: if your shell is sh
d254 2
a255 2
	set ver=""       ;: if your shell is csh
	ver=""           ;: if your shell is sh
@


1.21
log
@	* macosx/README: document CG antialiasing limit changes.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.20 2006/08/18 07:47:10 das Exp $
d76 1
a76 1
- The 'deploy' target of macosx/Makefile installs the html manpages into the
d80 1
a80 1
No nroff manpages are installed by default by the Makefiles.
d94 5
a98 5
- the env array is different when Wish is started from the Finder than when it
(or tclsh) is invoked from the Terminal, in particular PATH may not be what you
expect. (Wish started from the Finder inherits the Finder's environment
variables, which are essentially those set in $HOME/.MacOSX/environment.plist
and not those set by your shell configuration files).
d113 1
a113 1
thinner that <limit> pixels will not be antialiased.
d121 1
a121 1
normal scrollbar has a small dimension of 16, the small variant 12. Access to
d140 4
a143 5
- If you want to use Remote Debugging with Xcode 1.5 or 2.2, then you need to
set the environment variable XCNOSTDIN to 1 in the Executable editor for Wish.
That will cause us to force closing stdin & stdout.  Otherwise, given how Xcode
launches Wish remotely, they will be left open and then Wish & gdb will fight
for stdin...
d157 1
a157 1
- Tcl/Tk are most easily built as Mac OS X frameworks via Makefile in
d160 1
a160 1
other unix platform (indeed, the Makefiles are just wrappers around the unix
d176 12
a187 3
    * Wish.xcodeproj for Xcode 2.2 on 10.4, this additionally has a
	'ReleaseUniversal'configuration which builds both the 'Tk' and the
	'tktest' targets as universal binaries for ppc and i386. 
d211 3
a213 3
of the architectures (on intel Macs, the -isysroot may not be required). Note
that it is not possible to configure universal builds correctly if the current
architecture is not present in CFLAGS (i.e. -arch `arch` must be there).
d231 1
a231 1
except for the 'ReleaseUniversal'configuration, where they require 10.4.
d234 2
a235 2
Detailed Instructions for building with macosx/Makefile
-------------------------------------------------------
d270 2
a271 2
- The default Makefile targets will build _both_ debug and optimized versions of
the Tcl and Tk frameworks with the standard convention of naming the debug
d278 1
a278 1
'develop' or 'deploy' target variants of the Makefiles, respectively.
d285 1
a285 1
- The Makefiles can also build a version of 'Wish' that has the Tcl and Tk
d289 1
a289 1
the Makefiles. For example, to build a standalone 'Wish.app'
d309 1
a309 1
make overrides to the tk/macosx Makefile, e.g.
@


1.20
log
@	* unix/tcl.m4 (Darwin): add support for --enable-64bit on x86_64, for
	universal builds including x86_64, for 64-bit CoreFoundation on Leopard
	and for use of -mmacosx-version-min instead of MACOSX_DEPLOYMENT_TARGET.
	* unix/configure.in (Darwin): remove 64-bit arch flags from CFLAGS for
	combined 32-bit and 64-bit universal builds, as neither TkAqua nor TkX11
	can be built for 64-bit at present.
	* unix/configure: autoconf-2.59
	* unix/tkConfig.h.in: autoheader-2.59

	* macosx/Wish.xcodeproj/project.pbxproj: switch native release targets
	to use DWARF with dSYM, Xcode 3.0 changes.
	* macosx/README: updates for x86_64 and Xcode 2.3.

	* macosx/tkMacOSXInit.c (TkpInit): when available, use public
	TransformProcessType() API instead of CPSEnableForegroundOperation() SPI
	to notify the window server that we are a GUI application.

	* macosx/tkMacOSXWm.c (WmAttrGetTitlePath): use HIWindow API on >=Tiger.

	* macosx/tkMacOSXMouseEvent.c (GenerateToolbarButtonEvent):
	* macosx/tkMacOSXMenus.c (GenerateEditEvent):
	* macosx/tkMacOSXMenu.c (MenuSelectEvent): bzero XVirtualEvent structure
	before use to ensure all fields are initialized. [Bug 1542205]
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.19 2006/07/21 06:03:20 das Exp $
d104 2
a105 3
caps & miters. So this is a great improvement.
The old QD code is retained for now, just in case there are any compatibility
problems. To switch back to the QD drawing, just put:
d107 7
a113 7
in your script before you do drawing. Also the CG drawing can anti-alias line
drawing. However, anti-aliased thin lines look washed out, so the threshold for
antialiasing is set to 3 pixel width lines. You can change this if you want by
putting:
    set tk::mac::CGAntialiasLimit <limit>
in your script before drawing, in which case only lines thinner that <limit>
pixels will not be antialiased.
@


1.19
log
@typos
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.18 2006/07/20 06:25:19 das Exp $
d203 4
a206 4
This requires Mac OS X 10.4 and Xcode 2.2 (_not_ Xcode 2.1) and will work on
any of the architectures (on intel Macs, the -isysroot is not required).
Note that it is not possible to configure correctly if the current architecture
is not present in CFLAGS (i.e. -arch `arch` must always be there).
d209 2
a210 2
Note that while Tcl can be built for the ppc64 architecture, neither TkAqua nor
TkX11 can be built with -arch ppc64 as the corresponding GUI libraries are not
d212 4
a215 4
binary against a universal 'ppc ppc64 i386' Tcl binary works just fine.
The Tk configure script automatically removes '-arch ppc64' from CFLAGS to
facilitate universal building of both Tcl and Tk with the same CFLAGS setting;
the same happens with configure in Tk extensions based on TEA 3.5 or later.
@


1.18
log
@	* macosx/tkMacOSXWm.c (WmAttributesCmd, WmIconbitmapCmd): add support
	* unix/tkUnixSend.c (Tk_GetUserInactiveTime):             for weakly
	importing symbols not available on OSX 10.2 or 10.3, enables binaires
	built on later OSX versions to run on earlier ones.
	* macosx/Wish.xcodeproj/project.pbxproj: enable weak-linking; turn on
	                                         extra warnings.
	* macosx/README: document how to enable weak-linking; cleanup.
	* unix/configure.in: add check on Darwin-X11 for ld support of -weak-l
	* unix/tcl.m4:       flag and weak-link libXss if possible as it is not
	available before OSX 10.4; enforce requirement of OSX 10.2 for TkAqua;
	move Darwin specific checks & defines that are only relevant to the tcl
	build out of tcl.m4; restrict framework option to Darwin; cleanup
	quoting and help messages.
	* unix/configure: autoconf-2.59
	* unix/tkConfig.h.in: autoheader-2.59

	* macosx/GNUmakefile: enable xft for TkX11 build.
	* macosx/tkMacOSXFont.c (TkMacOSXQuarzStartDraw, TkMacOSXQuarzEndDraw):
	verify validity of context returned from QDBeginCGContext() before use.
	* macosx/tkMacOSXKeyEvent.c: ifdef out diagnostic messages to stderr.

	* macosx/tkMacOSXEvent.h:      standardize MAC_OS_X_VERSION_MAX_ALLOWED
	* macosx/tkMacOSXMenu.c:       checks per QA1316, ensure define can be
	* macosx/tkMacOSXMenubutton.c: overriden on command line (from default
	* macosx/tkMacOSXMenus.c:      of current OS version).
	* macosx/tkMacOSXMouseEvent.c:
	* macosx/tkMacOSXWm.c:

	* macosx/tkMacOSXFont.c (TkpMeasureCharsInContext): fix
	signed-with-unsigned comparison and other warnings from gcc4 -Wextra.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.17 2006/04/11 10:19:51 das Exp $
d200 1
a200 1
- To build universal binaires outside of Wish.xcodeproj, set CFLAGS as follows:
d223 1
a223 1
The Wish.xcodeproj is setup to produce binaires that can run on 10.2 or later,
@


1.17
log
@	* macosx/tkMacOSXFont.c: remove #ifdef'd text measuring codepaths now
	* macosx/tkMacOSXInit.c: known to be incorrect, cleanup obsolete text
	* macosx/README:         antialiasing control code, document ATSUI
	                         text antialiasing changes.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.16 2005/12/01 05:47:17 das Exp $
d46 6
a51 3
- Tcl/Tk built on Mac OS X 10.x will not run on 10.y for y < x, on the other
hand Tcl/Tk built on 10.y will run on 10.x for y < x (but without any of the
fixes and optimizations that would be available in a binary built on 10.x).
d164 1
a164 1
The Mac OS X specifc configure flags are --enable-aqua, --enable-framework and
d166 2
a167 3
select based notifier, you will only need this if your require use of naked fork
(i.e. not followed by execve) in an unthreaded core). Note that --enable-aqua is
incompatible with --disable-corefoundation (for both Tcl and Tk configure).
d204 1
a204 1
any of the architectures (on i386 DTKs, the -isysroot is not required).
d214 12
a225 1
facilitate universal building of both Tcl and Tk with the same CFLAGS setting.
d266 2
a267 2
This allows you to dynamically link to the debug libraries at runtime by setting
	setenv DYLD_IMAGE_SUFFIX _debug
@


1.16
log
@fix typo
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.15 2005/11/27 06:44:05 das Exp $
d113 4
a116 3
- Quickdraw text antialiasing is enabled by default when available (from 10.1.5
onwards). Changing the global boolean variable '::tk::mac::antialiasedtext'
allows to dis/enable antialiasing on the fly from Tcl (even for existing text).
@


1.15
log
@document automatic removal of -arch ppc64 CFLAGS
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.14 2005/11/27 02:36:14 das Exp $
d179 1
a179 1
    * the Xcode projects refer to the tcl and source directories with a relative
@


1.14
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
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.13 2005/05/23 20:24:59 das Exp $
d210 2
@


1.13
log
@	* macosx/Makefile:
	* macosx/README:
	* macosx/Tk-Info.plist.in (new file):
	* macosx/Wish-Info.plist.in (new file):
	* unix/Makefile.in:
	* unix/configure.in:
	* unix/tcl.m4:
	* unix/tkUnixInit.c:  moved all Darwin framework and TkAqua build
	support from macosx/Wish.pbproj and macosx/Makefile into the standard
	unix configure/make buildsystem, the project and macosx/Makefile are
	no longer required to build Tk.framework and/or TkAqua. TkAqua is now
	enabled by the --enable-aqua configure option, and static and
	non-framework builds of TkAqua are now available via the standard
	configure switches. Tk/X11 can also be built as a framework. The
	macosx/Makefile now wraps the unix buildsystem and no longer uses the
	projects, embedded builds are still only available via this Makefile,
	but for other builds it is not longer required (but its current
	functionality is still available for backwards compatibility). The
	projects currently do not call through to the Makefile to build
	(unlike Tcl.pbproj) so project builds may differ from makefile builds.
	Due to issues with spaces in pathnames, 'Wish Shell.app' has been
	renamed to 'Wish.app', the macosx/Makefile installs backwards
	compatibility symlinks for the old name.
	* macosx/tkMacOSXInit.c (TkpInit): added support for Tk resource file
	in non-framework and static builds: the resource file is copied into a
	__tk_rsrc MachO segment of the library or executable at link time and
	extracted into a temporary location at initialization.
	* unix/configure: autoconf-2.59
	* unix/tkConfig.h.in (new file): autoheader-2.59
@
text
@d1 2
a2 2
TclTkAqua README 
----------------
d4 1
a4 1
RCS: @@(#) $Id: README,v 1.12 2005/04/09 15:39:09 das Exp $
d6 1
a6 1
This is the README file for the Mac OS X native versions of Tcl & Tk.
d9 2
a10 2
1. General
----------
d12 1
a12 1
- The tcl-mac mailing list on sourceforge is the canonical place for questions
d18 31
a48 24
- For general tcl/tk questions, the newsgroup comp.lang.tcl is your best bet,
but also check the Tcl'ers Wiki for a wealth of information:
	http://wiki.tcl.tk/

- The wiki has a page listing known bugs in Mac OS X Tcl/Tk (and other tips)
	http://wiki.tcl.tk/MacOS%20X
as well as a page with info on building Tcl/Tk on Mac OS X
	http://wiki.tcl.tk/Steps%20to%20build%20Tcl/Tk%208.4.0%20on%20MacOS%20X

- You should report bugs to the sourceforge bug trackers as usual: 
	Tcl: https://sourceforge.net/tracker/?func=add&group_id=10894&atid=110894
	Tk:  https://sourceforge.net/tracker/?func=add&group_id=12997&atid=112997
please make sure that your report Tk specific bugs to the tktoolkit bug
tracker and not the tcl one.


2. Using TclTkAqua
------------------

- Mac OS X 10.2 (or higher) is required to run TclTkAqua.

- Tcl built on Mac OS X 10.3 or higher will not run on 10.2 due to missing
symbols in libSystem, however Tcl built on 10.2 will run on 10.3 (but without
prebinding and other optimizations).
d56 1
a56 1
brings up the tk console window at startup. This is the case when double
d59 1
a59 1
- Tcl extensions will be found in any of:
d65 7
a71 2
This allows building extensions as frameworks with all script files contained
in the Resources/Scripts directory of the framework.
d73 2
a74 2
- The Tcl and Tk frameworks contain documentation in html format in the
standard location for frameworks:
d77 1
a77 1
No manpages are installed by default for either tcl or tk.
d79 2
a80 2
- the frameworks Tcl.framework and Tk.framework can be placed in any of the
system's standard framework directories:
a82 1
and 'Wish' as well as /usr/bin/tclsh will work.
d84 1
a84 1
- /usr/bin/wish is a script that calls a copy of 'Wish' contained in
d91 3
a93 3
- the env array is different when Wish is started from the Finder than when
it (or tclsh) is invoked from the Terminal, in particular PATH may not be what
you expect. (Wish started from the Finder inherits the Finder's environment
d97 1
a97 1
- As of Tk 8.4.7, AquaTk has a version of the low-level drawing primitives using
d100 12
a111 16
model of QD & Tk.  CG also trivially supports dashed lines, and the various end
caps & miters.  So this is a great improvement.

The old QD code is retained for now, just in case there are any
compatibility problems.  To switch back to the QD drawing, just put:

set tk::mac::useCGDrawing 0

in your script before you do drawing.  Also the CG drawing can anti-alias line drawing.
However, anti-aliased thin lines look washed out, so the threshold for antialiasing 
is set to 3 pixel width lines.  You can change this if you want by putting:

set tk::mac::CGAntialiasLimit <limit>

in your script before drawing, in which case only lines thinner that <limit> pixels 
will not be antialiased.
d115 1
a115 1
allows to dis/enable antialiasing on the fly from tcl (even for existing text).
d117 3
a119 7
- the format of binary extensions expected by [load] is that of ordinary shared
libraries (.dylib) and not MachO bundles, at present loading of MachO bundles is
not supported.

- Scrollbars: There are two scrollbar variants in Aqua, normal & small.  The 
normal scrollbar has a small dimension of 16, the small variant 12.  Access
to the small variant was added in Tk 8.4.2.
d121 2
a122 2
- Cursors: You can now put up and spin the Classic MacOS spinner, and the 
counting hands and watch cursor.  The way this is done is each of the spinners
d129 2
a130 2
Then to get the sequential variants, add an integer to the end of the base 
name.  So, for instance this code will spin the spinner:
d137 73
a209 24
- If you want to use Remote Debugging with Xcode 1.5 or 2.0, then you need to set
the environment variable XCNOSTDIN to 1 in the Executable editor for Wish.  That
will cause us to force closing stdin & stdout.  Otherwise, given how Xcode launches
Wish remotely, they will be left open and then Wish & gdb will fight for stdin...

3. Building TclTkAqua
---------------------

- Mac OS X 10.2 (or higher) is required to build TclTkAqua on MacOSX.

- Apple's Developer Tools CD needs to be installed (the most recent version
matching your OS release, but no earlier than December 2002). This CD should
have come with Mac OS X retail or should be present as a disk image on new macs
that came with OSX preinstalled. It can also be downloaded from
http://connect.apple.com (after you register for free ADC membership).

- Tcl and Tk are built as a Mac OS X frameworks via the Makefiles in tcl/macosx
and tk/macosx, but can also be built directly with the standard unix configure
and make buildsystem in tcl/unix resp. tk/unix.

- It is still possible to build with Apple's Xcode IDE using the Tcl.pbproj and
Wish.pbproj projects but this is not recommended anymore (currently Tcl.pbproj
calls through to the tcl/macosx/Makefile; but Wish.pbproj doesn't, so there could
be build differences).
d211 4
a214 1
- Unpack the tcl and tk source release archives and place the tcl and tk source
d222 1
a222 1
- The following instructions assume the tcl and tk source trees are named
d224 1
a224 1
containing the tcl and tk version number (for example '8.4.2').
d226 2
a227 2
	set ver="8.4.2" ;: if your shell is csh
	ver="8.4.2"     ;: if your shell is sh
d231 2
a232 2
	set ver=""     ;: if your shell is csh
	ver=""         ;: if your shell is sh
d283 2
a284 2
Tcl.framework/tclConfig.sh. Also, linking with Tcl.framework has to work
exactly as indicated in TCL_LIB_SPEC in Tcl.framework/tclConfig.sh.
a290 1

@


1.12
log
@	* macosx/README: updated requirements for OS & developer tool
	versions + other small fixes/cleanup.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.11 2005/03/09 19:40:52 wolfsuit Exp $
d50 1
a50 1
clicking Wish in the Finder (or using 'open Wish\ Shell.app' from the Terminal).
d71 1
a71 1
and 'Wish Shell' as well as /usr/bin/tclsh will work.
d73 1
a73 1
- /usr/bin/wish is a script that calls a copy of 'Wish Shell' contained in
d76 1
a76 1
- if 'Wish Shell' is started from the Finder or via 'open', $argv contains a
d135 1
a135 1
the environment variable XCNOSTDIN to 1 in the Executable editor for Wish Shell.  That
d142 1
a142 1
- Mac OS X 10.2 (or higher) is required to build Tcl on MacOSX.
d150 8
a157 8
- Tcl is built as a Mac OS X framework via the Makefile in tcl/macosx, but can
also be built from Apple's ProjectBuilder IDE using the Tcl.pbproj project (which
calls through to the Makefile).

- TkAqua is built as a Mac OS X frameworks using Apple's ProjectBuilder
IDE, but you do not have to deal with the IDE if you don't want to, the
Makefile in tk/macosx takes care of calling the ProjectBuilder command line tool
with all the details taken care of. 
d179 1
a179 3
- If you're only interested in _building_ TclTkAqua and don't plan on doing
development with the ProjectBuilder projects, using the Makefiles is easiest.
The following steps will build Tcl and Tk from the Terminal, assuming you are
d207 1
a207 1
- The Makefiles can also build a version of 'Wish Shell' that has the Tcl and Tk
d211 1
a211 1
the Makefiles. For example, to build a standalone 'Wish Shell.app'
d222 1
a222 1
  * the standalone Wish has the directory Wish\ Shell.app/Contents/lib in its
d226 6
a231 6
- It is possible to build Tk without without the tcl sourcetree; but in that
case you need to tell the Tk Makefile where the copies of 'Tcl.framework' and 
'tclsh8.4' are located that you want to build & link against 
(their default location is ${BUILD_DIR}/tcl).

For instance to use their default systemwide install locations:
d233 1
a233 1
	    TCL_FRAMEWORK_DIR=/Library/Frameworks TCLSH_DIR=/usr/bin
d235 1
a235 10
	    TCL_FRAMEWORK_DIR=/Library/Frameworks TCLSH_DIR=/usr/bin
[ of course this will only work if /Library/Frameworks does indeed contain a  ]
[ Tcl.framework corresponding in version to the Tk.framework you're trying to ]
[ build, and if TCLSH_DIR contains a corresponding /usr/bin/tclsh8.4          ]

or to use an earlier install of Tcl into INSTALL_ROOT="${TCLTK}/" :
	make -C tk${ver}/macosx \
	    TCL_FRAMEWORK_DIR=${TCLTK}/Library/Frameworks TCLSH_DIR=${TCLTK}/usr/bin
	sudo make -C tk${ver}/macosx install INSTALL_ROOT="${TCLTK}/" \
	    TCL_FRAMEWORK_DIR=${TCLTK}/Library/Frameworks TCLSH_DIR=${TCLTK}/usr/bin
a237 4

Note that html help in Tk.framework is only built if TCL_FRAMEWORK_DIR contains
the tcl Makefile (as is the case for the default value of TCL_FRAMEWORK_DIR).

@


1.11
log
@Add a hack to work around some issues with remote debugging with Xcode.  Xcode requires
that stdin & stdout be closed or you won't be able to interrupt the running program.  So
I added a check for XCNOSTDIN environment variable in the startup, and I force them
closed if it is set.  With that, remote debugging works pretty well.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.10 2004/11/11 01:24:32 das Exp $
d37 1
a37 1
- Mac OS X 10.1 (or higher) is required to run TclTkAqua.
d39 2
a40 2
- Tcl built on Mac OS X 10.2 or higher will not run on 10.1 due to missing
symbols in libSystem, however Tcl built on 10.1 will run on 10.2 (but without
d63 2
a64 2
	Tcl.framework/Resources/English.lproj/Documentation/Reference/Tcl
	Tk.framework/Resources/English.lproj/Documentation/Reference/Tk
d142 1
a142 1
- Mac OS X 10.1.5 (or higher) is required to build TclTkAqua.
d144 5
a148 5
- Apple's Developer Tools CD needs to be installed (the version matching your OS
release, but no earlier than April 2002). This CD should have come with Mac OS X
retail or should be present as a disk image on new macs that came with OSX
preinstalled. It can also be downloaded from http://connect.apple.com (after you
register for free ADC membership).
@


1.10
log
@	* generic/tkMain.c:
	* macosx/tkMacOSXAppInit.c (removed):
	* macosx/Wish.pbproj/project.pbxproj:
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXInt.h: changes to make TkAqua dynamically loadable,
	enabling [package require Tk] from tclsh. Startup code from
	tkMacOSXAppInit.c moved into tkMacOSXInit.c, added code that
	notifies the window server that an unbundled executable is a full
	GUI application after loading Tk. [Patch 1035348]

	* doc/wm.n: documented [wm attributes] on Mac OS X. [Bug 606665]
	* macosx/tkMacOSXWm.c: implemented TIP 222 [wm attributes -alpha] on
	Mac OS X. [Patch 892194]
	WmIconbitmapCmd: adopted FSRef changes from [wm atttrs -titlepath].

	* macosx/tkMacOSXSubwindows.c: synced spacing/formatting with
	core-8-4-branch.

	* generic/tkRectOval.c:
	* macosx/README:
	* macosx/tkMacOSXDefault.h:
	* macosx/tkMacOSXDraw.c:
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXInt.h:
	* macosx/tkMacOSXMenu.c:
	* macosx/tkMacOSXWm.c: forward port from core-8-4-branch of Jim's
	and my changes for CG drawing and [wm attributes] (corresponds to
	8.4 changes dating from 09-18, 07-27, 07-24).

	* macosx/tkMacOSXMouseEvent.c: endianness fixes.

	* macosx/Wish.pbproj/project.pbxproj: corrected path to html help
	inside framework.

	* macosx/Makefile: prevent parallel make from building several
	targets at the same time.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.9 2003/10/01 14:35:32 das Exp $
d134 4
@


1.9
log
@	* macosx/Wish.pbproj/project.pbxproj:
	* macosx/Makefile: fixed redo prebinding bug when DESTDIR="".
	Added support for all applicable customizable makefile variables
	from tcl/macosx/Makefile.

	* macosx/README:
	* macosx/Wish.pbproj/project.pbxproj: ensure that the versioned
	wishX.X script works correctly when Tk.framework with multiple
	versions is present by referring to a copy of 'Wish Shell.app'
	located in Tk.framework/Versions/X.X/Resources.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.8 2003/07/18 02:02:28 das Exp $
d86 20
@


1.8
log
@	* macosx/Makefile: Changes for new tcl buildsystem.

	* macosx/Wish.pbproj/jingham.pbxuser:
	* macosx/Wish.pbproj/project.pbxproj:
	Changes for new tcl buildsystem.
	Changed build to include tk specific html help in Tk.framework
	instead of Tcl.framework.
	Set default SYMROOT in target options to simplify setting up PB
	(manually setting common build folder for tcl & tk no longer needed).

	* macosx/README: Updated info for changes to buildsystem,
	html help location and PB setup.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.7 2003/03/18 13:47:52 das Exp $
d73 2
a74 3
- /usr/bin/wish is a script that calls 'Wish Shell' in its default location
	/Applications/Utilities/Wish Shell.app
it will break if 'Wish Shell' is moved.
@


1.7
log
@	* macosx/Wish.pbproj/project.pbxproj:
	* macosx/Makefile:
	* macosx/README: added support for giving 'make' the location
	of Tcl.framework and tclsh to build and link against.

	* macosx/tkMacOSXXStubs.c: fixed crash in [winfo server].
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.6 2003/02/27 00:09:26 hobbs Exp $
d22 1
a22 1
- The wiki has a page listing known bugs in Mac OS X Tk (and other tips)
d61 1
a61 1
- Tcl.framework contains the Tcl and Tk documentation in html format in the
d64 2
a65 2
Tk.framework contains no documentation. No manpages are installed by
default for either tcl or tk.
d127 8
a134 4
- Tcl and TkAqua are built as Mac OS X frameworks using Apple's ProjectBuilder
IDE, but you do not have to deal with the IDE if you don't want to: there are
Makefiles available in tcl/macosx and tk/macosx that take care of calling the
ProjectBuilder command line tool with all the details taken care of. 
d205 4
a208 17
- To build from the IDE using the projects directly without going through the
Makefiles you need so setup a common build folder for the projects. A simple way
to achieve this is to make symbolic links
	ln -fs ../../build tcl/macosx/build
	ln -fs ../../build tk/macosx/build
(this location of the build folder is compatible with the Makefiles).

Another way is to set the build folder location directly in
tcl/macosx/Tcl.pbproj and tk/macosx/Wish/pbproj using ProjectBuilder's
"Project->Show Info" on the topmost icon in the filelist. Switch to "Place build
products in a separate location" with a setting of "$SRCROOT/../../build"
(this gets stored in Tcl.pbproj/${USER}.pbxuser & Wish.pbproj/${USER}.pbxuser).

- It is possible to build Tk without a common build folder with Tcl, or even
without the tcl sourcetree itself; but in that case you need to tell the Tk
Makefile where the copies of 'Tcl.framework' and 'tclsh8.4' are located that
you want to build & link against (their default location is the ${BUILD_DIR}).
d226 3
@


1.6
log
@correct 8.4.3 refs to 8.4.2
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.5 2003/02/21 03:34:29 das Exp $
d134 5
a138 5
 [ If you don't want have the two source trees in one directory, you'll need to
 [ create the following symbolic link for the build to work as setup by default
 [      ln -fs /path_to_tcl/build /path_to_tk/build
 [ (where /path_to_{tcl,tk} is the directory containing the tcl resp. tk tree)
 [ or you can pass an argument of BUILD_DIR=/somewhere to the tcl and tk make.
d141 10
a150 4
'tcl<ver>' and 'tk<ver>', respectively, where <ver> is the version number (for
example 'tcl8.4.2'). This will be the case if you are building from a release
archive. If you are building from CVS, the version numbers will be missing;
adapt the instructions below accordingly.
d156 2
a157 2
	make -C tcl<ver>/macosx
	make -C tk<ver>/macosx
d160 2
a161 2
	sudo make -C tcl<ver>/macosx install
	sudo make -C tk<ver>/macosx  install
d164 2
a165 2
	make -C tcl<ver>/macosx install INSTALL_ROOT=$HOME
	make -C tk<ver>/macosx  install INSTALL_ROOT=$HOME
d177 4
a180 4
	make -C tcl<ver>/macosx deploy
	make -C tk<ver>/macosx deploy
	sudo make -C tcl<ver>/macosx install-deploy
	sudo make -C tk<ver>/macosx  install-deploy
d188 4
a191 4
	make -C tcl<ver>/macosx embedded
	make -C tk<ver>/macosx embedded
	sudo make -C tcl<ver>/macosx install-embedded INSTALL_ROOT=`pwd`/embedded
	sudo make -C tk<ver>/macosx  install-embedded INSTALL_ROOT=`pwd`/embedded
d212 23
a234 1
(this gets stored in Tcl.pbproj/$USER.pbxuser & Wish.pbproj/$USER.pbxuser).
@


1.6.2.1
log
@	* macosx/Wish.pbproj/project.pbxproj:
	* macosx/Makefile:
	* macosx/README: added support for giving 'make' the location
	of Tcl.framework and tclsh to build and link against.

	* macosx/tkMacOSXXStubs.c: fixed crash in [winfo server].
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.6 2003/02/27 00:09:26 hobbs Exp $
d134 5
a138 5
[ If you don't want have the two source trees in one directory, you'll need to ]
[ create the following symbolic link for the build to work as setup by default ]
[      ln -fs /path_to_tcl/build /path_to_tk/build                             ]
[ (where /path_to_{tcl,tk} is the directory containing the tcl resp. tk tree)  ]
[ or you can pass an argument of BUILD_DIR=/somewhere to the tcl and tk make.  ]
d141 4
a144 10
"tcl${ver}" and "tk${ver}", respectively, where ${ver} is a shell variable
containing the tcl and tk version number (for example '8.4.2').
Setup the shell variable as follows:
	set ver="8.4.2" ;: if your shell is csh
	ver="8.4.2"     ;: if your shell is sh
The source trees will be named this way only if you are building from a release
archive, if you are building from CVS, the version numbers will be missing; so
set ${ver} to the empty string instead:
	set ver=""     ;: if your shell is csh
	ver=""         ;: if your shell is sh
d150 2
a151 2
	make -C tcl${ver}/macosx
	make -C tk${ver}/macosx
d154 2
a155 2
	sudo make -C tcl${ver}/macosx install
	sudo make -C tk${ver}/macosx  install
d158 2
a159 2
	make -C tcl${ver}/macosx install INSTALL_ROOT="${HOME}/"
	make -C tk${ver}/macosx  install INSTALL_ROOT="${HOME}/"
d171 4
a174 4
	make -C tcl${ver}/macosx deploy
	make -C tk${ver}/macosx deploy
	sudo make -C tcl${ver}/macosx install-deploy
	sudo make -C tk${ver}/macosx  install-deploy
d182 4
a185 4
	make -C tcl${ver}/macosx embedded
	make -C tk${ver}/macosx embedded
	sudo make -C tcl${ver}/macosx install-embedded INSTALL_ROOT=`pwd`/embedded/
	sudo make -C tk${ver}/macosx  install-embedded INSTALL_ROOT=`pwd`/embedded/
d206 1
a206 23
(this gets stored in Tcl.pbproj/${USER}.pbxuser & Wish.pbproj/${USER}.pbxuser).

- It is possible to build Tk without a common build folder with Tcl, or even
without the tcl sourcetree itself; but in that case you need to tell the Tk
Makefile where the copies of 'Tcl.framework' and 'tclsh8.4' are located that
you want to build & link against (their default location is the ${BUILD_DIR}).

For instance to use their default systemwide install locations:
	make -C tk${ver}/macosx \
	    TCL_FRAMEWORK_DIR=/Library/Frameworks TCLSH_DIR=/usr/bin
	sudo make -C tk${ver}/macosx install \
	    TCL_FRAMEWORK_DIR=/Library/Frameworks TCLSH_DIR=/usr/bin
[ of course this will only work if /Library/Frameworks does indeed contain a  ]
[ Tcl.framework corresponding in version to the Tk.framework you're trying to ]
[ build, and if TCLSH_DIR contains a corresponding /usr/bin/tclsh8.4          ]

or to use an earlier install of Tcl into INSTALL_ROOT="${TCLTK}/" :
	make -C tk${ver}/macosx \
	    TCL_FRAMEWORK_DIR=${TCLTK}/Library/Frameworks TCLSH_DIR=${TCLTK}/usr/bin
	sudo make -C tk${ver}/macosx install INSTALL_ROOT="${TCLTK}/" \
	    TCL_FRAMEWORK_DIR=${TCLTK}/Library/Frameworks TCLSH_DIR=${TCLTK}/usr/bin

The Makefile variables TCL_FRAMEWORK_DIR and TCLSH_DIR were added in Tk 8.4.3.
@


1.6.2.2
log
@	* macosx/Makefile: Changes for new tcl buildsystem.

	* macosx/Wish.pbproj/jingham.pbxuser:
	* macosx/Wish.pbproj/project.pbxproj:
	Changes for new tcl buildsystem.
	Changed build to include tk specific html help in Tk.framework
	instead of Tcl.framework.
	Set default SYMROOT in target options to simplify setting up PB
	(manually setting common build folder for tcl & tk no longer needed).

	* macosx/README: Updated info for changes to buildsystem,
	html help location and PB setup.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.6.2.1 2003/03/18 13:55:51 das Exp $
d22 1
a22 1
- The wiki has a page listing known bugs in Mac OS X Tcl/Tk (and other tips)
d61 1
a61 1
- The Tcl and Tk frameworks contain documentation in html format in the
d64 2
a65 2
	Tk.framework/Resources/English.lproj/Documentation/Reference/Tk
No manpages are installed by default for either tcl or tk.
d127 4
a130 8
- Tcl is built as a Mac OS X framework via the Makefile in tcl/macosx, but can
also be built from Apple's ProjectBuilder IDE using the Tcl.pbproj project (which
calls through to the Makefile).

- TkAqua is built as a Mac OS X frameworks using Apple's ProjectBuilder
IDE, but you do not have to deal with the IDE if you don't want to, the
Makefile in tk/macosx takes care of calling the ProjectBuilder command line tool
with all the details taken care of. 
d201 17
a217 4
- It is possible to build Tk without without the tcl sourcetree; but in that
case you need to tell the Tk Makefile where the copies of 'Tcl.framework' and 
'tclsh8.4' are located that you want to build & link against 
(their default location is ${BUILD_DIR}/tcl).
a234 3

Note that html help in Tk.framework is only built if TCL_FRAMEWORK_DIR contains
the tcl Makefile (as is the case for the default value of TCL_FRAMEWORK_DIR).
@


1.6.2.3
log
@	* macosx/Wish.pbproj/project.pbxproj:
	* macosx/Makefile: fixed redo prebinding bug when DESTDIR="".
	Added support for all applicable customizable makefile variables
	from tcl/macosx/Makefile.

	* macosx/README:
	* macosx/Wish.pbproj/project.pbxproj: ensure that the versioned
	wishX.X script works correctly when Tk.framework with multiple
	versions is present by referring to a copy of 'Wish Shell.app'
	located in Tk.framework/Versions/X.X/Resources.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.6.2.2 2003/07/18 01:06:33 das Exp $
d73 3
a75 2
- /usr/bin/wish is a script that calls a copy of 'Wish Shell' contained in
	Tk.framework/Resources
@


1.6.2.4
log
@Finish the implementation of the CG version of the X Drawing layer.
Add support for returning values for the wm attributes commands, and
use FSRef's rather than FSSpec's.
@
text
@d4 1
a4 1
RCS: @@(#) $Id$
a85 19
- As of Tk 8.4.7, AquaTk has a version of the low-level drawing primitives using
the CoreGraphics routines - the code is primarily due to James Tittle.  There
were numerous problems with the QD version, mostly due to the different drawing
model of QD & Tk.  CG also trivially supports dashed lines, and the various end
caps & miters.  So this is a great improvement.

The old QD code is retained for now, just in case there are any
compatibility problems.  To switch back to the QD drawing, just put:

set tk::mac::useCGDrawing 0

in your script before you do drawing.  Also the CG drawing can anti-alias line drawing.
However, anti-aliased thin lines look washed out, so the threshold for antialiasing 
is set to 3 pixel width lines.  You can change this if you want by putting:

set tk::mac::CGAntialiasLimit <pixel limit>

in your script before drawing.

@


1.6.2.5
log
@Fix the doco's for the anti-aliasing limit variable to be more helpful
@
text
@d101 1
a101 1
set tk::mac::CGAntialiasLimit <limit>
d103 1
a103 1
in your script before drawing, in which case only lines thinner that <limit> pixels will be antialiased.
@


1.6.2.6
log
@	* macosx/README: typos
	* macosx/tkMacOSXDraw.c (TkMacOSXSetUpCGContext): performance
	improvements: removed slow & unnecessary calls.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.6.2.5 2004/07/27 18:52:26 wolfsuit Exp $
d103 1
a103 2
in your script before drawing, in which case only lines thinner that <limit> pixels 
will not be antialiased.
@


1.6.2.7
log
@	* macosx/README: updated requirements for OS & developer tool
	versions + other small fixes/cleanup.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.6.2.6 2004/09/18 00:48:14 das Exp $
d37 1
a37 1
- Mac OS X 10.2 (or higher) is required to run TclTkAqua.
d39 2
a40 2
- Tcl built on Mac OS X 10.3 or higher will not run on 10.2 due to missing
symbols in libSystem, however Tcl built on 10.2 will run on 10.3 (but without
d63 2
a64 2
	Tcl.framework/Resources/Documentation/Reference/Tcl
	Tk.framework/Resources/Documentation/Reference/Tk
d138 1
a138 1
- Mac OS X 10.2 (or higher) is required to build TclTkAqua on MacOSX.
d140 5
a144 5
- Apple's Developer Tools CD needs to be installed (the most recent version
matching your OS release, but no earlier than December 2002). This CD should
have come with Mac OS X retail or should be present as a disk image on new macs
that came with OSX preinstalled. It can also be downloaded from
http://connect.apple.com (after you register for free ADC membership).
@


1.6.2.8
log
@	* macosx/Makefile:
	* macosx/README:
	* macosx/Tk-Info.plist.in (new file):
	* macosx/Wish-Info.plist.in (new file):
	* unix/Makefile.in:
	* unix/configure.in:
	* unix/tcl.m4:
	* unix/tkUnixInit.c:  moved all Darwin framework and TkAqua build
	support from macosx/Wish.pbproj and macosx/Makefile into the standard
	unix configure/make buildsystem, the project and macosx/Makefile are
	no longer required to build Tk.framework and/or TkAqua. TkAqua is now
	enabled by the --enable-aqua configure option, and static and
	non-framework builds of TkAqua are now available via the standard
	configure switches. Tk/X11 can also be built as a framework. The
	macosx/Makefile now wraps the unix buildsystem and no longer uses the
	projects, embedded builds are still only available via this Makefile,
	but for other builds it is not longer required (but its current
	functionality is still available for backwards compatibility). The
	projects currently do not call through to the Makefile to build
	(unlike Tcl.pbproj) so project builds may differ from makefile builds.
	Due to issues with spaces in pathnames, 'Wish Shell.app' has been
	renamed to 'Wish.app', the macosx/Makefile installs backwards
	compatibility symlinks for the old name.
	* macosx/tkMacOSXInit.c (TkpInit): added support for Tk resource file
	in non-framework and static builds: the resource file is copied into a
	__tk_rsrc MachO segment of the library or executable at link time and
	extracted into a temporary location at initialization.
	* unix/configure: autoconf-2.13
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.6.2.7 2005/04/09 15:39:39 das Exp $
d50 1
a50 1
clicking Wish in the Finder (or using 'open Wish.app' from the Terminal).
d71 1
a71 1
and 'Wish' as well as /usr/bin/tclsh will work.
d73 1
a73 1
- /usr/bin/wish is a script that calls a copy of 'Wish' contained in
d76 1
a76 1
- if 'Wish' is started from the Finder or via 'open', $argv contains a
d146 8
a153 8
- Tcl and Tk are built as a Mac OS X frameworks via the Makefiles in tcl/macosx
and tk/macosx, but can also be built directly with the standard unix configure
and make buildsystem in tcl/unix resp. tk/unix.

- It is still possible to build with Apple's Xcode IDE using the Tcl.pbproj and
Wish.pbproj projects but this is not recommended anymore (currently Tcl.pbproj
calls through to the tcl/macosx/Makefile; but Wish.pbproj doesn't, so there could
be build differences).
d175 3
a177 1
- The following steps will build Tcl and Tk from the Terminal, assuming you are
d205 1
a205 1
- The Makefiles can also build a version of 'Wish' that has the Tcl and Tk
d209 1
a209 1
the Makefiles. For example, to build a standalone 'Wish.app'
d220 1
a220 1
  * the standalone Wish has the directory Wish.app/Contents/lib in its
d224 6
a229 6
- It is possible to build Tk against an installed Tcl.framework; but you will
still need a tcl sourcetree in the location specified in TCL_SRC_DIR in
Tcl.framework/tclConfig.sh. Also, linking with Tcl.framework has to work
exactly as indicated in TCL_LIB_SPEC in Tcl.framework/tclConfig.sh.
If you used non-default install locations for Tcl.framework, specify them as
make overrides to the tk/macosx Makefile, e.g.
d231 1
a231 1
	    TCL_FRAMEWORK_DIR=$HOME/Library/Frameworks TCLSH_DIR=$HOME/usr/bin
d233 10
a242 1
	    TCL_FRAMEWORK_DIR=$HOME/Library/Frameworks TCLSH_DIR=$HOME/usr/bin
d245 4
@


1.6.2.9
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 tk/unix/tcl.m4, sync whitespace with HEAD.

	* 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

	* 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.

	* 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: sync with HEAD.

	* macosx/buildTkConfig.tcl (removed): remove obsolete build files.

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

	* macosx/Makefile: add support for reusing configure cache, build target
	fixes.

	* generic/tkMenu.c:
	* macosx/tkMacOSXButton.c:
	* macosx/tkMacOSXDebug.c:
	* macosx/tkMacOSXDebug.h:
	* macosx/tkMacOSXDialog.c:
	* macosx/tkMacOSXDraw.c:
	* macosx/tkMacOSXEntry.c:
	* macosx/tkMacOSXMenu.c:
	* macosx/tkMacOSXMouseEvent.c:
	* macosx/tkMacOSXXStubs.c:
	* macosx/tkMacOSXSubwindows.c:
	* xlib/xgc.c: declare functions and globals used only in own file as
	static, #ifdef out a few Xlib and aqua functions that are never called
	(sync with HEAD).

	* macosx/tkMacOSXPort.h:
	* generic/tkInt.decls: correct signature of TkMacOSXHandleMenuSelect,
	add XSync to aqua Xlib stubs.

	* generic/tkTest.c: #ifdef unix only declarations.
	(TestmetricsCmd): unify win and mac implementation.

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

	* macosx/tkMacOSXNotify.c:
	* macosx/tkMacOSXTest.c: sync with HEAD.

	* generic/tkIntPlatDecls.h:
	* generic/tkIntXlibDecls.h:
	* generic/tkStubInit.c:
	* unix/configure: regen.
@
text
@d1 2
a2 2
Tcl/Tk Mac OS X README 
----------------------
d4 1
a4 1
RCS: @@(#) $Id: README,v 1.6.2.8 2005/05/24 04:21:32 das Exp $
d6 1
a6 1
This is the README file for the Mac OS X/Darwin version of Tcl/Tk.
d9 2
a10 2
1. Where to go for support
--------------------------
d12 1
a12 1
- The tcl-mac mailing list on sourceforge is the best place to ask questions
d18 24
a41 31
- For general Tcl/Tk questions, the newsgroup comp.lang.tcl is your best bet:
	http://groups.google.com/group/comp.lang.tcl/

- The Tcl'ers Wiki also has many pages dealing with Tcl & Tk on Mac OS X, see
	http://wiki.tcl.tk/references/3753!
	http://wiki.tcl.tk/references/8361!

- Please report bugs with Tcl or Tk on Mac OS X to the sourceforge bug trackers:
	Tcl: http://sf.net/tracker/?func=add&group_id=10894&atid=110894
	Tk:  http://sf.net/tracker/?func=add&group_id=12997&atid=112997
please make sure that your report Tk specific bugs to the tktoolkit project bug
tracker rather than the tcl project bug tracker.
Mac OS X specific bugs should usually be assigned to 'das' or 'wolfsuit'.


2. Using Tcl/Tk on Mac OS X
---------------------------

- There are two versions of Tk available on Mac OS X: TkAqua using the native
aqua widgets and look&feel, and TkX11 using the traditional unix X11 wigets.
TkX11 requires an X11 server to be installed, such as Apple's X11 (which is
available as an optional install on recent Mac OS X retail disks).
TkAqua and TkX11 can be distinguished at runtime via [tk windowingsystem].

- At a minimum, Mac OS X 10.1 is required to run Tcl and TkX11, and OS X 10.2 is
required to run TkAqua. However OS X 10.3 or higher is recommended (certain
[file] operations behave incorrectly on earlier releases).

- Tcl/Tk built on Mac OS X 10.x will not run on 10.y for y < x, on the other
hand Tcl/Tk built on 10.y will run on 10.x for y < x (but without any of the
fixes and optimizations that would be available in a binary built on 10.x).
d49 1
a49 1
brings up the Tk console window at startup. This is the case when double
d52 1
a52 1
- Tcl extensions can be installed in any of:
d58 2
a59 7
This allows building extensions as frameworks with all script files contained in
the Resources/Scripts directory of the framework.

- [load]able binary extensions can linked as either ordinary shared libraries
(.dylib) or as MachO bundles (since 8.4.10/8.5a3); only bundles can be unloaded,
and bundles are also loaded more efficiently from VFS (no temporary copy to the
native filesystem required).
d61 2
a62 2
- The 'deploy' target of macosx/GNUmakefile installs the html manpages into the
standard documentation location in the Tcl/Tk frameworks:
d65 1
a65 1
No nroff manpages are installed by default by the GNUmakefiles.
d67 2
a68 2
- The Tcl and Tk frameworks can be installed in any of the system's standard
framework directories:
d71 1
d73 1
a73 1
- /usr/bin/wish8.x is a script that calls a copy of 'Wish' contained in
d80 3
a82 3
- the env array is different when Wish is started from the Finder than when it
(or tclsh) is invoked from the Terminal, in particular PATH may not be what you
expect. (Wish started from the Finder inherits the Finder's environment
d86 1
a86 1
- As of Tk 8.4.7, TkAqua has a version of the low-level drawing primitives using
d89 16
a104 12
model of QD & Tk. CG also trivially supports dashed lines, and the various end
caps & miters. So this is a great improvement.
The old QD code is retained for now, just in case there are any compatibility
problems. To switch back to the QD drawing, just put:
    set tk::mac::useCGDrawing 0
in your script before you do drawing. Also the CG drawing can anti-alias line
drawing. However, anti-aliased thin lines look washed out, so the threshold for
antialiasing is set to 3 pixel width lines. You can change this if you want by
putting:
    set tk::mac::CGAntialiasLimit <limit>
in your script before drawing, in which case only lines thinner that <limit>
pixels will not be antialiased.
d108 1
a108 1
allows to dis/enable antialiasing on the fly from Tcl (even for existing text).
d110 7
a116 3
- Scrollbars: There are two scrollbar variants in Aqua, normal & small. The
normal scrollbar has a small dimension of 16, the small variant 12. Access to
the small variant was added in Tk 8.4.2.
d118 2
a119 2
- Cursors: You can now put up and spin the Classic MacOS spinner, and the
counting hands and watch cursor. The way this is done is each of the spinners
d126 2
a127 2
Then to get the sequential variants, add an integer to the end of the base name.
So, for instance this code will spin the spinner:
d135 2
a136 2
3. Building Tcl/Tk on Mac OS X
------------------------------
d138 1
a138 36
- At least Mac OS X 10.1 is required to build Tcl and TkX11 and OS X 10.2 is
required to build TkAqua. Apple's Developer Tools need to be installed (only the
most recent version matching your OS release is supported). The Developer Tools
installer is available on Mac OS X retail disks or is present in
/Applications/Installers on Macs that came with OS X preinstalled. The most
recent version can be downloaded from the ADC website http://connect.apple.com
(after you register for free ADC membership).

- Tcl/Tk are most easily built as Mac OS X frameworks via GNUmakefile in
tcl/macosx and tk/macosx (see below for details), but can also be built with the
standard unix configure and make buildsystem in tcl/unix resp. tk/unix as on any
other unix platform (indeed, the GNUmakefiles are just wrappers around the unix
buildsystem).
The Mac OS X specifc configure flags are --enable-aqua, --enable-framework and
--disable-corefoundation (which disables CF and notably reverts to the standard
select based notifier, you will only need this if your require use of naked fork
(i.e. not followed by execve) in an unthreaded core). Note that --enable-aqua is
incompatible with --disable-corefoundation (for both Tcl and Tk configure).

- It is also possible to build with Apple's IDE via the tk/macosx/Wish.pbproj
project, this simply calls through to the tk/macosx/GNUMakefile. It requires a
build of the tcl/macosx/Tcl.pbproj project.

- To build universal binaires, set CFLAGS as follows:
    export CFLAGS="-arch ppc -arch i386 \
	-isysroot /Developer/SDKs/MacOSX10.4u.sdk -mmacosx-version-min=10.4"
This requires Mac OS X 10.4 and Xcode 2.2 (_not_ Xcode 2.1) and will work on
any of the architectures (on i386 DTKs, the -isysroot is not required).
Note that it is not possible to configure correctly if the current architecture
is not present in CFLAGS (i.e. -arch `arch` must always be there).
Universal builds of Tk TEA extensions are also possible with CFLAGS set as
above, they will be [load]able by universal as well as thin binaries of Tk.
Note that while Tcl can be built for the ppc64 architecture, neither TkAqua nor
TkX11 can be built with -arch ppc64 as the corresponding GUI libraries are not
available for 64bit at present. However, linking a universal 'ppc i386' Tk
binary against a universal 'ppc ppc64 i386' Tcl binary works just fine.
d140 14
a153 2
Detailed Instructions for building with macosx/GNUmakefile
----------------------------------------------------------
d155 1
a155 1
- Unpack the Tcl and Tk source release archives and place the tcl and tk source
d163 1
a163 1
- The following instructions assume the Tcl and Tk source trees are named
d165 1
a165 1
containing the Tcl and Tk version number (for example '8.4.12').
d167 2
a168 2
	set ver="8.4.12" ;: if your shell is csh
	ver="8.4.12"     ;: if your shell is sh
d172 2
a173 2
	set ver=""       ;: if your shell is csh
	ver=""           ;: if your shell is sh
d224 2
a225 2
Tcl.framework/tclConfig.sh. Also, linking with Tcl.framework has to work exactly
as indicated in TCL_LIB_SPEC in Tcl.framework/tclConfig.sh.
d232 1
@


1.6.2.10
log
@document automatic removal of -arch ppc64 CFLAGS
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.6.2.9 2005/11/27 02:36:46 das Exp $
a176 2
The Tk configure script automatically removes '-arch ppc64' from CFLAGS to
facilitate universal building of both Tcl and Tk with the same CFLAGS setting.
@


1.6.2.11
log
@	* macosx/tkMacOSXWm.c (WmAttributesCmd, WmIconbitmapCmd): add support
	for weakly importing symbols not available on OSX 10.2 or 10.3, enables
	binaires built on later OSX versions to run on earlier ones.
	* macosx/README: document how to enable weak-linking; cleanup.
	* unix/configure.in: enforce requirement of OSX 10.2 for TkAqua; move
	* unix/tcl.m4:       Darwin specific checks & defines that are only
	relevant to the tcl build out of tcl.m4; restrict framework option to
	Darwin; cleanup quoting.
	* unix/configure: autoconf-2.13

	* macosx/tkMacOSXKeyEvent.c: ifdef out diagnostic messages to stderr.

	* macosx/tkMacOSXEvent.h:      standardize MAC_OS_X_VERSION_MAX_ALLOWED
	* macosx/tkMacOSXMenu.c:       checks per QA1316, ensure define can be
	* macosx/tkMacOSXMenubutton.c: overriden on command line (from default
	* macosx/tkMacOSXMenus.c:      of current OS version).
	* macosx/tkMacOSXMouseEvent.c:
	* macosx/tkMacOSXWm.c:
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.6.2.10 2005/11/27 06:44:16 das Exp $
d46 3
a48 6
- Unless weak-linking is used, Tcl/Tk built on Mac OS X 10.x will not run on
10.y with y < x; on the other hand Tcl/Tk built on 10.y will always run on 10.x
with y <= x (but without any of the fixes and optimizations that would be
available in a binary built on 10.x).
Weak-linking is available on OS X 10.2 or later, it additionally allows Tcl/Tk
built on 10.x to run on any 10.y with x > y >= z (for a chosen z >= 2).
d154 1
a154 1
The Mac OS X specific configure flags are --enable-aqua, --enable-framework and
d156 3
a158 2
select based notifier). Note that --enable-aqua is incompatible with
--disable-corefoundation (for both Tcl and Tk configure).
d168 1
a168 1
any of the architectures (on intel Macs, the -isysroot is not required).
d178 1
a178 12
facilitate universal building of both Tcl and Tk with the same CFLAGS setting;
the same happens with configure in Tk extensions based on TEA 3.5 or later.

- To enable weak-linking, set the MACOSX_DEPLOYMENT_TARGET environment variable
to the minimal OS version (>= 10.2) the binaries should be able to run on, e.g:
    export MACOSX_DEPLOYMENT_TARGET=10.2
This requires Mac OS X 10.2 and gcc 3.1; if you have gcc 4 or later you can set
CFLAGS instead:
    export CFLAGS="-mmacosx-version-min=10.2"
The Wish.xcodeproj is setup to produce binaires that can run on 10.2 or later,
except for the 'ReleaseUniversal'configuration, where they require 10.4.
Support for weak-linking was added to the code for 8.4.14/8.5a5.
d219 2
a220 2
This allows switching to the debug libraries at runtime by setting
	export DYLD_IMAGE_SUFFIX=_debug
@


1.6.2.12
log
@typos
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.6.2.11 2006/07/20 06:27:34 das Exp $
d166 1
a166 1
- To build universal binaries, set CFLAGS as follows:
d189 2
@


1.6.2.13
log
@	* unix/tcl.m4 (Darwin): add support for --enable-64bit on x86_64, for
	universal builds including x86_64, for 64-bit CoreFoundation on Leopard
	and for use of -mmacosx-version-min instead of MACOSX_DEPLOYMENT_TARGET.
	* unix/configure.in (Darwin): remove 64-bit arch flags from CFLAGS for
	combined 32-bit and 64-bit universal builds, as neither TkAqua nor TkX11
	can be built for 64-bit at present.
	* unix/configure: autoconf-2.13

	* macosx/README: updates for x86_64 support in Tcl.

	* macosx/tkMacOSXInit.c (TkpInit): when available, use public
	TransformProcessType() API instead of CPSEnableForegroundOperation() SPI
	to notify the window server that we are a GUI application.

	* macosx/tkMacOSXWm.c (WmAttrGetTitlePath): use HIWindow API on >=Tiger.

	* macosx/tkMacOSXMouseEvent.c (GenerateToolbarButtonEvent):
	* macosx/tkMacOSXMenus.c (GenerateEditEvent):
	* macosx/tkMacOSXMenu.c (MenuSelectEvent): bzero XVirtualEvent structure
	before use to ensure all fields are initialized. [Bug 1542205]
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.6.2.12 2006/07/21 06:03:24 das Exp $
d169 4
a172 4
This requires Mac OS X 10.4 and Xcode 2.2 (_not_ Xcode 2.1) and will work on any
of the architectures (on intel Macs, the -isysroot may not be required). Note
that it is not possible to configure universal builds correctly if the current
architecture is not present in CFLAGS (i.e. -arch `arch` must be there).
d175 2
a176 2
Note that while Tcl can be built for 64-bit architectures, neither TkAqua nor
TkX11 can be built for 64-bit as the corresponding GUI libraries are not
d178 4
a181 4
binary against a universal 'ppc ppc64 i386 x86_64' Tcl binary works just fine.
The Tk configure script automatically removes the 64-bit -arch flags from CFLAGS
to facilitate universal building of both Tcl and Tk with the same CFLAGS; the
same happens with configure in Tk extensions based on TEA 3.5 or later.
@


1.6.2.14
log
@	* macosx/README: document CG antialiasing limit changes.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.6.2.13 2006/08/18 07:47:25 das Exp $
d104 3
a106 2
caps & miters. The old QD code is retained for now, just in case there are any
compatibility problems. To switch back to the QD drawing, put
d108 7
a114 7
in your script before you do drawing.
All CG drawing is antialiased by default, but (outline) linewidth can be used to
control whether a line/shape is drawn antialiased. The antialiasing threshold is
0 by default (i.e. antialias everything), it can be changed by setting
	set tk::mac::CGAntialiasLimit <limit>
in your script before drawing, in which case lines (or shapes with outlines)
thinner that <limit> pixels will not be antialiased.
@


1.6.2.15
log
@	* macosx/tkMacOSXCarbonEvents.c: add window event target carbon event
	* macosx/tkMacOSXEvent.c:	 handler for all kEventClassWindow and
	* macosx/tkMacOSXEvent.h:	 kEventClassMouse events; move all
	* macosx/tkMacOSXNotify.c:	 remaining events except for
	* macosx/tkMacOSXWindowEvent.c:	 kEventClassKeyboard from dispatcher to
	application event handler; pass event handler callRef downstream; fix
	debug event tracing; process all tcl event types in carbon event timer;
	delay carbon event timer first fire; add TkMacOSXTrackingLoop() to mark
	enter/exit of event tracking loop during which all tcl events but only
	carbon update events should be processed by the timer (replaces various
	calls to Tcl_SetServiceMode()); rename TkMacOSXReceiveAndProcessEvent()
	to TkMacOSXReceiveAndDispatchEvent(), move it from tkMacOSXEvent.c to
	tkMacOSXCarbonEvents.c and modify it to dequeue only update events
	during a tracking loop; add TkMacOSXRunTclEventLoop() to standardize
	the various ways in use to run the tcl event loop; add handling of
	kEventClassAppearance events (for ScrollBarVariantChanged event).

	* macosx/tkMacOSXDialog.c:	use new TkMacOSXTrackingLoop() around
	* macosx/tkMacOSXEvent.c:	blocking API that puts up modal dialogs
	* macosx/tkMacOSXMenu.c:	or when entering/exiting menu/control
	* macosx/tkMacOSXMouseEvent.c:	tracking, window dragging and other
	* macosx/tkMacOSXScale.c:	mouse tracking loops.
	* macosx/tkMacOSXScrlbr.c:
	* macosx/tkMacOSXWindowEvent.c:
	* macosx/tkMacOSXWm.c:

	* macosx/tkMacOSXDialog.c:	use new TkMacOSXRunTclEventLoop()
	* macosx/tkMacOSXScale.c:	instead of Tcl_DoOneEvent(),
	* macosx/tkMacOSXScrlbr.c:	Tcl_ServiceAll(), TclServiceIdle()
	* macosx/tkMacOSXWindowEvent.c:	and Tcl_GlobalEval("update idletasks").

	* macosx/tkMacOSXColor.c: make available as Tk system colors all
	* macosx/tkMacOSXPort.h:  appearance manager brushes, text colors and
	backgrounds with new and legacy names, as well as the fully transparent
	color "systemTransparent"; add TkMacOSXSetColorIn{Port,Context}() to
	directly set an X pixel color value in the current QD port resp. the
	given CG context without requiring passage through rgb representation
	(lossy for most system colors); modernize/remove Classic-era code;
	replace crufty strcmp() elseifs by Tcl_GetIndexFromObjStruct().

	* macosx/tkMacOSXButton.c:	use new TkMacOSXSetColorInPort()
	* macosx/tkMacOSXDraw.c:	instead of setting rgb color directly
	* macosx/tkMacOSXMenubutton.c:	to allow for non-rgb system colors.

	* macosx/tkMacOSXCursor.c: implement "none" cursor as on other
	platforms [Patch 1615427]; add all missing appearance manager cursors.

	* macosx/tkMacOSXDefault.h: set SELECT_FG_COLORs to None to match aqua
	L&F; use standard system color names; use new 'menu' system font;
	correct default scrollbar width.

	* macosx/tkMacOSXDraw.c:	standardize initialization, use and
	* macosx/tkMacOSXInt.h:		emptying of various static temp rgns
	* macosx/tkMacOSXRegion.c:	onto two global RgnHandles; in debug
	* macosx/tkMacOSXSubwindows.c:	builds, verify emptiness of these temp
	* macosx/tkMacOSXWindowEvent.c:	rgns before use.

	* macosx/tkMacOSXDraw.c: add TkMacOSX{Setup,Restore}DrawingContext() to
	* macosx/tkMacOSXInt.h:  abstract common setup & teardown of drawing
	environment (for both CG and QD); save/restore QD theme drawing state;
	handle GC clip region; add TkpClipDrawableToRect() to allow clipped
	drawing into drawable regardless of GC used; use new system color
	"systemWindowHeaderBackground" to setup background in themed toplevels;
	correct implementation of TkMacOSXMakeStippleMap().

	* macosx/tkMacOSXEntry.c: use new TkMacOSXSetupDrawingContext() and
	* macosx/tkMacOSXFont.c:  TkMacOSXRestoreDrawingContext() instead of
	various setup/teardown procs like TkMacOSX{SetUp,Release}CGContext(),
	TkMacOSXQuarz{Start,End}Draw(), TkMacOSXSetUpGraphicsPort() etc.

	* macosx/tkMacOSXEmbed.c: add CG context and drawable clip rgn fields
	* macosx/tkMacOSXInt.h:   to MacDrawable struct.
	* macosx/tkMacOSXSubwindows.c:

	* macosx/tkMacOSXDialog.c: make -parent option of tk_getOpenFile et al.
	use the sheet version of NavServices dialogs; ensure native parent win
	exists before using StandardSheet API for tk_messageBox [Bug 1677611];
	force sheets to behave like app-modal dialogs via WindowModality() API;
	use more modern ColorPicker API.

	* macosx/tkAboutDlg.r: use themed movable modal dialog, fix (c) year.

	* macosx/tkMacOSXEntry.c:  take xOff/yOff of MacDrawable into account
	when computing locations/bounds to ensure correct posititioning when
	not drawing into intermediate pixmap.

	* macosx/tkMacOSXFont.c: use appearance manager API to map system font
	* macosx/tkMacOSXFont.h: names to TkFonts; add "menu" system font for
	menu item text drawing from MDEF; disable broken QD stippling.

	* macosx/tkMacOSXMenu.c:		large-scale rewrite of custom
	* macosx/tkMacOSXMenu.r (removed):	MDEF and related code that
	* unix/Makefile.in:			restores many longtime-MIA
	features to working order (e.g. images, custom colors & fonts in menus
	etc); implement compound menu items; use Appearance Mgr and ThemeText
	APIs to mimic native MDEF as closely as possible when default "menu"
	system font is used; remove now obsolete SICN drawing code and
	resources.

	* macosx/tkMacOSXCarbonEvents.c: handle additional menu carbon events
	* macosx/tkMacOSXEvent.c:	 in order to support <<MenuSelect>> in
	* macosx/tkMacOSXMenu.c:	 the menubar and in menus that are not
	* macosx/tkMacOSXMenus.c:	 using the custom MDEF [Bug 1620826];
	fix early and missing clearing of current Tk active menu entry; fix
	extraneous sending of <<MenuSelect>> during active menu entry clearing.

	* macosx/tkMacOSXMouseEvent.c: add support for async window dragging by
	the window server; set the corresponding window attribute by default.

	* macosx/tkMacOSXMouseEvent.c: rationalized handling order of
	non-mousedown events; add TkMacOSXModifierState() to retrieve the
	current key modifiers in carbon format.

	* macosx/tkMacOSXScrlbr.c: use appearance manager API to retrieve
	scrollbar component metrics; add awareness of multiple possibilites for
	scrollbar arrow position in aqua and handle user changes to arrow
	position pref; handle difference in metrics of small & large scrollbar
	variants; handle aqua "jump to here" scrollbar behaviour; correct
	computation of scroll view size and position; enforce min scrollbar
	height to avoid scrollbar component overlap; erase scrollbar area
	outside of standard width; remove broken auto-adjust code; account for
	window class when leaving space for grow box; remove code to manually
	draw grow box; use modern API for thumb scroll proc; replace
	HiliteControl() by modern API; replace control mgr constants with
	appearance mgr equivalents.

	* macosx/tkMacOSXSubwindows.c: use SetWindowBounds() API instead of
	SizeWindow(); invalidate clip regions after X{Map,Unmap}Window as fix
	for [Bug 940117] made them dependent on mapping state; remove unneeded
	calls to TkMacOSXInvalClipRgns() and unnecessary setting of QD port;
	use native-endian pixmap on intel; remove obsolete pixmap pix locking.

	* macosx/tkMacOSXWindowEvent.c: handle only the first of a batch of
	kEventAppAvailableWindowBoundsChanged events sent per transaction;
	handle kEventWindowBoundsChanged event to support live window resizing
	and centralized sending of location/size changed ConfigureNotify
	events; ensure HIGrowBox is redrawn after bounds change; constrain
	window after dragging to ensure titlebar is not inacessible
	offscreen or under dock/menubar; handle kEventWindowGetRegion and
	kEventWindowDrawContent for transparent windows to mark resp. paint
	content region as transparent; handle kEventWindowConstrain for
	fullscreen windows to ensure bounds match new screen size; enter/exit
	fullscreen UIMode upon activation/deactivation of fullscreen window.

	* macosx/tkMacOSXWm.c: use live-resize and async-drag carbon window
	* macosx/tkMacOSXWm.h: attributes for toplevels by default; implement
	new [wm attributes] -topmost, -transparent and -fullscreen; refactor
	WmAttributesCmd() parallelling the tkUnixWm.c implementation, use thus
	factored proc to set proxy icon from [wm iconbitmap]; dynamically
	determine default values for toplevel min and max sizes (similar to
	tkWinWm.c impl): min sizes depend on window class & attributes to
	ensure visibility of all titlebar widgets and grow box, max sizes
	depend on maximal window bounds for all active displays; factor out
	code that puts into effect changes to master or override_redirect; use
	RepositionWindow() API to determine staggered initial window bounds;
	correct resize limit calculations, handle gridding and use modern
	resize API in TkMacOSXGrowToplevel(); remove sending of ConfigureNotify
	after resize or zoom (now handled by BoundsChanged handler); correct
	composite carbon window attribute handling, remove currently unusable
	attributes and add new attributes in [tk::unsupported::MacWindowStyle];
	ensure validity of window class and attributes before use; apply
	changes to window class when handling carbon window attribute changes
	(if HIWindowChangeClass() API available); add debug build warning
	message when deprecated window style is used instead of window class;
	use transparent HIGrowBox for resizable windows; avoid unnecessary
	calls to window structure width API; use tcl time API in TkpGetMS();
	add TkMacOSXEnterExitFullscreen() to enter/exit UIMode with dock and
	menubar hidden; restrict wmTracing output to debug builds; remove
	unneeded calls to TkMacOSXInvalClipRgns() and unnecessary setting of QD
	port; workaround GetWindowStructureWidths() Carbon bug (bogus results
	for never-mapped floating windows).

	* macosx/tkMacOSXXStubs.c (TkMacOSXDisplayChanged): add maximal window
	bounds field to Screen record (in ext_data), computed as the union of
	available window positioning bounds of all graphics devices (displays).

	* macosx/tkMacOSXBitmap.c: fix macRoman encoding leak.
	* macosx/tkMacOSXCursor.c:

	* macosx/tkMacOSXDebug.c (TkMacOSXCarbonEventToAscii): use static
	* macosx/tkMacOSXDebug.h: buffer to simplify callers; const fixes.

	* macosx/tkMacOSXBitmap.c: use more efficient QDSwapPort() instead of
	* macosx/tkMacOSXButton.c: GetPort()/SetPort()/GetGWorld()/SetGWorld().
	* macosx/tkMacOSXDraw.c:
	* macosx/tkMacOSXFont.c:
	* macosx/tkMacOSXMenubutton.c:
	* macosx/tkMacOSXScale.c:
	* macosx/tkMacOSXScrlbr.c:
	* macosx/tkMacOSXXStubs.c:

	* macosx/tkMacOSXColor.c: use kHIToolboxVersionNumber for runtime OS
	* macosx/tkMacOSXEntry.c: version check rather than Gestalt() etc.
	* macosx/tkMacOSXInt.h:
	* macosx/tkMacOSXWm.c:

	* macosx/tkMacOSXDraw.c: remove obsolete and now incorrect
	* macosx/tkMacOSXInt.h:  tkMenuCascadeRgn clipping code.
	* macosx/tkMacOSXMenu.c:

	* macosx/tkMacOSXHLEvents.c: replace Tcl_GlobalEval() resp. Tcl_Eval()
	* macosx/tkMacOSXScrlbr.c:   by Tcl_EvalEx().
	* macosx/tkMacOSXInit.c:

	* macosx/tkMacOSXInit.c (TkpInit): reorder initialization steps.

	* macosx/tkMacOSXKeyEvent.c: remove pre-10.2 support.

	* macosx/tkMacOSXMenus.c: remove now useless call to
	TkMacOSXHandleTearoffMenu(); use \x.. quoting for non-latin1 macroman
	literar chars to allow file to be edited as utf-8.

	* macosx/tkMacOSXScale.c: replace TrackControl() by modern
	* macosx/tkMacOSXScrlbr.c: HandleControlClick() API (using new
	TkMacOSXModifierState()).

	* macosx/tkMacOSXInt.h:		move all constant #defines needed to
	* macosx/tkMacOSXColor.c:	support building on older OS X releases
	* macosx/tkMacOSXEvent.h:	to a central location in tkMacOSXInt.h.
	* macosx/tkMacOSXFont.c:
	* macosx/tkMacOSXMenu.c:
	* macosx/tkMacOSXMenubutton.c:
	* macosx/tkMacOSXMenus.c:
	* macosx/tkMacOSXMouseEvent.c:
	* macosx/tkMacOSXWm.c:

	* macosx/tkMacOSXInt.h:		 add ChkErr() macro to factor out
	* macosx/tkMacOSXButton.c:	 Carbon OSStatus return value checking
	* macosx/tkMacOSXCarbonEvents.c: and TkMacOSXDbgMsg() macro to factour
	* macosx/tkMacOSXClipboard.c:	 out debug message output; use these
	* macosx/tkMacOSXColor.c:	 macros to replace #ifdef TK_MAC_DEBUG
	* macosx/tkMacOSXCursor.c:	 blocks & direct printing to stderr,
	* macosx/tkMacOSXDebug.c:	 and to do additional OSStatus return
	* macosx/tkMacOSXDialog.c:	 checking, and to standardize OSStatus
	* macosx/tkMacOSXDraw.c:	 usage.
	* macosx/tkMacOSXEntry.c:
	* macosx/tkMacOSXEvent.c:
	* macosx/tkMacOSXFont.c:
	* macosx/tkMacOSXHLEvents.c:
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXKeyEvent.c:
	* macosx/tkMacOSXMenu.c:
	* macosx/tkMacOSXMenubutton.c:
	* macosx/tkMacOSXMenus.c:
	* macosx/tkMacOSXMouseEvent.c:
	* macosx/tkMacOSXScrlbr.c:
	* macosx/tkMacOSXSubwindows.c:
	* macosx/tkMacOSXWindowEvent.c:
	* macosx/tkMacOSXWm.c:
	* macosx/tkMacOSXXStubs.c:

	* macosx/tkMacOSXSend.c:	remove duplicate/unused declarations.
	* macosx/tkMacOSXXStubs.c:

	* macosx/tkMacOSXDebug.c:	const fixes.
	* macosx/tkMacOSXInit.c:
	* macosx/tkMacOSXTest.c:
	* macosx/tkMacOSXWm.c:
	* macosx/tkMacOSXXStubs.c:

	* macosx/Wish-Info.plist.in: add tcl document extensions/mime types and
	LSMinimumSystemVersion, LSRequiresCarbon & NSAppleScriptEnabled keys.

	* macosx/tkMacOSXAETE.r:	fix whitespace.
	* macosx/tkMacOSXConfig.c:
	* macosx/tkMacOSXCursors.r:
	* macosx/tkMacOSXKeyboard.c:
	* macosx/tkMacOSXSend.c:
	* macosx/tkMacOSXXCursors.r:
	* macosx/README:

	* macosx/Makefile:		fix/add copyright and license refs.
	* macosx/Tk-Info.plist.in:
	* macosx/Wish-Info.plist.in:
	* macosx/tkMacOSX.h:
@
text
@d1 1
a1 1
Tcl/Tk Mac OS X README
d4 1
a4 1
RCS: @@(#) $Id: README,v 1.6.2.14 2006/10/16 15:57:13 das Exp $
d94 5
a98 5
- the env array is different when Wish is started from the Finder (i.e. via
LaunchServices) than when it (or tclsh) is invoked from the Terminal, in
particular PATH may not be what you expect. (Wish started by LaunchServices
inherits loginwindow's environment variables, which are essentially those set in
$HOME/.MacOSX/environment.plist, and are unrelated to those set in your shell).
d101 1
a101 1
the CoreGraphics routines - the code is primarily due to James Tittle. There
d113 1
a113 1
thinner than <limit> pixels will not be antialiased.
d120 1
a120 1
normal scrollbar has a small dimension of 15, the small variant 11. Access to
d134 2
a135 2
	$widget configure -cursor spinning$count
	after 100 spinCursor [incr count]
d162 1
a162 1
project, this simply calls through to the tk/macosx/Makefile. It requires a
d169 3
a171 3
of the architectures (the -isysroot flag is only required on PowerPC Tiger).
Note that configure requires CFLAGS to contain a least one architecture that can
be run on the build machine (i.e. ppc on PowerPC, ppc or i386 on Intel).
d197 1
a197 1
[      ln -fs /path_to_tcl/build /path_to_tk/build			       ]
d206 1
a206 1
	ver="8.4.12"	 ;: if your shell is sh
d210 2
a211 2
	set ver=""	 ;: if your shell is csh
	ver=""		 ;: if your shell is sh
@


1.5
log
@	* library/console.tcl: (aqua & macintosh) added missing <Cmd-q>
	binding for corresponding Quit menu item shortcut.

	* macosx/README: updated instructions for embedded build,
	added various improvements by Russell Owen.

	* unix/tcl.m4: update from Tcl.
	* unix/configure: regen.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.4 2003/02/11 07:26:18 wolfsuit Exp $
d97 1
a97 1
to the small variant was added in Tk 8.4.3.
d113 1
a113 1
This was added in Tk 8.4.3
@


1.4
log
@2003-02-10  Jim Ingham <jingham@@apple.com>

        * macosx/tkMacOSXCursor.c (TkMacOSXInstallCursor): Set all theme
        cursors using SetThemeCursor or SetAnimatedThemeCursors.
        (TkGetCursorByName): Use the theme cursors for arrow, ibeam, etc.
        Allow animatedCursor{NUM} form for an animated cursor with count.
        (TkpSetCursor): Don't reset the cursor if there is no change.
        * macosx/tkMacOSXMouseEvent.c (GeneratePollingEvents): Don't
        directly call TkMacOSXInstallCursor, it gets called by the call
        to Tk_UpdatePointer immediately above.
@
text
@d4 1
a4 1
RCS: @@(#) $Id$
d27 5
a31 3
- You should report bugs to the sourceforge bug trackers as usual:
	https://sourceforge.net/tracker/?func=add&group_id=10894&atid=110894
	https://sourceforge.net/tracker/?func=add&group_id=12997&atid=112997
d50 1
a50 1
clicking Wish in the finder (or using 'open Wish\ Shell.app' from the Terminal).
d57 1
a57 1
$pkg/Resources/Scripts/pkgIndex.tcl as well as $pkg/pkgIndex.tcl (as usual).
d64 2
a65 2
Tk.framework contains no documentation, and no manpages are installed by
default.
a101 1

a106 1

d109 4
a112 6

proc spinCursor {widget count} {
    $widget configure -cursor spinning$count
    after 100 spinCursor [incr count]
}

d119 2
d122 4
a125 6
release). This CD should have come with Mac OS X retail or should be present as
a disk image on new macs that had OSX preinstalled. It can also be downloaded
from http://connect.apple.com (free ADC membership required).

- Mac OS X 10.1.5 with the April 2002 Developer Tools update (or higher) is
required to build TclTkAqua.
d132 13
a144 11
- For the following instructions to work as is, the tcl and tk source trees
should be located in a common directory and be named 'tcl' resp. 'tk' (as is
the case when building directly from CVS). You need to adapt the paths in the
instructions if they are named differently (e.g. when building from a
distribution tarball), but the build process will still work fine.
If the source trees are not located in the same directory, you'll need to create
a symbolic link
	ln -fs /path_to_tcl/build /path_to_tk/build
(where /path_to_{tcl,tk} is the directory where the 'tcl' resp. 'tk' sourcetree
is located) for the build to work as setup by default by the Makefiles; or you
can pass an argument of BUILD_DIR=somewhere to both the tcl and tk make.
d148 4
a151 4
The following steps will build Tcl and Tk from the Terminal (assuming you are
located in the directory above the tcl and tk source trees):
	make -C tcl/macosx
	make -C tk/macosx
d153 7
a159 8
privileges required):
	sudo make -C tcl/macosx install
	sudo make -C tk/macosx  install
you can also pass an INSTALL_ROOT argument to 'make install', e.g.
	make -C tcl/macosx install INSTALL_ROOT=$HOME
	make -C tk/macosx  install INSTALL_ROOT=$HOME
will install into you home directory (useful if you're not an admin on your
machine)
d164 1
a164 1
This allows to dynamically link to the debug library at runtime by setting
d168 7
a174 7
If you only want to build/install the debug resp. optimized build, use the
'develop' resp. 'deploy' target variants of the Makefiles, e.g.
	make -C tcl/macosx deploy
	make -C tk/macosx deploy
	sudo make -C tcl/macosx install-deploy
	sudo make -C tk/macosx  install-deploy
will build and install only the optimized versions.
d177 1
a177 1
frameworks embedded in its application package, this allows for standalone
d180 14
a193 13
the Makefiles, i.e.
	make -C tcl/macosx embedded
	make -C tk/macosx embedded
	make -C tcl/macosx install-embedded INSTALL_ROOT=`pwd`/embedded
	make -C tk/macosx  install-embedded INSTALL_ROOT=`pwd`/embedded
will build a standalone 'Wish Shell.app' in ./embedded/Applications/Utilities
(if you've already built standard TclTkAqua, this only requires a relink).

Note that the embedded frameworks include only optimized builds and no
documentation.
The standalone Wish has the directory Wish\ Shell.app/Contents/lib in its
auto_path, this can be used to embed tcl extensions into the app package and
have them automatically available via [package require].
@


1.3
log
@	* macosx/README: added info on new package searching in
	Frameworks directories.
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.2 2002/10/21 04:37:34 das Exp $
d92 24
@


1.2
log
@	* macosx/README: revised according to Jim's suggestions
	* macosx/tkMacOSXAppInit.c: use standard PATH_MAX from <limits.h>
@
text
@d4 1
a4 1
RCS: @@(#) $Id: README,v 1.1 2002/10/16 23:56:02 das Exp $
d51 7
a57 3
	$HOME/Library/Tcl /Library/Tcl 
	Network/Library/Tcl /System/Library/Tcl
(searched in that order).
@


1.1
log
@	* macosx/README: info specific to building and running
	TclTk on Mac OS X, answers to tcl-mac list FAQs.
	* macosx/Makefile: permission fix after embedded install.
	* macosx/Wish.pbproj/project.pbxproj: after install, fix
	permissions of uninstalled products.
@
text
@d4 1
a4 1
RCS: @@(#) $Id$
d18 2
a19 2
- For general tcl/tk questions, the newsgroup comp.lang.tcl is your best bet, but
also check the Tcl'ers Wiki for a wealth of information:
d48 1
a48 8
clicking Wish in the finder (or using 'open Wish\ Shell.app').

- Wish accepts drag & drop of text files (i.e. OS type TEXT and other files that
the system recognizes as being of NSStringPboardType). To claim other OS types
or file extensions in your Wish clone, you need to edit
	Wish Shell.app/Contents/Info.plist
for more info on how this works, c.f. the System Overview document:
	file:///Developer/Documentation/Essentials/SystemOverview/index.html
d58 2
a59 2
(OTOH no manpages are installed by default).
Tk.framework contains no documentation.
d74 6
a79 4
Also note that the env array is different when Wish is started from
the Finder, in particular PATH may not be what you expect.
(Wish inherits the Finder's environment variables, which are essentially
those set in $HOME/.MacOSX/environment.plist).
d106 12
d159 1
a159 1
(this only requires a relink if you've already built standard TclTkAqua).
@

