[Xcb-commit] 2 commits - xcb xcb-util

Vincent Torri doursse at kemper.freedesktop.org
Wed Jun 7 22:02:47 PDT 2006


 xcb-util/convenient/xcb_aux.h    |   13 ++++++++++++-
 xcb-util/event/xcb_event.h       |   18 +++++++++++++++---
 xcb-util/icccm/xcb_icccm.h       |   22 +++++++++++++++++-----
 xcb-util/image/xcb_image.h       |   17 ++++++++++++++---
 xcb-util/keysyms/xcb_keysyms.h   |   11 +++++++++++
 xcb-util/property/xcb_property.h |   18 +++++++++++++++---
 xcb-util/reply/xcb_reply.h       |   18 +++++++++++++++---
 xcb-util/wm/xcb_wm.h             |   18 +++++++++++++++---
 xcb/src/xcb.h                    |    9 ++++++---
 9 files changed, 120 insertions(+), 24 deletions(-)

New commits:
diff-tree 28826be4d4180f0089cdd3faac02e807971af076 (from 499f943f656b3a15358af23b47753ab33dd10504)
Author: TORRI Vincent <torri at doursse.(none)>
Date:   Thu Jun 8 07:02:15 2006 +0200

    fix compilation with c++ compilers. Remove some trailing spaces

diff --git a/xcb-util/convenient/xcb_aux.h b/xcb-util/convenient/xcb_aux.h
index 6f5381c..0699035 100644
--- a/xcb-util/convenient/xcb_aux.h
+++ b/xcb-util/convenient/xcb_aux.h
@@ -2,6 +2,11 @@
 #define __XCB_AUX_H__
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 CARD8          XCBAuxGetDepth      (XCBConnection *c,
 				    XCBSCREEN     *screen);
 
@@ -126,4 +131,10 @@ XCBAuxChangeKeyboardControl (XCBConnecti
                           CARD32         mask,
                           const XCBParamsKeyboard *params);
 
-#endif /* __XCB_CONVENIENT_H__ */
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __XCB_AUX_H__ */
diff --git a/xcb-util/event/xcb_event.h b/xcb-util/event/xcb_event.h
index 5d94e4b..84b7f04 100644
--- a/xcb-util/event/xcb_event.h
+++ b/xcb-util/event/xcb_event.h
@@ -1,8 +1,14 @@
-#ifndef EVENTS_H
-#define EVENTS_H
+#ifndef __XCB_EVENTS_H__
+#define __XCB_EVENTS_H__
 
 #include <X11/XCB/xcb.h>
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 typedef struct EventHandlers EventHandlers;
 EventHandlers *allocEventHandlers(XCBConnection *c);
 void freeEventHandlers(EventHandlers *evenths);
@@ -56,4 +62,10 @@ MAKE_HANDLER(Event, ColormapNotify)
 MAKE_HANDLER(Event, ClientMessage)
 MAKE_HANDLER(Event, MappingNotify)
 
