1999/12/04 Microwindows FAQ - greg@censoft.com
Microwindows is an Open Source project that brings some of the features of modern graphical windowing systems to the programming community not wanting or requiring the large disk and ram requirements of higher-end windowing systems like Microsoft Windows or the X Window System. Microwindows does not require any operating system or other graphics system support, as it writes directly to the display hardware, although it runs well on Linux framebuffer systems. Microwindows is designed to be portable, and can run in a wide variety of hardware and software environments. One the of more interesting targets is the emerging market of portable handheld and pocket PC's running Linux, also known as LinuxCE.
Microwindows currently runs on 32-bit Linux systems with kernel framebuffer support, or
through the popular SVGAlib library. In addition, it has been ported to 16-bit Linux
ELKS, and real-mode MSDOS. Microwindows screen drivers for 1, 2, 4, 8, 16 and 32
bits-per-pixel have been written, as well as a VGA 16 color 4 planes driver.
Microwindows has been ported to a number of Handheld and Pocket PC's, as well. The
Microwindows graphics engine is capable of running on any system that supports readpixel,
writepixel, drawhorzline and drawvertline, and setpalette. Blitting support is
optional, but if implemented allows enhanced functionality. All bitmap, font, cursor
and color support is implemented on top of these routines. Support for 8, 15, 16 and
32 bit truecolor systems as well as 1, 2, 4 and 8bpp palletized systems is implemented.
Recently, an X11 driver was completed that allows Microwindows applications to be run on
top of the X Window desktop. This driver emulates all of Microwindows' truecolor and
palette modes so that an application can be previewed using the target system's display
characteristics directly on the desktop display, regardless of the desktop display
characteristics.
Microwindows is extremely portable, and completely written in C, although some routines have been recoded in assembly for speed. It has been ported to the Intel 16 and 32 bit cpu's, as well as MIPS R4000 (NEC Vr41xx) and ARM chips found on popular handheld and pocket PC's.
On 16 bit systems, the entire system, including screen, mouse and keyboard drivers runs in less than 64k. On 32-bit systems, support includes proportional fonts and applications are typically less than 100k.
Microwindows is essentially a layered design that allows different layers to be used or rewritten to suite the needs of the implementation. At the lowest level, screen, mouse/touchpad and keyboard drivers provide access to the actual display and other user-input hardware. At the mid level, a portable graphics engine is implemented, providing support for line draws, area fills, polygons, clipping and color models. At the upper level, various API's are implemented providing access to the graphics applications programmer. These APIs may or may not provide desktop and/or window look and feel. Currently, Microwindows supports the Win32 and Nano-X APIs. These APIs provide close compatibility with the Win32 and X Window systems, allowing programs to be ported from other systems easily.
Microwindows' origin is with NanoGUI. NanoGUI was created by Alex Holden by taking David Bell's mini-X server and Alan Cox's modifications and adding client/server networking. Greg Haerr then took interest in the NanoGUI project and began making extensive enhancements and modifications to NanoGUI. Around version 0.5, Greg Haerr added support for multiple API's, and began distributing Microwindows. In Microwindows 0.84, all previous NanoGUI changes were incorporated and since then Microwindows has been the combined NanoGUI/Microwindows distribution.
Nano-X is the X-like API that Microwindows supports. It is based on David Bell's mini-X server API, and includes X-like primitives for low-level window and graphics operations. Window management is not included, and the window look and feel must be created through a widget set or directly by the applications programmer. Currently, there are a number of people working on widget sets for Nano-X. There is some discussion about converting the Nano-X API to be X Window System compatible.
Microwindows supports an API based on the Win32 graphics device interface
module, and implements a large portion of it. The function calls try to be 100%
compatible, so that code compiled for other operating systems can usually be
compiled with no source code changes. In addition, a portion of the Win32
USER module is implemented, which contains routines for window dragging, title
bars, message passing, and generating required window messages.
Because of this, window manager support is built into the system, and a single
API for applications programs can be used that doesn't change based on the
widget set being used.
Since the WinCE API is mostly a subset of the Win32 API for graphics-related
functions, the Microwindows API is also WinCE compatible, and can be used to
implement WinCE graphics functions on platforms Microwindows is running on.
Microwindows features full RGB color support, color mapping, optimized palette bitmap drawing, truecolor and palletized displays, and a 3d look-and-feel. Overlapped and child windows are supported, with complete window and client area clipping. Proportional and fixed fonts are supported, along with utilities for converting fonts or bitmap files. Optimized painting algorithms are used to allow maximum response while the user is moving windows on the screen. Offscreen drawing and bit-blit routines are implemented for flicker-free drawing and animation. Polygon draws, fills and arbitrary region clipping are also supported.
The project is licensed under the MPL. Alternatively, the software can be licensed under the GPL, if desired. This means that the standard Microwindows distribution can be used for commercial purposes, and supports the needs of developers working under non-disclosure or writing proprietary device drivers. Modifications to source code supplied in the standard distribution must stay open source. Or the entire project can be converted to GPL, with files added by a developer considered GPL only.
The FTP site ftp://microwindows.censoft.com/pub/microwindows is the primary distribution point for all releases. The home web site is at http://microwindows.censoft.com. I can be reached at greg@censoft.com. I am working on getting the development tree moved to CVS, stay tuned.
There are demos for Linux, ELKS and MSDOS, as well as screenshots, available at:
ftp://microwindows.censoft.com/pub/microwindows/ScreenShots
ftp://microwindows.censoft.com/pub/microwindows/LinuxExamples ftp://microwindows.censoft.com/pub/microwindows/ElksExamples ftp://microwindows.censoft.com/pub/microwindows/DosExamples
The mailing list is nanogui@linuxhacker.org
To subscribe, send an empty email to:
nanogui-subscribe@linuxhacker.org
To unsubscribe, send an empty email to:
nanogui-unsubscribe@linuxhacker.org
We need help in all sorts of areas. There are currently projects to port base level widget sets and custom controls to Microwindows. Fast screen drivers and blitting routines are also on the list. There are lots of folks interested in getting the system to run on one of the many new Handheld or Pocket PC's. Please join the list and join the fun.