rust-x-bindings / rust-xcb

Rust bindings and wrapper for XCB.
MIT License
165 stars 64 forks source link

Cannot pass `details` argument to `select_events()` or `select_events_checked()` #98

Closed dixslyf closed 2 years ago

dixslyf commented 3 years ago

In C, a POD struct is passed as the details argument to select_events() and select_events_checked().

rust-xcb expects details to be a std::option::Option<SelectEventsDetails>, where SelectEventsDetails is the following:

pub type SelectEventsDetails<'a> = base::StructPtr<'a, xcb_xkb_select_events_details_t>

But there does not seem to be a way to construct that, and StructPtr is meant to be a wrapper for a pointer returned by XCB.

bd501cd seems to have left this out, along with a few other types, as mentioned in https://github.com/rtbo/rust-xcb/issues/7#issuecomment-355562488.

rtbo commented 2 years ago

This is fixed in v1.0 (currently beta). See https://rust-x-bindings.github.io/rust-xcb/branches/v1.0-dev/xcb/xkb/enum.SelectEventsDetails.html

rtbo commented 2 years ago

v1.0.0 is released.