-#endif /* EVENTS_H */
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __XCB_EVENTS_H__ */
diff --git a/xcb-util/icccm/xcb_icccm.h b/xcb-util/icccm/xcb_icccm.h
index 0bc3459..17918c2 100644
--- a/xcb-util/icccm/xcb_icccm.h
+++ b/xcb-util/icccm/xcb_icccm.h
@@ -1,9 +1,15 @@
-#ifndef ICCCM_H
-#define ICCCM_H
+#ifndef __XCB_ICCCM_H__
+#define __XCB_ICCCM_H__
 
 #include <X11/XCB/xcb.h>
 #include "xcb_property.h"
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /* WM_NAME */
 
 void SetWMName   (XCBConnection *c,
@@ -61,10 +67,10 @@ void       SizeHintsGetIncrease  (SizeHi
 				  INT32     *width_inc,
 				  INT32     *height_inc);
 void       SizeHintsGetMinAspect (SizeHints *hints,
-				  INT32     *min_aspect_num, 
+				  INT32     *min_aspect_num,
 				  INT32     *min_aspect_den);
 void       SizeHintsGetMaxAspect (SizeHints *hints,
-				  INT32     *max_aspect_num, 
+				  INT32     *max_aspect_num,
 				  INT32     *max_aspect_den);
 void       SizeHintsGetBaseSize  (SizeHints *hints,
 				  INT32     *base_width,
@@ -213,4 +219,10 @@ char *DiscriminatedAtomNameByResource (c
 char *DiscriminatedAtomNameUnique     (const char *base, CARD32 id);
 #endif
 
-#endif /* ICCCM_H */
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __XCB_ICCCM_H__ */
diff --git a/xcb-util/image/xcb_image.h b/xcb-util/image/xcb_image.h
index a79f179..a336268 100644
--- a/xcb-util/image/xcb_image.h
+++ b/xcb-util/image/xcb_image.h
@@ -1,10 +1,15 @@
-
 #ifndef __XCB_IMAGE_H__
 #define __XCB_IMAGE_H__
+
 #include <X11/XCB/xcb.h>
 #include <X11/XCB/shm.h>
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 /**
  * @defgroup XCB_Image XCB Image Functions
  *
@@ -63,7 +68,7 @@ struct XCBShmSegmentInfo_
  * @param height The height of the image, in pixels.
  * @param xpad The quantum of a scanline (8, 16, or 32).
  * @param bytes_per_line The number of bytes in the client image
- * between the start of one scanline and the start of the next. 
+ * between the start of one scanline and the start of the next.
  * @return The new image.
  *
  * This function allocates the memory needed for an XCBImage structure
@@ -228,7 +233,7 @@ int XCBImagePutPixel (XCBImage *image,
  * This function returns the specified pixel from the named image. The
  * pixel value is returned in normalized format (that is, the
  * least-significant byte of the long is the least-significant byte of
- * the pixel). The image must contain the @p x and @p y coordinates. 
+ * the pixel). The image must contain the @p x and @p y coordinates.
  * @ingroup XCB_Image
  */
 CARD32 XCBImageGetPixel (XCBImage *image,
@@ -362,4 +367,10 @@ int XCBImageSHMGet (XCBConnection    *co
  * @}
  */
 
+
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* __XCB_IMAGE_H__ */
diff --git a/xcb-util/keysyms/xcb_keysyms.h b/xcb-util/keysyms/xcb_keysyms.h
index b5ef9f2..ace0a95 100644
--- a/xcb-util/keysyms/xcb_keysyms.h
+++ b/xcb-util/keysyms/xcb_keysyms.h
@@ -1,8 +1,14 @@
 #ifndef __XCB_KEYSYMS_H__
 #define __XCB_KEYSYMS_H__
+
 #include <X11/XCB/xcb.h>
 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 typedef struct _XCBKeySymbols XCBKeySymbols;
 
 /* enumeration for col parameter? */
@@ -54,4 +60,9 @@ int XCBIsMiscFunctionKey  (XCBKEYSYM key
 int XCBIsModifierKey      (XCBKEYSYM keysym);
 
 
+#ifdef __cplusplus
+}
+#endif
+
+
 #endif /* __XCB_KEYSYMS_H__ */
diff --git a/xcb-util/property/xcb_property.h b/xcb-util/property/xcb_property.h
index 185b9a0..abd9711 100644
--- a/xcb-util/property/xcb_property.h
+++ b/xcb-util/property/xcb_property.h
@@ -1,8 +1,14 @@
-#ifndef PROP_H
-#define PROP_H
+#ifndef __XCB_PROP_H__
+#define __XCB_PROP_H__
 
 #include "xcb_event.h"
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 XCBGetPropertyCookie GetAnyProperty(XCBConnection *c, BOOL del, XCBWINDOW window, XCBATOM name, CARD32 long_len);
 
 typedef struct PropertyHandlers PropertyHandlers;
@@ -18,4 +24,10 @@ int SetDefaultPropertyHandler(PropertyHa
 
 int PropertyChanged(PropertyHandlers *prophs, BYTE state, XCBWINDOW window, XCBATOM atom);
 
-#endif /* PROP_H */
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __XCB_PROP_H__ */
diff --git a/xcb-util/reply/xcb_reply.h b/xcb-util/reply/xcb_reply.h
index b345d84..0f52d61 100644
--- a/xcb-util/reply/xcb_reply.h
+++ b/xcb-util/reply/xcb_reply.h
@@ -1,9 +1,15 @@
-#ifndef REPLY_H
-#define REPLY_H
+#ifndef __XCB_REPLY_H__
+#define __XCB_REPLY_H__
 
 #include <X11/XCB/xcb.h>
 #include <pthread.h>
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 typedef struct ReplyHandlers ReplyHandlers;
 ReplyHandlers *allocReplyHandlers(XCBConnection *c);
 void freeReplyHandlers(ReplyHandlers *h);
@@ -17,4 +23,10 @@ typedef void (*GenericReplyHandler)(void
 
 void AddReplyHandler(ReplyHandlers *h, unsigned int request, GenericReplyHandler handler, void *data);
 
-#endif /* REPLY_H */
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __XCB_REPLY_H__ */
diff --git a/xcb-util/wm/xcb_wm.h b/xcb-util/wm/xcb_wm.h
index 191392d..f856346 100644
--- a/xcb-util/wm/xcb_wm.h
+++ b/xcb-util/wm/xcb_wm.h
@@ -1,10 +1,16 @@
-#ifndef XCB_WM
-#define XCB_WM
+#ifndef __XCB_WM_H__
+#define __XCB_WM_H__
 
 #include <X11/XCB/xcb.h>
 #include "xcb_atom.h"
 #include "xcb_property.h"
 
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
 void reparentWindow(XCBConnection *c, XCBWINDOW child,
 		XCBVISUALID v, XCBWINDOW r, CARD8 d,
 		INT16 x, INT16 y, CARD16 width, CARD16 height);
@@ -42,4 +48,10 @@ void *TableRemove(Table *table, CARD32 k
 extern Table *byChild;
 extern Table *byParent;
 
-#endif /* XCB_WM */
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif /* __XCB_WM_H__ */
diff-tree 499f943f656b3a15358af23b47753ab33dd10504 (from a8e4c33a9ead071e55351ecb6f2efa6489b86b4a)
Author: TORRI Vincent <torri at doursse.(none)>
Date:   Thu Jun 8 06:59:47 2006 +0200

    fix compilation with c++ compilers. Remove some trailing spaces

diff --git a/xcb/src/xcb.h b/xcb/src/xcb.h
index c7084ff..85d0658 100644
--- a/xcb/src/xcb.h
+++ b/xcb/src/xcb.h
@@ -25,8 +25,8 @@
  * authorization from the authors.
  */
 
-#ifndef __XCB_H
-#define __XCB_H
+#ifndef __XCB_H__
+#define __XCB_H__
 #include <sys/types.h>
 
 /* TODO: check for stdint in config? (HAVE_STDINT) fallback? */
@@ -48,10 +48,12 @@ typedef int32_t  INT32;
 #include <sys/uio.h>
 #include <pthread.h>
 
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
+
 #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
 #define deprecated __attribute__((__deprecated__))
 #else
@@ -534,4 +536,5 @@ XCBGenericIter XCBConnSetupSuccessRepEnd
 }
 #endif
 
-#endif
+
+#endif /* __XCB_H__ */


More information about the xcb-commit mailing list