| 1 |
# Copyright (c) 1995-1996 Sun Microsystems, Inc. |
| 2 |
# See the file "license.terms" for information on usage and redistribution |
| 3 |
# of this file, and for a DISCLAIMER OF ALL WARRANTIES. |
| 4 |
# |
| 5 |
# |
| 6 |
|
| 7 |
=head1 NAME |
| 8 |
|
| 9 |
Tk_Init - add Tk to an interpreter and make a new Tk application. |
| 10 |
|
| 11 |
=for category C Programming |
| 12 |
|
| 13 |
=head1 SYNOPSIS |
| 14 |
|
| 15 |
B<#include E<lt>tk.hE<gt>> |
| 16 |
|
| 17 |
int |
| 18 |
B<Tk_Init>(I<interp>) |
| 19 |
|
| 20 |
=head1 ARGUMENTS |
| 21 |
|
| 22 |
=over 4 |
| 23 |
|
| 24 |
=item Tcl_Interp *interp (in) |
| 25 |
|
| 26 |
Interpreter in which to load Tk. Tk should not already be loaded |
| 27 |
in this interpreter. |
| 28 |
|
| 29 |
=back |
| 30 |
|
| 31 |
=head1 DESCRIPTION |
| 32 |
|
| 33 |
B<Tk_Init> is the package initialization procedure for Tk. |
| 34 |
It is normally invoked by the B<Tcl_AppInit> procedure |
| 35 |
for an application or by the B<load> command. |
| 36 |
B<Tk_Init> adds all of Tk's commands to I<interp> |
| 37 |
and creates a new Tk application, including its main window. |
| 38 |
If the initialization is successful B<Tk_Init> returns |
| 39 |
B<TCL_OK>; if there is an error it returns B<TCL_ERROR>. |
| 40 |
B<Tk_Init> also leaves a result or error message |
| 41 |
in I<interp-E<gt>result>. |
| 42 |
|
| 43 |
If there is a variable B<argv> in I<interp>, B<Tk_Init> |
| 44 |
treats the contents of this variable as a list of options for the |
| 45 |
new Tk application. |
| 46 |
The options may have any of the forms documented for the |
| 47 |
B<wish> application (in fact, B<wish> uses Tk_Init to process |
| 48 |
its command-line arguments). |
| 49 |
|
| 50 |
=head1 KEYWORDS |
| 51 |
|
| 52 |
application, initialization, load, main window |