Tk_Name, Tk_PathName, Tk_NameToWindow − convert between names and window tokens


#include <tk.h>


char *

(interp, pathName, tkwin)


Tk_Window tkwin (in)

Token for window.

Tcl_Interp *interp (out)

Interpreter to use for error reporting.

const char *pathName (in)

Character string containing path name of window.



Each window managed by Tk has two names, a short name that identifies a window among children of the same parent, and a path name that identifies the window uniquely among all the windows belonging to the same main window. The path name is used more often in Tk than the short name; many commands, like bind, expect path names as arguments.

The Tk_Name macro returns a window’s short name, which is the same as the name argument passed to Tk_CreateWindow when the window was created. The value is returned as a Tk_Uid, which may be used just like a string pointer but also has the properties of a unique identifier (see the manual entry for Tk_GetUid for details).

The Tk_PathName macro returns a hierarchical name for tkwin. Path names have a structure similar to file names in Unix but with dots between elements instead of slashes: the main window for an application has the path name “.”; its children have names like “.a” and “.b”; their children have names like “.a.aa” and “”; and so on. A window is considered to be a child of another window for naming purposes if the second window was named as the first window’s parent when the first window was created. This is not always the same as the X window hierarchy. For example, a pop-up is created as a child of the root window, but its logical parent will usually be a window within the application.

The procedure Tk_NameToWindow returns the token for a window given its path name (the pathName argument) and another window belonging to the same main window (tkwin). It normally returns a token for the named window, but if no such window exists Tk_NameToWindow leaves an error message in interp->result and returns NULL. The tkwin argument to Tk_NameToWindow is needed because path names are only unique within a single application hierarchy. If, for example, a single process has opened two main windows, each will have a separate naming hierarchy and the same path name might appear in each of the hierarchies. Normally tkwin is the main window of the desired hierarchy, but this need not be the case: any window in the desired hierarchy may be used.


name, path name, token, window

More Linux Commands

Locale::Maketext::Guts(3pm) - Deprecated module to load Loca
Previously Local::Maketext::GutsLoader performed some magic to load Locale::Maketext when utf8 was unavailable. The subs this module provided were merged back i

gnutls_certificate_set_openpgp_keyring_file.3 - The function is used to set keyrings that will be used internally by various OpenPGP functions. For example to f

ldap_add_ext(3) - Perform an LDAP add operation (Man Page)
The ldap_add_ext_s() routine is used to perform an LDAP add operation. It takes dn, the DN of the entry to add, and attrs, a null-terminated array of the entrys

rt_sigtimedwait(2) - synchronously wait for queued signals
RETURN VALUE ERRORS CONFORMING TO NOTES SEE ALSO COLOPHON NAME rt_sigtimedwait - synchronously wait for queued signals SYNOPSIS long rt_sigtimedwait(const sigse

gnutls_x509_crt_sign2(3) - API function - Linux manual page
gnutls_x509_crt_sign2.3 - This function will sign the certificate with the issuers private key, and will copy the issuers information into the certificate. This

llrintf(3) - round to nearest integer - Linux manual page...
These functions round their argument to the nearest integer value, using the current rounding direction (see fesetround(3)). Note that unlike the rint(3) family

btrfs-receive(8) receive subvolumes from stdin file.........
Receives one or more subvolumes that were previously sent with btrfs send. The received subvolumes are stored into &lt;mount&gt;. btrfs receive will fail with the fol

gnutls_pcert_import_x509_raw(3) - API function (Man Page)...
gnutls_pcert_import_x509_raw.3 - This convenience function will import the given certificate to a gnutls_pcert_st structure. The structure must be deinitialized

free_field(3form) - create and destroy form fields (ManPage)
The function new_field allocates a new field and initializes it from the parameters given: height, width, row of upper-left corner, column of upper-left corner,

glob(7) - Globbing pathnames (Misc - Linux man page)........
Long ago, in UNIX V6, there was a program /etc/glob that would expand wildcard patterns. Soon afterward this became a shell built-in. These days there is also a

glTexCoord2f(3gl) - set the current texture coordinates.....
glTexCoord specifies texture coordinates in one, two, three, or four dimensions. glTexCoord1 sets the current texture coordinates to (s, 0, 0, 1); a call to glT

send_trap_vars(3) - send TRAPs or INFORMs from a Net-SNMP MI
These three routines may be used to send traps from a MIB module within the Net-SNMP agent (including an AgentX subagent). send_easy_trap() sends an SNMPv1 trap

We can't live, work or learn in freedom unless the software we use is free.