Skip to content
  • get_type

    I think the volatile is because of https://bugzilla.gnome.org/show_bug.cgi?id=65041#c14 I've asked ebassi in irc.gnome.org #rust to check the generated code from gnome-class to see if it's doing the right thing; since we don't use GOnce, the spinlock is fine as it is, and we don't need volatile semantics.

    Construct properties

    This has to do with these issues: federico/gnome-class#31 and federico/gnome-class#2; let's discuss it there.

    Chain up

    I think one can just do

    impl Gtk.Widget for MyClass {
        virtual fn style_updated(&self) {
            // Chain up
            let widget = self.upcast::<gtk::Widget>();
            widget.style_updated();
    
            // ... do something ourselves
        }
    }

    Sebastian Dröge wants to discuss this, though; I'll update the comments here or file an issue.

    C-names

    Let's discuss here: federico/gnome-class#33

    Rust 2018

    Created federico/gnome-class#35 (closed)

    Code guidelines

    What do you mean about absolute paths? ::glib:blah::Foo instead of use glib; glib::blah::Foo? As you prefer.

    Newtypes implementing ToTokens - this has worked very well in various parts of the code. If it is convenient for some new thing, please use it!

    I think the main difference between ToTokens and returning a TokenStream is that the first one can be used for a quote! invocation. Basically, use whatever is convenient for the code you are writing.

    Non macro crate

    Yes, please do this separation! Can you file an issue with the details, just so that later I can know the purpose of that MR?

    Ergonomics

    Antoni Boucher is working on the problem of automatically figuring out the parent classes.

    Avoid marshalling

    Non-virtual functions

    • Functions that are not virtual (not included in the vtable). I think these still need trampolines, so that they can be called from language bindings. For example, gtk_widget_get_first_child() is a method on GtkWidget, but it is not a virtual method.

    Virtual functions

    I'm not sure... I like the conceptual simplicity of your first option.

    Other stuff

    Feel free to file issues in the main gnome-class repository 😄

0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment