Mercurial > cpython-lru_cache-weakref
annotate Modules/tkappinit.c @ 25838:8540887bcec6 2.2
Backport of 2.183:
Fix memory leak in add_subclass() found by NealN with valgrind.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Fri, 18 Oct 2002 13:42:21 +0000 |
| parents | 1852caba7014 |
| children | 470f95ad6750 |
| 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 | 14 |
| 15 #include <tcl.h> | |
| 16 #include <tk.h> | |
| 17 | |
| 18 int | |
|
13492
5087d1d45f1d
ANSI-fication (and test if committing files works now)
Peter Schneider-Kamp <nowonder@nowonder.de>
parents:
11444
diff
changeset
|
19 Tcl_AppInit(Tcl_Interp *interp) |
| 1691 | 20 { |
|
13862
4c3f977ce06c
Removing warnings discovered by gcc -Wall
Moshe Zadka <moshez@math.huji.ac.il>
parents:
13492
diff
changeset
|
21 Tk_Window main_window; |
| 1691 | 22 |
|
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
|
23 #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
|
24 #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
|
25 #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
|
26 #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
|
27 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
|
28 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
|
29 |
|
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 /* 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
|
31 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
|
32 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
|
33 |
|
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 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
|
35 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
|
36 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
|
37 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
|
38 } |
|
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 |
|
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 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
|
41 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
|
42 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
|
43 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
|
44 } |
|
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 #endif |
| 4955 | 46 if (Tcl_Init (interp) == TCL_ERROR) |
| 47 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
|
48 |
|
1852caba7014
Mods by Tony Lownds (patch 490100, slightly massaged by me) to make Tkinter
Jack Jansen <jack.jansen@cwi.nl>
parents:
13862
diff
changeset
|
49 #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
|
50 /* 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
|
51 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
|
52 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
|
53 |
|
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 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
|
55 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
|
56 } 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
|
57 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
|
58 } |
|
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 |
|
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 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
|
61 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
|
62 |
|
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_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
|
64 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
|
65 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
|
66 } |
|
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 |
|
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 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
|
69 #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
|
70 |
| 4955 | 71 if (Tk_Init (interp) == TCL_ERROR) |
| 72 return TCL_ERROR; | |
| 1691 | 73 |
|
13862
4c3f977ce06c
Removing warnings discovered by gcc -Wall
Moshe Zadka <moshez@math.huji.ac.il>
parents:
13492
diff
changeset
|
74 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
|
75 |
|
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
|
76 #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
|
77 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
|
78 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
|
79 #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
|
80 |
| 1691 | 81 #ifdef WITH_MOREBUTTONS |
| 4955 | 82 { |
| 83 extern Tcl_CmdProc studButtonCmd; | |
| 84 extern Tcl_CmdProc triButtonCmd; | |
| 1691 | 85 |
| 4955 | 86 Tcl_CreateCommand(interp, "studbutton", studButtonCmd, |
|
13862
4c3f977ce06c
Removing warnings discovered by gcc -Wall
Moshe Zadka <moshez@math.huji.ac.il>
parents:
13492
diff
changeset
|
87 (ClientData) main_window, NULL); |
| 4955 | 88 Tcl_CreateCommand(interp, "tributton", triButtonCmd, |
|
13862
4c3f977ce06c
Removing warnings discovered by gcc -Wall
Moshe Zadka <moshez@math.huji.ac.il>
parents:
13492
diff
changeset
|
89 (ClientData) main_window, NULL); |
| 4955 | 90 } |
| 1691 | 91 #endif |
|
5518
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
92 |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
93 #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
|
94 { |
|
6621
b96aad12a150
New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents:
6603
diff
changeset
|
95 extern void TkImaging_Init(Tcl_Interp *); |
|
5518
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
96 TkImaging_Init(interp); |
|
6621
b96aad12a150
New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents:
6603
diff
changeset
|
97 /* 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
|
98 /*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
|
99 } |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
100 #endif |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
101 |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
102 #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
|
103 { |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
104 extern void TkImaging_Init(void); |
|
6621
b96aad12a150
New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents:
6603
diff
changeset
|
105 /* 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
|
106 /*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
|
107 } |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
108 #endif |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
109 |
|
6603
7a0a48d73076
Add optional support fort Tix and BLT.
Guido van Rossum <guido@python.org>
parents:
5518
diff
changeset
|
110 #ifdef WITH_TIX |
|
6720
960853902ebe
Yes, Virginia, Tix does have a Tix_SafeInit() function.
Guido van Rossum <guido@python.org>
parents:
6621
diff
changeset
|
111 { |
|
960853902ebe
Yes, Virginia, Tix does have a Tix_SafeInit() function.
Guido van Rossum <guido@python.org>
parents:
6621
diff
changeset
|
112 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
|
113 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
|
114 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
|
115 } |
|
6603
7a0a48d73076
Add optional support fort Tix and BLT.
Guido van Rossum <guido@python.org>
parents:
5518
diff
changeset
|
116 #endif |
|
7a0a48d73076
Add optional support fort Tix and BLT.
Guido van Rossum <guido@python.org>
parents:
5518
diff
changeset
|
117 |
|
7a0a48d73076
Add optional support fort Tix and BLT.
Guido van Rossum <guido@python.org>
parents:
5518
diff
changeset
|
118 #ifdef WITH_BLT |
|
6621
b96aad12a150
New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents:
6603
diff
changeset
|
119 { |
|
b96aad12a150
New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents:
6603
diff
changeset
|
120 extern int Blt_Init(Tcl_Interp *); |
|
b96aad12a150
New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents:
6603
diff
changeset
|
121 extern int Blt_SafeInit(Tcl_Interp *); |
|
b96aad12a150
New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents:
6603
diff
changeset
|
122 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
|
123 } |
|
6621
b96aad12a150
New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents:
6603
diff
changeset
|
124 #endif |
|
b96aad12a150
New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents:
6603
diff
changeset
|
125 |
|
b96aad12a150
New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents:
6603
diff
changeset
|
126 #ifdef WITH_TOGL |
|
b96aad12a150
New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents:
6603
diff
changeset
|
127 { |
|
b96aad12a150
New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents:
6603
diff
changeset
|
128 /* 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
|
129 extern int Togl_Init(Tcl_Interp *); |
|
b96aad12a150
New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents:
6603
diff
changeset
|
130 /* XXX Is there no Togl_SafeInit? */ |
|
b96aad12a150
New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents:
6603
diff
changeset
|
131 Tcl_StaticPackage(NULL, "Togl", Togl_Init, NULL); |
|
b96aad12a150
New tkappinit supporting several popular packages.
Guido van Rossum <guido@python.org>
parents:
6603
diff
changeset
|
132 } |
|
6603
7a0a48d73076
Add optional support fort Tix and BLT.
Guido van Rossum <guido@python.org>
parents:
5518
diff
changeset
|
133 #endif |
|
7a0a48d73076
Add optional support fort Tix and BLT.
Guido van Rossum <guido@python.org>
parents:
5518
diff
changeset
|
134 |
| 1691 | 135 #ifdef WITH_XXX |
| 136 | |
| 137 #endif | |
| 4955 | 138 return TCL_OK; |
| 1691 | 139 } |
