OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [insight/] [tk/] [doc/] [SetAppName.3] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 578 markom
'\"
2
'\" Copyright (c) 1994 The Regents of the University of California.
3
'\" Copyright (c) 1994-1997 Sun Microsystems, Inc.
4
'\"
5
'\" See the file "license.terms" for information on usage and redistribution
6
'\" of this file, and for a DISCLAIMER OF ALL WARRANTIES.
7
'\"
8
'\" RCS: @(#) $Id: SetAppName.3,v 1.1.1.1 2002-01-16 10:25:48 markom Exp $
9
'\"
10
.so man.macros
11
.TH Tk_SetAppName 3 4.0 Tk "Tk Library Procedures"
12
.BS
13
.SH NAME
14
Tk_SetAppName \- Set the name of an application for ``send'' commands
15
.SH SYNOPSIS
16
.nf
17
\fB#include \fR
18
.sp
19
char *
20
\fBTk_SetAppName\fR(\fItkwin, name\fR)
21
.SH ARGUMENTS
22
.AS Tk_Window parent
23
.AP Tk_Window tkwin in
24
Token for window in application.  Used only to select a particular
25
application.
26
.AP char *name in
27
Name under which to register the application.
28
.BE
29
 
30
.SH DESCRIPTION
31
.PP
32
\fBTk_SetAppName\fR associates a name with a given application and
33
records that association on the display containing with the application's
34
main window.
35
After this procedure has been invoked, other applications on the
36
display will be able to use the \fBsend\fR command to invoke operations
37
in the application.
38
If \fIname\fR is already in use by some other application on the
39
display, then a new name will be generated by appending
40
``\fB #2\fR'' to \fIname\fR;  if this name is also in use,
41
the number will be incremented until an unused name is found.
42
The return value from the procedure is a pointer to the name actually
43
used.
44
.PP
45
If the application already has a name when \fBTk_SetAppName\fR is
46
called, then the new name replaces the old name.
47
.PP
48
\fBTk_SetAppName\fR also adds a \fBsend\fR command to the application's
49
interpreter, which can be used to send commands from this application
50
to others on any of the displays where the application has windows.
51
.PP
52
The application's name registration persists until the interpreter is
53
deleted or the \fBsend\fR command is deleted from \fIinterp\fR, at which
54
point the name is automatically unregistered and the application
55
becomes inaccessible via \fBsend\fR.
56
The application can be made accessible again by calling \fBTk_SetAppName\fR.
57
.PP
58
\fBTk_SetAppName\fR is called automatically by \fBTk_Init\fR,
59
so applications don't normally need to call it explicitly.
60
.PP
61
The command \fBtk appname\fR provides Tcl-level access to the
62
functionality of \fBTk_SetAppName\fR.
63
 
64
.SH KEYWORDS
65
application, name, register, send command

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.