home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / languages / tcl / tk3.3b1 / doc / InternAtom.3 < prev    next >
Encoding:
Text File  |  1993-04-01  |  2.7 KB  |  72 lines

  1. '\"
  2. '\" Copyright (c) 1990 The Regents of the University of California.
  3. '\" All rights reserved.
  4. '\"
  5. '\" Permission is hereby granted, without written agreement and without
  6. '\" license or royalty fees, to use, copy, modify, and distribute this
  7. '\" documentation for any purpose, provided that the above copyright
  8. '\" notice and the following two paragraphs appear in all copies.
  9. '\"
  10. '\" IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY
  11. '\" FOR DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES
  12. '\" ARISING OUT OF THE USE OF THIS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
  13. '\" CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  14. '\"
  15. '\" THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES,
  16. '\" INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
  17. '\" AND FITNESS FOR A PARTICULAR PURPOSE.  THE SOFTWARE PROVIDED HEREUNDER IS
  18. '\" ON AN "AS IS" BASIS, AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO
  19. '\" PROVIDE MAINTENANCE, SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
  20. '\" 
  21. '\" $Header: /user6/ouster/wish/man/RCS/InternAtom.3,v 1.4 93/04/01 09:41:41 ouster Exp $ SPRITE (Berkeley)
  22. '\" 
  23. .so man.macros
  24. .HS Tk_InternAtom tkc
  25. .BS
  26. .SH NAME
  27. Tk_InternAtom, Tk_GetAtomName \- manage cache of X atoms
  28. .SH SYNOPSIS
  29. .nf
  30. \fB#include <tk.h>\fR
  31. .sp
  32. Atom
  33. \fBTk_InternAtom(\fItkwin, name\fR)
  34. .sp
  35. char *
  36. \fBTk_GetAtomName(\fItkwin, atom\fR)
  37. .SH ARGUMENTS
  38. .AS Tk_Window parent
  39. .AP Tk_Window tkwin in
  40. Token for window.  Used to map atom or name relative to a particular display.
  41. .AP char *name in
  42. String name for which atom is desired.
  43. .AP Atom atom in
  44. Atom for which corresponding string name is desired.
  45. .BE
  46.  
  47. .SH DESCRIPTION
  48. .PP
  49. These procedures are similar to the Xlib procedures
  50. \fBXInternAtom\fR and \fBXGetAtomName\fR.  \fBTk_InternAtom\fR
  51. returns the atom identifier associated with string given by
  52. \fIname\fR;  the atom identifier is only valid for the display
  53. associated with \fItkwin\fR.
  54. \fBTk_GetAtomName\fR returns the string associated
  55. with \fIatom\fR on \fItkwin\fR's display.  The string returned
  56. by \fBTk_GetAtomName\fR is in Tk's storage:  the caller need
  57. not free this space when finished with the string, and the caller
  58. should not modify the contents of the returned string.
  59. If there is no atom \fIatom\fR on \fItkwin\fR's display,
  60. then \fBTk_GetAtomName\fR returns the string ``?bad atom?''.
  61. .PP
  62. Tk caches
  63. the information returned by \fBTk_InternAtom\fR and \fBTk_GetAtomName\fR
  64. so that future calls
  65. for the same information can be serviced from the cache without
  66. contacting the server.  Thus \fBTk_InternAtom\fR and \fBTk_GetAtomName\fR
  67. are generally much faster than their Xlib counterparts, and they
  68. should be used in place of the Xlib procedures.
  69.  
  70. .SH KEYWORDS
  71. atom, cache, display
  72.