Guido van Rossum | f713247 | 1994-06-27 08:00:16 +0000 | [diff] [blame] | 1 | /* appinit.c -- Tcl and Tk application initialization. */ |
| 2 | |
| 3 | #include <tcl.h> |
| 4 | #include <tk.h> |
| 5 | |
| 6 | int |
| 7 | Tcl_AppInit (interp) |
| 8 | Tcl_Interp *interp; |
| 9 | { |
| 10 | Tk_Window main; |
| 11 | |
| 12 | main = Tk_MainWindow(interp); |
| 13 | |
| 14 | if (Tcl_Init (interp) == TCL_ERROR) |
| 15 | return TCL_ERROR; |
| 16 | if (Tk_Init (interp) == TCL_ERROR) |
| 17 | return TCL_ERROR; |
| 18 | |
| 19 | #ifdef WITH_MOREBUTTONS |
| 20 | { |
| 21 | extern Tcl_CmdProc studButtonCmd; |
| 22 | extern Tcl_CmdProc triButtonCmd; |
| 23 | |
| 24 | Tcl_CreateCommand(interp, "studbutton", studButtonCmd, |
| 25 | (ClientData) main, NULL); |
| 26 | Tcl_CreateCommand(interp, "tributton", triButtonCmd, |
| 27 | (ClientData) main, NULL); |
| 28 | } |
| 29 | #endif |
| 30 | #ifdef WITH_XXX |
| 31 | |
| 32 | #endif |
| 33 | |
| 34 | return TCL_OK; |
| 35 | } |
| 36 | |