Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tree: d342305c0e
Fetching contributors…

Cannot retrieve contributors at this time

63 lines (62 sloc) 2.26 KB
'\" Copyright (c) 1994 The Regents of the University of California.
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
'\" See the file "license.terms" for information on usage and redistribution
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
.so man.macros
.TH Tk_SetAppName 3 4.0 Tk "Tk Library Procedures"
Tk_SetAppName \- Set the name of an application for 'send' commands
\fB#include <tk.h>\fR
const char *
\fBTk_SetAppName\fR(\fItkwin, name\fR)
.AS Tk_Window parent
.AP Tk_Window tkwin in
Token for window in application. Used only to select a particular
.AP "const char" *name in
Name under which to register the application.
\fBTk_SetAppName\fR associates a name with a given application and
records that association on the display containing with the application's
main window.
After this procedure has been invoked, other applications on the
display will be able to use the \fBsend\fR command to invoke operations
in the application.
If \fIname\fR is already in use by some other application on the
display, then a new name will be generated by appending
.QW "\fB #2\fR"
to \fIname\fR; if this name is also in use,
the number will be incremented until an unused name is found.
The return value from the procedure is a pointer to the name actually
If the application already has a name when \fBTk_SetAppName\fR is
called, then the new name replaces the old name.
\fBTk_SetAppName\fR also adds a \fBsend\fR command to the application's
interpreter, which can be used to send commands from this application
to others on any of the displays where the application has windows.
The application's name registration persists until the interpreter is
deleted or the \fBsend\fR command is deleted from \fIinterp\fR, at which
point the name is automatically unregistered and the application
becomes inaccessible via \fBsend\fR.
The application can be made accessible again by calling \fBTk_SetAppName\fR.
\fBTk_SetAppName\fR is called automatically by \fBTk_Init\fR,
so applications do not normally need to call it explicitly.
The command \fBtk appname\fR provides Tcl-level access to the
functionality of \fBTk_SetAppName\fR.
application, name, register, send command
Jump to Line
Something went wrong with that request. Please try again.