head	1.8;
access;
symbols
	core-8-5-9:1.6
	core-8-5-8:1.6
	macosx-cocoa-merge:1.8
	macosx-cocoa-premerge:1.8
	macosx-carbon-freeze:1.8
	core-8-5-7:1.6
	core-8-5-6:1.6
	core-8-6-b1:1.7
	core-8-6-a3:1.7
	core-8-5-5:1.6
	core-8-6-a2:1.7
	core-8-5-4:1.6
	core-8-5-3:1.6
	core-8-6-a1:1.6
	core-8-4-19:1.4
	core-8-5-branch:1.6.0.2
	core-8-5-2:1.6
	core-8-4-18:1.4
	core-8-5-1:1.6
	core-8-4-17:1.4
	core-8-5-0:1.6
	core-8-5-b3:1.5
	core-8-5-b2:1.4
	core-8-4-16:1.4
	core-8-5-b1:1.4
	core-stablilizer-merge:1.4
	core-stabilizer-branch:1.4.0.14
	core-stabilizer-merge:1.6
	core-8-4-15:1.4
	core-8-5-a6:1.4
	core-8-5-a5:1.4
	core-8-4-14:1.4
	core-8-5-a4:1.4
	core-8-4-13:1.4
	core-8-4-12:1.4
	core-8-4-11:1.4
	core-8-5-a3:1.4
	core-8-4-10:1.4
	core-8-4-9-branch:1.4.0.12
	core-8-5-a2:1.4
	core-8-4-9:1.4
	core-8-4-8:1.4
	core-8-4-7:1.4
	core-8-5-a1:1.4
	core-8-4-6:1.4
	core-8-4-5:1.4
	mistachkin-dev-branch:1.4.0.10
	core-8-4-4:1.4
	core-8-4-3:1.4
	core-8-4-branch:1.4.0.8
	core-8-4-2:1.4
	core-8-4-1:1.4
	core-8-3-5:1.2.18.1
	core-8-4-0:1.4
	macosx-8-4-merge-2002-08-31-trunk:1.4
	macosx-8-4-premerge-2002-08-31-branch:1.4
	macosx-8-4-premerge-2002-08-31-trunk:1.4
	macosx-8-4-merge-2002-08-30-branch:1.4
	macosx-8-4-merge-2002-08-30-trunk:1.4
	macosx-8-4-merge-2002-08-20-branch:1.4
	macosx-8-4-merge-2002-08-20-trunk:1.4
	core-8-4-b2:1.4
	core-8-4-b1:1.4
	macosx-premerge-6-9-02:1.4
	core-8-4-a4:1.4
	core-8-3-4:1.2.18.1
	macosx-8-4-branch:1.4.0.6
	macosx-8-4-branchpoint:1.4
	core-8-4-a3:1.4
	core-8-3-3:1.2.18.1
	dgp-privates-into-namespace:1.4.0.4
	tclpro-1-5-0:1.2
	core-8-4-win-speedup:1.4.0.2
	core-8-4-a2:1.4
	tclpro-1-4-1:1.2
	tclpro-1-4-0:1.2
	core-8-3-2:1.2
	ajuba-ajuba2-2-1-base:1.2
	ajuba-ajuba2-2-0:1.2
	core-8-4-a1:1.3
	core-8-3-1-branch:1.2.0.18
	core-8-3-1:1.2
	scriptics-sc-2-0-b5:1.2
	scriptics-sc-2-0-fixed:1.2
	scriptics-sc-2-0-b2:1.2
	scriptics-sc-2-0-b1:1.2
	core-8-3-0:1.2
	core-8-3-b2:1.2
	core-8-3-b1:1.2
	scriptics-sc-1-1:1.2
	scriptics-sc-1-1-b1:1.2
	core-8-2-3:1.2
	scriptics-sc-1-1-branch:1.2.0.16
	scriptics-sc-1-1-base:1.2
	scriptics-sc-1-0:1.2
	scriptics-sc-1-0-branch:1.2.0.14
	scriptics-sc-1-0-base:1.2
	core-8-2-2:1.2
	core-8-2-1:1.2
	scriptics-bc-1-0-b1:1.2
	core-8-2-1-branch:1.2.0.12
	scriptics-tclpro-1-3-0:1.2
	core-8-2-0:1.2
	core-8-2-b3-branch:1.2.0.10
	core-8-2-b3-base:1.2
	scriptics-tclpro-1-3-b4:1.2
	core-8-2-b2:1.2
	scriptics-tclpro-1-3-b3:1.2
	core-8-2-b1:1.2
	scriptics-tclpro-1-3-b2:1.2
	merge-to-mainline-5/21/99:1.2
	scriptics-tclpro-1-3-b2-branch:1.2.0.8
	core-8-1-1:1.2
	scriptics-tclpro-1-3-b1:1.2
	core-8-1-1-base:1.2
	core-8-1-0:1.2
	merge-to-mainline-4-29-99:1.2
	merge-to-mainline-4-23-99:1.2
	core-8-1-branch-old:1.1.0.4
	core-8-0-6-branch:1.2.0.6
	core-8-0-6-base:1.2
	core-8-0-5:1.2
	core-8-1-b3:1.1.4.1
	core-8-1-b2:1.1.4.1
	dev-8-1-stubs-branch:1.1.4.1.0.2
	dev-stubs-branch:1.2.0.4
	scriptics-tclpro-1-2:1.2
	scriptics-tclpro-1-2-b2:1.2
	core-8-1-merge-2/10/99:1.2
	core-8-0-5-branch:1.2.0.2
	core-8-0-5-base:1.2
	scriptics-tclpro-1-2-b1:1.2
	scriptics-tclpro-1-2-a1:1.2
	core-8-1-b1:1.1.4.1
	core-8-0-4:1.2
	core-8-1-a2:1.1
	core-8-0-2:1.1
	core-8-0-3:1.2;
