GObject introspection and cairo?

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

GObject introspection and cairo?

Stefan Salewski-2
I am currently working again on the gobject introspection based
bindings for Nim language (https://github.com/StefanSalewski/nim-gi).

And I wonder why there is only minimal support for cairo --
/usr/share/gir-1.0/cairo-1.0.gir is minimal.

Of course cairo is not gobject based, but is that the real problem? I
think glib is not gobject based too?

Of course cairo interface is not large, so I can used the c2nim
generated cairo bindings from https://github.com/ngtk3/nim-cairo and
adapt it manually.

But it would be nicer with direct introspection support -- not only for
Nim, but also for other gi based bindings like Ruby, Python, Rust,
Crystal and such I assume?

And a not directly related remark: nim-chess3 is now available -- but
it uses still the c2nim generated GTK 3.20 bindings. Maybe next winter
I will replace that basic GUI with a real one.
https://github.com/StefanSalewski/nim-chess3
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GObject introspection and cairo?

Emmanuele Bassi
On 9 May 2017 at 15:39, Stefan Salewski <[hidden email]> wrote:
> I am currently working again on the gobject introspection based
> bindings for Nim language (https://github.com/StefanSalewski/nim-gi).
>
> And I wonder why there is only minimal support for cairo --
> /usr/share/gir-1.0/cairo-1.0.gir is minimal.
>
> Of course cairo is not gobject based, but is that the real problem? I
> think glib is not gobject based too?

Cairo has an internal type system — image surfaces "inherit" from
generic surfaces, etc. — whereas GLib data structures do not have
inheritance.

Additionally, things like error domains mapped to exceptions are not
going to work without GError.

Ciao,
 Emmanuele.

--
https://www.bassi.io
[@] ebassi [@gmail.com]
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GObject introspection and cairo?

Nicola Fontana-3
In reply to this post by Stefan Salewski-2
Il Tue, 09 May 2017 16:39:10 +0200 Stefan Salewski <[hidden email]> scrisse:

> I am currently working again on the gobject introspection based
> bindings for Nim language (https://github.com/StefanSalewski/nim-gi).
>
> And I wonder why there is only minimal support for cairo --
> /usr/share/gir-1.0/cairo-1.0.gir is minimal.

Hi Stefan,

not so long ago Emmanuele accepted a few patches that improves
this situation:

https://bugzilla.gnome.org/show_bug.cgi?id=743364

No idea how long does it take to have that upstream.

Ciao.
--
Nicola
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GObject introspection and cairo?

Stefan Salewski-2
On Tue, 2017-05-09 at 17:05 +0200, Nicola Fontana wrote:

> Il Tue, 09 May 2017 16:39:10 +0200 Stefan Salewski <[hidden email]
> > scrisse:
>
> > I am currently working again on the gobject introspection based
> > bindings for Nim language (https://github.com/StefanSalewski/nim-gi
> > ).
> >
> > And I wonder why there is only minimal support for cairo --
> > /usr/share/gir-1.0/cairo-1.0.gir is minimal.
>
> Hi Stefan,
>
> not so long ago Emmanuele accepted a few patches that improves
> this situation:
>
> https://bugzilla.gnome.org/show_bug.cgi?id=743364
>
> No idea how long does it take to have that upstream.
>
> Ciao.

Is it already known when these patches will be available for ordinary
users?

The gobject-introspection based files for my current Nim bindings seems
to work already not too bad (https://github.com/StefanSalewski/gintro)
so I should try to provide cairo bindings soon as well.

Creating all manually is of course some additional work, so I would
hope that your patches can save me some labor.
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GObject introspection and cairo?

Nicola Fontana-3
Il Sat, 15 Jul 2017 13:47:22 +0200 Stefan Salewski <[hidden email]> scrisse:

> On Tue, 2017-05-09 at 17:05 +0200, Nicola Fontana wrote:
> > ...
> >
> > https://bugzilla.gnome.org/show_bug.cgi?id=743364
> >
> > No idea how long does it take to have that upstream.
> >
> > Ciao.  
>
> Is it already known when these patches will be available for ordinary
> users?
> ...

They have been included in gobject-introspection 1.53.2, released
on may:

https://git.gnome.org/browse/gobject-introspection/log/

Ciao.
--
Nicola
_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list
Reply | Threaded
Open this post in threaded view
|

Re: GObject introspection and cairo?

Stefan Salewski-2
On Sat, 2017-07-15 at 18:21 +0200, Nicola Fontana wrote:
> They have been included in gobject-introspection 1.53.2, released
> on may:
>
> https://git.gnome.org/browse/gobject-introspection/log/

Fine.

My Gentoo box has still

dev-libs/glib-2.50.3-r1:2::gentoo

I will try to grab the lastest and prepare cairo bindings from that.
While all the other true Nim gobject-introspection bindings are
generated on the local box of the users during install, I have to ship
a prebuilt bindings file for cairo, so it is no problem when most users
do not yet have latest gobject-introspection.

Thanks, Stefan Salewski

_______________________________________________
gtk-list mailing list
[hidden email]
https://mail.gnome.org/mailman/listinfo/gtk-list