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

DESCRIPTION

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

KEYWORDS

47       atom, cache, display
48
49
50
51Tk                                                            Tk_InternAtom(3)
Impressum