1XInternAtom(3)                  XLIB FUNCTIONS                  XInternAtom(3)
2
3
4

NAME

6       XInternAtom, XInternAtoms, XGetAtomName, XGetAtomNames - create or
7       return atom names
8

SYNTAX

10       Atom XInternAtom(Display *display, char *atom_name, Bool
11              only_if_exists);
12
13       Status XInternAtoms(Display *display, char **names, int count, Bool
14              only_if_exists, Atom *atoms_return);
15
16       char *XGetAtomName(Display *display, Atom atom);
17
18       Status XGetAtomNames(Display *display, Atom *atoms, int count, char
19              **names_return);
20

ARGUMENTS

22       atom      Specifies the atom for the property name you want returned.
23
24       atoms     Specifies the array of atoms.
25
26       atom_name Specifies the name associated with the atom you want
27                 returned.
28
29       atoms_return
30                 Returns the atoms.
31
32       count     Specifies the number of atom names in the array.
33
34       count     Specifies the number of atoms in the array.
35
36       display   Specifies the connection to the X server.
37
38       names     Specifies the array of atom names.
39
40       names_return
41                 Returns the atom names.
42
43       only_if_exists
44                 Specifies a Boolean value that indicates whether the atom
45                 must be created.
46

DESCRIPTION

48       The XInternAtom function returns the atom identifier associated with
49       the specified atom_name string.  If only_if_exists is False, the atom
50       is created if it does not exist.  Therefore, XInternAtom can return
51       None.  If the atom name is not in the Host Portable Character Encoding,
52       the result is implementation-dependent.  Uppercase and lowercase mat‐
53       ter; the strings ``thing'', ``Thing'', and ``thinG'' all designate dif‐
54       ferent atoms.  The atom will remain defined even after the client's
55       connection closes.  It will become undefined only when the last connec‐
56       tion to the X server closes.
57
58       XInternAtom can generate BadAlloc and BadValue errors.
59
60       The XInternAtoms function returns the atom identifiers associated with
61       the specified names.  The atoms are stored in the atoms_return array
62       supplied by the caller.  Calling this function is equivalent to calling
63       XInternAtom for each of the names in turn with the specified value of
64       only_if_exists, but this function minimizes the number of round-trip
65       protocol exchanges between the client and the X server.
66
67       This function returns a nonzero status if atoms are returned for all of
68       the names; otherwise, it returns zero.
69
70       XInternAtoms can generate BadAlloc and BadValue errors.
71
72       The XGetAtomName function returns the name associated with the speci‐
73       fied atom.  If the data returned by the server is in the Latin Portable
74       Character Encoding, then the returned string is in the Host Portable
75       Character Encoding.  Otherwise, the result is implementation-dependent.
76       To free the resulting string, call XFree.
77
78       XGetAtomName can generate a BadAtom error.
79
80       The XGetAtomNames function returns the names associated with the speci‐
81       fied atoms.  The names are stored in the names_return array supplied by
82       the caller.  Calling this function is equivalent to calling XGetAtom‐
83       Name for each of the atoms in turn, but this function minimizes the
84       number of round-trip protocol exchanges between the client and the X
85       server.
86
87       This function returns a nonzero status if names are returned for all of
88       the atoms; otherwise, it returns zero.
89
90       XGetAtomNames can generate a BadAtom error.
91

DIAGNOSTICS

93       BadAlloc  The server failed to allocate the requested resource or
94                 server memory.
95
96       BadAtom   A value for an Atom argument does not name a defined Atom.
97
98       BadValue  Some numeric value falls outside the range of values accepted
99                 by the request.  Unless a specific range is specified for an
100                 argument, the full range defined by the argument's type is
101                 accepted.  Any argument defined as a set of alternatives can
102                 generate this error.
103

SEE ALSO

105       XFree(3), XGetWindowProperty(3)
106       Xlib - C Language X Interface
107
108
109
110X Version 11                     libX11 1.6.7                   XInternAtom(3)
Impressum