-
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 ofuse 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 aTokenStream
is that the first one can be used for aquote!
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 onGtkWidget
, 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
😄 - 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,
Please register or sign in to comment