There are many projects to move graphics libraries (WinForms, GTK#, and OpenGL) and Java compatibility (IKVM, DotGNU, and JANET) to .NET; this month, I will focus on these and a couple of other projects.
System.Windows.Forms
One of the challenges of writing a monthly column on open-source software is that the deadline is almost two months before the column is published! As I finished last month's column, Mono had just released version 0.20, and I stated, "System.Windows.
Forms (SWF) is in a development lull, but it is expected to pick up soon." Within a week SWF was again moving forward quickly, even without resolution of some Winelib issues that had been holding it up, and I thought, "in six weeks, when this is published, I am going to have to apologize to the SWF developers for saying they were in a lull." I apologize. As I write this, Mono version 0.23 has just been released, several SWF controls are gaining basic functionality, and the Winelib issues are being resolved by Mono developers with some help from one of the Winelib developers; some temporary workarounds have already been found, and Mono can now be linked to Winelib with garbage collection enabled.
For the development team, this was an important milestone not only because it is a big step toward making Mono and Winelib compatible, but also because it helps developers running Linux to contribute to SWF. Perhaps most important, it helps resolve the concerns about getting SWF to work with Wine on Linux; this should attract more developers to help implement SWF on Mono. Combine all this with an increase in implementation of the SWF and System.Drawing classes and WinForms is definitely on the move again!
GTK#
GTK# 0.8 has been released. GTK# is a C# binding to the GIMP Toolkit (GTK), a cross-platform graphics toolkit widely used in the Linux community. GTK# runs on both Mono and DotGNU. Although it still needs a lot of work before a version 1.0 will be ready for the public it already has most of the basic functionality needed for many projects. In the Mono project, some work is even being done on a GTK# implementation of SWF. It is thought that basic SWF functionality could be implemented quickly using GTK#, but such deep compatibility with the Microsoft version of SWF would be practically impossible, so this is more of a side project compared to the Winelib implementation. For some screen shots from applications written using GTK#, see www.go-mono.com/screenshots.html. The applications featured include SkyNET, a GTK# program that displays star charts; a media player; an IRC (chat) client; and a SQL query program. The GTK# page is at http://gtk-sharp.sourceforge.net.
OpenGL
For all the OpenGL fans, there is a working binding to OpenGL - OpenGL# (www.go-mono.com/sshots/oglcs.png). Not much information is available yet, but the source code can be found in the Mono CVS repository under the module glgen. You can browse the OpenGL# source code at
http://cvs.hispalinux.es/cgi-bin/cvsweb/
glgen/glgen/?cvsroot=mono.
Java
A lot of open-source work is going on to bridge the gap between .NET and Java. A Java 1.4.1 VM, IKVM, is being written for .NET that will allow Java programs to run on .NET. It includes a bytecode compiler that converts Java Byte Code to .NET CLI code; maps java.lang.Object, java.lang.String, and java.lang.Throwable to .NET's System.Object, System.String, and System.Exception; offers interoperability with .NET code; and has just started implementing AWT. IKVM uses GNU Classpath, the open-source Java class library. The current status of the GNU Classpath project can be found at www.gnu.org/software/classpath, and a blog for IKVM is available at
http://radio.weblogs.com/0109845/stories/
2002/11/13/faq.html. IKVM has a lot of functionality under the Microsoft implementation of .NET; there are plans to run IKVM on Mono, but currently it is limited to "Hello World" type programs under Mono.
DotGNU is also working on a Java front end for their cscc compiler, which they expect to complete in the next few months.
Other Projects
An SMTP (e-mail) client that runs on Mono has been added to the Mono Project. A description of its capabilities at the time it was added can be found at http://p.rsn.bth.se/smtp.
DotGNU has become the first open-source project to support generics (the equivalent of C++ templates). At this time, only the assembler, disassembler, and runtime have support for generics, but C# support is not far behind and may be working by the time you read this. See
http://dotgnu.org/pipermail/developers/
2003-February/009918.html for details. DotGNU now has a wiki; check it out at http://wiki.dotgnu.org.
About the Author
Dennis Hayes is a senior software engineer at Raytek Corporation in Santa Cruz, CA, where he writes process control software. He has been involved with the Mono Project for over a year, and is in charge of the System.Windows.Forms and System.Drawing namespaces.
dennish@raytek.com
All Rights Reserved
Copyright © 2004 SYS-CON Media, Inc.
E-mail:
info@sys-con.com