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

Jonathan Morgan jonmmorgan at gmail.com
Thu Mar 16 11:58:07 AEDT 2006


On 3/15/06, Julien Fischer <juliensf at cs.mu.oz.au> wrote:
>
> On Wed, 15 Mar 2006, Jonathan Morgan 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.
>
> Here's a (slightly edited) version of the file mgtk.m that you posted,
> that either conforms to the coding standards used by the Mercury project or
> reflects my biases on those matters where the coding standard is silent.

I was intending to add section headers and so on, but I was initially
interested in just getting it working.

Another question I have is how sections should be organised, whether
they should be organised as a C version and then a C# version, or as a
C declaration followed directly by a C# declaration?  The second tends
to make things very fragmented, whereas the first makes it very
difficult to compare equivalent versions in different backends.

I'd also like to have some opinions on how modular the library should
be.  I can see two options: either something like mgtk.newWindow or
mgtk.window.new, with the second being more modular, but maybe more
problematic (it would mean things like having to either explicitly
call widget.show on a window, as window inherits this from widget, or
making window.show call widget.show - though this is a problem for
both methods).

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