Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rib/xgen
C library for parsing XCB protocol specs and generating code from those specs
https://github.com/rib/xgen
Last synced: about 2 months ago
JSON representation
C library for parsing XCB protocol specs and generating code from those specs
- Host: GitHub
- URL: https://github.com/rib/xgen
- Owner: rib
- Created: 2012-01-03T14:17:52.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2012-01-03T14:18:28.000Z (about 13 years ago)
- Last Synced: 2024-10-14T09:36:08.954Z (3 months ago)
- Language: C
- Homepage:
- Size: 266 KB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
- Changelog: ChangeLog
Awesome Lists containing this project
README
GX is an API built on top of the XCB API which isn't so raw, is object orientated and is a tiny bit more liberal about utility code; just not libX11 liberal.
Like XCB, GX is all auto generated based on the XCB XML protocol specs.
Brief comparison with XCB:
Object orientated:
- Connection
- Screen
- Drawable
- Window
- Pixmaps
- GContext
- CookieSignal based event delivery.
Get notification signals from cookies when replies/errors have been received from the server.
Less emphasis on multi threading support, mor on on single threaded mainloop based event dispatching.
GErrors for all X protocol errors.
The recommended way to use GX is to take advantage of the cookie reply notifications so your programs dont need to block waiting for responses, but GX also provides a very convenient synchronous API too. This should be easier to port xlib code too than directly to XCB, and is useful for writting easy to read utilities where performance is a non-issue.
The GX API passes struct types by-ref instead of by-value.
GXMaskValueItem provides some safeguards for setting up value-mask and value-list data which is fairly error prone when using raw XCB.
- Though it might be worth going further and generating well typed structs if possible.TODO
Bindings for Python
Bindings for Ruby
Bindings for Vala
Bindings for C++ (gtkmm style)
Bindings for C++ (QT style)