Re: Started adding GObject signals to gnome-class



On 23 August 2017 05:12:44 EEST, Federico Mena Quintero <federico gnome org> wrote:

gnome-class lets you derive from C GObjects.

I *think* gtk-rs lets you create a wrapped/bound gobject if you just
have a pointer to it, correct?  If so, gnome-class lets you access your
parent instance or parent class, and get a pointer to it... could one
pass that pointer to gtk-rs and get a binding for your parent?

Am I thinking that you want to do

gobject_gen! {
   class MyWidget: GtkWidget {
       ... derive it ...
   }
}

and in your implementation of MyWidget, actually use gtk-rs's binding
for GtkWidget instead of calling gtk functions by hand?

That would be the idea, and gobject_gen! would also generate the Rust bindings for MyWidget at the same time 
via the gtk-rs macros and wrapper functions in the style of the gtk-rs gir tool. So that further subclasses 
can use that again then.


-- 
Sent from my Android device with K-9 Mail. Please excuse my brevity.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]