New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
guile-cairo support #82
Comments
IIRC Cairo comes with a Typelib |
It appears that the I built cairo from source to verify, and it doesn't seem create a typelib or a gir. There are various discussions online about providing a real typelib for cairo, but, they don't seem to have a definitive resolution. |
I see. In the meantime, I had a look at |
No need to code right away. I want to take a look at how others have done Cairo and what guile-cairo thinks its future is. |
It appears guile-cairo was pretty dead until recently. I think pygobject goes a similar route as to what you're proposing in that they use a separate binding library for cairo. Not sure about other libraries. |
That minimal cairo information in that Everything on the guile-gi side of things is passing sub-types to G_TYPE_BOXED, which end up unpacked in I'm seeing a thin, a fat, and a hard way forward.
And of those, I think I like fat, because it would be least troublesome for the user. One complication is that since libcairo-gobject.so uses |
I personally like hard the most, as it will put an end not only to our problem but to that of any other language with a working GI implementation. On the other hand, hard is also somewhat outside of our scope. I so far implemented a mapping from our types to theirs. This should suffice for most uses, since Gtk maintains its own Cairo contexts, which will always be of the cairo typelib variant. Perhaps it could be made stronger through type-checking, but I honestly don't know whether I care enough and whether people will find it a problem to infer the correct type on their own and choose the right function for their purpose. |
On the point of forks diverging, I think guile-cairo -- which had one functionality patch in 2020, and then the previous functionality patch in 2014 -- is not a whirlwind of activity. |
Point taken, perhaps I was overly dramatic on that one. I stil feel as though linking a library-specific solution directly goes somewhat against our goal of generality. Perhaps something à la #32 would be nice to develop an libguile-gi-cairo outside of our tree. |
Talking to guile-cairo folks about using foreign objects instead of SMOBs, which would let us do the conversion using GOOPS functionality |
I did bring up the foreign objects to guile-cairo once or twice, but, without any resolution. |
Add an example of how to use guile-cairo to draw to a
GtkDrawingArea
in itsdraw
callback.Add helper functions for guile-cairo support if needed.
The text was updated successfully, but these errors were encountered: