SetAppName.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
- '"
- '" 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.
- '"
- '" RCS: @(#) $Id: SetAppName.3,v 1.3 2002/08/05 04:30:38 dgp Exp $
- '"
- .so man.macros
- .TH Tk_SetAppName 3 4.0 Tk "Tk Library Procedures"
- .BS
- .SH NAME
- Tk_SetAppName - Set the name of an application for ``send'' commands
- .SH SYNOPSIS
- .nf
- fB#include <tk.h>fR
- .sp
- CONST char *
- fBTk_SetAppNamefR(fItkwin, namefR)
- .SH ARGUMENTS
- .AS Tk_Window parent
- .AP Tk_Window tkwin in
- Token for window in application. Used only to select a particular
- application.
- .AP "CONST char" *name in
- Name under which to register the application.
- .BE
- .SH DESCRIPTION
- .PP
- fBTk_SetAppNamefR 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 fBsendfR command to invoke operations
- in the application.
- If fInamefR is already in use by some other application on the
- display, then a new name will be generated by appending
- ``fB #2fR'' to fInamefR; 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
- used.
- .PP
- If the application already has a name when fBTk_SetAppNamefR is
- called, then the new name replaces the old name.
- .PP
- fBTk_SetAppNamefR also adds a fBsendfR 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.
- .PP
- The application's name registration persists until the interpreter is
- deleted or the fBsendfR command is deleted from fIinterpfR, at which
- point the name is automatically unregistered and the application
- becomes inaccessible via fBsendfR.
- The application can be made accessible again by calling fBTk_SetAppNamefR.
- .PP
- fBTk_SetAppNamefR is called automatically by fBTk_InitfR,
- so applications don't normally need to call it explicitly.
- .PP
- The command fBtk appnamefR provides Tcl-level access to the
- functionality of fBTk_SetAppNamefR.
- .SH KEYWORDS
- application, name, register, send command