[Gtk-sharp-list] Binding Gtk.Databox?

Mike Kestner mkestner at novell.com
Mon Jan 23 11:45:49 EST 2006


On Mon, 2006-01-23 at 15:21 +0200, Yo'av Moshe wrote:

> It's seems like gapi2-parser is very basic though, since it won't help
> much with Gtk.Databox code. It process most *.h files, but won't do
> some of the major one (like gtkdatabox.h ...).

GAPI parser will never be a full-featured C parser, but it does a decent
job for libraries adhering to Gnome coding conventions.  Most GObject
libraries do, so it just works.

> From what I understood, at this point I'm supposed to dig into
> Gtk.Databox's code to find what preventing from gapi2-parser to parse
> the files. If so, I need to learn more-than-a-little-bit of C.

If you want to manage a binding to a C library, yes, you will probably
need to know C.  If you can point to the specific source/header code
that is failing to parse, please file a bug report and I'll try to
extend the parser to handle it.

> Is that so? What would be easier - to bind Gtk.Databox, or to create a
> simple C program that my C# program would call like a external tool,
> just to show the graphs?

If all you need is a few methods in the library, you could probably just
pinvoke them directly instead of doing a full blown binding.  But to do
that and have it work right, you will need to know a lot more of the
internals of how Gtk# binds GObjects.

-- 
Mike Kestner <mkestner at novell.com>



More information about the Gtk-sharp-list mailing list