From 03c24c51224e85eb96527a512f5f0483464fc810 Mon Sep 17 00:00:00 2001 From: Ophestra Umiker Date: Mon, 16 Sep 2024 20:32:07 +0900 Subject: move acl and xcb binding packages to top level These packages are reasonably clean and do not interact with other packages. Signed-off-by: Ophestra Umiker --- internal/xcb/c.go | 33 --------------------------------- 1 file changed, 33 deletions(-) delete mode 100644 internal/xcb/c.go (limited to 'internal/xcb/c.go') diff --git a/internal/xcb/c.go b/internal/xcb/c.go deleted file mode 100644 index 8fe59d8c..00000000 --- a/internal/xcb/c.go +++ /dev/null @@ -1,33 +0,0 @@ -package xcb - -import ( - "errors" -) - -//#include -//#include -//#cgo linux LDFLAGS: -lxcb -import "C" - -func xcbHandleConnectionError(c *C.xcb_connection_t) error { - if errno := C.xcb_connection_has_error(c); errno != 0 { - switch errno { - case C.XCB_CONN_ERROR: - return errors.New("connection error") - case C.XCB_CONN_CLOSED_EXT_NOTSUPPORTED: - return errors.New("extension not supported") - case C.XCB_CONN_CLOSED_MEM_INSUFFICIENT: - return errors.New("memory not available") - case C.XCB_CONN_CLOSED_REQ_LEN_EXCEED: - return errors.New("request length exceeded") - case C.XCB_CONN_CLOSED_PARSE_ERR: - return errors.New("invalid display string") - case C.XCB_CONN_CLOSED_INVALID_SCREEN: - return errors.New("server has no screen matching display") - default: - return errors.New("generic X11 failure") - } - } else { - return nil - } -} -- cgit v1.3.1