Graphical UI
Tony Rogvall
tony@REDACTED
Mon Oct 22 23:10:21 CEST 2001
Bjorn Gustavsson wrote:
> "Vlad Dumitrescu" <vladdu@REDACTED> writes:
>
>
> I don't how well erlgtk works on Windows (I haven't had time to build myself
> on Windows yet).
I am not sure what is holding the Windows GTK from build a working release, but I guess
they are aiming for Gtk2.0 (which solve a lot of problems, at least for me)
Anyway, it is possible (and works) to build from (unstable 1.3.x) releases of Gtk. Hopefully
some one that is deeply in love with both Windows and Erlang can do such a port and help
me out. I can not help feeling a bit tiered when I think of the amount of work needed to set up a
working development platform on a windows machine once again. ;-)
The latest release of erlgtk 0.9.3 has support for
- Gnome (at least some gnome gui classes)
- Glade (basic gtk + some gnome)
- gdk-pixbuf
- gdk-imlib
- opengl (still need some fixes to support Vlad's multiple display, in progress)
Yesterday I discovered that erlgtk was not working with R8B-0, this was due to a new tag
in the external format, and is fixed in the cvs. I will have a release 0.9.4 soon.
The speed of the opengl stuff is not yet known (probably it may be a bit to slow, if not
heavy use of Display Lists are adopted).
I intend to develop a driver version of the erlgtk but It can wait for a while.
See the examples directory in erlgtk (all:run() will fill your screen with nice looking examples :-)
small note!
The R8 release made it possible to access the arity of funs, this fact is used by erlgtk to allow
for funs with variable number of arguments in gtk:signal_connect. This make the binding more C like,
C allows the function not to receive all arguments.
The old way:
gtk:signal_connect(Window , 'delete_event', fun(_, _) -> gtk:main_quit() end, []).
The new way:
gtk:signal_connect(Window, 'delete_event', fun() -> gtk:main_quit() end)
In other words, you do not need to know the signature of every event and signal there is, if you
are not interested of the actual value of the argument. Normally you will have everything in the
closure anyway so why match values you already have? Thanks OTP.
Have Fun
/Tony
More information about the erlang-questions
mailing list