diff options
author | das <das> | 2002-04-23 14:28:02 (GMT) |
---|---|---|
committer | das <das> | 2002-04-23 14:28:02 (GMT) |
commit | 5486105ceae279f2e9e5951c0b3fb7cfca30296b (patch) | |
tree | c5cfba592c741ec2efa2d54ac2779ffbffe1575a | |
parent | 30329416a3c01e9ac098a93f793bced1dfb8f2f9 (diff) | |
download | tk-5486105ceae279f2e9e5951c0b3fb7cfca30296b.zip tk-5486105ceae279f2e9e5951c0b3fb7cfca30296b.tar.gz tk-5486105ceae279f2e9e5951c0b3fb7cfca30296b.tar.bz2 |
* mac/tkMacTclCode.r:
* mac/tkMacResource.r: added check of
TCLTK_NO_LIBRARY_TEXT_RESOURCES #define to allow disabling the
inclusion of the tk library code in the resource fork of Tk
executables and shared libraries.
Moved tk library code inclusion to separate file like in tcl.
Added 'panedwindow' resource.
-rw-r--r-- | ChangeLog | 10 | ||||
-rw-r--r-- | mac/tkMacResource.r | 44 | ||||
-rw-r--r-- | mac/tkMacTclCode.r | 69 |
3 files changed, 83 insertions, 40 deletions
@@ -1,3 +1,13 @@ +2002-04-24 Daniel Steffen <das@users.sourceforge.net> + + * mac/tkMacTclCode.r: + * mac/tkMacResource.r: added check of + TCLTK_NO_LIBRARY_TEXT_RESOURCES #define to allow disabling the + inclusion of the tk library code in the resource fork of Tk + executables and shared libraries. + Moved tk library code inclusion to separate file like in tcl. + Added 'panedwindow' resource. + 2002-04-22 Jeff Hobbs <jeffh@ActiveState.com> * library/button.tcl (ButtonLeave): corrected the 3 diff --git a/mac/tkMacResource.r b/mac/tkMacResource.r index 16a78aa..6daace7 100644 --- a/mac/tkMacResource.r +++ b/mac/tkMacResource.r @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tkMacResource.r,v 1.8 2001/12/27 22:45:16 das Exp $ + * RCS: @(#) $Id: tkMacResource.r,v 1.9 2002/04/23 14:28:02 das Exp $ */ /* @@ -32,8 +32,6 @@ #include "tcl.h" #include "tk.h" -#define TK_LIBRARY_RESOURCES 3000 - /* * The mechanisim below loads Tcl source into the resource fork of the * application. The example below creates a TEXT resource named @@ -46,43 +44,9 @@ * will load the TEXT resource named "Init". */ -read 'TEXT' (TK_LIBRARY_RESOURCES+1, "tk", purgeable,preload) - "::library:tk.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+2, "button", purgeable) - "::library:button.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+3, "dialog", purgeable) - "::library:dialog.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+4, "entry", purgeable) - "::library:entry.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+5, "focus", purgeable) - "::library:focus.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+6, "listbox", purgeable) - "::library:listbox.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+7, "menu", purgeable) - "::library:menu.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+8, "optMenu", purgeable) - "::library:optMenu.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+9, "palette", purgeable) - "::library:palette.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+10, "scale", purgeable) - "::library:scale.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+11, "scrlbar", purgeable) - "::library:scrlbar.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+12, "tearoff", purgeable) - "::library:tearoff.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+13, "text", purgeable) - "::library:text.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+14, "bgerror", purgeable) - "::library:bgerror.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+15, "console", purgeable) - "::library:console.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+16, "msgbox", purgeable) - "::library:msgbox.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+17, "comdlg", purgeable) - "::library:comdlg.tcl"; -read 'TEXT' (TK_LIBRARY_RESOURCES+18, "spinbox", purgeable) - "::library:spinbox.tcl"; - +#ifndef TCLTK_NO_LIBRARY_TEXT_RESOURCES +#include "tkMacTclCode.r" +#endif /* * The following two resources define the default "About Box" for Mac Tk. diff --git a/mac/tkMacTclCode.r b/mac/tkMacTclCode.r new file mode 100644 index 0000000..52d9e86 --- /dev/null +++ b/mac/tkMacTclCode.r @@ -0,0 +1,69 @@ +/* + * tkMacTclCode.r -- + * + * This file creates resources from the Tcl code that is + * usually stored in the TCL_LIBRARY + * + * Copyright (c) 1996-1997 Sun Microsystems, Inc. + * + * See the file "license.terms" for information on usage and redistribution + * of this file, and for a DISCLAIMER OF ALL WARRANTIES. + * + * SCCS: @(#) tkMacTclCode.r 1.1 98/01/21 22:22:38 + */ + +#include <Types.r> +#include <SysTypes.r> + +#define TK_LIBRARY_RESOURCES 3000 + +/* + * The mechanisim below loads Tcl source into the resource fork of the + * application. The example below creates a TEXT resource named + * "Init" from the file "init.tcl". This allows applications to use + * Tcl to define the behavior of the application without having to + * require some predetermined file structure - all needed Tcl "files" + * are located within the application. To source a file for the + * resource fork the source command has been modified to support + * sourcing from resources. In the below case "source -rsrc {Init}" + * will load the TEXT resource named "Init". + */ + +read 'TEXT' (TK_LIBRARY_RESOURCES+1, "tk", purgeable,preload) + "::library:tk.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+2, "button", purgeable) + "::library:button.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+3, "dialog", purgeable) + "::library:dialog.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+4, "entry", purgeable) + "::library:entry.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+5, "focus", purgeable) + "::library:focus.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+6, "listbox", purgeable) + "::library:listbox.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+7, "menu", purgeable) + "::library:menu.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+8, "optMenu", purgeable) + "::library:optMenu.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+9, "palette", purgeable) + "::library:palette.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+10, "scale", purgeable) + "::library:scale.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+11, "scrlbar", purgeable) + "::library:scrlbar.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+12, "tearoff", purgeable) + "::library:tearoff.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+13, "text", purgeable) + "::library:text.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+14, "bgerror", purgeable) + "::library:bgerror.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+15, "console", purgeable) + "::library:console.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+16, "msgbox", purgeable) + "::library:msgbox.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+17, "comdlg", purgeable) + "::library:comdlg.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+18, "spinbox", purgeable) + "::library:spinbox.tcl"; +read 'TEXT' (TK_LIBRARY_RESOURCES+19, "panedwindow", purgeable) + "::library:panedwindow.tcl"; |