]>
Commit | Line | Data |
---|---|---|
0fd734af JS |
1 | wxMicroWindows port |
2 | =================== | |
3 | ||
25ad2ac2 | 4 | Julian Smart 2001-12-08 |
0fd734af | 5 | |
bd52bee1 JS |
6 | This is a port of wxWindows to MicroWindows, under Linux. |
7 | Widgets are supplied by the wxUniversal project, while the | |
8 | underlying port uses the Windows ports with small modifications | |
9 | for the MicroWindows API. | |
0fd734af JS |
10 | |
11 | There are many things missing from MicroWindows that will | |
12 | make the port quite limited for the time being. I haven't | |
13 | worked out how to create bitmaps, though there is a BMP to C | |
bd52bee1 JS |
14 | converter. There are no common dialogs (we will use generic ones), |
15 | and only one WIN32 app may be run at a time. | |
0fd734af | 16 | |
bd52bee1 JS |
17 | Note that you can gain confidence in the WIN32/wxUniversal |
18 | combination by compiling wxUniversal under Windows using VC++, | |
19 | using src/wxvc_universal.dsp. You can compile the minimal | |
20 | and widgets samples in wxUniversal mode using the | |
21 | UnivDebug and UnivRelease targets. Most of the code is shared | |
22 | between this combination, and the wxMicroWindows port. | |
0fd734af JS |
23 | |
24 | Installation | |
25 | ============ | |
26 | ||
bd52bee1 | 27 | MicroWindows: |
0fd734af | 28 | |
25ad2ac2 | 29 | - unarchive MicroWindows 0.89pre8 |
46d0e4b2 JS |
30 | |
31 | - change 'config' to use X11 and any other options you feel fit. | |
32 | Suggestions for changes to the defaults: | |
33 | ||
34 | ERASEMOVE=N (otherwise moving windows will look messy) | |
35 | X11=Y | |
36 | OPTIMIZE=N | |
37 | DEBUG=Y | |
38 | VERBOSE=Y | |
39 | ||
40 | - apply microwindows.patches (from wxWindows: | |
bd52bee1 | 41 | docs/microwin/microwindows.patches) to fix PeekMessage |
25ad2ac2 JS |
42 | and other issues. If the patch doesn't apply automatically, |
43 | you may need to apply it by hand | |
46d0e4b2 | 44 | |
bd52bee1 JS |
45 | - compile by typing 'make' from within the MicroWindows src directory |
46 | ||
47 | wxMicroWindows: | |
48 | ||
25ad2ac2 | 49 | - Download wxMSW 2.3.2 or greater, or get it from CVS |
c67d6888 JS |
50 | |
51 | - Copy include/wx/msw/setup_microwin.h to include/wx/setup.h if | |
52 | include/wx/setup.h doesn't exist | |
46d0e4b2 JS |
53 | |
54 | - change the TOP variable at the top of src/msw/makefile.mic | |
bd52bee1 | 55 | to reflect where MicroWindows is installed |
46d0e4b2 | 56 | |
25ad2ac2 JS |
57 | - type 'make -f makefile.mic all' from src/msw. To clean, use |
58 | cleanwx and NOT clean since that will clean MicroWindows itself | |
46d0e4b2 | 59 | |
bd52bee1 | 60 | - to make the sample, cd into samples/minimal, edit the TOP variable, |
25ad2ac2 | 61 | and type 'make -f makefile.mic all' |
0fd734af | 62 | |
0fd734af JS |
63 | Running 'minimal' runs the virtual MicroWindows desktop |
64 | and the minimal sample, since in a MicroWindows WIN32 application | |
65 | they are one and the same binary. | |
66 | ||
67 | Status | |
68 | ====== | |
69 | ||
46d0e4b2 JS |
70 | The minimal sample is almost fully-functional, apart from minor |
71 | menu presentation issues (no borders, for example). | |
bd52bee1 JS |
72 | |
73 | Implementation Notes | |
74 | ==================== | |
0fd734af | 75 | |
bd52bee1 JS |
76 | wxMicroWindows is essentially the wxMSW port + wxUniversal |
77 | widgets. Lots of things in include/wx/univ/setup.h are switched | |
78 | off to allow the port to compile. There are also #ifdefs | |
79 | switching off further functionality, such as most wxBitmap | |
80 | functions, pending proper implementation. | |
0fd734af | 81 | |
bd52bee1 JS |
82 | There are some WIN32 API functions not implemented by MicroWindows |
83 | that are instead stubbed out in include/wx/msw/microwin.c, | |
84 | and 'implemented' in src/msw/microwin.c. Some of these functions | |
85 | are important, some less so. They will need to be implemented | |
86 | in due course. But implementing missing functionality in this way | |
87 | is preferably to proliferating many #ifdefs in the | |
88 | wxMSW/wxMicroWindows port itself. | |
89 | ||
90 | Things missing from MicroWindows that need to be worked around | |
91 | ============================================================== | |
92 | ||
93 | No ::GetKeyState (see include/wx/msw/private.h). Should probably use | |
94 | GdOpenKeyboard/GdCloseKeyboard/GdReadKeyboard. Could perhaps emulate | |
95 | GetKeyState this way. | |
0fd734af JS |
96 | |
97 | No ::CreateBitmap or BITMAPINFO. But BMPs can be converted | |
98 | to C using convbmp, then need to use Gr... functions. | |
bd52bee1 JS |
99 | We MUST implement creation from XPMs, since wxUniversal |
100 | makes use of XPMs, or else create our own bitmaps for | |
101 | drawing radioboxes, checkboxes etc.: see renderers | |
102 | in src/univ. | |
0fd734af JS |
103 | |
104 | No ::DestroyIcon, ::DestroyCursor - use ::DestroyObject instead? | |
105 | Also no LoadCursor, LoadImage. So how do we make cursors? No ::SetCursor. | |
106 | ||
107 | wxDC: no ::GetTextColor, ::GetBkColor, ::IntersectClipRect, | |
108 | ::GetClipBox | |
109 | ||
bd52bee1 JS |
110 | No ::SetMenu, so no menus or menubars (now implemented by |
111 | wxUniversal). | |
0fd734af JS |
112 | |
113 | No ::GetObject so we can't get LOGFONT from an HFONT | |
bd52bee1 JS |
114 | in wxSystemSettings (worked around by passing HFONT to |
115 | the wxFont constructor). | |
0fd734af | 116 |