OSDN Git Service

touched all tk files to ease next import
[pf3gnuchains/pf3gnuchains4x.git] / tk / doc / loadTk.n
1 '\"
2 '\" Copyright (c) 1995-1996 Sun Microsystems, Inc.
3 '\"
4 '\" See the file "license.terms" for information on usage and redistribution
5 '\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
6 '\" 
7 '\" RCS: @(#) $Id$
8 '\" 
9 .so man.macros
10 .TH "Safe Tk" n 8.0 Tk "Tk Built-In Commands"
11 .BS
12 '\" Note:  do not modify the .SH NAME line immediately below!
13 .SH NAME
14 loadTk \- Load Tk into a safe interpreter.
15 .SH SYNOPSIS
16 \fB::safe::loadTk \fIslave\fR ?\fB\-use\fR \fIwindowId\fR? ?\fB\-display\fR \fIdisplayName\fR? 
17 .BE
18
19 Safe Tk is based on Safe Tcl, which provides a mechanism 
20 that allows restricted and mediated
21 access to auto-loading and packages for safe interpreters.
22 Safe Tk adds the ability to configure the interpreter
23 for safe Tk operations and load Tk into safe 
24 interpreters.
25
26 .SH DESCRIPTION
27 .PP
28 The \fB::safe::loadTk\fR command initializes the required data structures
29 in the named safe interpreter and then loads Tk into it.
30 The command returns the name of the safe interpreter.
31 If \fB\-use\fR is specified, the window identified by the specified system
32 dependent identifier \fIwindowId\fR is used to contain the \fB``.''\fR
33 window of the safe interpreter; it can be any valid id, eventually 
34 referencing a window belonging to another application. As a convenience,
35 if the window you plan to use is a Tk Window of the application you
36 can use the window name (eg: \fB.x.y\fR) instead of its window Id 
37 (\fB[winfo id .x.y]\fR).
38 When \fB\-use\fR is not specified,
39 a new toplevel window is created for the \fB``.''\fR window of
40 the safe interpreter. On X11 if you want the embedded window
41 to use another display than the default one, specify it with
42 \fB\-display\fR.
43 See the \fBSECURITY ISSUES\fR section below for implementation details.
44
45 .SH SECURITY ISSUES
46 .PP
47 Please read the \fBsafe\fR manual page for Tcl to learn about the basic
48 security considerations for Safe Tcl.
49 .PP
50 \fB::safe::loadTk\fR adds the value of \fBtk_library\fR taken from the master
51 interpreter to the virtual access path of the safe interpreter so that
52 auto-loading will work in the safe interpreter.
53 .PP
54 .PP
55 Tk initialization is now safe with respect to not trusting
56 the slave's state for startup. \fB::safe::loadTk\fR
57 registers the slave's name so
58 when the Tk initialization (\fBTk_SafeInit\fR) is called
59 and in turn calls the master's \fB::safe::InitTk\fR it will
60 return the desired \fBargv\fR equivalent (\fB\-use\fR 
61 \fIwindowId\fR, correct \fB\-display\fR, etc...).
62 .PP
63 When \fB\-use\fR is not used, the new toplevel created is specially
64 decorated so the user is always aware that the user interface presented comes
65 from a potentially unsafe code and can easily delete the corresponding
66 interpreter.
67 .PP
68 On X11, conflicting \fB\-use\fR and \fB\-display\fR are likely
69 to generate a fatal X error.
70
71 .SH "SEE ALSO"
72 safe(n), interp(n), library(n), load(n), package(n), source(n), unknown(n)
73  
74 .SH KEYWORDS
75 alias, auto\-loading, auto_mkindex, load, master interpreter, safe
76 interpreter, slave interpreter, source
77