Julian Smart 2001-07-02
-This is a snapshot of my experimental port of wxWindows to
-MicroWindows. Widgets are supplied by the wxUniversal project,
-while the underlying port uses the Windows ports with small
-modifications for the MicroWindows API.
+This is a port of wxWindows to MicroWindows, under Linux.
+Widgets are supplied by the wxUniversal project, while the
+underlying port uses the Windows ports with small modifications
+for the MicroWindows API.
There are many things missing from MicroWindows that will
make the port quite limited for the time being. I haven't
worked out how to create bitmaps, though there is a BMP to C
-converter. There are no menus, no common dialogs, and only
-one WIN32 app may be run at a time.
+converter. There are no common dialogs (we will use generic ones),
+and only one WIN32 app may be run at a time.
-Some things can no doubt be worked around, and/or MicroWindows
-itself tweaked. Lots of wxWin functionality is just switched off or
-commented out.
+Note that you can gain confidence in the WIN32/wxUniversal
+combination by compiling wxUniversal under Windows using VC++,
+using src/wxvc_universal.dsp. You can compile the minimal
+and widgets samples in wxUniversal mode using the
+UnivDebug and UnivRelease targets. Most of the code is shared
+between this combination, and the wxMicroWindows port.
Installation
============
-First install MicroWindows - untar it, change config to
-use X11 and any other options you feel fit, apply
-microwindows.patches to fix PeekMessage, and compile
-(type 'make' from within the src directory).
+MicroWindows:
-Untar the wxMicroWindows port, and change the TOP variable at the
-top of src/microwin/Makefile to reflect where MicroWindows is installed.
-Type 'make all' from src/microwin. To clean, use cleanwx and NOT clean
-since that will clean MicroWindows itself.
+- unarchive MicroWindows 0.89pre7
+- change 'config' to use X11 and any other options you feel fit,
+ such as verbose compilation
+- cd to src/mwin and apply microwindows.patches (from wxWindows:
+ docs/microwin/microwindows.patches) to fix PeekMessage
+- compile by typing 'make' from within the MicroWindows src directory
+
+wxMicroWindows:
+
+- untar the wxMicroWindows port/download from CVS
+- and change the TOP variable at the top of src/msw/makefile.mic
+ to reflect where MicroWindows is installed
+- type 'make all' from src/msw. To clean, use cleanwx and NOT clean
+ since that will clean MicroWindows itself
+- to make the sample, cd into samples/minimal, edit the TOP variable,
+ and type 'make all'
-To make the sample, cd into samples/minimal, edit the TOP variable,
-and type 'make all'.
Running 'minimal' runs the virtual MicroWindows desktop
and the minimal sample, since in a MicroWindows WIN32 application
they are one and the same binary.
Status
======
-A frame comes up :-)
+A frame comes up :-) The menus don't work properly just yet.
+
+Implementation Notes
+====================
-Notes
-=====
+wxMicroWindows is essentially the wxMSW port + wxUniversal
+widgets. Lots of things in include/wx/univ/setup.h are switched
+off to allow the port to compile. There are also #ifdefs
+switching off further functionality, such as most wxBitmap
+functions, pending proper implementation.
-No ::GetKeyState (see microwin/private.h). Should probably use GdOpenKeyboard/GdCloseKeyboard/GdReadKeyboard. Could perhaps emulate GetKeyState this way.
+There are some WIN32 API functions not implemented by MicroWindows
+that are instead stubbed out in include/wx/msw/microwin.c,
+and 'implemented' in src/msw/microwin.c. Some of these functions
+are important, some less so. They will need to be implemented
+in due course. But implementing missing functionality in this way
+is preferably to proliferating many #ifdefs in the
+wxMSW/wxMicroWindows port itself.
+
+Things missing from MicroWindows that need to be worked around
+==============================================================
+
+No ::GetKeyState (see include/wx/msw/private.h). Should probably use
+GdOpenKeyboard/GdCloseKeyboard/GdReadKeyboard. Could perhaps emulate
+GetKeyState this way.
No ::CreateBitmap or BITMAPINFO. But BMPs can be converted
to C using convbmp, then need to use Gr... functions.
+We MUST implement creation from XPMs, since wxUniversal
+makes use of XPMs, or else create our own bitmaps for
+drawing radioboxes, checkboxes etc.: see renderers
+in src/univ.
No ::DestroyIcon, ::DestroyCursor - use ::DestroyObject instead?
Also no LoadCursor, LoadImage. So how do we make cursors? No ::SetCursor.
wxDC: no ::GetTextColor, ::GetBkColor, ::IntersectClipRect,
::GetClipBox
-No ::SetMenu, so no menus or menubars.
+No ::SetMenu, so no menus or menubars (now implemented by
+wxUniversal).
No ::GetObject so we can't get LOGFONT from an HFONT
-in wxSystemSettings.
+in wxSystemSettings (worked around by passing HFONT to
+the wxFont constructor).
No ::CreateDialog so how do we create dialogs? Simulate
-one with a frame I guess.
+one with a frame...
+
CFG=wxvc_dll - Win32 Debug
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
!MESSAGE use the Export Makefile command and run
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "wxvc_dll.mak".
-!MESSAGE
+!MESSAGE
!MESSAGE You can specify a configuration when running NMAKE
!MESSAGE by defining the macro CFG on the command line. For example:
-!MESSAGE
+!MESSAGE
!MESSAGE NMAKE /f "wxvc_dll.mak" CFG="wxvc_dll - Win32 Debug"
-!MESSAGE
+!MESSAGE
!MESSAGE Possible choices for configuration are:
-!MESSAGE
+!MESSAGE
!MESSAGE "wxvc_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
!MESSAGE "wxvc_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
-!MESSAGE
+!MESSAGE
# Begin Project
# PROP AllowPerConfigDependencies 0
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comctl32.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib wsock32.lib rpcrt4.lib winmm.lib opengl32.lib glu32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /out:"../lib/wx23_2d.dll" /pdbtype:sept
-!ENDIF
+!ENDIF
# Begin Target
# End Source File
# Begin Source File
-SOURCE=.\common\cmdproc.cpp
+SOURCE=.\common\cmdline.cpp
# End Source File
# Begin Source File
-SOURCE=.\common\cmdline.cpp
+SOURCE=.\common\cmdproc.cpp
# End Source File
# Begin Source File
# End Source File
# Begin Source File
+SOURCE=.\common\nbkbase.cpp
+# End Source File
+# Begin Source File
+
SOURCE=.\common\object.cpp
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# Begin Source File
# ADD CPP /Zi /I ".."
# SUBTRACT CPP /YX /Yc /Yu
-!ENDIF
+!ENDIF
# End Source File
# End Group