jpakkane / capypdf

A fully color managed PDF generation library
Apache License 2.0
95 stars 5 forks source link

Add GObject Introspection support for the C API #20

Open swilmet opened 1 year ago

swilmet commented 1 year ago

Add GObject Introspection support for the C API.

That way CapyPDF would be available for more languages.

jpakkane commented 1 year ago

Eventually yes. I have not done it yet since I don't have much experience in writing GIR and because the API is still unstable and will probably change. The more APIs we support, the more work that is.

If someone wants to submit this functionality, then patches welcome I guess.

swilmet commented 11 months ago

Ok, good to know.

Note that GI doesn't support all the possibilities of the C language.

I haven't looked at the CapyPDF API, but it's always possible to add an additional layer of indirection, of course: like libgit2 and libgit2-glib (the latter is a separate project).

Another example is the Graphene project. And of course all GObject-based libraries of GNOME etc ;-)

GI doesn't require to use GObject, but structs ("semi-OOP") may require some additional functions for being GI bindings-friendly.

(I don't plan to work on this, I'm already quite busy with other projects).