[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: What is your favorite Lua GUI toolkit?
- From: Miles Bader <miles@...>
- Date: Sat, 12 Feb 2011 10:57:50 +0900
Lucas <kkndrox@gmail.com> writes:
> As Iñigo Serna already pointed, lgob maintains the original GTK+ API
> where possible. The main differences are published in is tiny
> documentation [1]. There are more than 70 examples in the bundle,
> covering many parts of the API.
Does it provide the _exact_ GTK+ C API, or does it do "obvious"
cleanups, removing redundancies/warts which are only necessary because
of the C API's implementation in C?
lua-gtk does the latter, basically a "thin" cleanup of the C interface
(which I think is largely done automatically); the result is very
similar to gtkmm (so I actually learned lua-gtk by reading docs and
examples written for gtkmm!).
For instance in "raw" GTK+, you might say:
gtk_range_set_increments (GTK_RANGE (thing), 1, 1)
but in lua-gtk, you do:
thing:set_increments (1, 1)
[The redundant prefix is removed from the method name, and of course the
superclass cast is automatic.]
I really like this "cleaned up" interface; it's still very close to
GTK+'s C interface (so one can use the same docs, applying the obvious
transformations in one's head), but more pleasant to use.
Thanks,
-Miles
--
Cat, n. A soft, indestructible automaton provided by nature to be kicked when
things go wrong in the domestic circle.