[Mono-list] Xsharp (was Re: Hey Everaldo, have you seen this?)

Rhys Weatherley rweather@zip.com.au
Sat, 21 Sep 2002 09:32:06 +1000


Adam Treat wrote:

> > - Your source compile with Mono? If dont compile, I can make alterations
> > in the code source without problems of  licence?
> > - What it is better,  rewrite or use XSharp?
> 
> From a quick look at the source the license is LGPL so there should be no
> problems there.  If I were you I'd ask Rhys about helping him develop it
> rather than continue along separate tracks.

This would certainly be my preference also.

> Not sure if it will compile with
> Mono, but my guess is yes.  Right now the build requires P.Net's csnant to
> compile, but I'm sure you could come up with some alternative makefiles
> without to much work.

If you configure the system as "./configure --with-mono", it
will attempt to build using mcs (I don't know if this will
work - haven't tried it).  You still need csant and resgen
to provide the build framework at the moment.  Feel free to
send patches for building pnet-less.

The important thing is whether it runs on Mono, not whether
it compiles with Mono.  The exact means used to build the
assemblies should be immaterial as long as a valid IL binary
drops out the bottom.

Right now, Xsharp is an experiment to see how far I can push
PInvoke under Unix without using C callouts before it cries
uncle.  Xlib seemed like a good choice as it is such a horrible
legacy API.

Ultimately, Xsharp will wrap up Xlib enough to hide its uglier
details (colors, font management, grab logic, etc), but won't
provide much in the way of widget support.  It isn't intended
to be a replacement for Gtk# or Qt#.

There are some kinds of race conditions that may be exploitable
in toolkits like Gtk# or Qt#.  e.g. destroy a widget in one
thread and immediately use it in another.  This may allow an
applet to circumvent heap security controls, which would be bad.
Xsharp is hardened against this, and so may be useful as
a simple GUI layer for embedded applets.

Whether Xsharp will be useful as the underpinnings for a port
of Windows.Forms, I don't know.  I'm certainly willing to
entertain patches that help make it more suitable for that
purpose.

Since I don't read mono-list regularly, if you wish to discuss the
development of Xsharp, please come over to "developers@dotgnu.info".

Cheers,

Rhys.