blob: 08217604aa8cec29d7942ee66e7da004470467a2 [file] [log] [blame]
Guido van Rossumf7132471994-06-27 08:00:16 +00001/* appinit.c -- Tcl and Tk application initialization. */
2
3#include <tcl.h>
4#include <tk.h>
5
6int
7Tcl_AppInit (interp)
Barry Warsaw845a4c61997-01-14 17:36:36 +00008 Tcl_Interp *interp;
Guido van Rossumf7132471994-06-27 08:00:16 +00009{
Barry Warsaw845a4c61997-01-14 17:36:36 +000010 Tk_Window main;
Guido van Rossumf7132471994-06-27 08:00:16 +000011
Barry Warsaw845a4c61997-01-14 17:36:36 +000012 main = Tk_MainWindow(interp);
Guido van Rossumf7132471994-06-27 08:00:16 +000013
Barry Warsaw845a4c61997-01-14 17:36:36 +000014 if (Tcl_Init (interp) == TCL_ERROR)
15 return TCL_ERROR;
16 if (Tk_Init (interp) == TCL_ERROR)
17 return TCL_ERROR;
Guido van Rossumf7132471994-06-27 08:00:16 +000018
19#ifdef WITH_MOREBUTTONS
Barry Warsaw845a4c61997-01-14 17:36:36 +000020 {
21 extern Tcl_CmdProc studButtonCmd;
22 extern Tcl_CmdProc triButtonCmd;
Guido van Rossumf7132471994-06-27 08:00:16 +000023
Barry Warsaw845a4c61997-01-14 17:36:36 +000024 Tcl_CreateCommand(interp, "studbutton", studButtonCmd,
25 (ClientData) main, NULL);
26 Tcl_CreateCommand(interp, "tributton", triButtonCmd,
27 (ClientData) main, NULL);
28 }
Guido van Rossumf7132471994-06-27 08:00:16 +000029#endif
30#ifdef WITH_XXX
31
32#endif
Barry Warsaw845a4c61997-01-14 17:36:36 +000033 return TCL_OK;
Guido van Rossumf7132471994-06-27 08:00:16 +000034}
35