Compare commits
6 Commits
libxcb-1.1
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
93e6da2e2e | ||
|
6a7661f60a | ||
|
daf2c53976 | ||
|
021e887de9 | ||
|
124690ba63 | ||
|
ebea71700f |
|
@ -0,0 +1,4 @@
|
|||
[wrap-git]
|
||||
url = https://gitea.gigo-games.dk/frederik/libxcb.git
|
||||
revision = HEAD
|
||||
depth = 1
|
|
@ -2660,14 +2660,14 @@ def _man_request(self, name, void, aux):
|
|||
name = 'man/%s.%s' % (linkname, section)
|
||||
if manpaths:
|
||||
sys.stdout.write(name)
|
||||
f = open(name, 'w')
|
||||
f = open(name, 'w', encoding='UTF-8')
|
||||
f.write('.so man%s/%s.%s' % (section, func_name, section))
|
||||
f.close()
|
||||
|
||||
if manpaths:
|
||||
sys.stdout.write('man/%s.%s ' % (func_name, section))
|
||||
# Our CWD is src/, so this will end up in src/man/
|
||||
f = open('man/%s.%s' % (func_name, section), 'w')
|
||||
f = open('man/%s.%s' % (func_name, section), 'w', encoding='UTF-8')
|
||||
f.write('.TH %s %s "%s" "%s" "XCB Requests"\n' % (func_name, section, center_footer, left_footer))
|
||||
# Left-adjust instead of adjusting to both sides
|
||||
f.write('.ad l\n')
|
||||
|
@ -3035,7 +3035,7 @@ def _man_event(self, name):
|
|||
if manpaths:
|
||||
sys.stdout.write('man/%s.%s ' % (self.c_type, section))
|
||||
# Our CWD is src/, so this will end up in src/man/
|
||||
f = open('man/%s.%s' % (self.c_type, section), 'w')
|
||||
f = open('man/%s.%s' % (self.c_type, section), 'w', encoding='UTF-8')
|
||||
f.write('.TH %s %s "%s" "%s" "XCB Events"\n' % (self.c_type, section, center_footer, left_footer))
|
||||
# Left-adjust instead of adjusting to both sides
|
||||
f.write('.ad l\n')
|
||||
|
|
33
src/xcb.h
33
src/xcb.h
|
@ -29,11 +29,7 @@
|
|||
#define __XCB_H__
|
||||
#include <sys/types.h>
|
||||
|
||||
#if defined(__solaris__)
|
||||
#include <inttypes.h>
|
||||
#else
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
|
||||
#ifndef _WIN32
|
||||
#include <sys/uio.h>
|
||||
|
@ -51,12 +47,36 @@ extern "C" {
|
|||
* @file xcb.h
|
||||
*/
|
||||
|
||||
#ifdef __GNUC__
|
||||
#ifndef __has_attribute
|
||||
# define __has_attribute(x) 0 /* Compatibility with older compilers. */
|
||||
#endif
|
||||
|
||||
/*
|
||||
* For the below checks, we currently assume that __GNUC__ indicates
|
||||
* gcc 3.0 (released 2001) or later, as we require support for C99.
|
||||
*/
|
||||
|
||||
/* Supported in gcc 2.5 and later */
|
||||
#if defined(__GNUC__) || __has_attribute(__const__)
|
||||
#define XCB_CONST_FUNCTION __attribute__((__const__))
|
||||
#else
|
||||
#define XCB_CONST_FUNCTION XCB_PURE_FUNCTION
|
||||
#endif
|
||||
|
||||
/* Supported in gcc 2.7 and later */
|
||||
#if defined(__GNUC__) || __has_attribute(__packed__)
|
||||
#define XCB_PACKED __attribute__((__packed__))
|
||||
#else
|
||||
#define XCB_PACKED
|
||||
#endif
|
||||
|
||||
/* Supported in gcc 2.96 and later */
|
||||
#if defined(__GNUC__) || __has_attribute(__pure__)
|
||||
#define XCB_PURE_FUNCTION __attribute__((__pure__))
|
||||
#else
|
||||
#define XCB_PURE_FUNCTION
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @defgroup XCB_Core_API XCB Core API
|
||||
* @brief Core API of the XCB library.
|
||||
|
@ -469,6 +489,7 @@ void xcb_prefetch_extension_data(xcb_connection_t *c, xcb_extension_t *ext);
|
|||
*
|
||||
* The result must not be freed.
|
||||
*/
|
||||
XCB_PURE_FUNCTION
|
||||
const struct xcb_setup_t *xcb_get_setup(xcb_connection_t *c);
|
||||
|
||||
/**
|
||||
|
@ -479,6 +500,7 @@ const struct xcb_setup_t *xcb_get_setup(xcb_connection_t *c);
|
|||
* Accessor for the file descriptor that was passed to the
|
||||
* xcb_connect_to_fd call that returned @p c.
|
||||
*/
|
||||
XCB_PURE_FUNCTION
|
||||
int xcb_get_file_descriptor(xcb_connection_t *c);
|
||||
|
||||
/**
|
||||
|
@ -499,6 +521,7 @@ int xcb_get_file_descriptor(xcb_connection_t *c);
|
|||
* @return XCB_CONN_CLOSED_PARSE_ERR, error during parsing display string.
|
||||
* @return XCB_CONN_CLOSED_INVALID_SCREEN, because the server does not have a screen matching the display.
|
||||
*/
|
||||
XCB_PURE_FUNCTION
|
||||
int xcb_connection_has_error(xcb_connection_t *c);
|
||||
|
||||
/**
|
||||
|
|
|
@ -104,7 +104,9 @@ static int _xcb_parse_display_path_to_socket(const char *name, char **host, char
|
|||
int *displayp, int *screenp)
|
||||
{
|
||||
struct stat sbuf;
|
||||
char path[PATH_MAX];
|
||||
/* In addition to the AF_UNIX path, there may be a screen number.
|
||||
* The trailing \0 is already accounted in the size of sun_path. */
|
||||
char path[sizeof(((struct sockaddr_un*)0)->sun_path) + 1 + 10];
|
||||
size_t len;
|
||||
int _screen = 0, res;
|
||||
|
||||
|
|
|
@ -297,6 +297,7 @@ int xcb_poll_for_reply64(xcb_connection_t *c, uint64_t request, void **reply, xc
|
|||
* @param replylen The size of the reply.
|
||||
* @return Pointer to the location where received file descriptors are stored.
|
||||
*/
|
||||
XCB_CONST_FUNCTION
|
||||
int *xcb_get_reply_fds(xcb_connection_t *c, void *reply, size_t replylen);
|
||||
|
||||
|
||||
|
@ -306,6 +307,7 @@ int *xcb_get_reply_fds(xcb_connection_t *c, void *reply, size_t replylen);
|
|||
* @param mask The mask to check
|
||||
* @return The number of set bits in the mask
|
||||
*/
|
||||
XCB_CONST_FUNCTION
|
||||
int xcb_popcount(uint32_t mask);
|
||||
|
||||
/**
|
||||
|
@ -313,6 +315,7 @@ int xcb_popcount(uint32_t mask);
|
|||
* @param len The length of the array
|
||||
* @return The sum of all entries in the array.
|
||||
*/
|
||||
XCB_PURE_FUNCTION
|
||||
int xcb_sumof(uint8_t *list, int len);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
|
@ -225,6 +225,7 @@ struct xcb_connection_t {
|
|||
|
||||
void _xcb_conn_shutdown(xcb_connection_t *c, int err);
|
||||
|
||||
XCB_CONST_FUNCTION
|
||||
xcb_connection_t *_xcb_conn_ret_error(int err);
|
||||
|
||||
int _xcb_conn_wait(xcb_connection_t *c, pthread_cond_t *cond, struct iovec **vector, int *count);
|
||||
|
|
Loading…
Reference in New Issue