jhass / crystal-gobject

gobject-introspection for Crystal
BSD 3-Clause "New" or "Revised" License
127 stars 13 forks source link

Viachpaliy #24

Closed viachpaliy closed 4 years ago

viachpaliy commented 5 years ago

In commits on Nov 17 I change GObject::Type::STRING to GObject::Type::UTF8. GObject::Type::UTF8 is used in various methods of lot Gtk classes that return string property values (for example - Gtk::TextBuffer.text ). In enum GObject::Type (src/g_object/type.cr) Type::UTF8 was not defined. Instead, there was GObject::Type::STRING.It was used only in one file - src/g_object/value.cr

jhass commented 4 years ago

Hey, sorry this took me so long to look at, but to be honest it also mixes a couple of things so it's a bit harder to look at.

Thanks for noting the GObject::Type inconsistency, I fixed it in 2f00937e4029dee02501493578e17d05cf3b4444.

For the CSS example, I think the other one you contributed is good enough :)

So about Cairo. The typelib/GIR data for that one is... pretty darn incomplete. To the point that I don't think actually generating anything than what's required as dependency by other libs makes any sense here. Then Cairo's API surface seems small enough to write a binding by hand for which you have essentially done here. So in my opinion it should just go into its own independent shard, the work done here seems like a good starting point for that after some cleaning up :)

PS: src/generated is, well, generated. So never edit it manually, instead fix things in the generator. Manual changes will just be gone with the next run of the generator. In fact the latest version here drops most of that stuff and only keeps what's necessary to run the generator at the compile time of consumers of this shard.