[GUI] Re: RFC: GUI Library Task Force
Manuel M. T. Chakravarty
chak@cse.unsw.edu.au
Wed, 26 Sep 2001 15:28:53 +1000
[redirected to gui@haskell.org]
Juan Carlos Ar=E9valo Baeza <jcab@roningames.com> wrote,
> On Tue, 25 Sep 2001 17:41:06 +1000, Manuel M. T. Chakravarty wrote:
> =
> >>=A0Many applications where GUIs are used require a canvas/scribble f=
ield
> >>=A0with the following basic functionality:
> >>
> >>=A0=A0- set a point in a particular color; if speed is an issue,
> >>=A0=A0=A0mapping a 2D-array content to the canvas would be useful
> >
> >Sure - such functionality needs to be included. =A0However, a
> >canvas widget is just one among many.
> =
> IMHO, the main interest on having this kind of
> functionality singled out is that this allows any other
> drawing primitive to be implemented in a generic
> way. You wouldn't have fast implementations, but this
> will allow complete implementations of the drawing
> portion of the GUI to be done real quickly, and it
> would also provide a reference implementation for all
> the basic drawing primitives. Any implementation that
> uses hardware acceleration or that defers rendering of
> primitives to the operating system can then be checked
> against that reference implementation. =
Facilities for extension is certainly a good thing to have.
And it doesn't necessarily mean that such extensions need to
be slow. The architecture of GTK+ (at least, the C API) is
a good example of how the real implementation of all widgets
can actually be based on one generic mechanism.
It would be very interesting to see how far this approach
could be transferred to Haskell.
Manuel