loadTk.n
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:3k
- '"
- '" 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: loadTk.n,v 1.5.2.2 2005/01/05 21:57:17 dkf Exp $
- '"
- .so man.macros
- .TH "Safe Tk" n 8.0 Tk "Tk Built-In Commands"
- .BS
- '" Note: do not modify the .SH NAME line immediately below!
- .SH NAME
- loadTk - Load Tk into a safe interpreter.
- .SH SYNOPSIS
- fB::safe::loadTk fIslavefR ?fB-usefR fIwindowIdfR? ?fB-displayfR fIdisplayNamefR?
- .BE
- Safe Tk is based on Safe Tcl, which provides a mechanism
- that allows restricted and mediated
- access to auto-loading and packages for safe interpreters.
- Safe Tk adds the ability to configure the interpreter
- for safe Tk operations and load Tk into safe
- interpreters.
- .SH DESCRIPTION
- .PP
- The fB::safe::loadTkfR command initializes the required data structures
- in the named safe interpreter and then loads Tk into it.
- The interpreter must have been created with fB::safe::interpCreatefR
- or have been initialized with fB::safe::interpInitfR.
- The command returns the name of the safe interpreter.
- If fB-usefR is specified, the window identified by the specified system
- dependent identifier fIwindowIdfR is used to contain the ``.''
- window of the safe interpreter; it can be any valid id, eventually
- referencing a window belonging to another application. As a convenience,
- if the window you plan to use is a Tk Window of the application you
- can use the window name (e.g. fB.x.yfR) instead of its window Id
- (fB[winfo id .x.y]fR).
- When fB-usefR is not specified,
- a new toplevel window is created for the ``.'' window of
- the safe interpreter. On X11 if you want the embedded window
- to use another display than the default one, specify it with
- fB-displayfR.
- See the fBSECURITY ISSUESfR section below for implementation details.
- .SH "SECURITY ISSUES"
- .PP
- Please read the fBsafefR manual page for Tcl to learn about the basic
- security considerations for Safe Tcl.
- .PP
- fB::safe::loadTkfR adds the value of fBtk_libraryfR taken from the master
- interpreter to the virtual access path of the safe interpreter so that
- auto-loading will work in the safe interpreter.
- .PP
- .PP
- Tk initialization is now safe with respect to not trusting
- the slave's state for startup. fB::safe::loadTkfR
- registers the slave's name so
- when the Tk initialization (fBTk_SafeInitfR) is called
- and in turn calls the master's fB::safe::InitTkfR it will
- return the desired fBargvfR equivalent (fB-usefR
- fIwindowIdfR, correct fB-displayfR, etc.)
- .PP
- When fB-usefR is not used, the new toplevel created is specially
- decorated so the user is always aware that the user interface presented comes
- from a potentially unsafe code and can easily delete the corresponding
- interpreter.
- .PP
- On X11, conflicting fB-usefR and fB-displayfR are likely
- to generate a fatal X error.
- .SH "SEE ALSO"
- safe(n), interp(n), library(n), load(n), package(n), source(n), unknown(n)
-
- .SH KEYWORDS
- alias, auto-loading, auto_mkindex, load, master interpreter, safe
- interpreter, slave interpreter, source
- '" Local Variables:
- '" mode: nroff
- '" End: