1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
/* appinit.c -- Tcl and Tk application initialization. */
#include <tcl.h>
#include <tk.h>
#ifdef WITH_BLT
#include "blt.h"
#endif
int
Tcl_AppInit (interp)
Tcl_Interp *interp;
{
Tk_Window main;
main = Tk_MainWindow(interp);
if (Tcl_Init (interp) == TCL_ERROR)
return TCL_ERROR;
if (Tk_Init (interp) == TCL_ERROR)
return TCL_ERROR;
#ifdef WITH_MOREBUTTONS
{
extern Tcl_CmdProc studButtonCmd;
extern Tcl_CmdProc triButtonCmd;
Tcl_CreateCommand(interp, "studbutton", studButtonCmd,
(ClientData) main, NULL);
Tcl_CreateCommand(interp, "tributton", triButtonCmd,
(ClientData) main, NULL);
}
#endif
#ifdef WITH_PIL /* 0.2b5 and later -- not yet released as of May 14 */
{
extern void TkImaging_Init(Tcl_Interp *interp);
TkImaging_Init(interp);
}
#endif
#ifdef WITH_PIL_OLD /* 0.2b4 and earlier */
{
extern void TkImaging_Init(void);
TkImaging_Init();
}
#endif
#ifdef WITH_TIX
if (Tix_Init (interp) == TCL_ERROR) {
fprintf(stderr, "Tix_Init error: #s\n", interp->result);
return TCL_ERROR;
}
#endif
#ifdef WITH_BLT
if (Blt_Init(interp) != TCL_OK) {
fprintf(stderr, "BLT_Init error: #s\n", interp->result);
return TCL_ERROR;
}
Tcl_StaticPackage(interp, "Blt", Blt_Init, Blt_SafeInit);
#endif
#ifdef WITH_XXX
#endif
return TCL_OK;
}
|