Closed oakes closed 9 years ago
Perfect ! It's been a long time we wanted to do that ! Thanks a lot !
I just made impl_GObjectFunctions
as a workaround. I didn't think further than that but it could actually be a good idea.
Anyway, thanks for this PR !
Aren't you beating a dead horse? Even #197 would do away with FFIGObject
and FFIWidget
and I'm working on a further improved design as we speak.
@gkoz I haven't looked at your RFC yet but the rename only took a few minutes so it wasn't much work on my part.
@gkoz: I see this as an intermediate step. It would actually simplify your own RFC's implementation (from my point of view). But yes, it's only useful on short term.
This is a quick bulk rename I did to improve consistency. It renames some
get_*
functions tounwrap_*
when they have an equivalentwrap_*
, to show that they do the opposite. Specifically, it does the following:get_pointer
tounwrap_pointer
in many places (note thatsrc/gtk/widgets/value.rs
already does this, sinceget_pointer
conflicted with its own function of the same name).FFIGObject::get_gobject
toFFIGObject::unwrap_gobject
.FFIWidget::get_widget
toFFIWidget::unwrap_widget
andFFIWidget::wrap
toFFIWidget::wrap_widget
.What do you think? It's mainly just scratching an itch, but I thought it cleaned things up. Another thing we can do in the future is replace all the explicit unwrap_pointer/wrap_pointer definitions with the
impl_GObjectFunctions
macro.