1XInternAtom(3) XLIB FUNCTIONS XInternAtom(3)
2
3
4
6 XInternAtom, XInternAtoms, XGetAtomName, XGetAtomNames - create or re‐
7 turn atom names
8
10 Atom XInternAtom(Display *display, _Xconst 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
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 re‐
27 turned.
28
29 atoms_return
30 Returns the atoms.
31
32 count Specifies the number of atom names in the array.
33
34 display Specifies the connection to the X server.
35
36 names Specifies the array of atom names.
37
38 names_return
39 Returns the atom names.
40
41 only_if_exists
42 Specifies a Boolean value that indicates whether the atom
43 must be created.
44
46 The XInternAtom function returns the atom identifier associated with
47 the specified atom_name string. If only_if_exists is False, the atom
48 is created if it does not exist. Therefore, XInternAtom can return
49 None. If the atom name is not in the Host Portable Character Encoding,
50 the result is implementation-dependent. Uppercase and lowercase mat‐
51 ter; the strings “thing”, “Thing”, and “thinG” all designate different
52 atoms. The atom will remain defined even after the client's connection
53 closes. It will become undefined only when the last connection to the
54 X server closes.
55
56 XInternAtom can generate BadAlloc and BadValue errors.
57
58 The XInternAtoms function returns the atom identifiers associated with
59 the specified names. The atoms are stored in the atoms_return array
60 supplied by the caller. Calling this function is equivalent to calling
61 XInternAtom for each of the names in turn with the specified value of
62 only_if_exists, but this function minimizes the number of round-trip
63 protocol exchanges between the client and the X server.
64
65 This function returns a nonzero status if atoms are returned for all of
66 the names; otherwise, it returns zero.
67
68 XInternAtoms can generate BadAlloc and BadValue errors.
69
70 The XGetAtomName function returns the name associated with the speci‐
71 fied atom. If the data returned by the server is in the Latin Portable
72 Character Encoding, then the returned string is in the Host Portable
73 Character Encoding. Otherwise, the result is implementation-dependent.
74 To free the resulting string, call XFree.
75
76 XGetAtomName can generate a BadAtom error.
77
78 The XGetAtomNames function returns the names associated with the speci‐
79 fied atoms. The names are stored in the names_return array supplied by
80 the caller. Calling this function is equivalent to calling XGetAtom‐
81 Name for each of the atoms in turn, but this function minimizes the
82 number of round-trip protocol exchanges between the client and the X
83 server.
84
85 This function returns a nonzero status if names are returned for all of
86 the atoms; otherwise, it returns zero.
87
88 XGetAtomNames can generate a BadAtom error.
89
91 BadAlloc The server failed to allocate the requested resource or
92 server memory.
93
94 BadAtom A value for an Atom argument does not name a defined Atom.
95
96 BadValue Some numeric value falls outside the range of values accepted
97 by the request. Unless a specific range is specified for an
98 argument, the full range defined by the argument's type is
99 accepted. Any argument defined as a set of alternatives can
100 generate this error.
101
103 XFree(3), XGetWindowProperty(3)
104 Xlib - C Language X Interface
105
106
107
108X Version 11 libX11 1.7.3.1 XInternAtom(3)