[Xcb-commit] 2 commits - aux configure.ac convenient Makefile.am

Bart Massey bart at kemper.freedesktop.org
Fri Dec 7 00:15:46 PST 2007


 Makefile.am              |    2 
 aux/Makefile.am          |   16 +++
 aux/xcb-aux.pc.in        |   11 ++
 aux/xcb_aux.c            |  212 +++++++++++++++++++++++++++++++++++++++++++++++
 aux/xcb_aux.h            |  152 +++++++++++++++++++++++++++++++++
 configure.ac             |    6 -
 convenient/Makefile.am   |   16 ---
 convenient/xcb-aux.pc.in |   11 --
 convenient/xcb_aux.c     |  163 ------------------------------------
 convenient/xcb_aux.h     |  140 -------------------------------
 10 files changed, 395 insertions(+), 334 deletions(-)

New commits:
commit b7309d5888ac13a1a9442a14766ce418dbef6f50
Author: Bart Massey <bart at cs.pdx.edu>
Date:   Fri Dec 7 00:14:29 2007 -0800

    added xcb_aux_find_visual functions

diff --git a/aux/xcb_aux.c b/aux/xcb_aux.c
index 276c4de..d9a6295 100644
--- a/aux/xcb_aux.c
+++ b/aux/xcb_aux.c
@@ -78,6 +78,40 @@ xcb_aux_get_visualtype (xcb_connection_t *c,
    return NULL;
 }
 
