From a810d1ffe4825b9359f13ebb395f5f681961fc89 Mon Sep 17 00:00:00 2001 From: Ian Osgood Date: Mon, 13 Mar 2006 17:49:17 -0800 Subject: [PATCH 01/16] Remove dependencies on Xmd.h and X.h (Still including X.h until defs are moved to xproto.xml and xcb-util and xcb-demo are fixed to use them.) --- src/xcb.h | 14 +++++++++++++- src/xcb_auth.c | 2 +- 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/src/xcb.h b/src/xcb.h index 68c32a8..18785ab 100644 --- a/src/xcb.h +++ b/src/xcb.h @@ -28,7 +28,19 @@ #ifndef __XCB_H #define __XCB_H #include -#include + +/* TODO: check for stdint in config? (HAVE_STDINT) fallback? */ +#include + +typedef uint8_t BYTE; +typedef uint8_t BOOL; +typedef uint8_t CARD8; +typedef uint16_t CARD16; +typedef uint32_t CARD32; +typedef int8_t INT8; +typedef int16_t INT16; +typedef int32_t INT32; + #include #include #include diff --git a/src/xcb_auth.c b/src/xcb_auth.c index 3971010..d72d780 100644 --- a/src/xcb_auth.c +++ b/src/xcb_auth.c @@ -97,7 +97,7 @@ static Xauth *get_authptr(struct sockaddr *sockname, unsigned int socknamelen) addr = (char *) &si->sin_addr; addrlen = 4; if (ntohl(si->sin_addr.s_addr) != 0x7f000001) - family = FamilyInternet; /* 0 */ + family = 0; /* X.h: FamilyInternet */ snprintf(dispbuf, sizeof(dispbuf), "%d", ntohs(si->sin_port) - X_TCP_PORT); display = dispbuf; } -- 2.34.1 From 0d648ac0ab3a2d457284644e677fd2ed612f3e7c Mon Sep 17 00:00:00 2001 From: TORRI Vincent Date: Tue, 14 Mar 2006 07:40:39 +0100 Subject: [PATCH 02/16] doxygen documentation of the API --- src/xcb.h | 362 +++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 330 insertions(+), 32 deletions(-) diff --git a/src/xcb.h b/src/xcb.h index 18785ab..27f57b8 100644 --- a/src/xcb.h +++ b/src/xcb.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2001-2004 Bart Massey, Jamey Sharp, and Josh Triplett. + * Copyright (C) 2001-2006 Bart Massey, Jamey Sharp, and Josh Triplett. * All Rights Reserved. * * Permission is hereby granted, free of charge, to any person obtaining a @@ -8,17 +8,17 @@ * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: - * + * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. - * + * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE * AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - * + * * Except as contained in this notice, the names of the authors or their * institutions shall not be used in advertising or otherwise to promote the * sale, use or other dealings in this Software without prior written @@ -55,15 +55,27 @@ extern "C" { #define deprecated #endif + +/** + * @file xcb.h + */ + +/** + * @defgroup XCB_Core_Api XCB Core API + * @brief Core API of the XCB library. + * + * @{ + */ + /* Pre-defined constants */ -/* current protocol version */ +/** Current protocol version */ #define X_PROTOCOL 11 -/* current minor version */ +/** Current minor version */ #define X_PROTOCOL_REVISION 0 -/* X_TCP_PORT + display number = server port for TCP transport */ +/** X_TCP_PORT + display number = server port for TCP transport */ #define X_TCP_PORT 6000 #define XCB_TYPE_PAD(T,I) (-(I) & (sizeof(T) > 4 ? 3 : sizeof(T) - 1)) @@ -71,42 +83,72 @@ extern "C" { /* Opaque structures */ -typedef struct XCBConnection XCBConnection; +/** + * @brief XCB Connection structure. + * + * A structure that contain all data that XCB needs to communicate with an X server. + */ +typedef struct XCBConnection XCBConnection; /**< Opaque structure containing all data that XCB needs to communicate with an X server. */ /* Other types */ +/** + * @brief Generic iterator. + * + * A generic iterator structure. + */ typedef struct { - void *data; - int rem; - int index; + void *data; /**< Data of the current iterator */ + int rem; /**< remaining elements */ + int index; /**< index of the current iterator */ } XCBGenericIter; +/** + * @brief Generic reply. + * + * A generic reply structure. + */ typedef struct { - BYTE response_type; - CARD8 pad0; - CARD16 sequence; - CARD32 length; + BYTE response_type; /**< Type of the response */ + CARD8 pad0; /**< Padding */ + CARD16 sequence; /**< Sequence number */ + CARD32 length; /**< Length of the response */ } XCBGenericRep; +/** + * @brief Generic event. + * + * A generic event structure. + */ typedef struct { - BYTE response_type; - CARD8 pad0; - CARD16 sequence; - CARD32 pad[7]; + BYTE response_type; /**< Type of the response */ + CARD8 pad0; /**< Padding */ + CARD16 sequence; /**< Sequence number */ + CARD32 pad[7]; /**< Padding */ CARD32 full_sequence; } XCBGenericEvent; +/** + * @brief Generic error. + * + * A generic error structure. + */ typedef struct { - BYTE response_type; - BYTE error_code; - CARD16 sequence; - CARD32 pad[7]; + BYTE response_type; /**< Type of the response */ + BYTE error_code; /**< Error code */ + CARD16 sequence; /**< Sequence number */ + CARD32 pad[7]; /**< Padding */ CARD32 full_sequence; } XCBGenericError; +/** + * @brief Generic cookie. + * + * A generic cookie structure. + */ typedef struct { - unsigned int sequence; + unsigned int sequence; /**< Sequence number */ } XCBVoidCookie; @@ -117,64 +159,320 @@ typedef struct { /* xcb_auth.c */ +/** + * @brief Container for authorization information. + * + * A container for authorization information to be sent to the X server. + */ typedef struct XCBAuthInfo { - int namelen; - char *name; - int datalen; - char *data; + int namelen; /**< Length of the string name (as returned by strlen). */ + char *name; /**< String containing the authentication protocol name, such as "MIT-MAGIC-COOKIE-1" or "XDM-AUTHORIZATION-1". */ + int datalen; /**< Length of the data member. */ + char *data; /**< Data interpreted in a protocol-specific manner. */ } XCBAuthInfo; +/** + * @brief Gets authorization information. + * @param fd: The file descriptor. + * @param info: The authorisation info to set. + * @return @c 0 on failure, 1 otherwise. + * + * @deprecated This function is deprecated. It must not be used in + * newly written code. + */ int XCBGetAuthInfo(int fd, XCBAuthInfo *info) deprecated; /* xcb_out.c */ +/** + * @brief Forces any buffered output to be written to the server. + * @param c: The connection to the X server. + * @return > @c 0 on success, <= @c 0 otherwise. + * + * Forces any buffered output to be written to the server. Blocks + * until the write is complete. + */ int XCBFlush(XCBConnection *c); + +/** + * @brief Returns the maximum request length field from the connection + * setup data. + * @param c: The connection to the X server. + * @return The maximum request length field. + * + * In the absence of the BIG-REQUESTS extension, returns the + * maximum request length field from the connection setup data, which + * may be as much as 65535. If the server supports BIG-REQUESTS, then + * the maximum request length field from the reply to the + * BigRequestsEnable request will be returned instead. + * + * Note that this length is measured in four-byte units, making the + * theoretical maximum lengths roughly 256kB without BIG-REQUESTS and + * 16GB with. + */ CARD32 XCBGetMaximumRequestLength(XCBConnection *c); /* xcb_in.c */ +/** + * @brief Returns the next event or error from the server. + * @param c: The connection to the X server. + * @return The next event from the server. + * + * @deprecated This function is deprecated. It must not be used in + * newly written code. + */ XCBGenericEvent *XCBWaitEvent(XCBConnection *c) deprecated; + +/** + * @brief Returns the next event or error from the server. + * @param c: The connection to the X server. + * @return The next event from the server. + * + * Returns the next event or error from the server, or returns null in + * the event of an I/O error. Blocks until either an event or error + * arrive, or an I/O error occurs. + */ XCBGenericEvent *XCBWaitForEvent(XCBConnection *c); + +/** + * @brief Returns the next event or error from the server. + * @param c: The connection to the X server. + * @param error: A pointer to an int to be filled in with the I/O + * error status of the operation. + * @return The next event from the server. + * + * Returns the next event or error from the server, if one is + * available, or returns @c NULL otherwise. If no event is available, that + * might be because an I/O error like connection close occurred while + * attempting to read the next event. The @p error parameter is a + * pointer to an int to be filled in with the I/O error status of the + * operation. If @p error is @c NULL, terminates the application when an + * I/O error occurs. + */ XCBGenericEvent *XCBPollForEvent(XCBConnection *c, int *error); + +/** + * @brief Returns the last sequence number that the server is known to + * have processed. + * @param c: The connection to the X server. + * @return The last sequence number. + * + * Returns the last sequence number that the server is known to have + * processed. This function enables applications to determine whether + * forcing a cookie is going to block. + * + * @todo review that function. + */ unsigned int XCBGetRequestRead(XCBConnection *c); /* xcb_ext.c */ -typedef struct XCBExtension XCBExtension; +/** + * @typedef typedef struct XCBExtension XCBExtension + */ +typedef struct XCBExtension XCBExtension; /**< Opaque structure used as key for XCBGetExtensionData. */ -/* Do not free the returned XCBQueryExtensionRep - on return, it's aliased - * from the cache. */ +/** + * @brief Caches reply information from QueryExtension requests. + * @param c: The connection. + * @param ext: The extension data. + * @return A pointer to a XCBConnSetupSuccessRep pointer. + * + * This function is the primary interface to the "extension cache", + * which caches reply information from QueryExtension + * requests. Invoking this function may cause a call to + * XCBQueryExtension to retrieve extension information from the + * server, and may block until extension data is received from the + * server. + * + * The result must not be freed. This storage is managed by the cache + * itself. + */ const XCBQueryExtensionRep *XCBGetExtensionData(XCBConnection *c, XCBExtension *ext); +/** + * @brief Prefetch of extension data into the extension cache + * @param c: The connection. + * @param ext: The extension data. + * + * This function allows a "prefetch" of extension data into the + * extension cache. Invoking the function may cause a call to + * XCBQueryExtension, but will not block waiting for the + * reply. XCBGetExtensionData will return the prefetched data after + * possibly blocking while it is retrieved. + */ void XCBPrefetchExtensionData(XCBConnection *c, XCBExtension *ext); /* xcb_conn.c */ -XCBConnSetupSuccessRep *XCBGetSetup(XCBConnection *c); +/** + * @brief Access the data returned by the server. + * @param c: The connection. + * @return A pointer to a XCBConnSetupSuccessRep pointer. + * + * Accessor for the data returned by the server when the XCBConnection + * was initialized. This data includes + * - the server's required format for images, + * - a list of available visuals, + * - a list of available screens, + * - the server's maximum request length (in the absence of the + * BIG-REQUESTS extension), + * - and other assorted information. + * + * See the X protocol specification for more details. + * + * The result must not be freed. + */ +const XCBConnSetupSuccessRep *XCBGetSetup(XCBConnection *c); + +/** + * @brief Access the file descriptor of the connection. + * @param c: The connection. + * @return The file descriptor. + * + * Accessor for the file descriptor that was passed to the + * XCBConnectToFD call that returned @p c. + */ int XCBGetFileDescriptor(XCBConnection *c); +/** + * @brief Connects to the X server. + * @param fd: The file descriptor. + * @param auth_info: Authentication data. + * @return A newly allocated XCBConnection structure. + * + * Connects to an X server, given the open socket @p fd and the + * XCBAuthInfo @p auth_info. The file descriptor @p fd is + * bidirectionally connected to an X server. XCBGetTCPFD and + * XCBGetUnixFD return appropriate file descriptors. If the connection + * should be unauthenticated, @p auth_info must be @c + * NULL. XCBGetAuthInfo returns appropriate authentication data. + */ XCBConnection *XCBConnectToFD(int fd, XCBAuthInfo *auth_info); + +/** + * @brief Closes the connection. + * @param c: The connection. + * + * Closes the file descriptor and frees all memory associated with the + * connection @c c. + */ void XCBDisconnect(XCBConnection *c); /* xcb_util.c */ +/** + * @brief Parses a display string name in the form documented by X(7x). + * @param displayname: The name of the display. + * @param hostp: A pointer to a malloc'd copy of the hostname. + * @param displayp: A pointer to the display number. + * @param screenp: A pointer to the screen number. + * @return 0 on failure, non 0 otherwise. + * + * Parses the display string name @p display_name in the form + * documented by X(7x). Has no side effects on failure. If + * @p displayname is @c NULL or empty, it uses the environment + * variable DISPLAY. @p hostp is a pointer to a newly allocated string + * that contain the host name. @p displayp is set to the display + * number and @p screenp to the preferred screen number. @p screenp + * can be @c NULL. If @p displayname does not contain a screen number, + * it is set to @c 0. + */ int XCBParseDisplay(const char *name, char **host, int *display, int *screen); + +/** + * @brief Open a connection to the X server. + * @param host: The host name. + * @param display: The display number. + * @return The file descriptor. + * + * @deprecated This function is deprecated. It must not be used in + * newly written code. + */ int XCBOpen(const char *host, int display) deprecated; + +/** + * @brief Open a connection to the X server. + * @param host: The host name. + * @param port: The TCP port. + * @return The file descriptor. + * + * @deprecated This function is deprecated. It must not be used in + * newly written code. + */ int XCBOpenTCP(const char *host, unsigned short port) deprecated; + +/** + * @brief Connects to the X server. + * @param file: The file name. + * @return The file descriptor. + * + * @deprecated This function is deprecated. It must not be used in + * newly written code. + */ int XCBOpenUnix(const char *file) deprecated; +/** + * @brief Connects to the X server. + * @return A newly allocated XCBConnection structure. + * + * @deprecated This function is deprecated. It must not be used in + * newly written code. + */ XCBConnection *XCBConnectBasic(void) deprecated; + +/** + * @brief Connects to the X server. + * @param displayname: The name of the display. + * @param screenp: A pointer to a preferred screen number. + * @return A newly allocated XCBConnection structure. + * + * Connects to the X server specified by @p displayname. If @p + * displayname is @c NULL, uses the value of the DISPLAY environment + * variable. If a particular screen on that server is preferred, the + * int pointed to by @p screenp (if not @c NULL) will be set to that + * screen; otherwise the screen will be set to 0. + */ XCBConnection *XCBConnect(const char *displayname, int *screenp); + +/** + * @brief Connects to the X server, using an authorization information. + * @param displayname: The name of the display. + * @param auth: The authorization information. + * @param screenp: A pointer to a preferred screen number. + * @return A newly allocated XCBConnection structure. + * + * Connects to the X server specified by @p displayname, using the + * authorization @p auth. If a particular screen on that server is + * preferred, the int pointed to by @p screenp (if not @c NULL) will + * be set to that screen; otherwise @p screenp will be set to 0. + */ XCBConnection *XCBConnectToDisplayWithAuthInfo(const char *display, XCBAuthInfo *auth, int *screen); +/** + * @brief Ensures that all events and errors are avalaible in XCB. + * @param c: The connection to the X server. + * @param e: A pointer to an error. + * @return @c 1 on success, @c 0 otherwise. + * + * Blocks the calling thread for the duration of one round trip to the + * server, ensuring that all events and errors caused by previous + * requests are available to XCB. + */ int XCBSync(XCBConnection *c, XCBGenericError **e); +/** + * @} + */ + + #ifdef __cplusplus } #endif -- 2.34.1 From 71ddf29d00ad8ff2323faf2cc6c354cbf3eca16c Mon Sep 17 00:00:00 2001 From: Ian Osgood Date: Tue, 14 Mar 2006 10:18:22 -0800 Subject: [PATCH 03/16] Add an expression construct for mask enumerations such as CW flags. Replaces the C-specific use of 1<) + + (1 << + + ) + + -- 2.34.1 From f5c4956a81ed5aee3ea46e91785ec14f82e205d5 Mon Sep 17 00:00:00 2001 From: Ian Osgood Date: Tue, 14 Mar 2006 11:53:01 -0800 Subject: [PATCH 04/16] Fix XCBGetSetup to match prototype. --- src/xcb_conn.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/xcb_conn.c b/src/xcb_conn.c index 51f8eaa..1e93137 100644 --- a/src/xcb_conn.c +++ b/src/xcb_conn.c @@ -169,7 +169,7 @@ static int write_vec(XCBConnection *c, struct iovec **vector, int *count) /* Public interface */ -XCBConnSetupSuccessRep *XCBGetSetup(XCBConnection *c) +const XCBConnSetupSuccessRep *XCBGetSetup(XCBConnection *c) { /* doesn't need locking because it's never written to. */ return c->setup; -- 2.34.1 From 4142e34695310c20a8a30af64e0b40842bfb5dbe Mon Sep 17 00:00:00 2001 From: Ian Osgood Date: Tue, 14 Mar 2006 18:23:37 -0800 Subject: [PATCH 05/16] Remove xcb-util dependency on proto/X11 by moving many defs from X.h to s in xproto.xml --- src/xcb.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/xcb.h b/src/xcb.h index 27f57b8..9920c85 100644 --- a/src/xcb.h +++ b/src/xcb.h @@ -81,6 +81,10 @@ extern "C" { #define XCB_TYPE_PAD(T,I) (-(I) & (sizeof(T) > 4 ? 3 : sizeof(T) - 1)) +/** XCBNone is the universal null resource or null atom parameter value for many core X requests */ +#define XCBNone 0L + + /* Opaque structures */ /** -- 2.34.1 From 35ecaf45be75cb78fe18dd4ea9d564b03f6cea67 Mon Sep 17 00:00:00 2001 From: Ian Osgood Date: Wed, 15 Mar 2006 10:09:47 -0800 Subject: [PATCH 06/16] Remove proto/X11 dependencies from xcb-demo. --- src/xcb.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/xcb.h b/src/xcb.h index 9920c85..7998d20 100644 --- a/src/xcb.h +++ b/src/xcb.h @@ -84,6 +84,8 @@ extern "C" { /** XCBNone is the universal null resource or null atom parameter value for many core X requests */ #define XCBNone 0L +/** XCBCopyFromParent can be used for many CreateWindow parameters */ +#define XCBCopyFromParent 0L /* Opaque structures */ -- 2.34.1 From 5ccf7216d266f22755e40a8b9858ebd60fd48f40 Mon Sep 17 00:00:00 2001 From: Ian Osgood Date: Wed, 15 Mar 2006 22:41:08 -0800 Subject: [PATCH 07/16] Change syntax to n as Jamey and Josh suggested and add more button, key, and graphics enumerations. --- src/c-client.xsl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/c-client.xsl b/src/c-client.xsl index 6306a5c..56dbaac 100644 --- a/src/c-client.xsl +++ b/src/c-client.xsl @@ -1091,7 +1091,7 @@ authorization from the authors. (1 << - + ) -- 2.34.1 From df5d8adc1f18776e4417a03b465dae9273511fb1 Mon Sep 17 00:00:00 2001 From: Jamey Sharp Date: Thu, 16 Mar 2006 11:27:06 -0800 Subject: [PATCH 08/16] The typedefs replacing Xmd.h conflict with Xmd.h. Here is a hacky workaround: FIXME! --- src/xcb.h | 3 +++ src/xcb_auth.c | 12 ++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/src/xcb.h b/src/xcb.h index 7998d20..204164a 100644 --- a/src/xcb.h +++ b/src/xcb.h @@ -32,6 +32,8 @@ /* TODO: check for stdint in config? (HAVE_STDINT) fallback? */ #include +/* FIXME: these names conflict with those defined in Xmd.h. */ +#ifndef XMD_H typedef uint8_t BYTE; typedef uint8_t BOOL; typedef uint8_t CARD8; @@ -40,6 +42,7 @@ typedef uint32_t CARD32; typedef int8_t INT8; typedef int16_t INT16; typedef int32_t INT32; +#endif /* XMD_H */ #include #include diff --git a/src/xcb_auth.c b/src/xcb_auth.c index d72d780..f42400d 100644 --- a/src/xcb_auth.c +++ b/src/xcb_auth.c @@ -34,13 +34,21 @@ #include #include -#include "xcb.h" -#include "xcbint.h" +/* FIXME: for the moment Xdmcp.h must be included before xcb.h because + * it includes Xmd.h, but config.h (normally included from xcbint.h + * which must be included after xcb.h) must be included before Xdmcp.h. + * Ow. */ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif #ifdef HASXDMAUTH #include #endif +#include "xcb.h" +#include "xcbint.h" + enum auth_protos { #ifdef HASXDMAUTH AUTH_XA1, -- 2.34.1 From fc577b81bfeb79bb78ee529278ed52d59d489f89 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Tue, 21 Mar 2006 14:22:21 -0800 Subject: [PATCH 09/16] Remove outdated fd.o-* entries from */debian/.gitignore (obsolete since before they came from .cvsignore). --- debian/.gitignore | 1 - 1 file changed, 1 deletion(-) diff --git a/debian/.gitignore b/debian/.gitignore index cad8b05..a6db18d 100644 --- a/debian/.gitignore +++ b/debian/.gitignore @@ -1,6 +1,5 @@ compat copyright -fd.o-* stamp-* tmp files -- 2.34.1 From ff38c17c48c271847d12c81cbf80142c6918dc78 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 15 Apr 2006 12:26:03 -0700 Subject: [PATCH 10/16] Split all non-essential extensions into their own separate libraries, named libXCBextname. To use extension extname, include extname.h and link with -lXCBextname. This allows extensions to change without bumping the main libXCB version. bigreq and xc_misc remain in libXCB, because XCB uses them internally to make big requests and to allocate XIDs, respectively. --- src/Makefile.am | 64 +++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 62 insertions(+), 2 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index 41c261e..ffb70b9 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -1,4 +1,21 @@ -lib_LTLIBRARIES = libXCB.la +lib_LTLIBRARIES = libXCB.la \ + libXCBcomposite.la \ + libXCBdamage.la \ + libXCBdpms.la \ + libXCBglx.la \ + libXCBrandr.la \ + libXCBrecord.la \ + libXCBrender.la \ + libXCBres.la \ + libXCBshape.la \ + libXCBshm.la \ + libXCBsync.la \ + libXCBxevie.la \ + libXCBxf86dri.la \ + libXCBxfixes.la \ + libXCBxprint.la \ + libXCBxv.la \ + libXCBxvmc.la EXTHEADERS = \ extensions/bigreq.h \ @@ -42,6 +59,12 @@ EXTSOURCES = \ extensions/xvmc.c EXTENSIONS = $(EXTSOURCES) $(EXTHEADERS) +ESSENTIAL_EXTENSIONS = \ + extensions/bigreq.h \ + extensions/bigreq.c \ + extensions/xc_misc.h \ + extensions/xc_misc.c + COREHEADERS = xproto.h xcb_types.h CORESOURCES = xproto.c xcb_types.c COREPROTO = $(CORESOURCES) $(COREHEADERS) @@ -54,13 +77,50 @@ libXCB_la_LIBADD = $(XCBPROTO_LIBS) $(XPROTO_LIBS) $(XAU_LIBS) $(XDMCP_LIBS) libXCB_la_SOURCES = \ xcb_conn.c xcb_out.c xcb_in.c xcb_ext.c xcb_xid.c \ xcb_list.c xcb_util.c xcb_xlib.c xcb_auth.c \ - $(COREPROTO) $(EXTENSIONS) + $(COREPROTO) $(ESSENTIAL_EXTENSIONS) BUILT_SOURCES = $(COREPROTO) $(EXTENSIONS) CLEANFILES = $(COREPROTO) $(EXTENSIONS) clean-local: rmdir extensions || true +XCB_LIBS = $(top_builddir)/src/libXCB.la + +libXCBcomposite_la_LIBADD = $(XCB_LIBS) +libXCBcomposite_la_SOURCES = extensions/composite.c extensions/composite.h +libXCBdamage_la_LIBADD = $(XCB_LIBS) +libXCBdamage_la_SOURCES = extensions/damage.c extensions/damage.h +libXCBdpms_la_LIBADD = $(XCB_LIBS) +libXCBdpms_la_SOURCES = extensions/dpms.c extensions/dpms.h +libXCBglx_la_LIBADD = $(XCB_LIBS) +libXCBglx_la_SOURCES = extensions/glx.c extensions/glx.h +libXCBrandr_la_LIBADD = $(XCB_LIBS) +libXCBrandr_la_SOURCES = extensions/randr.c extensions/randr.h +libXCBrecord_la_LIBADD = $(XCB_LIBS) +libXCBrecord_la_SOURCES = extensions/record.c extensions/record.h +libXCBrender_la_LIBADD = $(XCB_LIBS) +libXCBrender_la_SOURCES = extensions/render.c extensions/render.h +libXCBres_la_LIBADD = $(XCB_LIBS) +libXCBres_la_SOURCES = extensions/res.c extensions/res.h +libXCBshape_la_LIBADD = $(XCB_LIBS) +libXCBshape_la_SOURCES = extensions/shape.c extensions/shape.h +libXCBshm_la_LIBADD = $(XCB_LIBS) +libXCBshm_la_SOURCES = extensions/shm.c extensions/shm.h +libXCBsync_la_LIBADD = $(XCB_LIBS) +libXCBsync_la_SOURCES = extensions/sync.c extensions/sync.h +libXCBxevie_la_LIBADD = $(XCB_LIBS) +libXCBxevie_la_SOURCES = extensions/xevie.c extensions/xevie.h +libXCBxf86dri_la_LIBADD = $(XCB_LIBS) +libXCBxf86dri_la_SOURCES = extensions/xf86dri.c extensions/xf86dri.h +libXCBxfixes_la_LIBADD = $(XCB_LIBS) +libXCBxfixes_la_SOURCES = extensions/xfixes.c extensions/xfixes.h +libXCBxprint_la_LIBADD = $(XCB_LIBS) +libXCBxprint_la_SOURCES = extensions/xprint.c extensions/xprint.h +libXCBxv_la_LIBADD = $(XCB_LIBS) +libXCBxv_la_SOURCES = extensions/xv.c extensions/xv.h +libXCBxvmc_la_LIBADD = $(XCB_LIBS) +libXCBxvmc_la_SOURCES = extensions/xvmc.c extensions/xvmc.h + vpath %.xml $(XCBPROTO_XCBINCLUDEDIR) $(XCBPROTO_XCBINCLUDEDIR)/extensions %.h: %.xml c-client.xsl -- 2.34.1 From 91aeea2a3e72af16733ddcba037541440c0c4739 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 15 Apr 2006 12:52:05 -0700 Subject: [PATCH 11/16] Put EXTHEADERS and EXTSOURCES in order. --- src/Makefile.am | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index ffb70b9..d38b5cb 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -21,14 +21,14 @@ EXTHEADERS = \ extensions/bigreq.h \ extensions/composite.h \ extensions/damage.h \ + extensions/dpms.h \ extensions/glx.h \ - extensions/shm.h \ - extensions/shape.h \ extensions/randr.h \ extensions/record.h \ extensions/render.h \ extensions/res.h \ - extensions/dpms.h \ + extensions/shape.h \ + extensions/shm.h \ extensions/sync.h \ extensions/xc_misc.h \ extensions/xevie.h \ @@ -41,14 +41,14 @@ EXTSOURCES = \ extensions/bigreq.c \ extensions/composite.c \ extensions/damage.c \ + extensions/dpms.c \ extensions/glx.c \ - extensions/shm.c \ - extensions/shape.c \ extensions/randr.c \ extensions/record.c \ extensions/render.c \ extensions/res.c \ - extensions/dpms.c \ + extensions/shape.c \ + extensions/shm.c \ extensions/sync.c \ extensions/xc_misc.c \ extensions/xevie.c \ -- 2.34.1 From cb6e1849b66c17f96d79598adb740ed16325a9c1 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 15 Apr 2006 14:17:52 -0700 Subject: [PATCH 12/16] Use screensaver.xml --- src/Makefile.am | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Makefile.am b/src/Makefile.am index d38b5cb..4002fd3 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -7,6 +7,7 @@ lib_LTLIBRARIES = libXCB.la \ libXCBrecord.la \ libXCBrender.la \ libXCBres.la \ + libXCBscreensaver.la \ libXCBshape.la \ libXCBshm.la \ libXCBsync.la \ @@ -27,6 +28,7 @@ EXTHEADERS = \ extensions/record.h \ extensions/render.h \ extensions/res.h \ + extensions/screensaver.h \ extensions/shape.h \ extensions/shm.h \ extensions/sync.h \ @@ -47,6 +49,7 @@ EXTSOURCES = \ extensions/record.c \ extensions/render.c \ extensions/res.c \ + extensions/screensaver.c \ extensions/shape.c \ extensions/shm.c \ extensions/sync.c \ @@ -102,6 +105,8 @@ libXCBrender_la_LIBADD = $(XCB_LIBS) libXCBrender_la_SOURCES = extensions/render.c extensions/render.h libXCBres_la_LIBADD = $(XCB_LIBS) libXCBres_la_SOURCES = extensions/res.c extensions/res.h +libXCBscreensaver_la_LIBADD = $(XCB_LIBS) +libXCBscreensaver_la_SOURCES = extensions/screensaver.c extensions/screensaver.h libXCBshape_la_LIBADD = $(XCB_LIBS) libXCBshape_la_SOURCES = extensions/shape.c extensions/shape.h libXCBshm_la_LIBADD = $(XCB_LIBS) -- 2.34.1 From cc075990f4fc2ed09c708036569049ddd24605ac Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 15 Apr 2006 20:21:22 -0700 Subject: [PATCH 13/16] Add xcbint.h to noinst_HEADERS, so it gets distributed. --- src/Makefile.am | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Makefile.am b/src/Makefile.am index 4002fd3..4a154a1 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -73,6 +73,7 @@ CORESOURCES = xproto.c xcb_types.c COREPROTO = $(CORESOURCES) $(COREHEADERS) xcbinclude_HEADERS = xcb.h xcbext.h xcbxlib.h $(COREHEADERS) $(EXTHEADERS) +noinst_HEADERS = xcbint.h CFLAGS = AM_CFLAGS = $(COPTFLAGS) $(CWARNFLAGS) $(CDEBUGFLAGS) $(XCBPROTO_CFLAGS) $(XPROTO_CFLAGS) $(XAU_CFLAGS) $(XDMCP_CFLAGS) -- 2.34.1 From 8eedb4a487dcede0e52849e36c4da13bdf0c8b51 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 15 Apr 2006 20:22:05 -0700 Subject: [PATCH 14/16] Stop running autoreconf in debian/rules, and remove Build-Depends for autoconf, automake, and libtool. --- debian/changelog | 48 +++++++++++++++++++++++------------------------- debian/control | 3 +-- debian/rules | 4 ---- 3 files changed, 24 insertions(+), 31 deletions(-) diff --git a/debian/changelog b/debian/changelog index 148dd94..a0501f3 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,28 +1,26 @@ -libxcb0 (0.9-1pre2v4) unstable; urgency=low - - pre2v1: - * Split into libxcb0 and libxcb0-dev. - * Change control file for new packages. - * Add install and dirs files for new packages. - * Update Build-Depends for renaming of fd.o-xau, fd.o-xproto, and - fd.o-xcb-proto. - * Remove fd.o prefix from package name. - * Change Maintainer to xcb@lists.freedesktop.org, move myself to - Uploaders, and add Jamey Sharp to Uploaders. Update copyright.debian - accordingly. - * Add Bugs field pointing to xcb@lists.freedesktop.org. - * Update homepage URL in description and copyright.debian to - http://xcb.freedesktop.org, and put it in a Homepage: field in the - description. - - pre2v2: - * Add libxcb0-dbg package. - - pre2v3: - * New upstream snapshot. - - pre2v4: - * New upstream snapshot. +libxcb0 (0.9-3) UNRELEASED; urgency=low + + * Stop running autoreconf in debian/rules, and remove Build-Depends for + autoconf, automake, and libtool. + + -- Josh Triplett Sat, 15 Apr 2006 19:20:07 -0700 + +libxcb0 (0.9-2) unstable; urgency=low + + * Split into libxcb0 and libxcb0-dev. + * Change control file for new packages. + * Add install and dirs files for new packages. + * Update Build-Depends for renaming of fd.o-xau, fd.o-xproto, and + fd.o-xcb-proto. + * Remove fd.o prefix from package name. + * Change Maintainer to xcb@lists.freedesktop.org, move myself to + Uploaders, and add Jamey Sharp to Uploaders. Update copyright.debian + accordingly. + * Add Bugs field pointing to xcb@lists.freedesktop.org. + * Update homepage URL in description and copyright.debian to + http://xcb.freedesktop.org, and put it in a Homepage: field in the + description. + * Add libxcb0-dbg package. -- Josh Triplett Tue, 17 May 2005 12:53:53 -0700 diff --git a/debian/control b/debian/control index 33c61c0..d019630 100644 --- a/debian/control +++ b/debian/control @@ -2,8 +2,7 @@ Source: libxcb0 Priority: optional Maintainer: XCB Developers Uploaders: Jamey Sharp , Josh Triplett -Build-Depends: x-dev, libxau-dev, xcb-proto, cdbs, debhelper (>= 4.1.76), pkg-config, autoconf, automake1.9 | automaken, libtool, xsltproc, check, binutils (>= 2.12.90.0.9) -Build-Conflicts: automake1.4, automake1.5, automake1.6 +Build-Depends: x-dev, libxau-dev, xcb-proto, cdbs, debhelper (>= 4.1.76), pkg-config, xsltproc, check, binutils (>= 2.12.90.0.9) Standards-Version: 3.6.1 Bugs: mailto:xcb@lists.freedesktop.org diff --git a/debian/rules b/debian/rules index e81cbea..8a10683 100755 --- a/debian/rules +++ b/debian/rules @@ -9,10 +9,6 @@ DEB_CONFIGURE_EXTRA_FLAGS = --with-opt DEB_CONFIGURE_INCLUDEDIR = "\$${prefix}/X11R6/include" DEB_DH_STRIP_ARGS=--dbg-package=libxcb0 -debian/stamp-autotools-files: - autoreconf -v --install - touch debian/stamp-autotools-files - debian/copyright: debian/copyright.debian COPYING cat $+ > $@ -- 2.34.1 From 057ae541a3a73cffd58533029292c1c721fa3162 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 15 Apr 2006 20:44:11 -0700 Subject: [PATCH 15/16] Update -dbg package handling to work with debhelper compat level 5. Increase minimum version on debhelper Build-Depends to 5.0.0. --- debian/changelog | 2 ++ debian/control | 2 +- debian/rules | 1 - 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index a0501f3..1b7ee20 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ libxcb0 (0.9-3) UNRELEASED; urgency=low * Stop running autoreconf in debian/rules, and remove Build-Depends for autoconf, automake, and libtool. + * Update -dbg package handling to work with debhelper compat level 5. + Increase minimum version on debhelper Build-Depends to 5.0.0. -- Josh Triplett Sat, 15 Apr 2006 19:20:07 -0700 diff --git a/debian/control b/debian/control index d019630..3a8e50d 100644 --- a/debian/control +++ b/debian/control @@ -2,7 +2,7 @@ Source: libxcb0 Priority: optional Maintainer: XCB Developers Uploaders: Jamey Sharp , Josh Triplett -Build-Depends: x-dev, libxau-dev, xcb-proto, cdbs, debhelper (>= 4.1.76), pkg-config, xsltproc, check, binutils (>= 2.12.90.0.9) +Build-Depends: x-dev, libxau-dev, xcb-proto, cdbs, debhelper (>= 5.0.0), pkg-config, xsltproc, check, binutils (>= 2.12.90.0.9) Standards-Version: 3.6.1 Bugs: mailto:xcb@lists.freedesktop.org diff --git a/debian/rules b/debian/rules index 8a10683..e31478a 100755 --- a/debian/rules +++ b/debian/rules @@ -7,7 +7,6 @@ include /usr/share/cdbs/1/class/autotools.mk DEB_CONFIGURE_EXTRA_FLAGS = --with-opt DEB_CONFIGURE_INCLUDEDIR = "\$${prefix}/X11R6/include" -DEB_DH_STRIP_ARGS=--dbg-package=libxcb0 debian/copyright: debian/copyright.debian COPYING cat $+ > $@ -- 2.34.1 From 11c62f7d9d65c10c796c2199c73c8f167e53f234 Mon Sep 17 00:00:00 2001 From: Josh Triplett Date: Sat, 15 Apr 2006 22:50:33 -0700 Subject: [PATCH 16/16] Stop installing the libtool .la files. --- debian/changelog | 3 ++- debian/libxcb0-dev.install | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 1b7ee20..76fb69d 100644 --- a/debian/changelog +++ b/debian/changelog @@ -4,8 +4,9 @@ libxcb0 (0.9-3) UNRELEASED; urgency=low autoconf, automake, and libtool. * Update -dbg package handling to work with debhelper compat level 5. Increase minimum version on debhelper Build-Depends to 5.0.0. + * Stop installing the libtool .la files. - -- Josh Triplett Sat, 15 Apr 2006 19:20:07 -0700 + -- Josh Triplett Sat, 15 Apr 2006 22:16:33 -0700 libxcb0 (0.9-2) unstable; urgency=low diff --git a/debian/libxcb0-dev.install b/debian/libxcb0-dev.install index 5ab44bc..f680b2b 100644 --- a/debian/libxcb0-dev.install +++ b/debian/libxcb0-dev.install @@ -2,4 +2,3 @@ usr/X11R6/include/X11/* usr/lib/lib*.a usr/lib/lib*.so usr/lib/pkgconfig/* -usr/lib/*.la -- 2.34.1