diff options
author | Jamey Sharp <jamey@minilop.net> | 2005-12-08 07:07:22 +0000 |
---|---|---|
committer | Jamey Sharp <jamey@minilop.net> | 2005-12-08 07:07:22 +0000 |
commit | 1fd57fab5c452296ccd75c9314fa0b201da67f7a (patch) | |
tree | f5630d815ea17dafe601a28692e5c6c70426a855 /xcb | |
parent | 7b8e903c2f9ba41bd52a670864acc574029884dd (diff) |
Use GCC attribute extension, if available, to mark some functions
deprecated; and rename XCBWaitEvent to XCBWaitForEvent, with a
deprecated backwards compatibility function.
Diffstat (limited to 'xcb')
-rw-r--r-- | xcb/ChangeLog | 8 | ||||
-rw-r--r-- | xcb/src/xcb.h | 19 | ||||
-rw-r--r-- | xcb/src/xcb_in.c | 5 |
3 files changed, 26 insertions, 6 deletions
diff --git a/xcb/ChangeLog b/xcb/ChangeLog index bff9d5e..6269a7f 100644 --- a/xcb/ChangeLog +++ b/xcb/ChangeLog @@ -1,5 +1,13 @@ 2005-12-07 Jamey Sharp <jamey@minilop.net> + * src/xcb.h, src/xcb_in.c: + Use GCC attribute extension, if available, to mark some + functions deprecated; and rename XCBWaitEvent to + XCBWaitForEvent, with a deprecated backwards compatibility + function. + +2005-12-07 Jamey Sharp <jamey@minilop.net> + * src/xcb.h, src/xcb_conn.c, src/xcb_util.c: Rename XCBConnect to XCBConnectToFD, and implement XCBConnect and XCBConnectToDisplayWithAuthInfo, as specified by the XcbApi diff --git a/xcb/src/xcb.h b/xcb/src/xcb.h index 84295d9..d17f819 100644 --- a/xcb/src/xcb.h +++ b/xcb/src/xcb.h @@ -36,6 +36,12 @@ extern "C" { #endif +#if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) +#define deprecated __attribute__((__deprecated__)) +#else +#define deprecated +#endif + /* Pre-defined constants */ /* current protocol version */ @@ -101,7 +107,7 @@ typedef struct XCBAuthInfo { char *data; } XCBAuthInfo; -int XCBGetAuthInfo(int fd, XCBAuthInfo *info); +int XCBGetAuthInfo(int fd, XCBAuthInfo *info) deprecated; /* xcb_out.c */ @@ -112,7 +118,8 @@ CARD32 XCBGetMaximumRequestLength(XCBConnection *c); /* xcb_in.c */ -XCBGenericEvent *XCBWaitEvent(XCBConnection *c); +XCBGenericEvent *XCBWaitEvent(XCBConnection *c) deprecated; +XCBGenericEvent *XCBWaitForEvent(XCBConnection *c); XCBGenericEvent *XCBPollForEvent(XCBConnection *c, int *error); unsigned int XCBGetRequestRead(XCBConnection *c); @@ -140,11 +147,11 @@ void XCBDisconnect(XCBConnection *c); /* xcb_util.c */ int XCBParseDisplay(const char *name, char **host, int *display, int *screen); -int XCBOpen(const char *host, int display); -int XCBOpenTCP(const char *host, unsigned short port); -int XCBOpenUnix(const char *file); +int XCBOpen(const char *host, int display) deprecated; +int XCBOpenTCP(const char *host, unsigned short port) deprecated; +int XCBOpenUnix(const char *file) deprecated; -XCBConnection *XCBConnectBasic(void); /* deprecated */ +XCBConnection *XCBConnectBasic(void) deprecated; XCBConnection *XCBConnect(const char *displayname, int *screenp); XCBConnection *XCBConnectToDisplayWithAuthInfo(const char *display, XCBAuthInfo *auth, int *screen); diff --git a/xcb/src/xcb_in.c b/xcb/src/xcb_in.c index 2ca4ef2..c260b7b 100644 --- a/xcb/src/xcb_in.c +++ b/xcb/src/xcb_in.c @@ -126,6 +126,11 @@ done: XCBGenericEvent *XCBWaitEvent(XCBConnection *c) { + return XCBWaitForEvent(c); +} + +XCBGenericEvent *XCBWaitForEvent(XCBConnection *c) +{ XCBGenericEvent *ret; #if XCBTRACEEVENT |