Manual Pages for UNIX Darwin command on man Tk_Init
MyWebUniversity

Manual Pages for UNIX Darwin command on man Tk_Init

TkInit(3) Tk Library Procedures TkInit(3)

NAME

TkInit, TkSafeInit - add Tk to an interpreter and make a new Tk

application.

SYNOPSIS

##iinncclluuddee <>

int TTkkIInniitt(interp) int TTkkSSaaffeeIInniitt(interp) AARRGGUUMMEENNTTSS TclInterp *interp (in) Interpreter in which to load Tk. Tk should not already be loaded in this interpreter.

DESCRIPTION

TTkkIInniitt is the package initialization procedure for Tk. It is normally invoked by the TTccllAAppppIInniitt procedure for an application or by the llooaadd command. TTkkIInniitt adds all of Tk's commands to interp and creates a new Tk application, including its main window. If the initialization is successful TTkkIInniitt returns TTCCLLOOKK; if there is an error it returns TTCCLLEERRRROORR. TTkkIInniitt also leaves a result or error message in

interp->result.

If there is a variable aarrggvv in interp, TTkkIInniitt 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 wwiisshh application

(in fact, wwiisshh uses TkInit to process its command-line arguments).

TTkkSSaaffeeIInniitt is identical to TTkkIInniitt except that it removes all Tk com-

mands that are considered unsafe. Those commands and the reasons for their exclusion are: bbeellll Continuous ringing of the bell is a nuisance. cclliippbbooaarrdd A malicious script could replace the contents of the clipboard

with the string ""rrmm -rr **"" and lead to surprises when the con-

tents of the clipboard are pasted.

ggrraabb Grab can be used to block the user from using any other applica-

tions. mmeennuu Menus can be used to cover the entire screen and to steal input from the user. sseelleeccttiioonn See clipboard.

sseenndd Send can be used to cause unsafe interpreters to execute com-

mands. ttkk The tk command recreates the send command, which is unsafe. ttkkwwaaiitt Tkwait can block the containing process forever ttoopplleevveell Toplevels can be used to cover the entire screen and to steal input from the user.

wwmm If toplevels are ever allowed, wm can be used to remove decora-

tions, move windows around, etc. KKEEYYWWOORRDDSS safe, application, initialization, load, main window Tk 8.0 TkInit(3)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™