-
Notifications
You must be signed in to change notification settings - Fork 8
Add an XCB compatibility layer #83
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
609f44f
Stage the XCB protocol headers at build time
jserv 0f34721
Add the XCB connection, event and bridge core
jserv 510f876
Implement core XCB window and property requests
jserv 9b558c2
Implement XCB pixmap, GC and drawing requests
jserv 86e183d
Add native XCB showcase programs
jserv eea742a
Consolidate and harden the wasm paint check
jserv File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| #ifndef LIBX11_COMPAT_XCB_PRIVATE_H | ||
| #define LIBX11_COMPAT_XCB_PRIVATE_H | ||
| #include <stdint.h> | ||
| #include <xcb/xcb.h> | ||
| typedef struct _XDisplay Display; | ||
| typedef union _XEvent XEvent; | ||
| Display *xcbCompatDisplay(xcb_connection_t *connection); | ||
| xcb_connection_t *xcbCompatConnectionForDisplay(Display *display); | ||
| void xcbCompatSetQueueOwner(xcb_connection_t *connection, int owner); | ||
| unsigned int xcbCompatEventWaiters(xcb_connection_t *connection); | ||
| void xcbCompatSetConnectionError(xcb_connection_t *connection, int error); | ||
| int xcbCompatRequestReady(xcb_connection_t *connection); | ||
| void xcbCompatReleaseRequestResources(xcb_connection_t *connection); | ||
| uint64_t xcbCompatNextSequence(xcb_connection_t *connection); | ||
| void xcbCompatSetNextSequence(xcb_connection_t *connection, uint64_t sequence); | ||
| void xcbCompatStorePending(xcb_connection_t *connection, | ||
| uint64_t sequence, | ||
| void *reply, | ||
| xcb_generic_error_t *error); | ||
| void xcbCompatStoreProtocolError(xcb_connection_t *connection, | ||
| uint64_t sequence, | ||
| uint8_t code, | ||
| uint32_t resource, | ||
| uint8_t opcode, | ||
| int checked); | ||
| void *xcbCompatTakeReply(xcb_connection_t *connection, | ||
| uint64_t sequence, | ||
| xcb_generic_error_t **error); | ||
| xcb_void_cookie_t xcbCompatVoidCookie(xcb_connection_t *connection, | ||
| uint8_t errorCode, | ||
| uint32_t resource, | ||
| uint8_t opcode, | ||
| int checked); | ||
| #endif |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
P2: The$(UPSTREAM_HEADERS_STAMP) prerequisite in mk/libxcb.mk's object rules expands to empty because that variable is only defined in mk/libxt.mk, mk/libxaw.mk, and mk/upstream-headers.mk, all included after mk/libxcb.mk. The stamp ordering is therefore silently dropped for xcb-compat.o, xcb-requests.o, and xlib-xcb-compat.o, and on a clean parallel build (make -j XCB=1) these objects can compile before the upstream headers are staged, failing with missing X11/Xlib.h (the compat sources include it, and it is not in the local include/X11 tree). Follow the pattern libxt.mk/libxaw.mk use: define UPSTREAM_HEADERS_DIR ?= $ (OUT)/upstream/include and UPSTREAM_HEADERS_STAMP ?= $(UPSTREAM_HEADERS_DIR)/.upstream-stamp at the top of mk/libxcb.mk before the rules that reference the stamp.
Prompt for AI agents