summaryrefslogtreecommitdiff
path: root/dist/libxcb/src
diff options
context:
space:
mode:
authorMatthieu Herrb <matthieu@cvs.openbsd.org>2018-09-11 19:34:58 +0000
committerMatthieu Herrb <matthieu@cvs.openbsd.org>2018-09-11 19:34:58 +0000
commit5b6cb0ac05beef2969cd97b1bcbc312986e27d63 (patch)
tree23bf7c589f43111b70ef8445658f28e7a7b1df02 /dist/libxcb/src
parent26e88f304a40144b9cc2579824a419bd96418454 (diff)
Update to libxcb 1.13. ok tb@
Diffstat (limited to 'dist/libxcb/src')
-rw-r--r--dist/libxcb/src/Makefile.am7
-rw-r--r--dist/libxcb/src/c_client.py107
-rw-r--r--dist/libxcb/src/xcb.h76
-rw-r--r--dist/libxcb/src/xcb_in.c6
-rw-r--r--dist/libxcb/src/xcb_util.c2
-rw-r--r--dist/libxcb/src/xcbext.h102
6 files changed, 187 insertions, 113 deletions
diff --git a/dist/libxcb/src/Makefile.am b/dist/libxcb/src/Makefile.am
index e06e70bc9..17b64a80e 100644
--- a/dist/libxcb/src/Makefile.am
+++ b/dist/libxcb/src/Makefile.am
@@ -232,6 +232,13 @@ libxcb_xvmc_la_LIBADD = $(XCB_LIBS)
nodist_libxcb_xvmc_la_SOURCES = xvmc.c xvmc.h
endif
+EXTSOURCES += ge.c
+if BUILD_GE
+lib_LTLIBRARIES += libxcb-ge.la
+libxcb_ge_la_LDFLAGS = -version-info 0:0:0 -no-undefined @lt_enable_auto_import@
+libxcb_ge_la_LIBADD = $(XCB_LIBS)
+nodist_libxcb_ge_la_SOURCES = ge.c ge.h
+endif
EXTHEADERS=$(EXTSOURCES:.c=.h)
xcbinclude_HEADERS = xcb.h xcbext.h
diff --git a/dist/libxcb/src/c_client.py b/dist/libxcb/src/c_client.py
index 57de3fb9d..2213a317d 100644
--- a/dist/libxcb/src/c_client.py
+++ b/dist/libxcb/src/c_client.py
@@ -437,7 +437,11 @@ def _c_type_setup(self, name, postfix):
first_field_after_varsized = None
for field in self.fields:
- field.c_field_type = _t(field.field_type)
+ if field.type.is_event:
+ field.c_field_type = _t(field.field_type + ('event',))
+ else:
+ field.c_field_type = _t(field.field_type)
+
field.c_field_const_type = ('' if field.type.nmemb == 1 else 'const ') + field.c_field_type
field.c_field_name = _cpp(field.field_name)
field.c_subscript = '[%d]' % field.type.nmemb if (field.type.nmemb and field.type.nmemb > 1) else ''
@@ -454,7 +458,7 @@ def _c_type_setup(self, name, postfix):
field.c_field_const_type = 'const ' + field.c_field_type
self.c_need_aux = True
- if not field.type.fixed_size() and not field.type.is_case_or_bitcase:
+ if not field.type.fixed_size() and not field.type.is_case_or_bitcase and field.wire:
self.c_need_sizeof = True
field.c_iterator_type = _t(field.field_type + ('iterator',)) # xcb_fieldtype_iterator_t
@@ -493,7 +497,7 @@ def _c_type_setup(self, name, postfix):
_c_type_setup(field.type, field.field_type, ())
if field.type.is_list:
_c_type_setup(field.type.member, field.field_type, ())
- if (field.type.nmemb is None):
+ if (field.type.nmemb is None and field.wire):
self.c_need_sizeof = True
if self.c_need_serialize:
@@ -1166,6 +1170,8 @@ def _c_serialize_helper_fields(context, self,
_c_pre.push_indent(space + ' ')
for field in self.fields:
+ if not field.wire:
+ continue
if not field.visible:
if not ((field.wire and not field.auto) or 'unserialize' == context):
continue
@@ -1190,7 +1196,9 @@ def _c_serialize_helper_fields(context, self,
# fields with variable size
else:
- if field.type.is_pad:
+ if not field.wire:
+ continue
+ elif field.type.is_pad:
# Variable length pad is <pad align= />
code_lines.append('%s xcb_align_to = %d;' % (space, field.type.align))
count += _c_serialize_helper_insert_padding(context, self, code_lines, space,
@@ -1364,7 +1372,7 @@ def _c_serialize(context, self):
_c(' unsigned int xcb_align_to = 0;')
if self.is_switch:
_c(' unsigned int xcb_padding_offset = %d;',
- self.get_align_offset() )
+ self.get_align_offset() )
prefix = [('_aux', '->', self)]
aux_ptr = 'xcb_out'
@@ -1390,7 +1398,7 @@ def _c_serialize(context, self):
_c(' unsigned int xcb_align_to = 0;')
if self.is_switch:
_c(' unsigned int xcb_padding_offset = %d;',
- self.get_align_offset() )
+ self.get_align_offset() )
elif 'sizeof' == context:
param_names = [p[2] for p in params]
@@ -1661,14 +1669,7 @@ def _c_accessor_get_expr(expr, field_mapping):
return c_name
elif expr.op == 'sumof':
# locate the referenced list object
- field = None
- for f in expr.lenfield_parent.fields:
- if f.field_name == expr.lenfield_name:
- field = f
- break
-
- if field is None:
- raise Exception("list field '%s' referenced by sumof not found" % expr.lenfield_name)
+ field = expr.lenfield
list_name = field_mapping[field.c_field_name][0]
c_length_func = "%s(%s)" % (field.c_length_name, list_name)
c_length_func = _c_accessor_get_expr(field.type.expr, field_mapping)
@@ -1930,14 +1931,14 @@ def _c_accessors_list(self, field):
# from the request size and divide that by the member size
return '(((R->length * 4) - sizeof('+ self.c_type + '))/'+'sizeof('+field.type.member.c_wiretype+'))'
else:
- # use the accessor to get the start of the list, then
- # compute the length of it by subtracting it from
+ # use the accessor to get the start of the list, then
+ # compute the length of it by subtracting it from
# the adress of the first byte after the end of the
# request
- after_end_of_request = '(((char*)R) + R->length * 4)'
- start_of_list = '%s(R)' % (field.c_accessor_name)
+ after_end_of_request = '(((char*)R) + R->length * 4)'
+ start_of_list = '%s(R)' % (field.c_accessor_name)
bytesize_of_list = '%s - (char*)(%s)' % (after_end_of_request, start_of_list)
- return '(%s) / sizeof(%s)' % (bytesize_of_list, field.type.member.c_wiretype)
+ return '(%s) / sizeof(%s)' % (bytesize_of_list, field.type.member.c_wiretype)
else:
raise Exception(
"lengthless lists with varsized members are not supported. Fieldname '%s'"
@@ -2311,7 +2312,7 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False):
count = 2
if not self.c_var_followed_by_fixed_fields:
for field in param_fields:
- if not field.type.fixed_size():
+ if not field.type.fixed_size() and field.wire:
count = count + 2
if field.type.c_need_serialize:
# _serialize() keeps track of padding automatically
@@ -2339,12 +2340,30 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False):
if aux:
_c(' void *xcb_aux%d = 0;' % (idx))
if list_with_var_size_elems:
- _c(' unsigned int i;')
_c(' unsigned int xcb_tmp_len;')
_c(' char *xcb_tmp;')
- num_fds = len([field for field in param_fields if field.isfd])
- if num_fds > 0:
- _c(' int fds[%d];' % (num_fds))
+
+ num_fds_fixed = 0
+ num_fds_expr = []
+ for field in param_fields:
+ if field.isfd:
+ if not field.type.is_list:
+ num_fds_fixed += 1
+ else:
+ num_fds_expr.append(_c_accessor_get_expr(field.type.expr, None))
+
+ if list_with_var_size_elems or len(num_fds_expr) > 0:
+ _c(' unsigned int i;')
+
+ if num_fds_fixed > 0:
+ num_fds_expr.append('%d' % (num_fds_fixed))
+ if len(num_fds_expr) > 0:
+ num_fds = '+'.join(num_fds_expr)
+ _c(' int fds[%s];' % (num_fds))
+ _c(' int fd_index = 0;')
+ else:
+ num_fds = None
+
_c('')
# fixed size fields
@@ -2382,7 +2401,7 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False):
count = 4
for field in param_fields:
- if not field.type.fixed_size():
+ if field.wire and not field.type.fixed_size():
_c(' /* %s %s */', field.type.c_type, field.c_field_name)
# default: simple cast to char *
if not field.type.c_need_serialize and not field.type.c_need_sizeof:
@@ -2450,16 +2469,18 @@ def _c_request_helper(self, name, void, regular, aux=False, reply_fds=False):
# no padding necessary - _serialize() keeps track of padding automatically
_c('')
- fd_index = 0
for field in param_fields:
if field.isfd:
- _c(' fds[%d] = %s;', fd_index, field.c_field_name)
- fd_index = fd_index + 1
+ if not field.type.is_list:
+ _c(' fds[fd_index++] = %s;', field.c_field_name)
+ else:
+ _c(' for (i = 0; i < %s; i++)', _c_accessor_get_expr(field.type.expr, None))
+ _c(' fds[fd_index++] = %s[i];', field.c_field_name)
- if num_fds == 0:
+ if not num_fds:
_c(' xcb_ret.sequence = xcb_send_request(c, %s, xcb_parts + 2, &xcb_req);', func_flags)
else:
- _c(' xcb_ret.sequence = xcb_send_request_with_fds(c, %s, xcb_parts + 2, &xcb_req, %d, fds);', func_flags, num_fds)
+ _c(' xcb_ret.sequence = xcb_send_request_with_fds(c, %s, xcb_parts + 2, &xcb_req, %s, fds);', func_flags, num_fds)
# free dyn. all. data, if any
for f in free_calls:
@@ -3163,6 +3184,28 @@ def c_request(self, name):
# TODO: what about aux helpers?
_man_request(self, name, void=not self.reply, aux=False)
+
+def c_eventstruct(self, name):
+ #add fields that are needed to get the event-type in a generic way
+ self.fields.append( Field( tevent, tevent.name, 'event_header', False, True, True) )
+
+ if self.contains_ge_events:
+ #TODO: add header of ge-events as an extra field
+ raise Exception( 'eventstructs with ge-events are not yet supported' )
+
+ _c_type_setup(self, name, ())
+
+ #correct the format of the field names
+ for field in self.fields:
+ field.c_field_name = _n_item(field.c_field_name).lower()
+
+ _c_complex(self)
+ _c_iterator(self, name)
+
+ if not self.fixed_size():
+ #TODO: Create sizeof function (and maybe other accessors) for var-sized eventstructs
+ raise Exception( 'var sized eventstructs are not yet supported' )
+
def c_event(self, name):
'''
Exported function that handles event declarations.
@@ -3260,6 +3303,7 @@ output = {'open' : c_open,
'struct' : c_struct,
'union' : c_union,
'request' : c_request,
+ 'eventstruct' : c_eventstruct,
'event' : c_event,
'error' : c_error,
}
@@ -3303,6 +3347,9 @@ Refer to the README file in xcb/proto for more info.
''')
raise
+# predefined datatype globals.
+tevent = SimpleType(('xcb_raw_generic_event_t',), 32)
+
# Ensure the man subdirectory exists
try:
os.mkdir('man')
diff --git a/dist/libxcb/src/xcb.h b/dist/libxcb/src/xcb.h
index 86eb1bcee..cbc0f2bf2 100644
--- a/dist/libxcb/src/xcb.h
+++ b/dist/libxcb/src/xcb.h
@@ -143,6 +143,18 @@ typedef struct {
} xcb_generic_event_t;
/**
+ * @brief Raw Generic event.
+ *
+ * A generic event structure as used on the wire, i.e., without the full_sequence field
+ */
+typedef struct {
+ uint8_t response_type; /**< Type of the response */
+ uint8_t pad0; /**< Padding */
+ uint16_t sequence; /**< Sequence number */
+ uint32_t pad[7]; /**< Padding */
+} xcb_raw_generic_event_t;
+
+/**
* @brief GE event
*
* An event as sent by the XGE extension. The length field specifies the
@@ -225,7 +237,7 @@ typedef struct xcb_auth_info_t {
/**
* @brief Forces any buffered output to be written to the server.
- * @param c: The connection to the X 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
@@ -235,7 +247,7 @@ int xcb_flush(xcb_connection_t *c);
/**
* @brief Returns the maximum request length that this server accepts.
- * @param c: The connection to the X server.
+ * @param c The connection to the X server.
* @return The maximum request length field.
*
* In the absence of the BIG-REQUESTS extension, returns the
@@ -252,7 +264,7 @@ uint32_t xcb_get_maximum_request_length(xcb_connection_t *c);
/**
* @brief Prefetch the maximum request length without blocking.
- * @param c: The connection to the X server.
+ * @param c The connection to the X server.
*
* Without blocking, does as much work as possible toward computing
* the maximum request length accepted by the X server.
@@ -274,7 +286,7 @@ void xcb_prefetch_maximum_request_length(xcb_connection_t *c);
/**
* @brief Returns the next event or error from the server.
- * @param c: The connection to the X 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
@@ -285,7 +297,7 @@ xcb_generic_event_t *xcb_wait_for_event(xcb_connection_t *c);
/**
* @brief Returns the next event or error from the server.
- * @param c: The connection to the X 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, if one is
@@ -298,7 +310,7 @@ xcb_generic_event_t *xcb_poll_for_event(xcb_connection_t *c);
/**
* @brief Returns the next event without reading from the connection.
- * @param c: The connection to the X server.
+ * @param c The connection to the X server.
* @return The next already queued event from the server.
*
* This is a version of xcb_poll_for_event that only examines the
@@ -346,8 +358,8 @@ void xcb_unregister_for_special_event(xcb_connection_t *c,
/**
* @brief Return the error for a request, or NULL if none can ever arrive.
- * @param c: The connection to the X server.
- * @param cookie: The request cookie.
+ * @param c The connection to the X server.
+ * @param cookie The request cookie.
* @return The error for the request, or NULL if none can ever arrive.
*
* The xcb_void_cookie_t cookie supplied to this function must have resulted
@@ -364,8 +376,8 @@ xcb_generic_error_t *xcb_request_check(xcb_connection_t *c, xcb_void_cookie_t co
/**
* @brief Discards the reply for a request.
- * @param c: The connection to the X server.
- * @param sequence: The request sequence number from a cookie.
+ * @param c The connection to the X server.
+ * @param sequence The request sequence number from a cookie.
*
* Discards the reply for a request. Additionally, any error generated
* by the request is also discarded (unless it was an _unchecked request
@@ -380,8 +392,8 @@ void xcb_discard_reply(xcb_connection_t *c, unsigned int sequence);
/**
* @brief Discards the reply for a request, given by a 64bit sequence number
- * @param c: The connection to the X server.
- * @param sequence: 64-bit sequence number as returned by xcb_send_request64().
+ * @param c The connection to the X server.
+ * @param sequence 64-bit sequence number as returned by xcb_send_request64().
*
* Discards the reply for a request. Additionally, any error generated
* by the request is also discarded (unless it was an _unchecked request
@@ -403,8 +415,8 @@ void xcb_discard_reply64(xcb_connection_t *c, uint64_t sequence);
/**
* @brief Caches reply information from QueryExtension requests.
- * @param c: The connection.
- * @param ext: The extension data.
+ * @param c The connection.
+ * @param ext The extension data.
* @return A pointer to the xcb_query_extension_reply_t for the extension.
*
* This function is the primary interface to the "extension cache",
@@ -421,8 +433,8 @@ const struct xcb_query_extension_reply_t *xcb_get_extension_data(xcb_connection_
/**
* @brief Prefetch of extension data into the extension cache
- * @param c: The connection.
- * @param ext: The extension data.
+ * @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
@@ -437,7 +449,7 @@ void xcb_prefetch_extension_data(xcb_connection_t *c, xcb_extension_t *ext);
/**
* @brief Access the data returned by the server.
- * @param c: The connection.
+ * @param c The connection.
* @return A pointer to an xcb_setup_t structure.
*
* Accessor for the data returned by the server when the xcb_connection_t
@@ -457,7 +469,7 @@ const struct xcb_setup_t *xcb_get_setup(xcb_connection_t *c);
/**
* @brief Access the file descriptor of the connection.
- * @param c: The connection.
+ * @param c The connection.
* @return The file descriptor.
*
* Accessor for the file descriptor that was passed to the
@@ -467,7 +479,7 @@ int xcb_get_file_descriptor(xcb_connection_t *c);
/**
* @brief Test whether the connection has shut down due to a fatal error.
- * @param c: The connection.
+ * @param c The connection.
* @return > 0 if the connection is in an error state; 0 otherwise.
*
* Some errors that occur in the context of an xcb_connection_t
@@ -487,8 +499,8 @@ int xcb_connection_has_error(xcb_connection_t *c);
/**
* @brief Connects to the X server.
- * @param fd: The file descriptor.
- * @param auth_info: Authentication data.
+ * @param fd The file descriptor.
+ * @param auth_info Authentication data.
* @return A newly allocated xcb_connection_t structure.
*
* Connects to an X server, given the open socket @p fd and the
@@ -506,7 +518,7 @@ xcb_connection_t *xcb_connect_to_fd(int fd, xcb_auth_info_t *auth_info);
/**
* @brief Closes the connection.
- * @param c: The connection.
+ * @param c The connection.
*
* Closes the file descriptor and frees all memory associated with the
* connection @c c. If @p c is @c NULL, nothing is done.
@@ -518,10 +530,10 @@ void xcb_disconnect(xcb_connection_t *c);
/**
* @brief Parses a display string name in the form documented by X(7x).
- * @param name: The name of the display.
- * @param host: A pointer to a malloc'd copy of the hostname.
- * @param display: A pointer to the display number.
- * @param screen: A pointer to the screen number.
+ * @param name The name of the display.
+ * @param host A pointer to a malloc'd copy of the hostname.
+ * @param display A pointer to the display number.
+ * @param screen A pointer to the screen number.
* @return 0 on failure, non 0 otherwise.
*
* Parses the display string name @p display_name in the form
@@ -537,8 +549,8 @@ int xcb_parse_display(const char *name, char **host, int *display, int *screen);
/**
* @brief Connects to the X server.
- * @param displayname: The name of the display.
- * @param screenp: A pointer to a preferred screen number.
+ * @param displayname The name of the display.
+ * @param screenp A pointer to a preferred screen number.
* @return A newly allocated xcb_connection_t structure.
*
* Connects to the X server specified by @p displayname. If @p
@@ -556,9 +568,9 @@ xcb_connection_t *xcb_connect(const char *displayname, int *screenp);
/**
* @brief Connects to the X server, using an authorization information.
- * @param display: The name of the display.
- * @param auth: The authorization information.
- * @param screen: A pointer to a preferred screen number.
+ * @param display The name of the display.
+ * @param auth The authorization information.
+ * @param screen A pointer to a preferred screen number.
* @return A newly allocated xcb_connection_t structure.
*
* Connects to the X server specified by @p displayname, using the
@@ -578,7 +590,7 @@ xcb_connection_t *xcb_connect_to_display_with_auth_info(const char *display, xcb
/**
* @brief Allocates an XID for a new object.
- * @param c: The connection.
+ * @param c The connection.
* @return A newly allocated XID.
*
* Allocates an XID for a new object. Typically used just prior to
diff --git a/dist/libxcb/src/xcb_in.c b/dist/libxcb/src/xcb_in.c
index bab4bc77f..73209e0c4 100644
--- a/dist/libxcb/src/xcb_in.c
+++ b/dist/libxcb/src/xcb_in.c
@@ -661,6 +661,8 @@ int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply,
assert(reply != 0);
pthread_mutex_lock(&c->iolock);
ret = poll_for_reply(c, widen(c, request), reply, error);
+ if(!ret && c->in.reading == 0 && _xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */
+ ret = poll_for_reply(c, widen(c, request), reply, error);
pthread_mutex_unlock(&c->iolock);
return ret;
}
@@ -678,6 +680,8 @@ int xcb_poll_for_reply64(xcb_connection_t *c, uint64_t request, void **reply, xc
assert(reply != 0);
pthread_mutex_lock(&c->iolock);
ret = poll_for_reply(c, request, reply, error);
+ if(!ret && c->in.reading == 0 && _xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */
+ ret = poll_for_reply(c, request, reply, error);
pthread_mutex_unlock(&c->iolock);
return ret;
}
@@ -768,6 +772,8 @@ xcb_generic_event_t *xcb_poll_for_special_event(xcb_connection_t *c,
return 0;
pthread_mutex_lock(&c->iolock);
event = get_special_event(c, se);
+ if(!event && c->in.reading == 0 && _xcb_in_read(c)) /* _xcb_in_read shuts down the connection on error */
+ event = get_special_event(c, se);
pthread_mutex_unlock(&c->iolock);
return event;
}
diff --git a/dist/libxcb/src/xcb_util.c b/dist/libxcb/src/xcb_util.c
index a3357efde..a16270c63 100644
--- a/dist/libxcb/src/xcb_util.c
+++ b/dist/libxcb/src/xcb_util.c
@@ -265,6 +265,8 @@ static int _xcb_open(const char *host, char *protocol, const int display)
struct stat sbuf;
if (0 == stat(host, &sbuf)) {
file = strdup(host);
+ if(file == NULL)
+ return -1;
filelen = actual_filelen = strlen(file);
} else
#endif
diff --git a/dist/libxcb/src/xcbext.h b/dist/libxcb/src/xcbext.h
index 44d789eee..90f9d58b8 100644
--- a/dist/libxcb/src/xcbext.h
+++ b/dist/libxcb/src/xcbext.h
@@ -60,10 +60,10 @@ enum xcb_send_request_flags_t {
/**
* @brief Send a request to the server.
- * @param c: The connection to the X server.
- * @param flags: A combination of flags from the xcb_send_request_flags_t enumeration.
- * @param vector: Data to send; must have two iovecs before start for internal use.
- * @param request: Information about the request to be sent.
+ * @param c The connection to the X server.
+ * @param flags A combination of flags from the xcb_send_request_flags_t enumeration.
+ * @param vector Data to send; must have two iovecs before start for internal use.
+ * @param request Information about the request to be sent.
* @return The request's sequence number on success, 0 otherwise.
*
* This function sends a new request to the X server. The data of the request is
@@ -84,12 +84,12 @@ unsigned int xcb_send_request(xcb_connection_t *c, int flags, struct iovec *vect
/**
* @brief Send a request to the server.
- * @param c: The connection to the X server.
- * @param flags: A combination of flags from the xcb_send_request_flags_t enumeration.
- * @param vector: Data to send; must have two iovecs before start for internal use.
- * @param request: Information about the request to be sent.
- * @param num_fds: Number of additional file descriptors to send to the server
- * @param fds: Additional file descriptors that should be send to the server.
+ * @param c The connection to the X server.
+ * @param flags A combination of flags from the xcb_send_request_flags_t enumeration.
+ * @param vector Data to send; must have two iovecs before start for internal use.
+ * @param request Information about the request to be sent.
+ * @param num_fds Number of additional file descriptors to send to the server
+ * @param fds Additional file descriptors that should be send to the server.
* @return The request's sequence number on success, 0 otherwise.
*
* This function sends a new request to the X server. The data of the request is
@@ -115,10 +115,10 @@ unsigned int xcb_send_request_with_fds(xcb_connection_t *c, int flags, struct io
/**
* @brief Send a request to the server, with 64-bit sequence number returned.
- * @param c: The connection to the X server.
- * @param flags: A combination of flags from the xcb_send_request_flags_t enumeration.
- * @param vector: Data to send; must have two iovecs before start for internal use.
- * @param request: Information about the request to be sent.
+ * @param c The connection to the X server.
+ * @param flags A combination of flags from the xcb_send_request_flags_t enumeration.
+ * @param vector Data to send; must have two iovecs before start for internal use.
+ * @param request Information about the request to be sent.
* @return The request's sequence number on success, 0 otherwise.
*
* This function sends a new request to the X server. The data of the request is
@@ -139,12 +139,12 @@ uint64_t xcb_send_request64(xcb_connection_t *c, int flags, struct iovec *vector
/**
* @brief Send a request to the server, with 64-bit sequence number returned.
- * @param c: The connection to the X server.
- * @param flags: A combination of flags from the xcb_send_request_flags_t enumeration.
- * @param vector: Data to send; must have two iovecs before start for internal use.
- * @param request: Information about the request to be sent.
- * @param num_fds: Number of additional file descriptors to send to the server
- * @param fds: Additional file descriptors that should be send to the server.
+ * @param c The connection to the X server.
+ * @param flags A combination of flags from the xcb_send_request_flags_t enumeration.
+ * @param vector Data to send; must have two iovecs before start for internal use.
+ * @param request Information about the request to be sent.
+ * @param num_fds Number of additional file descriptors to send to the server
+ * @param fds Additional file descriptors that should be send to the server.
* @return The request's sequence number on success, 0 otherwise.
*
* This function sends a new request to the X server. The data of the request is
@@ -171,8 +171,8 @@ uint64_t xcb_send_request_with_fds64(xcb_connection_t *c, int flags, struct iove
/**
* @brief Send a file descriptor to the server in the next call to xcb_send_request.
- * @param c: The connection to the X server.
- * @param fd: The file descriptor to send.
+ * @param c The connection to the X server.
+ * @param fd The file descriptor to send.
*
* After this function returns, the file descriptor given is owned by xcb and
* will be closed eventually.
@@ -185,12 +185,12 @@ void xcb_send_fd(xcb_connection_t *c, int fd);
/**
* @brief Take over the write side of the socket
- * @param c: The connection to the X server.
- * @param return_socket: Callback function that will be called when xcb wants
+ * @param c The connection to the X server.
+ * @param return_socket Callback function that will be called when xcb wants
* to use the socket again.
- * @param closure: Argument to the callback function.
- * @param flags: A combination of flags from the xcb_send_request_flags_t enumeration.
- * @param sent: Location to the sequence number of the last sequence request.
+ * @param closure Argument to the callback function.
+ * @param flags A combination of flags from the xcb_send_request_flags_t enumeration.
+ * @param sent Location to the sequence number of the last sequence request.
* Must not be NULL.
* @return 1 on success, else 0.
*
@@ -214,10 +214,10 @@ int xcb_take_socket(xcb_connection_t *c, void (*return_socket)(void *closure), v
/**
* @brief Send raw data to the X server.
- * @param c: The connection to the X server.
- * @param vector: Array of data to be sent.
- * @param count: Number of entries in @p vector.
- * @param requests: Number of requests that are being sent.
+ * @param c The connection to the X server.
+ * @param vector Array of data to be sent.
+ * @param count Number of entries in @p vector.
+ * @param requests Number of requests that are being sent.
* @return 1 on success, else 0.
*
* You must own the write-side of the socket (you've called
@@ -238,9 +238,9 @@ int xcb_writev(xcb_connection_t *c, struct iovec *vector, int count, uint64_t re
/**
* @brief Wait for the reply of a given request.
- * @param c: The connection to the X server.
- * @param request: Sequence number of the request as returned by xcb_send_request().
- * @param e: Location to store errors in, or NULL. Ignored for unchecked requests.
+ * @param c The connection to the X server.
+ * @param request Sequence number of the request as returned by xcb_send_request().
+ * @param e Location to store errors in, or NULL. Ignored for unchecked requests.
*
* Returns the reply to the given request or returns null in the event of
* errors. Blocks until the reply or error for the request arrives, or an I/O
@@ -250,9 +250,9 @@ void *xcb_wait_for_reply(xcb_connection_t *c, unsigned int request, xcb_generic_
/**
* @brief Wait for the reply of a given request, with 64-bit sequence number
- * @param c: The connection to the X server.
- * @param request: 64-bit sequence number of the request as returned by xcb_send_request64().
- * @param e: Location to store errors in, or NULL. Ignored for unchecked requests.
+ * @param c The connection to the X server.
+ * @param request 64-bit sequence number of the request as returned by xcb_send_request64().
+ * @param e Location to store errors in, or NULL. Ignored for unchecked requests.
*
* Returns the reply to the given request or returns null in the event of
* errors. Blocks until the reply or error for the request arrives, or an I/O
@@ -265,10 +265,10 @@ void *xcb_wait_for_reply64(xcb_connection_t *c, uint64_t request, xcb_generic_er
/**
* @brief Poll for the reply of a given request.
- * @param c: The connection to the X server.
- * @param request: Sequence number of the request as returned by xcb_send_request().
- * @param reply: Location to store the reply in, must not be NULL.
- * @param e: Location to store errors in, or NULL. Ignored for unchecked requests.
+ * @param c The connection to the X server.
+ * @param request Sequence number of the request as returned by xcb_send_request().
+ * @param reply Location to store the reply in, must not be NULL.
+ * @param error Location to store errors in, or NULL. Ignored for unchecked requests.
* @return 1 when the reply to the request was returned, else 0.
*
* Checks if the reply to the given request already received. Does not block.
@@ -277,10 +277,10 @@ int xcb_poll_for_reply(xcb_connection_t *c, unsigned int request, void **reply,
/**
* @brief Poll for the reply of a given request, with 64-bit sequence number.
- * @param c: The connection to the X server.
- * @param request: 64-bit sequence number of the request as returned by xcb_send_request().
- * @param reply: Location to store the reply in, must not be NULL.
- * @param e: Location to store errors in, or NULL. Ignored for unchecked requests.
+ * @param c The connection to the X server.
+ * @param request 64-bit sequence number of the request as returned by xcb_send_request().
+ * @param reply Location to store the reply in, must not be NULL.
+ * @param error Location to store errors in, or NULL. Ignored for unchecked requests.
* @return 1 when the reply to the request was returned, else 0.
*
* Checks if the reply to the given request already received. Does not block.
@@ -292,9 +292,9 @@ int xcb_poll_for_reply64(xcb_connection_t *c, uint64_t request, void **reply, xc
/**
* @brief Don't use this, only needed by the generated code.
- * @param c: The connection to the X server.
- * @param reply: A reply that was received from the server
- * @param replylen: The size of the reply.
+ * @param c The connection to the X server.
+ * @param reply A reply that was received from the server
+ * @param replylen The size of the reply.
* @return Pointer to the location where received file descriptors are stored.
*/
int *xcb_get_reply_fds(xcb_connection_t *c, void *reply, size_t replylen);
@@ -303,14 +303,14 @@ int *xcb_get_reply_fds(xcb_connection_t *c, void *reply, size_t replylen);
/* xcb_util.c */
/**
- * @param mask: The mask to check
+ * @param mask The mask to check
* @return The number of set bits in the mask
*/
int xcb_popcount(uint32_t mask);
/**
- * @param list: The base of an array
- * @param len: The length of the array
+ * @param list The base of an array
+ * @param len The length of the array
* @return The sum of all entries in the array.
*/
int xcb_sumof(uint8_t *list, int len);