aboutsummaryrefslogtreecommitdiffstats
path: root/man3/LIBAXL_REQUEST_INTERN_ATOM.3
blob: 95821ea3fa71aefcf65d2a3d8f027d30e302c413 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
.TH LIBAXL_REQUEST_INTERN_ATOM 3 libaxl
.SH NAME
LIBAXL_REQUEST_INTERN_ATOM - Get atom ID from atom name
.SH SYNOPSIS
.nf
#include <libaxl.h>

#define LIBAXL_REQUEST_INTERN_ATOM 16
struct libaxl_request_intern_atom {
        uint8_t     \fIopcode\fP;
        uint8_t     \fIonly_if_exists\fP;
        uint16_t    \fI_request_length\fP;
        uint16_t    \fIlength_of_name\fP;
        uint8_t     \fI__pad\fP;
        const char *\fIname\fP;
};
.fi
.SH DESCRIPTION
The display server shall return the ID of
the atom whose name is specified in the
.I name
field. The length of the name shall be
specified in the
.I length_of_name
field. If the atom does not already exist
it shall be created if the
.I only_if_exists
field is set to 0.
.PP
The value of the
.I opcode
field shall be
.I LIBAXL_REQUEST_INTERN_ATOM
to signify that the request is of the
request described in this document.
.PP
Other fields are filled in automatically by the
.BR libaxl_send_request (3)
function.
.SH ERRORS
.TP
.BR LIBAXL_ERROR_ALLOC (3)
The display server failed to allocate
enough memory to create the atom.
.TP
.BR LIBAXL_ERROR_VALUE (3)
The request contains a value that falls
outside the range of accepted values.
.SH REPLIES
.nf
struct libaxl_reply_intern_atom {
        uint8_t       \fI__one\fP;
        uint8_t       \fI__pad\fP;
        uint16_t      \fIsequence_number\fP;
        uint32_t      \fI_reply_length\fP;
        libaxl_atom_t \fIatom\fP;
        uint8_t       \fI__unused\fP[20];
};
.fi
.PP
The display server shall, unless it returns an
error, return one
.B "struct libaxl_reply_intern_atom"
with the
.I atom
field set to the ID of the atom, or to
.I LIBAXL_NONE
if the atom does not exist (and the
.I only_if_exists
field in the request was not 0).
.SH NOTES
An atom is a ISO Latin-1 encoded, case-sensitive
string that has been integerised. X predefines
some of the important atoms. The predefined atoms
can be accessed with the following constants,
which are named as the atoms themselves except
with the
.B LIBAXL_ATOM_
prefix:

.IR LIBAXL_ATOM_ARC ,
.IR LIBAXL_ATOM_ATOM ,
.IR LIBAXL_ATOM_BITMAP ,
.IR LIBAXL_ATOM_CAP_HEIGHT ,
.IR LIBAXL_ATOM_CARDINAL ,
.IR LIBAXL_ATOM_COLORMAP ,
.IR LIBAXL_ATOM_COPYRIGHT ,
.IR LIBAXL_ATOM_CURSOR ,
.IR LIBAXL_ATOM_CUT_BUFFER0 ,
.IR LIBAXL_ATOM_CUT_BUFFER1 ,
.IR LIBAXL_ATOM_CUT_BUFFER2 ,
.IR LIBAXL_ATOM_CUT_BUFFER3 ,
.IR LIBAXL_ATOM_CUT_BUFFER4 ,
.IR LIBAXL_ATOM_CUT_BUFFER5 ,
.IR LIBAXL_ATOM_CUT_BUFFER6 ,
.IR LIBAXL_ATOM_CUT_BUFFER7 ,
.IR LIBAXL_ATOM_DRAWABLE ,
.IR LIBAXL_ATOM_END_SPACE ,
.IR LIBAXL_ATOM_FAMILY_NAME ,
.IR LIBAXL_ATOM_FONT ,
.IR LIBAXL_ATOM_FONT_NAME ,
.IR LIBAXL_ATOM_FULL_NAME ,
.IR LIBAXL_ATOM_INTEGER ,
.IR LIBAXL_ATOM_ITALIC_ANGLE ,
.IR LIBAXL_ATOM_MAX_SPACE ,
.IR LIBAXL_ATOM_MIN_SPACE ,
.IR LIBAXL_ATOM_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,
.IR LIBAXL_ATOM_WM_SIZE_HINTS ,
.IR LIBAXL_ATOM_WM_TRANSIENT_FOR ,
.IR LIBAXL_ATOM_WM_ZOOM_HINTS ,
and
.IR LIBAXL_ATOM_X_HEIGHT .
.PP
Atoms remain defined until the server resets.
\" TODO See Chapter 10, Connection Close
.PP
To avoid conflicts with names for atoms, atoms
that are private to a particular vendor or
organisation should be prefixed with an underscore
followed by additional prefixes, which the
protocol does not specify how they are chosen.
Atoms that are private to a single application
or end user, but stored in globally accessible
locations, should use two leading underscores.
.SH SEE ALSO
.BR libaxl_send_request (3),
.BR libaxl_receive (3),
.BR LIBAXL_REQUEST_GET_ATOM_NAME (3)