1. llama

------=_NextPart_000_0011_01C00781.B446FA60
        charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

David, why did you drop the Llama project?
I think having more files is good thing.

In Euphoria you have to carefully figure out what will be in what file, =
because all functions and constants you use must be before you... Really =
becomes complicated.  Something should be done abut it.
Here is the structure of files I think  would work:

-WinConst.ew file, where all Windows constants would be. It would =
include no files, would use no functions and produce no functions, like: =
global constant WM_USER=3Dx020943089

-WinStruc.ew file: here would be C structures defined, like: global =
constant RECT_left=3Dallot(..), ... file would use functions =
allot(),alloted_size() ...

-Gdi32.ew, Kernel32.ew and User32.ew, ... files would just link dll =
functions, like: global constant xCreateWindow=3DlinkFunc(..) .... , =
nothing else, no wrapped functions. That way you avoid linking same =
function more times and loading same libraries more times.

Then would come other files which would include the above files and =
would wrap dll functions which you would actually use in your code.
Then you would have files like =
ComboBox.ew,Toolbar.ew,Menu.ew,Graphics.ew,...
Do you think that could work? What was the problem with Llama?

------=_NextPart_000_0011_01C00781.B446FA60
        charset="iso-8859-2"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content=3D"text/html; charset=3Diso-8859-2" =
http-equiv=3DContent-Type>
<META content=3D"MSHTML 5.00.2614.3401" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DVerdana size=3D2>David, why did you drop the Llama=20
project?</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>I think having more files is good=20
thing.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DVerdana size=3D2>In Euphoria you have to carefully =
figure out what=20
will be in what file, because all functions and constants you use must =
be before=20
you... Really becomes complicated.&nbsp; Something should be done abut=20
it.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>Here is the structure of files&nbsp;I =
think&nbsp;=20
would work:</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DVerdana size=3D2>-WinConst.ew file, where all Windows =
constants=20
would be. It would include no files, would use no functions =
and&nbsp;produce no=20
functions, like: global constant WM_USER=3Dx020943089</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DVerdana size=3D2>-WinStruc.ew file: here would be C =
structures=20
defined, like: global constant RECT_left=3Dallot(..), ... file would use =
functions=20
allot(),alloted_size() ...</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DVerdana size=3D2>-Gdi32.ew, Kernel32.ew and User32.ew, =
... files=20
would just link&nbsp;dll functions, like: global constant=20
xCreateWindow=3DlinkFunc(..) .... , nothing else, no wrapped functions. =
That way=20
you avoid linking same function more times and loading same libraries =
more=20
times.</FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=3DVerdana size=3D2>Then would come =
other&nbsp;files&nbsp;which would=20
include the above files and would wrap&nbsp;dll functions which you =
would=20
actually use in your code.</FONT></DIV>
<DIV><FONT face=3DVerdana size=3D2>Then you would have files like=20
<DIV><FONT face=3DVerdana size=3D2>Do you think that&nbsp;could work? =
What was the=20

------=_NextPart_000_0011_01C00781.B446FA60--

new topic     » topic index » view message » categorize

2. Re: llama

=A9koda wrote:

> David, why did you drop the Llama project?
> I think having more files is good thing.

The goal of Llama was to have a cross-platform toolkit. I ran into troubl=
e
trying to make GTK+ work, and finally gave up. I had written a program th=
at
parsed the GTK include files, and built Euphoria wrappers. But the data
structures that it was building were not entirely correct, and I ran into
trouble with some of the functions. Looking back, I should have done what
SWIG does - generate C code to build the wrappers.

Another problem I ran into was reconciling how Windows and GTK+ behaved,
especially toward drawables. My options were to either break Win32Lib cod=
e,
or write code at the X Window level to trap events to GTK+ drawables. I
threw up my hands at this point.

OOP was also a bit problematic - things can get *really* hairy. The
underlying event systems of Windows and GTK+ are different. With Windows,
you need to trap events in an event loop; for GTK+, you set callbacks
directly at a control's events, and skip the event loop altogether.

Finally, the prospect of maintaining the GTK+ wrappers was a bit
overwhelming. GTK+ has a *lot* of files, and even with the automated tool=
s I
had written, the generated code still needed a lot of hand-tweaking. Ever=
y
time GTK+ came out with a new release, I would have to rebuild the wrappe=
rs.
It was just too much work for me to take on.

Since the main point of the project was to create a cross-platform toolki=
t,
and getting the GTK+ side of it working was turning into a real struggle,=
 I
decided to drop the project. Since the library would then only run on
Windows, the cost and complexity of using OOP didn't seem worth the effor=
t,
so I dropped it.

Feel free to take up the library if you like. Personally, I've decided th=
at
there's little point in writing a cross-platform library by hand when the=
re
are so many toolkits that already exist. I'm in the process of trying to =
get
wxWindows working with Euphoria. Well, actually Peuphoria at this point,
since wxWindows does some "magical" things that make it difficult for me
(with my limited C++ skills) to wrap in a DLL.

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu