InternAtom.3
上传用户:rrhhcc
上传日期:2015-12-11
资源大小:54129k
文件大小:2k
- '"
- '" Copyright (c) 1990 The Regents of the University of California.
- '" Copyright (c) 1994-1996 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: InternAtom.3,v 1.3 2002/08/05 04:30:38 dgp Exp $
- '"
- .so man.macros
- .TH Tk_InternAtom 3 "" Tk "Tk Library Procedures"
- .BS
- .SH NAME
- Tk_InternAtom, Tk_GetAtomName - manage cache of X atoms
- .SH SYNOPSIS
- .nf
- fB#include <tk.h>fR
- .sp
- Atom
- fBTk_InternAtom(fItkwin, namefR)
- .sp
- CONST char *
- fBTk_GetAtomName(fItkwin, atomfR)
- .SH ARGUMENTS
- .AS Tk_Window parent
- .AP Tk_Window tkwin in
- Token for window. Used to map atom or name relative to a particular display.
- .AP "CONST char" *name in
- String name for which atom is desired.
- .AP Atom atom in
- Atom for which corresponding string name is desired.
- .BE
- .SH DESCRIPTION
- .PP
- These procedures are similar to the Xlib procedures
- fBXInternAtomfR and fBXGetAtomNamefR. fBTk_InternAtomfR
- returns the atom identifier associated with string given by
- fInamefR; the atom identifier is only valid for the display
- associated with fItkwinfR.
- fBTk_GetAtomNamefR returns the string associated
- with fIatomfR on fItkwinfR's display. The string returned
- by fBTk_GetAtomNamefR is in Tk's storage: the caller need
- not free this space when finished with the string, and the caller
- should not modify the contents of the returned string.
- If there is no atom fIatomfR on fItkwinfR's display,
- then fBTk_GetAtomNamefR returns the string ``?bad atom?''.
- .PP
- Tk caches
- the information returned by fBTk_InternAtomfR and fBTk_GetAtomNamefR
- so that future calls
- for the same information can be serviced from the cache without
- contacting the server. Thus fBTk_InternAtomfR and fBTk_GetAtomNamefR
- are generally much faster than their Xlib counterparts, and they
- should be used in place of the Xlib procedures.
- .SH KEYWORDS
- atom, cache, display