+xcb_visualtype_t *
+xcb_aux_find_visual_by_id (xcb_screen_t *screen,
+			   xcb_visualid_t id)
+{
+    xcb_depth_iterator_t i;
+    xcb_visualtype_iterator_t j;
+    for (i = xcb_screen_allowed_depths_iterator(screen);
+	 i.rem; xcb_depth_next(&i))
+	for (j = xcb_depth_visuals_iterator(i.data);
+	     j.rem; xcb_visualtype_next(&j))
+	    if (j.data->visual_id == id)
+		return j.data;
+    return 0;
+}
+
+xcb_visualtype_t *
+xcb_aux_find_visual_by_attrs (xcb_screen_t *screen,
+			      int8_t class,
+			      int8_t depth)
+{
+    xcb_depth_iterator_t i;
+    xcb_visualtype_iterator_t j;
+    for (i = xcb_screen_allowed_depths_iterator(screen);
+	 i.rem; xcb_depth_next(&i)) {
+	if (depth != -1 && i.data->depth != depth)
+	    continue;
+	for (j = xcb_depth_visuals_iterator(i.data);
+	     j.rem; xcb_visualtype_next(&j))
+	    if (class == -1 || j.data->visual_class == class)
+		return j.data;
+    }
+    return 0;
+}
+
 void
 xcb_aux_sync (xcb_connection_t *c)
 {
diff --git a/aux/xcb_aux.h b/aux/xcb_aux.h
index 9cc5448..e07a90f 100644
--- a/aux/xcb_aux.h
+++ b/aux/xcb_aux.h
@@ -20,6 +20,15 @@ xcb_visualtype_t *xcb_aux_get_visualtype (xcb_connection_t *c,
                                           int               screen,
                                           xcb_visualid_t    vid);
 
+xcb_visualtype_t *
+xcb_aux_find_visual_by_id (xcb_screen_t *screen,
+			   xcb_visualid_t id);
+
+xcb_visualtype_t *
+xcb_aux_find_visual_by_attrs (xcb_screen_t *screen,
+			      int8_t class,
+			      int8_t depth);
+
 void           xcb_aux_sync              (xcb_connection_t *c);
 
 /* less error prone to use structs instead of value lists */
commit 67add5c027dc881093f6e24b280cc66bf200f151
Author: Bart Massey <bart at cs.pdx.edu>
Date:   Fri Dec 7 00:11:41 2007 -0800

    added xcb_aux_get_depth_by_visual_id()

diff --git a/Makefile.am b/Makefile.am
index b17a1af..250beca 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -1,4 +1,4 @@
 
 MAINTAINERCLEANFILES = Makefile.in
 
-SUBDIRS = atom convenient event property icccm image keysyms reply wm renderutil
+SUBDIRS = atom aux event property icccm image keysyms reply wm renderutil
diff --git a/aux/Makefile.am b/aux/Makefile.am
new file mode 100644
index 0000000..bccfce2
--- /dev/null
+++ b/aux/Makefile.am
@@ -0,0 +1,16 @@
+
+MAINTAINERCLEANFILES = Makefile.in
+
+lib_LTLIBRARIES = libxcb-aux.la
+
+xcbinclude_HEADERS = xcb_aux.h
+
+AM_CFLAGS = $(CWARNFLAGS)
+
+libxcb_aux_la_SOURCES = xcb_aux.c
+libxcb_aux_la_CPPFLAGS = $(XCB_CFLAGS)
+libxcb_aux_la_LIBADD = $(XCB_LIBS)
+
+pkgconfig_DATA = xcb-aux.pc
+
+EXTRA_DIST=xcb-aux.pc.in
diff --git a/aux/xcb-aux.pc.in b/aux/xcb-aux.pc.in
new file mode 100644
index 0000000..79ed95c
--- /dev/null
+++ b/aux/xcb-aux.pc.in
@@ -0,0 +1,11 @@
+prefix=@prefix@
+exec_prefix=@exec_prefix@
+libdir=@libdir@
+includedir=@includedir@
+
+Name: XCB Aux library
+Description: XCB convenient functions
+Version: @PACKAGE_VERSION@
+Requires: xcb
+Libs: -L${libdir} -lxcb-aux @LIBS@
+Cflags: -I${includedir}
diff --git a/aux/xcb_aux.c b/aux/xcb_aux.c
new file mode 100644
index 0000000..276c4de
--- /dev/null
+++ b/aux/xcb_aux.c
@@ -0,0 +1,178 @@
+#include <stdio.h>
+#include <stdlib.h>
+
+#include <xcb/xcb.h>
+#include "xcb_aux.h"
+
+/* Connection related functions */
+
+uint8_t
+xcb_aux_get_depth (xcb_connection_t *c,
+                   xcb_screen_t     *screen)
+{
+  xcb_drawable_t            drawable;
+  xcb_get_geometry_reply_t *geom;
+  int                       depth;
+
+  drawable = screen->root;
+  geom = xcb_get_geometry_reply (c, xcb_get_geometry(c, drawable), 0);
+
+  if (!geom) {
+    perror ("GetGeometry(root) failed");
+    exit (0);
+  }
+  
+  depth = geom->depth;
+  free (geom);
+
+  return depth;
+}
+
+uint8_t
+xcb_aux_get_depth_of_visual (xcb_screen_t *screen,
+			     xcb_visualid_t id)
+{
+    xcb_depth_iterator_t i;
+    xcb_visualtype_iterator_t j;
+    for (i = xcb_screen_allowed_depths_iterator(screen);
+	 i.rem; xcb_depth_next(&i))
+	for (j = xcb_depth_visuals_iterator(i.data);
+	     j.rem; xcb_visualtype_next(&j))
+	    if (j.data->visual_id == id)
+		return i.data->depth;
+    return 0;
+}
+
+xcb_screen_t *
+xcb_aux_get_screen (xcb_connection_t *c,
+                    int               screen)
+{
+  xcb_screen_iterator_t i = xcb_setup_roots_iterator(xcb_get_setup(c));
+  for (; i.rem; --screen, xcb_screen_next(&i))
+    if (screen == 0)
+      return i.data;
+  return 0;
+}
+
+xcb_visualtype_t *
+xcb_aux_get_visualtype (xcb_connection_t *c,
+                        int               scr,
+                        xcb_visualid_t    vid)
+{
+  xcb_screen_t        *screen;
+  xcb_depth_t         *depth;
+  xcb_visualtype_iterator_t iter;
+  int               cur;
+
+  screen = xcb_aux_get_screen (c, scr);
+  if (!screen) return NULL;
+
+  depth = xcb_screen_allowed_depths_iterator(screen).data;
+  if (!depth) return NULL;
+   
+   iter = xcb_depth_visuals_iterator(depth);
+   for (cur = 0 ; cur < iter.rem ; xcb_visualtype_next(&iter), ++cur)
+      if (vid == iter.data->visual_id)
+	 return iter.data;
+
+   return NULL;
+}
+
+void
+xcb_aux_sync (xcb_connection_t *c)
+{
+    free(xcb_get_input_focus_reply(c, xcb_get_input_focus(c), NULL));
+}
+
+/* structs instead of value lists */
+/* TODO: generate the struct types and functions from protocol masks and descriptions */
+
+/* This generic implementation of pack_list depends on:
+   a) structs packed to uint32_t size
+   b) structs consist of just uint32_t/int32_t fields in the same order as bitmask
+*/
+
+static void
+pack_list( uint32_t mask, const uint32_t *src, uint32_t *dest )
+{
+	for ( ; mask; mask >>= 1, src++)
+		if (mask & 1)
+			*dest++ = *src;
+}
+
+xcb_void_cookie_t
+xcb_aux_create_window (xcb_connection_t       *c,
+                       uint8_t                depth,
+                       xcb_window_t           wid,
+                       xcb_window_t           parent,
+                       int16_t                x,
+                       int16_t                y,
+                       uint16_t               width,
+                       uint16_t               height,
+                       uint16_t               border_width,
+                       uint16_t               _class,
+                       xcb_visualid_t         visual,
+                       uint32_t               mask,
+                       const xcb_params_cw_t *params)
+{
+	uint32_t value_list[16];
+	pack_list(mask, (const uint32_t *)params, value_list);
+	return xcb_create_window(c, depth, wid, parent,
+		x, y, width, height, border_width,
+		_class, visual, mask, value_list);
+}
+
+xcb_void_cookie_t
+xcb_aux_change_window_attributes (xcb_connection_t      *c,
+                                  xcb_window_t           window,
+                                  uint32_t               mask,
+                                  const xcb_params_cw_t *params)
+{
+	uint32_t value_list[16];
+	pack_list(mask, (const uint32_t *)params, value_list);
+	return xcb_change_window_attributes( c, window, mask, value_list );
+}
+
+xcb_void_cookie_t
+xcb_aux_configure_window (xcb_connection_t                    *c,
+                          xcb_window_t                         window,
+                          uint16_t                             mask,
+                          const xcb_params_configure_window_t *params)
+{
+	uint32_t value_list[8];
+	pack_list(mask, (const uint32_t *)params, value_list);
+	return xcb_configure_window( c, window, mask, value_list );
+}
+
+xcb_void_cookie_t
+xcb_aux_create_gc (xcb_connection_t      *c,
+                   xcb_gcontext_t         gid,
+                   xcb_drawable_t         drawable,
+                   uint32_t               mask,
+                   const xcb_params_gc_t *params)
+{
+	uint32_t value_list[32];
+	pack_list(mask, (const uint32_t *)params, value_list);
+	return xcb_create_gc( c, gid, drawable, mask, value_list );
+}
+
+xcb_void_cookie_t
+xcb_aux_change_gc (xcb_connection_t     *c,
+                   xcb_gcontext_t        gc,
+                   uint32_t              mask,
+                   const xcb_params_gc_t *params)
+{
+	uint32_t value_list[32];
+	pack_list(mask, (const uint32_t *)params, value_list);
+	return xcb_change_gc( c, gc, mask, value_list );
+}
+
+xcb_void_cookie_t
+xcb_aux_change_keyboard_control (xcb_connection_t            *c,
+                                 uint32_t                     mask,
+                                 const xcb_params_keyboard_t *params)
+{
+	uint32_t value_list[16];
+	pack_list(mask, (const uint32_t *)params, value_list);
+	return xcb_change_keyboard_control( c, mask, value_list );
+}
diff --git a/aux/xcb_aux.h b/aux/xcb_aux.h
new file mode 100644
index 0000000..9cc5448
--- /dev/null
+++ b/aux/xcb_aux.h
@@ -0,0 +1,143 @@
+#ifndef __XCB_AUX_H__
+#define __XCB_AUX_H__
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+uint8_t          xcb_aux_get_depth       (xcb_connection_t *c,
+                                          xcb_screen_t     *screen);
+
+uint8_t xcb_aux_get_depth_of_visual      (xcb_screen_t *screen,
+					  xcb_visualid_t id);
+
+xcb_screen_t     *xcb_aux_get_screen     (xcb_connection_t *c,
+                                          int               screen);
+
+xcb_visualtype_t *xcb_aux_get_visualtype (xcb_connection_t *c,
+                                          int               screen,
+                                          xcb_visualid_t    vid);
+
+void           xcb_aux_sync              (xcb_connection_t *c);
+
+/* less error prone to use structs instead of value lists */
+
+typedef struct {
+    uint32_t back_pixmap;
+    uint32_t back_pixel;
+    uint32_t border_pixmap;
+    uint32_t border_pixel;
+    uint32_t bit_gravity;
+    uint32_t win_gravity;
+    uint32_t backing_store;
+    uint32_t backing_planes;
+    uint32_t backing_pixel;
+    uint32_t override_redirect;
+    uint32_t save_under;
+    uint32_t event_mask;
+    uint32_t dont_propagate;
+    uint32_t colormap;
+    uint32_t cursor;
+} xcb_params_cw_t;
+
+xcb_void_cookie_t
+xcb_aux_create_window (xcb_connection_t      *c,
+                       uint8_t                depth,
+                       xcb_window_t           wid,
+                       xcb_window_t           parent,
+                       int16_t                x,
+                       int16_t                y,
+                       uint16_t               width,
+                       uint16_t               height,
+                       uint16_t               border_width,
+                       uint16_t               _class,
+                       xcb_visualid_t         visual,
+                       uint32_t               mask,
+                       const xcb_params_cw_t *params);
+
+xcb_void_cookie_t
+xcb_aux_change_window_attributes (xcb_connection_t      *c,
+                                  xcb_window_t           window,
+                                  uint32_t               mask,
+                                  const xcb_params_cw_t *params);
+
+typedef struct {
+    int32_t  x;
+    int32_t  y;
+    uint32_t width;
+    uint32_t height;
+    uint32_t border_width;
+    uint32_t sibling;
+    uint32_t stack_mode;
+} xcb_params_configure_window_t;
+
+xcb_void_cookie_t
+xcb_aux_configure_window (xcb_connection_t                    *c,
+                          xcb_window_t                         window,
+                          uint16_t                             mask,
+                          const xcb_params_configure_window_t *params);
+
+typedef struct {
+    uint32_t function;
+    uint32_t plane_mask;
+    uint32_t foreground;
+    uint32_t background;
+    uint32_t line_width;
+    uint32_t line_style;
+    uint32_t cap_style;
+    uint32_t join_style;
+    uint32_t fill_style;
+    uint32_t fill_rule;
+    uint32_t tile;
+    uint32_t stipple;
+    uint32_t tile_stipple_originX;
+    uint32_t tile_stipple_originY;
+    uint32_t font;
+    uint32_t subwindow_mode;
+    uint32_t graphics_exposures;
+    uint32_t clip_originX;
+    uint32_t clip_originY;
+    uint32_t mask;
+    uint32_t dash_offset;
+    uint32_t dash_list;
+    uint32_t arc_mode;
+} xcb_params_gc_t;
+
+xcb_void_cookie_t
+xcb_aux_create_gc (xcb_connection_t      *c,
+                   xcb_gcontext_t         cid,
+                   xcb_drawable_t         drawable,
+                   uint32_t               mask,
+                   const xcb_params_gc_t *params);
+
+xcb_void_cookie_t
+xcb_aux_change_gc (xcb_connection_t      *c,
+                   xcb_gcontext_t         gc,
+                   uint32_t               mask,
+                   const xcb_params_gc_t *params);
+
+typedef struct {
+    uint32_t key_click_percent;
+    uint32_t bell_percent;
+    uint32_t bell_pitch;
+    uint32_t bell_duration;
+    uint32_t led;
+    uint32_t led_mode;
+    uint32_t key;
+    uint32_t auto_repeat_mode;
+} xcb_params_keyboard_t;
+
+xcb_void_cookie_t
+xcb_aux_change_keyboard_control (xcb_connection_t            *c,
+                                 uint32_t                     mask,
+                                 const xcb_params_keyboard_t *params);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __XCB_AUX_H__ */
diff --git a/configure.ac b/configure.ac
index 33fa866..3f7dc72 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,8 +31,8 @@ PKG_CHECK_MODULES(XCB, xcb >= 1.0)
 PKG_CHECK_MODULES(XCB_SHM, xcb-shm)
 PKG_CHECK_MODULES(XCB_RENDER, xcb-render)
 
-XCB_AUX_CFLAGS='-I$(top_srcdir)/convenient'
-XCB_AUX_LIBS='$(top_builddir)/convenient/libxcb-aux.la'
+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'
@@ -53,7 +53,7 @@ AC_SUBST(XCB_ICCCM_CFLAGS)
 AC_SUBST(XCB_ICCCM_LIBS)
 
 AC_OUTPUT([Makefile
-	convenient/Makefile convenient/xcb-aux.pc
+	aux/Makefile aux/xcb-aux.pc
 	reply/Makefile reply/xcb-reply.pc
 	image/Makefile image/xcb-image.pc
 	atom/Makefile atom/xcb-atom.pc
diff --git a/convenient/Makefile.am b/convenient/Makefile.am
deleted file mode 100644
index bccfce2..0000000
--- a/convenient/Makefile.am
+++ /dev/null
@@ -1,16 +0,0 @@
-
-MAINTAINERCLEANFILES = Makefile.in
-
-lib_LTLIBRARIES = libxcb-aux.la
-
-xcbinclude_HEADERS = xcb_aux.h
-
-AM_CFLAGS = $(CWARNFLAGS)
-
-libxcb_aux_la_SOURCES = xcb_aux.c
-libxcb_aux_la_CPPFLAGS = $(XCB_CFLAGS)
-libxcb_aux_la_LIBADD = $(XCB_LIBS)
-
-pkgconfig_DATA = xcb-aux.pc
-
-EXTRA_DIST=xcb-aux.pc.in
diff --git a/convenient/xcb-aux.pc.in b/convenient/xcb-aux.pc.in
deleted file mode 100644
index 79ed95c..0000000
--- a/convenient/xcb-aux.pc.in
+++ /dev/null
@@ -1,11 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@
-
-Name: XCB Aux library
-Description: XCB convenient functions
-Version: @PACKAGE_VERSION@
-Requires: xcb
-Libs: -L${libdir} -lxcb-aux @LIBS@
-Cflags: -I${includedir}
diff --git a/convenient/xcb_aux.c b/convenient/xcb_aux.c
deleted file mode 100644
index c84ef8a..0000000
--- a/convenient/xcb_aux.c
+++ /dev/null
@@ -1,163 +0,0 @@
-#include <stdio.h>
-#include <stdlib.h>
-
-#include <xcb/xcb.h>
-#include "xcb_aux.h"
-
-/* Connection related functions */
-
-uint8_t
-xcb_aux_get_depth (xcb_connection_t *c,
-                   xcb_screen_t     *screen)
-{
-  xcb_drawable_t            drawable;
-  xcb_get_geometry_reply_t *geom;
-  int                       depth;
-
-  drawable = screen->root;
-  geom = xcb_get_geometry_reply (c, xcb_get_geometry(c, drawable), 0);
-
-  if (!geom) {
-    perror ("GetGeometry(root) failed");
-    exit (0);
-  }
-  
-  depth = geom->depth;
-  free (geom);
-
-  return depth;
-}
-
-xcb_screen_t *
-xcb_aux_get_screen (xcb_connection_t *c,
-                    int               screen)
-{
-  xcb_screen_iterator_t i = xcb_setup_roots_iterator(xcb_get_setup(c));
-  for (; i.rem; --screen, xcb_screen_next(&i))
-    if (screen == 0)
-      return i.data;
-  return 0;
-}
-
-xcb_visualtype_t *
-xcb_aux_get_visualtype (xcb_connection_t *c,
-                        int               scr,
-                        xcb_visualid_t    vid)
-{
-  xcb_screen_t        *screen;
-  xcb_depth_t         *depth;
-  xcb_visualtype_iterator_t iter;
-  int               cur;
-
-  screen = xcb_aux_get_screen (c, scr);
-  if (!screen) return NULL;
-
-  depth = xcb_screen_allowed_depths_iterator(screen).data;
-  if (!depth) return NULL;
-   
-   iter = xcb_depth_visuals_iterator(depth);
-   for (cur = 0 ; cur < iter.rem ; xcb_visualtype_next(&iter), ++cur)
-      if (vid == iter.data->visual_id)
-	 return iter.data;
-
-   return NULL;
-}
-
-void
-xcb_aux_sync (xcb_connection_t *c)
-{
-    free(xcb_get_input_focus_reply(c, xcb_get_input_focus(c), NULL));
-}
-
-/* structs instead of value lists */
-/* TODO: generate the struct types and functions from protocol masks and descriptions */
-
-/* This generic implementation of pack_list depends on:
-   a) structs packed to uint32_t size
-   b) structs consist of just uint32_t/int32_t fields in the same order as bitmask
-*/
-
-static void
-pack_list( uint32_t mask, const uint32_t *src, uint32_t *dest )
-{
-	for ( ; mask; mask >>= 1, src++)
-		if (mask & 1)
-			*dest++ = *src;
-}
-
-xcb_void_cookie_t
-xcb_aux_create_window (xcb_connection_t       *c,
-                       uint8_t                depth,
-                       xcb_window_t           wid,
-                       xcb_window_t           parent,
-                       int16_t                x,
-                       int16_t                y,
-                       uint16_t               width,
-                       uint16_t               height,
-                       uint16_t               border_width,
-                       uint16_t               _class,
-                       xcb_visualid_t         visual,
-                       uint32_t               mask,
-                       const xcb_params_cw_t *params)
-{
-	uint32_t value_list[16];
-	pack_list(mask, (const uint32_t *)params, value_list);
-	return xcb_create_window(c, depth, wid, parent,
-		x, y, width, height, border_width,
-		_class, visual, mask, value_list);
-}
-
-xcb_void_cookie_t
-xcb_aux_change_window_attributes (xcb_connection_t      *c,
-                                  xcb_window_t           window,
-                                  uint32_t               mask,
-                                  const xcb_params_cw_t *params)
-{
-	uint32_t value_list[16];
-	pack_list(mask, (const uint32_t *)params, value_list);
-	return xcb_change_window_attributes( c, window, mask, value_list );
-}
-
-xcb_void_cookie_t
-xcb_aux_configure_window (xcb_connection_t                    *c,
-                          xcb_window_t                         window,
-                          uint16_t                             mask,
-                          const xcb_params_configure_window_t *params)
-{
-	uint32_t value_list[8];
-	pack_list(mask, (const uint32_t *)params, value_list);
-	return xcb_configure_window( c, window, mask, value_list );
-}
-
-xcb_void_cookie_t
-xcb_aux_create_gc (xcb_connection_t      *c,
-                   xcb_gcontext_t         gid,
-                   xcb_drawable_t         drawable,
-                   uint32_t               mask,
-                   const xcb_params_gc_t *params)
-{
-	uint32_t value_list[32];
-	pack_list(mask, (const uint32_t *)params, value_list);
-	return xcb_create_gc( c, gid, drawable, mask, value_list );
-}
-
-xcb_void_cookie_t
-xcb_aux_change_gc (xcb_connection_t     *c,
-                   xcb_gcontext_t        gc,
-                   uint32_t              mask,
-                   const xcb_params_gc_t *params)
-{
-	uint32_t value_list[32];
-	pack_list(mask, (const uint32_t *)params, value_list);
-	return xcb_change_gc( c, gc, mask, value_list );
-}
-
-xcb_void_cookie_t
-xcb_aux_change_keyboard_control (xcb_connection_t            *c,
-                                 uint32_t                     mask,
-                                 const xcb_params_keyboard_t *params)
-{
-	uint32_t value_list[16];
-	pack_list(mask, (const uint32_t *)params, value_list);
-	return xcb_change_keyboard_control( c, mask, value_list );
-}
diff --git a/convenient/xcb_aux.h b/convenient/xcb_aux.h
deleted file mode 100644
index 7032056..0000000
--- a/convenient/xcb_aux.h
+++ /dev/null
@@ -1,140 +0,0 @@
-#ifndef __XCB_AUX_H__
-#define __XCB_AUX_H__
-
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-uint8_t          xcb_aux_get_depth       (xcb_connection_t *c,
-                                          xcb_screen_t     *screen);
-
-xcb_screen_t     *xcb_aux_get_screen     (xcb_connection_t *c,
-                                          int               screen);
-
-xcb_visualtype_t *xcb_aux_get_visualtype (xcb_connection_t *c,
-                                          int               screen,
-                                          xcb_visualid_t    vid);
-
-void           xcb_aux_sync              (xcb_connection_t *c);
-
-/* less error prone to use structs instead of value lists */
-
-typedef struct {
-    uint32_t back_pixmap;
-    uint32_t back_pixel;
-    uint32_t border_pixmap;
-    uint32_t border_pixel;
-    uint32_t bit_gravity;
-    uint32_t win_gravity;
-    uint32_t backing_store;
-    uint32_t backing_planes;
-    uint32_t backing_pixel;
-    uint32_t override_redirect;
-    uint32_t save_under;
-    uint32_t event_mask;
-    uint32_t dont_propagate;
-    uint32_t colormap;
-    uint32_t cursor;
-} xcb_params_cw_t;
-
-xcb_void_cookie_t
-xcb_aux_create_window (xcb_connection_t      *c,
-                       uint8_t                depth,
-                       xcb_window_t           wid,
-                       xcb_window_t           parent,
-                       int16_t                x,
-                       int16_t                y,
-                       uint16_t               width,
-                       uint16_t               height,
-                       uint16_t               border_width,
-                       uint16_t               _class,
-                       xcb_visualid_t         visual,
-                       uint32_t               mask,
-                       const xcb_params_cw_t *params);
-
-xcb_void_cookie_t
-xcb_aux_change_window_attributes (xcb_connection_t      *c,
-                                  xcb_window_t           window,
-                                  uint32_t               mask,
-                                  const xcb_params_cw_t *params);
-
-typedef struct {
-    int32_t  x;
-    int32_t  y;
-    uint32_t width;
-    uint32_t height;
-    uint32_t border_width;
-    uint32_t sibling;
-    uint32_t stack_mode;
-} xcb_params_configure_window_t;
-
-xcb_void_cookie_t
-xcb_aux_configure_window (xcb_connection_t                    *c,
-                          xcb_window_t                         window,
-                          uint16_t                             mask,
-                          const xcb_params_configure_window_t *params);
-
-typedef struct {
-    uint32_t function;
-    uint32_t plane_mask;
-    uint32_t foreground;
-    uint32_t background;
-    uint32_t line_width;
-    uint32_t line_style;
-    uint32_t cap_style;
-    uint32_t join_style;
-    uint32_t fill_style;
-    uint32_t fill_rule;
-    uint32_t tile;
-    uint32_t stipple;
-    uint32_t tile_stipple_originX;
-    uint32_t tile_stipple_originY;
-    uint32_t font;
-    uint32_t subwindow_mode;
-    uint32_t graphics_exposures;
-    uint32_t clip_originX;
-    uint32_t clip_originY;
-    uint32_t mask;
-    uint32_t dash_offset;
-    uint32_t dash_list;
-    uint32_t arc_mode;
-} xcb_params_gc_t;
-
-xcb_void_cookie_t
-xcb_aux_create_gc (xcb_connection_t      *c,
-                   xcb_gcontext_t         cid,
-                   xcb_drawable_t         drawable,
-                   uint32_t               mask,
-                   const xcb_params_gc_t *params);
-
-xcb_void_cookie_t
-xcb_aux_change_gc (xcb_connection_t      *c,
-                   xcb_gcontext_t         gc,
-                   uint32_t               mask,
-                   const xcb_params_gc_t *params);
-
-typedef struct {
-    uint32_t key_click_percent;
-    uint32_t bell_percent;
-    uint32_t bell_pitch;
-    uint32_t bell_duration;
-    uint32_t led;
-    uint32_t led_mode;
-    uint32_t key;
-    uint32_t auto_repeat_mode;
-} xcb_params_keyboard_t;
-
-xcb_void_cookie_t
-xcb_aux_change_keyboard_control (xcb_connection_t            *c,
-                                 uint32_t                     mask,
-                                 const xcb_params_keyboard_t *params);
-
-
-#ifdef __cplusplus
-}
-#endif
-
-
-#endif /* __XCB_AUX_H__ */


More information about the xcb-commit mailing list