[m-dev.] For (style) review: Beginning a Gtk+ binding.

Jonathan Morgan jonmmorgan at gmail.com
Thu Mar 16 12:03:04 AEDT 2006


On 3/15/06, Peter Wang <wangp at students.cs.mu.oz.au> wrote:
> On 2006-03-15, Jonathan Morgan <jonmmorgan at gmail.com> wrote:
> > I have made a start on a binding for Gtk+ 2.0.  At the moment, it has
> > just enough power to open a window and then destroy it.  As I am
> > fairly new to Mercury, I would like someone to look through the
> > attached files and give me any necessary style guidelines.
>
> How are you planning to continue with this?  Have you considered parsing
> the .defs files that come with PyGTK and generating code from that?  I
> did it once for Scheme and it saved me some tedium, although I still
> needed to hand tune some things and the result wasn't pretty.  On the
> other hand, Mercury may be too different from imperative languages to
> make this an option.
>
> http://www.pygtk.org/

I was considering using the XML files used to auto-generate Gtk#
files, though I will also look at the .def files.  However, I'll need
to do more looking at it just to decide whether it can do enough to
justify its existence, as I have open to me both the direct
copy-paste-modify, and also (hopefully) g_object_set to wrap one C#
call and one C call into pure Mercury predicates (though I don't know
what the performance implications of this are).

Would you have any code for me to look at, or is that too much to ask for?

Jon

--------------------------------------------------------------------------
mercury-developers mailing list
Post messages to:       mercury-developers at cs.mu.oz.au
Administrative Queries: owner-mercury-developers at cs.mu.oz.au
Subscriptions:          mercury-developers-request at cs.mu.oz.au
--------------------------------------------------------------------------



More information about the developers mailing list