X-Git-Url: http://git.demorecorder.com/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fxcb.h;h=3d193e1823ccd929810b61c0da9ae4b9a6ba7a90;hb=79e3227022ae3d66f9f3806d231fdeec2a06cc6b;hp=114f2cf089e2e2af910fe04ebeeba20a3eaf3fae;hpb=0d7fb3afdd308d714a97144125a69a5f4976916a;p=free-sw%2Fxcb%2Flibxcb diff --git a/src/xcb.h b/src/xcb.h index 114f2cf..3d193e1 100644 --- a/src/xcb.h +++ b/src/xcb.h @@ -333,6 +333,21 @@ const XCBSetup *XCBGetSetup(XCBConnection *c); */ int XCBGetFileDescriptor(XCBConnection *c); +/** + * @brief Test whether the connection has shut down due to a fatal error. + * @param c: The connection. + * @return 1 if the connection is in an error state; 0 otherwise. + * + * Some errors that occur in the context of an XCBConnection + * are unrecoverable. When such an error occurs, the + * connection is shut down and further operations on the + * XCBConnection have no effect. + * + * @todo Other functions should document the conditions in + * which they shut down the connection. + */ +int XCBConnectionHasError(XCBConnection *c); + /** * @brief Connects to the X server. * @param fd: The file descriptor.