Rev 2 |
Blame |
Compare with Previous |
Last modification |
View Log
| Download
| RSS feed
<
h1 align=center>Quick Reference
for Mktclapp<
/h1>
To create a new Tcl command named <
b>abcdef<
/b> in C
code, do this:
<
b>int ET_COMMAND_abcdef
(ET_TCLARGS
){
...
}
The <
b>ET_TCLARGS<
/b> macro declares four parameters:<
p>
<
li> <
b>clientData<
/b>. Always NULL
for commands generated by mktclapp.
<
li> <
b>interp<
/b>. A pointer to the Tcl interpreter.
<
li> <
b>argc<
/b>. Number of arguments to the Tcl command.
<
li> <
b>argv<
/b>.
Value of each argument.
The C implementation of Tcl commands must return one
of the following integer values:
To create a new Obj_Tcl command named <
b>ghijkl<
/b> in C
code, do this:
<
b>int ET_OBJCOMMAND_ghijkl
(ET_OBJARGS
){
...
}
The following extra C functions are available:
<
li> int <
b>Et_EvalF<
/b>
(Tcl_Interp *interp, const
char *zFormat, ...
);
<
li> int <
b>Et_GlobalEvalF<
/b>
(Tcl_Interp *interp, const
char *zFormat, ...
);
<
li> int <
b>Et_ResultF<
/b>
(Tcl_Interp *interp, const
char *zFormat, ...
);
<
li> int <
b>Et_DStringAppendF<
/b>
(Tcl_DString *, const
char *zFormat, ...
);
<
li>
char *<
b>mprintf<
/b>
(const
char *zFormat, ...
);
<
li>
char *<
b>vmprintf<
/b>
(const
char *zFormat, va_list
);
<
li> Tcl_Interp *<
b>Et_Interp<
/b>;<
p>
<
li> <
b>Et_EvalTrace<
/b>;<
p>
Mktclapp will create suitable implementations of the following functions
if you fail to do so yourself:<
p>
<
li> int <
b>main<
/b>
(int argc,
char **argv
);
<
li> int <
b>Et_PreInit<
/b>
(Tcl_Interp *interp
);
<
li> int <
b>Et_AppInit<
/b>
(Tcl_Interp *interp
);
If you make your own <
b>main<
/b>, but sure it calls the routine
<
b>Et_Init<
/b>
(argc,argv
) at some point in order to create and
initialize the Tcl interpreter.<
p>
To run the graphical application builder, type
<
b>wish xmktclapp.tcl<
/b>
To run from the command line (or from within a Makefile) enter
"<b>mktclapp</b> <i>options...</i>" For information on
available options, type "<b>mktclapp -help</b>".
See complete documentation on mktclapp at
<
a href="http://www.hwaci.com/sw/mktclapp/mktclapp.html">
http:
//www.hwaci.com
/sw
/mktclapp
/mktclapp.html<
/a>.