summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArnaud Fontaine <arnau@debian.org>2010-03-22 12:01:05 +0000
committerArnaud Fontaine <Arnaud Fontaine arnau@debian.org>2010-03-29 13:31:07 +0100
commit9107c7b8b9291a33a1c39527f33985d7c45bf60d (patch)
tree91a4180f266d51d957a31e9fb806e9bf92610a20
parent2ffa61b854a67b9f6cc58fafabd4eb75c1a7de5d (diff)
icccm: allow to set the encoding format for TEXT properties
-rw-r--r--icccm/Makefile.am2
-rw-r--r--icccm/icccm.c48
-rw-r--r--icccm/xcb_icccm.h52
3 files changed, 59 insertions, 43 deletions
diff --git a/icccm/Makefile.am b/icccm/Makefile.am
index da755d4..bd955f0 100644
--- a/icccm/Makefile.am
+++ b/icccm/Makefile.am
@@ -11,7 +11,7 @@ libxcb_icccm_la_SOURCES = icccm.c
libxcb_icccm_la_CPPFLAGS = $(XCB_CFLAGS) $(XPROTO_CFLAGS) $(XCB_EVENT_CFLAGS) \
$(XCB_PROPERTY_CFLAGS)
libxcb_icccm_la_LIBADD = $(XCB_LIBS) $(XPROTO_LIBS) $(XCB_PROPERTY_LIBS)
-libxcb_icccm_la_LDFLAGS = -version-info 1:0:0
+libxcb_icccm_la_LDFLAGS = -version-info 2:0:0
pkgconfig_DATA = xcb-icccm.pc
diff --git a/icccm/icccm.c b/icccm/icccm.c
index dffca4f..49429e8 100644
--- a/icccm/icccm.c
+++ b/icccm/icccm.c
@@ -82,19 +82,21 @@ xcb_get_text_property_reply_wipe(xcb_get_text_property_reply_t *prop)
xcb_void_cookie_t
xcb_set_wm_name_checked(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t encoding, uint32_t name_len,
- const char *name)
+ xcb_atom_t encoding, uint8_t format,
+ uint32_t name_len, const char *name)
{
- return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window, XCB_ATOM_WM_NAME,
- encoding, 8, name_len, name);
+ return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
+ XCB_ATOM_WM_NAME, encoding, format,
+ name_len, name);
}
xcb_void_cookie_t
xcb_set_wm_name(xcb_connection_t *c, xcb_window_t window, xcb_atom_t encoding,
- uint32_t name_len, const char *name)
+ uint8_t format, uint32_t name_len, const char *name)
{
- return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, XCB_ATOM_WM_NAME,
- encoding, 8, name_len, name);
+ return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window,
+ XCB_ATOM_WM_NAME, encoding, format, name_len,
+ name);
}
xcb_get_property_cookie_t
@@ -131,20 +133,22 @@ xcb_watch_wm_name(xcb_property_handlers_t *prophs, uint32_t long_len,
xcb_void_cookie_t
xcb_set_wm_icon_name_checked(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t encoding, uint32_t name_len,
- const char *name)
+ xcb_atom_t encoding, uint8_t format,
+ uint32_t name_len, const char *name)
{
return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
- XCB_ATOM_WM_ICON_NAME, encoding, 8, name_len,
- name);
+ XCB_ATOM_WM_ICON_NAME, encoding, format,
+ name_len, name);
}
xcb_void_cookie_t
xcb_set_wm_icon_name(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t encoding, uint32_t name_len, const char *name)
+ xcb_atom_t encoding, uint8_t format, uint32_t name_len,
+ const char *name)
{
- return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window, XCB_ATOM_WM_ICON_NAME,
- encoding, 8, name_len, name);
+ return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window,
+ XCB_ATOM_WM_ICON_NAME, encoding, format,
+ name_len, name);
}
xcb_get_property_cookie_t
@@ -182,22 +186,22 @@ xcb_watch_wm_icon_name(xcb_property_handlers_t *prophs, uint32_t long_len,
xcb_void_cookie_t
xcb_set_wm_client_machine_checked(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t encoding, uint32_t name_len,
- const char *name)
+ xcb_atom_t encoding, uint8_t format,
+ uint32_t name_len, const char *name)
{
return xcb_change_property_checked(c, XCB_PROP_MODE_REPLACE, window,
- XCB_ATOM_WM_CLIENT_MACHINE, encoding, 8, name_len,
- name);
+ XCB_ATOM_WM_CLIENT_MACHINE, encoding,
+ format, name_len, name);
}
xcb_void_cookie_t
xcb_set_wm_client_machine(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t encoding, uint32_t name_len,
- const char *name)
+ xcb_atom_t encoding, uint8_t format,
+ uint32_t name_len, const char *name)
{
return xcb_change_property(c, XCB_PROP_MODE_REPLACE, window,
- XCB_ATOM_WM_CLIENT_MACHINE, encoding, 8, name_len,
- name);
+ XCB_ATOM_WM_CLIENT_MACHINE, encoding, format,
+ name_len, name);
}
xcb_get_property_cookie_t
diff --git a/icccm/xcb_icccm.h b/icccm/xcb_icccm.h
index dbe0600..5e838bd 100644
--- a/icccm/xcb_icccm.h
+++ b/icccm/xcb_icccm.h
@@ -119,21 +119,23 @@ void xcb_get_text_property_reply_wipe(xcb_get_text_property_reply_t *prop);
* @param c The connection to the X server.
* @param window Window X identifier.
* @param encoding Encoding used for the data passed in the name parameter, the set property will also have this encoding as its type.
+ * @param format Encoding format.
* @param name_len Length of name value to set.
* @param name Name value to set.
*/
xcb_void_cookie_t xcb_set_wm_name_checked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t encoding,
- uint32_t name_len,
- const char *name);
+ xcb_window_t window,
+ xcb_atom_t encoding,
+ uint8_t format,
+ uint32_t name_len,
+ const char *name);
/**
* @see xcb_set_wm_name_checked()
*/
xcb_void_cookie_t xcb_set_wm_name(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t encoding, uint32_t name_len,
- const char *name);
+ xcb_atom_t encoding, uint8_t format,
+ uint32_t name_len, const char *name);
/**
* @brief Deliver a GetProperty request to the X server for WM_NAME.
@@ -181,19 +183,26 @@ uint8_t xcb_watch_wm_name(xcb_property_handlers_t *prophs, uint32_t long_len,
* @param c The connection to the X server.
* @param window Window X identifier.
* @param encoding Encoding used for the data passed in the name parameter, the set property will also have this encoding as its type.
+ * @param format Encoding format.
* @param name_len Length of name value to set.
* @param name Name value to set.
*/
-xcb_void_cookie_t xcb_set_wm_icon_name_checked(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t encoding, uint32_t name_len,
- const char *name);
+xcb_void_cookie_t xcb_set_wm_icon_name_checked(xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_atom_t encoding,
+ uint8_t format,
+ uint32_t name_len,
+ const char *name);
/**
* @see xcb_set_wm_icon_name_checked()
*/
-xcb_void_cookie_t xcb_set_wm_icon_name(xcb_connection_t *c, xcb_window_t window,
- xcb_atom_t encoding, uint32_t name_len,
- const char *name);
+xcb_void_cookie_t xcb_set_wm_icon_name(xcb_connection_t *c,
+ xcb_window_t window,
+ xcb_atom_t encoding,
+ uint8_t format,
+ uint32_t name_len,
+ const char *name);
/**
* @brief Send request to get WM_ICON_NAME property of a window.
@@ -243,23 +252,26 @@ uint8_t xcb_watch_wm_icon_name(xcb_property_handlers_t *prophs,
* @param c The connection to the X server.
* @param window Window X identifier.
* @param encoding Encoding used for the data passed in the name parameter, the set property will also have this encoding as its type.
+ * @param format Encoding format.
* @param name_len Length of name value to set.
* @param name Name value to set.
*/
xcb_void_cookie_t xcb_set_wm_client_machine_checked(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t encoding,
- uint32_t name_len,
- const char *name);
+ xcb_window_t window,
+ xcb_atom_t encoding,
+ uint8_t format,
+ uint32_t name_len,
+ const char *name);
/**
* @see xcb_set_wm_client_machine_checked()
*/
xcb_void_cookie_t xcb_set_wm_client_machine(xcb_connection_t *c,
- xcb_window_t window,
- xcb_atom_t encoding,
- uint32_t name_len,
- const char *name);
+ xcb_window_t window,
+ xcb_atom_t encoding,
+ uint8_t format,
+ uint32_t name_len,
+ const char *name);
/**
* @brief Send request to get WM_CLIENT_MACHINE property of a window.