Closed Maxzor closed 2 years ago
You could put examples on CI?
Hi and thank you for testing the beta!
The example does compile on the v1.0-dev
branch and they are checked in CI through cargo test --all-features
.
It doesn't compile for you because I have fixed some problems in the API since the release of the beta.0
.
You may either test directly the branch tip, or use the examples as they were released at the beta-0
stage.
See here.
In this case you have to change to
x::Cw::EventMask((x::EventMask::EXPOSURE | x::EventMask::KEY_PRESS).bits())
(Cw::EventMask
used to take u32
but has been fixed to accept a x::EventMask
)
I will release beta.1
. It will be easier!
Thank you for the quick feedback!
@Maxzor as for your initial question, in v1
the Connection
class is still a binding struct to the xcb_connection_t
C struct and associated functions, but the protocol requests and events are now proper implementation in Rust.
This means, I don't bind anymore to functions such as xcb_create_window
, I have instead a request struct x::CreateWindow
that serializes itself to raw bytes as expected by XCB. This very similar as what xcb_create_window
does.
See here if you are curious about how it works.
For events, the methods are accessors over the raw data received from the server.
Hello and thank you for the library. If I understood correctly v1 beta is not a wraper anymore but a proper implementation?
This example does not compile. Rust 1.56.1 here.
I am only at rust book chapter 8 so I won't be able to help solving this type mismatch today :)