annotate Modules/tkappinit.c @ 44825:ef859cd754a7 legacy-trunk

Fixed a wrong assumption in configure.in and Include/pyport.h. The is finite function is not called isfinite() but finite(). Sorry, my fault. :)
author Christian Heimes <christian@cheimes.de>
date Sun, 20 Jan 2008 14:28:28 +0000
parents 5d27269c9e33
children 86893a397dd0
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
6621
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
1 /* appinit.c -- Tcl and Tk application initialization.
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
2
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
3 The function Tcl_AppInit() below initializes various Tcl packages.
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
4 It is called for each Tcl interpreter created by _tkinter.create().
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
5 It needs to be compiled with -DWITH_<package> flags for each package
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
6 that you are statically linking with. You may have to add sections
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
7 for packages not yet listed below.
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
8
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
9 Note that those packages for which Tcl_StaticPackage() is called with
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
10 a NULL first argument are known as "static loadable" packages to
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
11 Tcl but not actually initialized. To use these, you have to load
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
12 it explicitly, e.g. tkapp.eval("load {} Blt").
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
13 */
1691
d88af58e95cd Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
14
32341
5d27269c9e33 Remove warning about implicit declaration of strcmp()
Neal Norwitz <nnorwitz@gmail.com>
parents: 31547
diff changeset
15 #include <string.h>
1691
d88af58e95cd Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
16 #include <tcl.h>
d88af58e95cd Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
17 #include <tk.h>
d88af58e95cd Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
18
d88af58e95cd Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
19 int
13492
5087d1d45f1d ANSI-fication (and test if committing files works now)
Peter Schneider-Kamp <nowonder@nowonder.de>
parents: 11444
diff changeset
20 Tcl_AppInit(Tcl_Interp *interp)
1691
d88af58e95cd Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
21 {
13862
4c3f977ce06c Removing warnings discovered by gcc -Wall
Moshe Zadka <moshez@math.huji.ac.il>
parents: 13492
diff changeset
22 Tk_Window main_window;
31547
470f95ad6750 Implementation of patch 869468
David Ascher <david.ascher@gmail.com>
parents: 21322
diff changeset
23 const char * _tkinter_skip_tk_init;
1691
d88af58e95cd Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
24
21322
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
25 #ifdef TK_AQUA
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
26 #ifndef MAX_PATH_LEN
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
27 #define MAX_PATH_LEN 1024
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
28 #endif
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
29 char tclLibPath[MAX_PATH_LEN], tkLibPath[MAX_PATH_LEN];
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
30 Tcl_Obj* pathPtr;
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
31
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
32 /* pre- Tcl_Init code copied from tkMacOSXAppInit.c */
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
33 Tk_MacOSXOpenBundleResources (interp, "com.tcltk.tcllibrary",
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
34 tclLibPath, MAX_PATH_LEN, 0);
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
35
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
36 if (tclLibPath[0] != '\0') {
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
37 Tcl_SetVar(interp, "tcl_library", tclLibPath, TCL_GLOBAL_ONLY);
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
38 Tcl_SetVar(interp, "tclDefaultLibrary", tclLibPath, TCL_GLOBAL_ONLY);
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
39 Tcl_SetVar(interp, "tcl_pkgPath", tclLibPath, TCL_GLOBAL_ONLY);
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
40 }
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
41
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
42 if (tclLibPath[0] != '\0') {
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
43 Tcl_SetVar(interp, "tcl_library", tclLibPath, TCL_GLOBAL_ONLY);
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
44 Tcl_SetVar(interp, "tclDefaultLibrary", tclLibPath, TCL_GLOBAL_ONLY);
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
45 Tcl_SetVar(interp, "tcl_pkgPath", tclLibPath, TCL_GLOBAL_ONLY);
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
46 }
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
47 #endif
4955
e6b797aaa69f Formatting.
Barry Warsaw <barry@python.org>
parents: 1691
diff changeset
48 if (Tcl_Init (interp) == TCL_ERROR)
e6b797aaa69f Formatting.
Barry Warsaw <barry@python.org>
parents: 1691
diff changeset
49 return TCL_ERROR;
21322
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
50
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
51 #ifdef TK_AQUA
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
52 /* pre- Tk_Init code copied from tkMacOSXAppInit.c */
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
53 Tk_MacOSXOpenBundleResources (interp, "com.tcltk.tklibrary",
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
54 tkLibPath, MAX_PATH_LEN, 1);
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
55
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
56 if (tclLibPath[0] != '\0') {
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
57 pathPtr = Tcl_NewStringObj(tclLibPath, -1);
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
58 } else {
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
59 Tcl_Obj *pathPtr = TclGetLibraryPath();
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
60 }
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
61
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
62 if (tkLibPath[0] != '\0') {
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
63 Tcl_Obj *objPtr;
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
64
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
65 Tcl_SetVar(interp, "tk_library", tkLibPath, TCL_GLOBAL_ONLY);
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
66 objPtr = Tcl_NewStringObj(tkLibPath, -1);
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
67 Tcl_ListObjAppendElement(NULL, pathPtr, objPtr);
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
68 }
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
69
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
70 TclSetLibraryPath(pathPtr);
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
71 #endif
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
72
31547
470f95ad6750 Implementation of patch 869468
David Ascher <david.ascher@gmail.com>
parents: 21322
diff changeset
73 #ifdef WITH_XXX
470f95ad6750 Implementation of patch 869468
David Ascher <david.ascher@gmail.com>
parents: 21322
diff changeset
74 // Initialize modules that don't require Tk
470f95ad6750 Implementation of patch 869468
David Ascher <david.ascher@gmail.com>
parents: 21322
diff changeset
75 #endif
470f95ad6750 Implementation of patch 869468
David Ascher <david.ascher@gmail.com>
parents: 21322
diff changeset
76
470f95ad6750 Implementation of patch 869468
David Ascher <david.ascher@gmail.com>
parents: 21322
diff changeset
77 _tkinter_skip_tk_init = Tcl_GetVar(interp, "_tkinter_skip_tk_init", TCL_GLOBAL_ONLY);
470f95ad6750 Implementation of patch 869468
David Ascher <david.ascher@gmail.com>
parents: 21322
diff changeset
78 if (_tkinter_skip_tk_init != NULL && strcmp(_tkinter_skip_tk_init, "1") == 0) {
470f95ad6750 Implementation of patch 869468
David Ascher <david.ascher@gmail.com>
parents: 21322
diff changeset
79 return TCL_OK;
470f95ad6750 Implementation of patch 869468
David Ascher <david.ascher@gmail.com>
parents: 21322
diff changeset
80 }
470f95ad6750 Implementation of patch 869468
David Ascher <david.ascher@gmail.com>
parents: 21322
diff changeset
81 if (Tk_Init(interp) == TCL_ERROR)
4955
e6b797aaa69f Formatting.
Barry Warsaw <barry@python.org>
parents: 1691
diff changeset
82 return TCL_ERROR;
1691
d88af58e95cd Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
83
13862
4c3f977ce06c Removing warnings discovered by gcc -Wall
Moshe Zadka <moshez@math.huji.ac.il>
parents: 13492
diff changeset
84 main_window = Tk_MainWindow(interp);
11444
90f4830e2122 Patch by Dieter Maurer to make things work for Tcl/Tk 8.1. This
Guido van Rossum <guido@python.org>
parents: 6720
diff changeset
85
21322
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
86 #ifdef TK_AQUA
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
87 TkMacOSXInitAppleEvents(interp);
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
88 TkMacOSXInitMenus(interp);
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
89 #endif
1852caba7014 Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents: 13862
diff changeset
90
1691
d88af58e95cd Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
91 #ifdef WITH_MOREBUTTONS
4955
e6b797aaa69f Formatting.
Barry Warsaw <barry@python.org>
parents: 1691
diff changeset
92 {
e6b797aaa69f Formatting.
Barry Warsaw <barry@python.org>
parents: 1691
diff changeset
93 extern Tcl_CmdProc studButtonCmd;
e6b797aaa69f Formatting.
Barry Warsaw <barry@python.org>
parents: 1691
diff changeset
94 extern Tcl_CmdProc triButtonCmd;
1691
d88af58e95cd Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
95
4955
e6b797aaa69f Formatting.
Barry Warsaw <barry@python.org>
parents: 1691
diff changeset
96 Tcl_CreateCommand(interp, "studbutton", studButtonCmd,
13862
4c3f977ce06c Removing warnings discovered by gcc -Wall
Moshe Zadka <moshez@math.huji.ac.il>
parents: 13492
diff changeset
97 (ClientData) main_window, NULL);
4955
e6b797aaa69f Formatting.
Barry Warsaw <barry@python.org>
parents: 1691
diff changeset
98 Tcl_CreateCommand(interp, "tributton", triButtonCmd,
13862
4c3f977ce06c Removing warnings discovered by gcc -Wall
Moshe Zadka <moshez@math.huji.ac.il>
parents: 13492
diff changeset
99 (ClientData) main_window, NULL);
4955
e6b797aaa69f Formatting.
Barry Warsaw <barry@python.org>
parents: 1691
diff changeset
100 }
1691
d88af58e95cd Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
101 #endif
5518
576b7d927afb Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents: 4955
diff changeset
102
576b7d927afb Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents: 4955
diff changeset
103 #ifdef WITH_PIL /* 0.2b5 and later -- not yet released as of May 14 */
576b7d927afb Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents: 4955
diff changeset
104 {
6621
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
105 extern void TkImaging_Init(Tcl_Interp *);
5518
576b7d927afb Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents: 4955
diff changeset
106 TkImaging_Init(interp);
6621
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
107 /* XXX TkImaging_Init() doesn't have the right return type */
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
108 /*Tcl_StaticPackage(interp, "Imaging", TkImaging_Init, NULL);*/
5518
576b7d927afb Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents: 4955
diff changeset
109 }
576b7d927afb Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents: 4955
diff changeset
110 #endif
576b7d927afb Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents: 4955
diff changeset
111
576b7d927afb Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents: 4955
diff changeset
112 #ifdef WITH_PIL_OLD /* 0.2b4 and earlier */
576b7d927afb Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents: 4955
diff changeset
113 {
576b7d927afb Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents: 4955
diff changeset
114 extern void TkImaging_Init(void);
6621
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
115 /* XXX TkImaging_Init() doesn't have the right prototype */
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
116 /*Tcl_StaticPackage(interp, "Imaging", TkImaging_Init, NULL);*/
5518
576b7d927afb Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents: 4955
diff changeset
117 }
576b7d927afb Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents: 4955
diff changeset
118 #endif
576b7d927afb Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents: 4955
diff changeset
119
6603
7a0a48d73076 Add optional support fort Tix and BLT.
Guido van Rossum <guido@python.org>
parents: 5518
diff changeset
120 #ifdef WITH_TIX
6720
960853902ebe Yes, Virginia, Tix does have a Tix_SafeInit() function.
Guido van Rossum <guido@python.org>
parents: 6621
diff changeset
121 {
960853902ebe Yes, Virginia, Tix does have a Tix_SafeInit() function.
Guido van Rossum <guido@python.org>
parents: 6621
diff changeset
122 extern int Tix_Init(Tcl_Interp *interp);
960853902ebe Yes, Virginia, Tix does have a Tix_SafeInit() function.
Guido van Rossum <guido@python.org>
parents: 6621
diff changeset
123 extern int Tix_SafeInit(Tcl_Interp *interp);
960853902ebe Yes, Virginia, Tix does have a Tix_SafeInit() function.
Guido van Rossum <guido@python.org>
parents: 6621
diff changeset
124 Tcl_StaticPackage(NULL, "Tix", Tix_Init, Tix_SafeInit);
960853902ebe Yes, Virginia, Tix does have a Tix_SafeInit() function.
Guido van Rossum <guido@python.org>
parents: 6621
diff changeset
125 }
6603
7a0a48d73076 Add optional support fort Tix and BLT.
Guido van Rossum <guido@python.org>
parents: 5518
diff changeset
126 #endif
7a0a48d73076 Add optional support fort Tix and BLT.
Guido van Rossum <guido@python.org>
parents: 5518
diff changeset
127
7a0a48d73076 Add optional support fort Tix and BLT.
Guido van Rossum <guido@python.org>
parents: 5518
diff changeset
128 #ifdef WITH_BLT
6621
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
129 {
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
130 extern int Blt_Init(Tcl_Interp *);
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
131 extern int Blt_SafeInit(Tcl_Interp *);
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
132 Tcl_StaticPackage(NULL, "Blt", Blt_Init, Blt_SafeInit);
6603
7a0a48d73076 Add optional support fort Tix and BLT.
Guido van Rossum <guido@python.org>
parents: 5518
diff changeset
133 }
6621
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
134 #endif
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
135
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
136 #ifdef WITH_TOGL
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
137 {
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
138 /* XXX I've heard rumors that this doesn't work */
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
139 extern int Togl_Init(Tcl_Interp *);
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
140 /* XXX Is there no Togl_SafeInit? */
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
141 Tcl_StaticPackage(NULL, "Togl", Togl_Init, NULL);
b96aad12a150 New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents: 6603
diff changeset
142 }
6603
7a0a48d73076 Add optional support fort Tix and BLT.
Guido van Rossum <guido@python.org>
parents: 5518
diff changeset
143 #endif
7a0a48d73076 Add optional support fort Tix and BLT.
Guido van Rossum <guido@python.org>
parents: 5518
diff changeset
144
1691
d88af58e95cd Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
145 #ifdef WITH_XXX
d88af58e95cd Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
146
d88af58e95cd Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
147 #endif
4955
e6b797aaa69f Formatting.
Barry Warsaw <barry@python.org>
parents: 1691
diff changeset
148 return TCL_OK;
1691
d88af58e95cd Initial revision
Guido van Rossum <guido@python.org>
parents:
diff changeset
149 }