1xcb_change_property(3) XCB Requests xcb_change_property(3)
2
3
4
6 xcb_change_property - Changes a window property
7
9 #include <xcb/xproto.h>
10
11 Request function
12 xcb_void_cookie_t xcb_change_property(xcb_connection_t *conn,
13 uint8_t mode, xcb_window_t window, xcb_atom_t property,
14 xcb_atom_t type, uint8_t format, uint32_t data_len, const
15 void *data);
16
18 conn The XCB connection to X11.
19
20 mode One of the following values:
21
22 XCB_PROP_MODE_REPLACE
23 Discard the previous property value and store the
24 new data.
25
26 XCB_PROP_MODE_PREPEND
27 Insert the new data before the beginning of exist‐
28 ing data. The format must match existing property
29 value. If the property is undefined, it is treated
30 as defined with the correct type and format with
31 zero-length data.
32
33 XCB_PROP_MODE_APPEND
34 Insert the new data after the beginning of existing
35 data. The format must match existing property val‐
36 ue. If the property is undefined, it is treated as
37 defined with the correct type and format with zero-
38 length data.
39
40
41
42 window The window whose property you want to change.
43
44 property The property you want to change (an atom).
45
46 type The type of the property you want to change (an atom).
47
48 format Specifies whether the data should be viewed as a list of
49 8-bit, 16-bit or 32-bit quantities. Possible values are 8, 16
50 and 32. This information allows the X server to correctly
51 perform byte-swap operations as necessary.
52
53 data_len Specifies the number of elements (see format).
54
55 data The property data.
56
58 Sets or updates a property on the specified window. Properties are for
59 example the window title (WM_NAME) or its minimum size (WM_NOR‐
60 MAL_HINTS). Protocols such as EWMH also use properties - for example
61 EWMH defines the window title, encoded as UTF-8 string, in the
62 _NET_WM_NAME property.
63
65 Returns an xcb_void_cookie_t. Errors (if any) have to be handled in the
66 event loop.
67
68 If you want to handle errors directly with xcb_request_check instead,
69 use xcb_change_property_checked. See xcb-requests(3) for details.
70
72 xcb_alloc_error_t
73 The X server could not store the property (no memory?).
74
75 xcb_atom_error_t
76 property or type do not refer to a valid atom.
77
78 xcb_match_error_t
79 TODO: reasons?
80
81 xcb_value_error_t
82 TODO: reasons?
83
84 xcb_window_error_t
85 The specified window does not exist.
86
88 /*
89 * Sets the WM_NAME property of the window to "XCB Example".
90 *
91 */
92 void my_example(xcb_connection_t *conn, xcb_window_t window) {
93 xcb_change_property(conn,
94 XCB_PROP_MODE_REPLACE,
95 window,
96 XCB_ATOM_WM_NAME,
97 XCB_ATOM_STRING,
98 8,
99 strlen("XCB Example"),
100 "XCB Example");
101 xcb_flush(conn);
102 }
103
105 xcb-requests(3), xcb-examples(3), xcb_intern_atom(3), xprop(1)
106
108 Generated from xproto.xml. Contact xcb@lists.freedesktop.org for cor‐
109 rections and improvements.
110
111
112
113X Version 11 libxcb 1.13 xcb_change_property(3)