Manual Pages for UNIX Darwin command on man Tk_InitStubs
MyWebUniversity

Manual Pages for UNIX Darwin command on man Tk_InitStubs

TkInitStubs(3) Tk Library Procedures TkInitStubs(3)

NAME

TkInitStubs - initialize the Tk stubs mechanism

SYNOPSIS

##iinncclluuddee <>

CONST char * TTkkIInniittSSttuubbss(interp, version, exact) AARRGGUUMMEENNTTSS TclInterp *interp (in) Tcl interpreter handle. char *version (in) A version string consisting of one or more decimal numbers separated by dots.

int exact (in) Non-zero means that only the particu-

lar Tk version specified by version is acceptable. Zero means that versions newer than version are also acceptable as long as they have the same major version number as version. IINNTTRROODDUUCCTTIIOONN The Tcl stubs mechanism defines a way to dynamically bind extensions to a particular Tcl implementation at run time. the stubs mechanism requires no changes to applications incoporating Tcl/Tk interpreters.

Only developers creating C-based Tcl/Tk extensions need to take steps

to use the stubs mechanism with their extensions. See the TTccllIInniitt-

SSttuubbss page for more information.

Enabling the stubs mechanism for a Tcl/Tk extension requires the fol-

lowing steps: 1) Call TTccllIInniittSSttuubbss in the extension before calling any other Tcl functions. 2) Call TTkkIInniittSSttuubbss if the extension before calling any other Tk functions. 2) Define the USETCLSTUBS symbol. Typically, you would include the

-DUSETCLSTUBS flag when compiling the extension.

3) Link the extension with the Tcl and Tk stubs libraries instead of the standard Tcl and Tk libraries. On Unix platforms, the library

names are libtclstub8.4.a and libtkstub8.4.a; on Windows plat-

forms, the library names are tclstub84.lib and tkstub84.lib (adjust names with appropriate version number).

DESCRIPTION

TTkkIInniittSSttuubbss attempts to initialize the Tk stub table pointers and ensure that the correct version of Tk is loaded. In addition to an interpreter handle, it accepts as arguments a version number and a Boolean flag indicating whether the extension requires an exact version match or not. If exact is 0, then the extension is indicating that newer versions of Tk are acceptable as long as they have the same major

version number as version; non-zero means that only the specified ver-

sion is acceptable. TTccllIInniittSSttuubbss returns a string containing the actual version of Tk satisfying the request, or NULL if the Tk version is not acceptable, does not support the stubs mechansim, or any other error condition occurred.

SEE ALSO

TTccllIInniittSSttuubbss KKEEYYWWOORRDDSS stubs Tk 8.4 TkInitStubs(3)




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