X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2a7449f4097567c62aa3337f2df000e50ed692e9..25250d335f869088a3551db226f25079c28f65fb:/docs/microwin/readme.txt?ds=inline diff --git a/docs/microwin/readme.txt b/docs/microwin/readme.txt index 8cd81015a8..4c43843608 100644 --- a/docs/microwin/readme.txt +++ b/docs/microwin/readme.txt @@ -1,22 +1,32 @@ wxMicroWindows port =================== +Warning: As of 2007-07-17 this port probably doesn't build any more. + Please don't expect it to work out of the box currently. + + Julian Smart 2001-12-08 -This is a port of wxWindows to MicroWindows, under Linux. +This is a port of wxWidgets 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. +=== NOTE: === + + Current efforts are being concentrated on a port to Nano-X, + which potentially offers greater flexibility than the WIN32 + API of MicroWindows, such as the ability to run multiple + Nano-X processes simultaneously. Please see + ../docs/x11/readme-nanox.txt for information. + 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 common dialogs (we will use generic ones), -and only one WIN32 app may be run at a time. +make the port quite limited for the time being. +In particular, only one WIN32 app may be run at a time. 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 +using src/wxUniv.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. @@ -39,7 +49,7 @@ MicroWindows: Note: these are already applied by the patch below. -- apply microwindows.patches (from wxWindows: +- apply microwindows.patches (from wxWidgets: docs/microwin/microwindows.patches) to fix PeekMessage and other issues. If the patch doesn't apply automatically, you may need to apply it by hand, and the relevant changed @@ -54,19 +64,29 @@ MicroWindows: wxMicroWindows: -- Download wxMSW 2.3.2 or greater, or get it from CVS +- Download wxMSW 2.3.4 or greater, or get it from CVS + +- Many settings in include/wx/setup.h have to be disabled. As contents + of this file keeps changing, it's impossible to say what exactly should be + disabled but it probably makes sense to disable as much as possible + initially, make sure that the build works and then add features as needed. + +- EITHER: + + o set the MICROWINDOWS environment variable, e.g.: + + % export MICROWINDOWS=/home/julians/local/microwindows/microwindows-0.89pre8/src -- Copy include/wx/msw/setup_microwin.h to include/wx/setup.h if - include/wx/setup.h doesn't exist + OR: -- change the TOP variable at the top of src/msw/makefile.mic - to reflect where MicroWindows is installed + o change the TOP variable at the top of src/msw/makefile.mic + to reflect where MicroWindows is installed - type 'make -f makefile.mic 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 -f makefile.mic all' +- to make the sample, cd into samples/minimal, edit the TOP variable + (or set MICROWINDOWS) as before, and type 'make -f makefile.mic all' Running 'minimal' runs the virtual MicroWindows desktop and the minimal sample, since in a MicroWindows WIN32 application @@ -75,8 +95,12 @@ they are one and the same binary. Status ====== -The minimal sample is almost fully-functional, apart from minor -menu presentation issues (no borders, for example). +The minimal sample is almost fully-functional, apart from some +presentation issues (no menu borders and status bar in the wrong +place. + +The widgets sample is crashing in DeleteObject (see notes below). + Implementation Notes ==================== @@ -95,20 +119,76 @@ in due course. But implementing missing functionality in this way is preferably to proliferating many #ifdefs in the wxMSW/wxMicroWindows port itself. + +Errors/warnings +=============== + +In file ../../src/msw/window.cpp at line 1294: 'UpdateWindow' failed with error 0x00000000 (Success). + + - caused because there are no paint messages pending. Presumed + harmless. + +In file ../../src/msw/dc.cpp at line 1838: 'BitBlt' failed with error 0x00000000 (Success). + + - caused because the window isn't mapped, and MwPrepareDC in wingdi.c + fails (hwnd->unmapcount is non-zero). Presumed harmless. + +Recursive paint problem, e.g. when clicking the 'Press Me!' +button in the widgets sample a few times, until the text control +is full. + + - possibly the scrollbar is causing the text control to be + updated, which somehow effects the scrollbar, which causes + a window update, etc. + +Sluggish updates. + + - probably because many image to bitmap conversions are being + done on update, and bitmaps should probably be cached. + + Things missing from MicroWindows that need to be worked around ============================================================== +wxImage/inline XPM/::CreateBitmap support +----------------------------------------- + +This is the main obstacle to getting a good range +of widgets working, since wxUniversal uses inline XPMs +to implement most of the widgets. + +See src/engine/devimage.c for routines for loading JPEGs, +XPMs etc. Unfortunately the XPM routines are also #ifdefed +for FILE_IO, even though for inline XPMs we don't need file I/O. +(Embedded systems tend not to have file I/O, anyway.) + +Now, wxWidgets has its own XPM decoder, src/common/xpmdecod.cpp, +so in theory we don't need to use MicroWindows' code there. +wxImage can load an inline XPM, _but_ we need to convert to +a wxBitmap since this is what the widgets need. + +There is no ::CreateBitmap or BITMAPINFO. (BMPs can be converted +to C using convbmp, then need to use Gr... functions.) + +So how can we convert from wxImage to wxBitmap in MicroWindows? + +Well, a simple-minded way would be to use CreateCompatibleBitmap +which returns an HBITMAP, select it into an HDC, and draw +the pixels from the wxImage to the HDC one by one with SetPixel. +This is now implemented, but there are problems with masks. +(a) masks have to be created at screen depth because BitBlt/GrDraw +can't cope with differing depths, and (b) masked blitting +is still not working (try enabling mask creation in +wxBitmap::CreateFromImage by setting USE_MASKS to 1). + + +Other missing features +---------------------- + 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.