diff options
author | Jamey Sharp <jamey@minilop.net> | 2010-06-24 10:48:35 -0700 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2010-06-24 17:22:18 -0700 |
commit | f4c7e382252449e32bb11755deca235a5766a7a1 (patch) | |
tree | 0a55ac9e248d5094d8bd47aed8644abb3047bd66 | |
parent | dbec1cdb5f851844db34fd757dd0b4a5e42acd2c (diff) |
Delete callback-based APIs for events, properties, and replies.
They are poorly designed and not terribly useful. I wrote the original
versions of these libraries for demonstration purposes and would like to
actively discourage anyone from actually using them.
After deleting the callback-based APIs, there was nothing interesting
left in property or reply, so those libraries are deleted outright. The
event library is no longer particularly related to event handling, but
that's a problem for another commit.
The icccm library had some simple hooks for integrating with the
property library, which are precisely as useful as the property library
itself, so I deleted them too. (Arnaud suggested this in
<sa5ocib84hf.fsf@Orfeo.duckcorp.org>.)
Since the icccm and event libraries have changed interfaces, this commit
bumps their SONAME versions.
Signed-off-by: Jamey Sharp <jamey@minilop.net>
Reviewed-by: Mikhail Gusarov <dottedmag@dottedmag.net>
Reviewed-by: Josh Triplett <josh@joshtriplett.org>
Acked-by: Julien Cristau <jcristau@debian.org>
-rw-r--r-- | configure.ac | 10 | ||||
-rw-r--r-- | icccm/Makefile.am | 7 | ||||
-rw-r--r-- | icccm/icccm.c | 27 | ||||
-rw-r--r-- | icccm/xcb-icccm.pc.in | 2 | ||||
-rw-r--r-- | icccm/xcb_icccm.h | 35 |
5 files changed, 6 insertions, 75 deletions
diff --git a/configure.ac b/configure.ac index e8b48f6..d843da6 100644 --- a/configure.ac +++ b/configure.ac @@ -80,31 +80,21 @@ XCB_AUX_CFLAGS='-I$(top_srcdir)/aux' XCB_AUX_LIBS='$(top_builddir)/aux/libxcb-aux.la' XCB_ATOM_CFLAGS='-I$(top_srcdir)/atom -I$(top_builddir)/atom' XCB_ATOM_LIBS='$(top_builddir)/atom/libxcb-atom.la' -XCB_EVENT_CFLAGS='-I$(top_srcdir)/event' -XCB_EVENT_LIBS='$(top_builddir)/event/libxcb-event.la' -XCB_PROPERTY_CFLAGS='-I$(top_srcdir)/property' -XCB_PROPERTY_LIBS='$(top_builddir)/property/libxcb-property.la' XCB_ICCCM_CFLAGS='-I$(top_srcdir)/icccm' XCB_ICCCM_LIBS='$(top_builddir)/icccm/libxcb-icccm.la' AC_SUBST(XCB_AUX_CFLAGS) AC_SUBST(XCB_AUX_LIBS) AC_SUBST(XCB_ATOM_CFLAGS) AC_SUBST(XCB_ATOM_LIBS) -AC_SUBST(XCB_EVENT_CFLAGS) -AC_SUBST(XCB_EVENT_LIBS) -AC_SUBST(XCB_PROPERTY_CFLAGS) -AC_SUBST(XCB_PROPERTY_LIBS) AC_SUBST(XCB_ICCCM_CFLAGS) AC_SUBST(XCB_ICCCM_LIBS) AC_OUTPUT([Makefile aux/Makefile aux/xcb-aux.pc - reply/Makefile reply/xcb-reply.pc image/Makefile image/xcb-image.pc atom/Makefile atom/xcb-atom.pc event/Makefile event/xcb-event.pc keysyms/Makefile keysyms/xcb-keysyms.pc - property/Makefile property/xcb-property.pc icccm/Makefile icccm/xcb-icccm.pc renderutil/Makefile renderutil/xcb-renderutil.pc xcb_util_intro diff --git a/icccm/Makefile.am b/icccm/Makefile.am index bd955f0..2e7f8ca 100644 --- a/icccm/Makefile.am +++ b/icccm/Makefile.am @@ -8,10 +8,9 @@ xcbinclude_HEADERS = xcb_icccm.h AM_CFLAGS = $(CWARNFLAGS) 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 2:0:0 +libxcb_icccm_la_CPPFLAGS = $(XCB_CFLAGS) $(XPROTO_CFLAGS) +libxcb_icccm_la_LIBADD = $(XCB_LIBS) $(XPROTO_LIBS) +libxcb_icccm_la_LDFLAGS = -version-info 3:0:0 pkgconfig_DATA = xcb-icccm.pc diff --git a/icccm/icccm.c b/icccm/icccm.c index 4bb2c00..260a557 100644 --- a/icccm/icccm.c +++ b/icccm/icccm.c @@ -40,7 +40,7 @@ xcb_get_text_property(xcb_connection_t *c, xcb_window_t window, xcb_atom_t property) { - return xcb_get_any_property(c, 0, window, property, UINT_MAX); + return xcb_get_property(c, 0, window, property, XCB_GET_PROPERTY_TYPE_ANY, 0, UINT_MAX); } xcb_get_property_cookie_t @@ -48,7 +48,7 @@ xcb_get_text_property_unchecked(xcb_connection_t *c, xcb_window_t window, xcb_atom_t property) { - return xcb_get_any_property_unchecked(c, 0, window, property, UINT_MAX); + return xcb_get_property_unchecked(c, 0, window, property, XCB_GET_PROPERTY_TYPE_ANY, 0, UINT_MAX); } uint8_t @@ -123,13 +123,6 @@ xcb_get_wm_name_reply(xcb_connection_t *c, return xcb_get_text_property_reply(c, cookie, prop, e); } -uint8_t -xcb_watch_wm_name(xcb_property_handlers_t *prophs, uint32_t long_len, - xcb_generic_property_handler_t handler, void *data) -{ - return xcb_property_set_handler(prophs, XCB_ATOM_WM_NAME, long_len, handler, data); -} - /* WM_ICON_NAME */ xcb_void_cookie_t @@ -175,14 +168,6 @@ xcb_get_wm_icon_name_reply(xcb_connection_t *c, return xcb_get_text_property_reply(c, cookie, prop, e); } -uint8_t -xcb_watch_wm_icon_name(xcb_property_handlers_t *prophs, uint32_t long_len, - xcb_generic_property_handler_t handler, void *data) -{ - return xcb_property_set_handler(prophs, XCB_ATOM_WM_ICON_NAME, long_len, handler, - data); -} - /* WM_COLORMAP_WINDOWS */ xcb_void_cookie_t @@ -306,14 +291,6 @@ xcb_get_wm_client_machine_reply(xcb_connection_t *c, return xcb_get_text_property_reply(c, cookie, prop, e); } -uint8_t -xcb_watch_wm_client_machine(xcb_property_handlers_t *prophs, uint32_t long_len, - xcb_generic_property_handler_t handler, void *data) -{ - return xcb_property_set_handler(prophs, XCB_ATOM_WM_CLIENT_MACHINE, long_len, handler, - data); -} - /* WM_CLASS */ xcb_void_cookie_t diff --git a/icccm/xcb-icccm.pc.in b/icccm/xcb-icccm.pc.in index d21d019..b8c626e 100644 --- a/icccm/xcb-icccm.pc.in +++ b/icccm/xcb-icccm.pc.in @@ -6,6 +6,6 @@ includedir=@includedir@ Name: XCB ICCCM library Description: XCB ICCCM binding Version: @PACKAGE_VERSION@ -Requires: xcb xcb-property +Requires: xcb Libs: -L${libdir} -lxcb-icccm @LIBS@ Cflags: -I${includedir} diff --git a/icccm/xcb_icccm.h b/icccm/xcb_icccm.h index f05ced0..1617b84 100644 --- a/icccm/xcb_icccm.h +++ b/icccm/xcb_icccm.h @@ -40,7 +40,6 @@ */ #include <xcb/xcb.h> -#include "xcb_property.h" #ifdef __cplusplus extern "C" { @@ -166,16 +165,6 @@ uint8_t xcb_get_wm_name_reply(xcb_connection_t *c, xcb_get_text_property_reply_t *prop, xcb_generic_error_t **e); -/** - * @brief Set a callback on WM_NAME property changes. - * @param prophs Property handlers. - * @param long_len Length of data. - * @param handler The callback. - * @param data data given to the callback. - */ -uint8_t xcb_watch_wm_name(xcb_property_handlers_t *prophs, uint32_t long_len, - xcb_generic_property_handler_t handler, void *data); - /* WM_ICON_NAME */ /** @@ -233,18 +222,6 @@ uint8_t xcb_get_wm_icon_name_reply(xcb_connection_t *c, xcb_get_text_property_reply_t *prop, xcb_generic_error_t **e); -/** - * @brief Set a callback on WM_ICON_NAME property changes. - * @param prophs Property handlers. - * @param long_len Length of data. - * @param handler The callback. - * @param data data given to the callback. - */ -uint8_t xcb_watch_wm_icon_name(xcb_property_handlers_t *prophs, - uint32_t long_len, - xcb_generic_property_handler_t handler, - void *data); - /* WM_COLORMAP_WINDOWS */ /** @@ -394,18 +371,6 @@ uint8_t xcb_get_wm_client_machine_reply(xcb_connection_t *c, xcb_get_text_property_reply_t *prop, xcb_generic_error_t **e); -/** - * @brief Set a callback on WM_CLIENT_MACHINE property changes. - * @param prophs Property handlers. - * @param long_len Length of data. - * @param handler The callback. - * @param data data given to the callback. - */ -uint8_t xcb_watch_wm_client_machine(xcb_property_handlers_t *prophs, - uint32_t long_len, - xcb_generic_property_handler_t handler, - void *data); - /* WM_CLASS */ /** |