summaryrefslogtreecommitdiff
path: root/src/xcbext.h
diff options
context:
space:
mode:
authorJosh Triplett <josh@freedesktop.org>2006-09-23 12:22:22 -0700
committerJosh Triplett <josh@freedesktop.org>2006-09-23 12:22:22 -0700
commita3bd6f4760b5b3f5f360a690920839646e2b9d06 (patch)
tree4a7ad7c07bc77f16de5c344aac65b2b1ecce8e35 /src/xcbext.h
parentca72e777740f917753f3c180fdfdb55df91c09c4 (diff)
The Great XCB Renaming
Rename API to follow a new naming convention: * XCB_CONSTANTS_UPPERCASE_WITH_UNDERSCORES * xcb_functions_lowercase_with_underscores * xcb_types_lowercase_with_underscores_and_suffix_t * expand all abbreviations like "req", "rep", and "iter" Word boundaries for the names in the protocol descriptions fall: * Wherever the protocol descriptions already have an underscore * Between a lowercase letter and a subsequent uppercase letter * Before the last uppercase letter in a string of uppercase letters followed by a lowercase letter (such as in LSBFirst between LSB and First) * Before and after a string of digits (with exceptions for sized types like xcb_char2b_t and xcb_glx_float32_t to match the stdint.h convention) Also fix up some particular naming issues: * Rename shape_op and shape_kind to drop the "shape_" prefix, since otherwise these types end up as xcb_shape_shape_{op,kind}_t. * Remove leading underscores from enums in the GLX protocol description, previously needed to ensure a word separator, but now redundant. This renaming breaks code written for the previous API naming convention. The scripts in XCB's tools directory will convert code written for the old API to use the new API; they work well enough that we used them to convert the non-program-generated code in XCB, and when run on the old program-generated code, they almost exactly reproduce the new program-generated code (modulo whitespace and bugs in the old code generator). Authors: Vincent Torri, Thomas Hunger, Josh Triplett
Diffstat (limited to 'src/xcbext.h')
-rw-r--r--src/xcbext.h22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/xcbext.h b/src/xcbext.h
index 508ebf0..4824660 100644
--- a/src/xcbext.h
+++ b/src/xcbext.h
@@ -36,7 +36,7 @@ extern "C" {
/* xcb_ext.c */
-struct XCBExtension {
+struct xcb_extension_t {
const char *name;
int global_id;
};
@@ -46,34 +46,34 @@ struct XCBExtension {
typedef struct {
size_t count;
- XCBExtension *ext;
- CARD8 opcode;
- BOOL isvoid;
-} XCBProtocolRequest;
+ xcb_extension_t *ext;
+ uint8_t opcode;
+ uint8_t isvoid;
+} xcb_protocol_request_t;
-enum XCBSendRequestFlags {
+enum xcb_send_request_flags_t {
XCB_REQUEST_CHECKED = 1 << 0,
XCB_REQUEST_RAW = 1 << 1,
XCB_REQUEST_DISCARD_REPLY = 1 << 2
};
-unsigned int XCBSendRequest(XCBConnection *c, int flags, struct iovec *vector, const XCBProtocolRequest *request);
+unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vector, const xcb_protocol_request_t *request);
/* xcb_in.c */
-void *XCBWaitForReply(XCBConnection *c, unsigned int request, XCBGenericError **e);
-int XCBPollForReply(XCBConnection *c, unsigned int request, void **reply, XCBGenericError **error);
+void *xcb_wait_for_reply(xcb_connection_t *c, unsigned int request, xcb_generic_error_t **e);
+int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply, xcb_generic_error_t **error);
/* xcb_xid.c */
-CARD32 XCBGenerateID(XCBConnection *c);
+uint32_t xcb_generate_id(xcb_connection_t *c);
/* xcb_util.c */
-int XCBPopcount(CARD32 mask);
+int xcb_popcount(uint32_t mask);
#ifdef __cplusplus
}