hugopl / gi-crystal

Tool to generate Crystal bindings for gobject-based libraries (i.e. GTK)
BSD 3-Clause "New" or "Revised" License
45 stars 3 forks source link

Ignore unknown parameters from GObject::Property annotation. #131

Closed hugopl closed 9 months ago

hugopl commented 9 months ago

This will allow GTK4 shards to implement gtk_widget_class_install_property_action function through an action parameter in the annotation like the code bellow:

@[GObject::Property(action: "obj.action")]
property action : Bool = false

This will create another _class_init that end up calling gtk_widget_class_install_property_action.

hugopl commented 9 months ago

I'm still checking if this patch will be valid by finding a way to hook a _class_init function defined in Gtk::Widget into the _class_init chain.

hugopl commented 9 months ago

Related discussion on Crystal Forum.

hugopl commented 9 months ago

Yes, this patch will be useful :)