locks; strict;
comment	@# @;


1.8
date	2009.05.04.09.12.33;	author dkf;	state Exp;
branches;
next	1.7;

1.7
date	2008.06.30.22.57.02;	author dkf;	state Exp;
branches;
next	1.6;

1.6
date	2007.12.13.15.23.43;	author dgp;	state Exp;
branches;
next	1.5;

1.5
date	2007.10.29.16.04.13;	author dkf;	state Exp;
branches;
next	1.4;

1.4
date	2000.09.07.17.38.16;	author hobbs;	state Exp;
branches
	1.4.14.1;
next	1.3;

1.3
date	2000.04.28.00.46.04;	author ericm;	state Exp;
branches;
next	1.2;

1.2
date	98.09.14.18.22.54;	author stanton;	state Exp;
branches
	1.2.18.1;
next	1.1;

1.1
date	98.04.01.09.40.13;	author rjohnson;	state Exp;
branches
	1.1.4.1;
next	;

1.1.4.1
date	98.09.30.02.16.09;	author stanton;	state Exp;
branches;
next	;

1.2.18.1
date	2001.04.04.07.23.48;	author hobbs;	state Exp;
branches;
next	;

1.4.14.1
date	2007.11.01.16.37.13;	author dgp;	state Exp;
branches;
next	;


desc
@@


1.8
log
@Purge mention of interp->result. [Bug 2431507]
@
text
@'\"
'\" Copyright (c) 1995-1996 Sun Microsystems, Inc.
'\"
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
'\" 
'\" RCS: @@(#) $Id: Tk_Init.3,v 1.7 2008/06/30 22:57:02 dkf Exp $
'\" 
.so man.macros
.TH Tk_Init 3 8.0 Tk "Tk Library Procedures"
.BS
.SH NAME
Tk_Init, Tk_SafeInit \- add Tk to an interpreter and make a new Tk application.
.SH SYNOPSIS
.nf
\fB#include <tk.h>\fR
.sp
int
\fBTk_Init\fR(\fIinterp\fR)
.sp
int
\fBTk_SafeInit\fR(\fIinterp\fR)
.SH ARGUMENTS
.AP Tcl_Interp *interp in
Interpreter in which to load Tk.  Tk should not already be loaded
in this interpreter.
.BE
.SH DESCRIPTION
.PP
\fBTk_Init\fR is the package initialization procedure for Tk.
It is normally invoked by the \fBTcl_AppInit\fR procedure
for an application or by the \fBload\fR command.
\fBTk_Init\fR adds all of Tk's commands to \fIinterp\fR
and creates a new Tk application, including its main window.
If the initialization is successful \fBTk_Init\fR returns
\fBTCL_OK\fR;  if there is an error it returns \fBTCL_ERROR\fR.
\fBTk_Init\fR also leaves a result or error message
in interpreter \fIinterp\fR's result.
.PP
If there is a variable \fBargv\fR in \fIinterp\fR, \fBTk_Init\fR
treats the contents of this variable as a list of options for the
new Tk application.
The options may have any of the forms documented for the
\fBwish\fR application (in fact, \fBwish\fR uses Tk_Init to process
its command-line arguments).
.PP
\fBTk_SafeInit\fR is identical to \fBTk_Init\fR except that it removes
all Tk commands that are considered unsafe.  Those commands and the
reasons for their exclusion are:
.TP
\fBbell\fR
Continuous ringing of the bell is a nuisance.
.TP
\fBclipboard\fR
A malicious script could replace the contents of the clipboard with
the string
.QW "\fBrm \-r *\fR"
and lead to surprises when the contents of the clipboard are pasted.
.TP
\fBgrab\fR
Grab can be used to block the user from using any other applications.
.TP
\fBmenu\fR
Menus can be used to cover the entire screen and to steal input from
the user.
.TP
\fBselection\fR
See clipboard.
.TP
\fBsend\fR
Send can be used to cause unsafe interpreters to execute commands.
.TP
\fBtk\fR
The tk command recreates the send command, which is unsafe.
.TP
\fBtkwait\fR
Tkwait can block the containing process forever
.TP
\fBtoplevel\fR
Toplevels can be used to cover the entire screen and to steal input
from the user.
.TP
\fBwm\fR
If toplevels are ever allowed, wm can be used to remove decorations,
move windows around, etc.
.SH KEYWORDS
safe, application, initialization, load, main window
@


