Closed flosse closed 4 months ago
The correct way to get the underlying C pointer is widget.to_glib_none().0
, widget.to_glib_full()
or widget.as_ptr()
depending on the context. Please check the implementation of the bindings for lots of examples of this.
@sdroege Thanks a lot for that fast reply! :pray: This is exactly what I was looking for! :+1:
My code base currently uses only
gtk_sys
but I want to migrate togtk
step by step. Now to avoid refactoring all at once, it would be helpful, if I can access the underlying data.Let's say I want to migrate this:
The new code would look like this:
But at some other point I still want to access the
*mut gtk_sys::GtkWidget
pointer, e.g. to useg_signal_connect_data
like here: