[Mono-list] Implementing System.Windows.Forms

Jonathan Pryor jonpryor@vt.edu
16 Sep 2002 11:17:38 -0400


As others have suggested, check the archives.

However, some of the more interesting counter-arguments that I still
remember focuses on the assumptions implicit in SWF: that you're running
on Windows.  Most of the methods in SWF don't make this requirement
explicit, but if you want to get custom Windows messages, wrap a native
platform control, or any number of other "advanced" techniques that will
likely be common in complex SWF apps, you need Windows.  Or (at least) a
Windows message loop, with WM_MESSAGE messages, and lots of other gunk. 
In which case using Wine is better -- they've already written the
Windows message loop APIs.

I recall that *no one* stated that it would be possible to have 100% SWF
compatibility without using Wine, or duplicating large portions of Wine,
in one form or another.

If 100% compatibility isn't a requirement (which would go against your
thought (1)), then you have more flexibility in implementation.

At the same time as the previous discussions about SWF, someone
mentioned (I forget who, don't care to lookup) that Microsoft was
looking into "improving" upon SWF in a future release, and compatibility
might not be preserved.  This is a red herring, arguably, but it
suggests that any effort put into SWF *may* be wasted.  (*May*.  Not
*will*.  I have a flame-retardant suite. :-)

At about that time Miguel announced that Ximian probably wouldn't put
any effort into a SWF implementation, preferring to work on Gtk# and
Gnome bindings instead, and perhaps participate in any standardization
efforts for SWF (or equivalent) in the future.

I can't say that I disagree with that decision.

That hasn't stopped others from starting work on SWF implementations, at
least one of which is based on WineLib (currently in CVS).  It's quite
likely that SWF work will continue into the future, and we will
eventually have a 100% compatible implementation of SWF.  But a
Xlib-based implementation of SWF is not a good idea, not if you desire
100% compatibility.  And if you don't care for 100% compatibility, why
use Xlib instead of GTK+ or Qt?  Surely you'd prefer that SWF apps look
like the rest of your programs...

(Please note that this is all from memory, my memory isn't the best in
the world, so some things might not match up with reality 100%, but this
should match up with reality with 90% accuracy...)

 - Jon

On Mon, 2002-09-16 at 10:49, Seun Osewa wrote:
> Hi!
> 
> Hmmm ... some issues I have thought about:
> 
> (1) Systems.Windows.Forms (and related packages) is
> probably the most important package in Windows to
> implement.  A scrupulously accurate implementation
> will be a hell of a lot of work, but rewarding.
> (2) In a lot of ways, Windows (including SWT) is more
> than just a GUI library.  It is an entire environment
> and things work cleanly that way.  The more we try to
> port the *entire* environment (code for
> events/controls, window manager, desktop environment,
> everything) the more likely we will have
> cross-platform .NET apps.
> (3) Qt would have been a very good thing, with the
> native look and feel its able to emulate.  I noticed
> that the only fee involved with Qt is development (not
> deploymeny), which means that some company might want
> to spend a lot of money in buying commercial Qt
> licences for independent developers to work on a free
> System.Windows.Forms implementation.
> 
> So, what do I think?  Emulate Windows faithfully
> including all the elements but without the Win32 API
> (the Windows.Forms API should be just enough ;) ).
> Implement every element of Windows including:
> (a) Window Manager.
> (b) A deskop environment.
> (c) The GUI code itself.
> 
> I believe its *best* to call Xlib's C functions
> directly from mono and implement all extra
> functionality within mono using Csharp (of course,
> many unmanaged code hacks would be essential for
> performance..)
> 
> Well, what do you think? (thoughts expressed at 79%
> efficiency).  more to say...after I 'hear' what people
> think about the above.
> 
> Seun Osewa
> 
> --- Everaldo Canuto <everaldo.canuto@bol.com.br>
> wrote:
> > Hello,
> > 
> > I'm working on System.Windows.Forms  interface to
> > Xlib, a first step is 
> > create a Xsharp, a group of class to access XWindow
> > System, I'wonking on 
> > it now!
> > A second step is create a  System.Windows.Forms
> > based on Xsharp.
> > 
> > I accept voluntarios to help myself.
> > 
> > Everaldo Canuto
> > 
> > 
> 
> 
> __________________________________________________
> Do you Yahoo!?
> Yahoo! News - Today's headlines
> http://news.yahoo.com
> 
> _______________________________________________
> Mono-list maillist  -  Mono-list@ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list