Closed vikigenius closed 2 years ago
The layout in the data
field of Visualtype
is compatible with the C layout, so you should be able to cast a pointer or reference to Visualtype
to a pointer of cairo_sys::xcb_visualtype_t
.
Please let me know if that works.
Oh thanks a lot, that does seem to work, here is what I ended up with
unsafe {
cairo::XCBVisualType::from_raw_none(
visual_type as *mut xcb::x::Visualtype as *mut cairo_sys::xcb_visualtype_t,
)
}
Cairo
XCBVisualType
needspub unsafe fn from_raw_none(ptr: *mut ffi::xcb_visualtype_t) -> XCBVisualType
Previously this library had the following as the
VisualType
definitionSo I could just get the base and unsafe cast
But now the definition of VisualType is
How do I get a
cairo::XCBVisualType
now ?