1.7
log
@Minor doc updates (removing out of date changebars, improving typedef formatting,
 etc.)
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: Tk_Init.3,v 1.6 2007/12/13 15:23:43 dgp Exp $
d38 1
a38 1
in \fIinterp->result\fR.
@


1.6
log
@merge stable branch onto HEAD
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: Tk_Init.3,v 1.4.14.1 2007/11/01 16:37:13 dgp Exp $
a27 1

a85 1

@


1.5
log
@Lots more GOOBE stuff. Now works with 'make html'!
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: Tk_Init.3,v 1.4 2000/09/07 17:38:16 hobbs Exp $
@


1.4
log
@	* doc/Tk_Init.3:
	* doc/bell.n:
	* doc/loadTk.n: minor doc cleanup
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: Tk_Init.3,v 1.3 2000/04/28 00:46:04 ericm Exp $
d57 3
a59 2
the string \fB"rm -r *"\fR and lead to surprises when the contents of
the clipboard are pasted.
@


1.4.14.1
log
@merge updates from HEAD
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: Tk_Init.3,v 1.4 2000/09/07 17:38:16 hobbs Exp $
d57 2
a58 3
the string
.QW "\fBrm \-r *\fR"
and lead to surprises when the contents of the clipboard are pasted.
@


1.3
log
@* doc/Tk_Init.3: Added Tk_SafeInit information [Bug: 1884].

* doc/keysyms.n: Man page enumerating keysyms [RFE: 1645].
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: Tk_Init.3,v 1.2 1998/09/14 18:22:54 stanton Exp $
a85 1
.CE
@


1.2
log
@Replaced SCCS strings, fixed binary files
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id$
d10 1
a10 1
.TH Tk_Init 3 4.1 Tk "Tk Library Procedures"
d13 1
a13 1
Tk_Init \- add Tk to an interpreter and make a new Tk application.
d20 3
a23 1
.AS Tcl_Interp *interp
d47 40
d89 1
a89 1
application, initialization, load, main window
@


1.2.18.1
log
@doc cleanup and clarifications from 8.4aCVS backport
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: Tk_Init.3,v 1.4 2000/09/07 17:38:16 hobbs Exp $
d10 1
a10 1
.TH Tk_Init 3 8.0 Tk "Tk Library Procedures"
d13 1
a13 1
Tk_Init, Tk_SafeInit \- add Tk to an interpreter and make a new Tk application.
a19 3
.sp
int
\fBTk_SafeInit\fR(\fIinterp\fR)
d21 1
a44 39
.PP
\fBTk_SafeInit\fR is identical to \fBTk_Init\fR except that it removes
all Tk commands that are considered unsafe.  Those commands and the
reasons for their exclusion are:
.TP
\fBbell\fR
Continuous ringing of the bell is a nuisance.
.TP
\fBclipboard\fR
A malicious script could replace the contents of the clipboard with
the string \fB"rm -r *"\fR and lead to surprises when the contents of
the clipboard are pasted.
.TP
\fBgrab\fR
Grab can be used to block the user from using any other applications.
.TP
\fBmenu\fR
Menus can be used to cover the entire screen and to steal input from
the user.
.TP
\fBselection\fR
See clipboard.
.TP
\fBsend\fR
Send can be used to cause unsafe interpreters to execute commands.
.TP
\fBtk\fR
The tk command recreates the send command, which is unsafe.
.TP
\fBtkwait\fR
Tkwait can block the containing process forever
.TP
\fBtoplevel\fR
Toplevels can be used to cover the entire screen and to steal input
from the user.
.TP
\fBwm\fR
If toplevels are ever allowed, wm can be used to remove decorations,
move windows around, etc.
d47 1
a47 1
safe, application, initialization, load, main window
@


1.1
log
@Initial revision
@
text
@d7 1
a7 1
'\" SCCS: @@(#) Tk_Init.3 1.3 96/03/26 18:19:08
@


1.1.4.1
log
@Merged 8.0.3 changes into 8.1
@
text
@d7 1
a7 1
'\" RCS: @@(#) $Id: Tk_Init.3,v 1.2 1998/09/14 18:22:54 stanton Exp $
@


