Mercurial > cpython-lru_cache-weakref
annotate Modules/tkappinit.c @ 5817:48b94de85bf3 legacy-trunk
Extensive changes by AMK.
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 17 Jul 1997 16:29:42 +0000 |
| parents | 576b7d927afb |
| children | 7a0a48d73076 |
| rev | line source |
|---|---|
| 1691 | 1 /* appinit.c -- Tcl and Tk application initialization. */ |
| 2 | |
| 3 #include <tcl.h> | |
| 4 #include <tk.h> | |
| 5 | |
| 6 int | |
| 7 Tcl_AppInit (interp) | |
| 4955 | 8 Tcl_Interp *interp; |
| 1691 | 9 { |
| 4955 | 10 Tk_Window main; |
| 1691 | 11 |
| 4955 | 12 main = Tk_MainWindow(interp); |
| 1691 | 13 |
| 4955 | 14 if (Tcl_Init (interp) == TCL_ERROR) |
| 15 return TCL_ERROR; | |
| 16 if (Tk_Init (interp) == TCL_ERROR) | |
| 17 return TCL_ERROR; | |
| 1691 | 18 |
| 19 #ifdef WITH_MOREBUTTONS | |
| 4955 | 20 { |
| 21 extern Tcl_CmdProc studButtonCmd; | |
| 22 extern Tcl_CmdProc triButtonCmd; | |
| 1691 | 23 |
| 4955 | 24 Tcl_CreateCommand(interp, "studbutton", studButtonCmd, |
| 25 (ClientData) main, NULL); | |
| 26 Tcl_CreateCommand(interp, "tributton", triButtonCmd, | |
| 27 (ClientData) main, NULL); | |
| 28 } | |
| 1691 | 29 #endif |
|
5518
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
30 |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
31 #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
|
32 { |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
33 extern void TkImaging_Init(Tcl_Interp *interp); |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
34 TkImaging_Init(interp); |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
35 } |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
36 #endif |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
37 |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
38 #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
|
39 { |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
40 extern void TkImaging_Init(void); |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
41 TkImaging_Init(); |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
42 } |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
43 #endif |
|
576b7d927afb
Add sections for PIL (Fred Lundh).
Guido van Rossum <guido@python.org>
parents:
4955
diff
changeset
|
44 |
| 1691 | 45 #ifdef WITH_XXX |
| 46 | |
| 47 #endif | |
| 4955 | 48 return TCL_OK; |
| 1691 | 49 } |
