[Gtk-sharp-list] GObject Introspection?

Stephan Sundermann stephansundermann at gmail.com
Sun Apr 17 22:10:54 UTC 2016


There has been effort to bring gobject-introspection to the C#/Mono world.
For now there's tool called bindinator [1]
which converts the gobject-introspection .gir files into a gapi readable
XML. I have been working in 2013 and 2014 on
the bindinator and gapi generator under GSoC and in it's current state it
can pretty much bind everything out of the box.
In bigger libraries there will likely be some corner cases which cannot be
bound automatically and will need to either be
fixed using .metadata patching or manual writing code. There is a proof of
concept gtk-sharp from gobject-introspection
which is kinda outdated (binding gtk 3.8) but newer versions can likely be
generated easily.

The problem is that using gobject-introspection the API will not be
compatible with the current gtk#3 API. This is because
gobject-introspection data is at a lot of places more accurate than parsing
the source files with a perl script. gobject-introspection
has a lot better information like ownership of a variable or information on
arrays. Especially these two cases are error prone
in the current gtk-sharp bindings.

I think it's a lot cleaner to use either the current bindinator tool or
write a complete new generator that directly takes the
gobject-introspection data than to use some vala to C# converter.

Sincerely,
Stephan Sundermann

[1] https://github.com/shana/bindinator/
[2] https://github.com/stsundermann/gtk-sharp-gi/

2016-04-17 23:56 GMT+02:00 Daniel Hughes <trampster at gmail.com>:

> I think the problem is that Xamarin has invested heavily into the GTK
> 2 bindings for use with Xamarin Studio. They have no interest in the
> linux desktop, they do not support it in there commercial products and
> have no plan to. They therefore have no plans to move to GTK 3.
>
> This means Xamarin is not developing GTK3 bindings and so the bindings
> must come from the community. However there seems to be insufficient
> interest from the community in developing the bindings. This may be
> due to the years of hate that has come from the linux community. Would
> you stay around in an openly abusive environment? Xamarin didn't and
> most of the community has been driven out to.
>
> Sincerely,
> Daniel Hughes
>
> On Fri, Apr 15, 2016 at 1:36 AM, Daniel Espinosa <esodan at gmail.com> wrote:
> > How long gapi has taken to create Gtk+ 3.0 bindings? Yes, a few, but is
> it
> > stable? No.
> >
> > How long can be take to use GIR format? Better, How long to use GObject
> > Introspection to have immediate access to latest Gtk+ release?
> >
> > Why don't follows Vala steps? They create bindings from GIR and use
> metadata
> > to "Valaficated" it, close to GAPI but it is auto generated by most
> projects
> > out there, no effort for Vala, just maintain a metadata file each release
> > and is holded by the project's repository.
> >
> > Considering Vala is too similar to C# syntax, may you can write a Vala
> VAPI
> > to C# converter binding, may is easy than parse a huge XML files.
> >
> >
> > _______________________________________________
> > Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> > http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
> >
> _______________________________________________
> Gtk-sharp-list maillist  -  Gtk-sharp-list at lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/gtk-sharp-list
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ximian.com/pipermail/gtk-sharp-list/attachments/20160418/361cb96a/attachment.html>


More information about the Gtk-sharp-list mailing list