1Tk_InternAtom(3)             Tk Library Procedures            Tk_InternAtom(3)
2
3
4
5______________________________________________________________________________
6

NAME

8       Tk_InternAtom, Tk_GetAtomName - manage cache of X atoms
9

SYNOPSIS

11       #include <tk.h>
12
13       Atom
14       Tk_InternAtom(tkwin, name)
15
16       const char *
17       Tk_GetAtomName(tkwin, atom)
18

ARGUMENTS

20       Tk_Window tkwin (in)           Token  for  window.  Used to map atom or
21                                      name relative to a particular display.
22
23       const char *name (in)          String name for which atom is desired.
24
25       Atom atom (in)                 Atom for which corresponding string name
26                                      is desired.
27_________________________________________________________________
28
29

DESCRIPTION

31       These  procedures  are  similar  to the Xlib procedures XInternAtom and
32       XGetAtomName.  Tk_InternAtom returns  the  atom  identifier  associated
33       with  string  given by name;  the atom identifier is only valid for the
34       display associated with tkwin.  Tk_GetAtomName returns the string asso‐
35       ciated   with   atom  on  tkwin's  display.   The  string  returned  by
36       Tk_GetAtomName is in Tk's storage:  the caller need not free this space
37       when  finished  with  the  string, and the caller should not modify the
38       contents of the returned string.  If there is no atom atom  on  tkwin's
39       display, then Tk_GetAtomName returns the string “?bad atom?”.
40
41       Tk  caches the information returned by Tk_InternAtom and Tk_GetAtomName
42       so that future calls for the same information can be serviced from  the
43       cache   without   contacting   the   server.   Thus  Tk_InternAtom  and
44       Tk_GetAtomName are generally much faster than their Xlib  counterparts,
45       and they should be used in place of the Xlib procedures.
46
47

KEYWORDS

49       atom, cache, display
50
51
52
53Tk                                                            Tk_InternAtom(3)
Impressum