]>
Commit | Line | Data |
---|---|---|
368c9c6d JS |
1 | General guidelines for |
2 | wxWin/CE porting contributors. | |
3 | ||
4 | 1. | |
5 | define __WXMSW__ when __WXWINCE__ is defined. | |
6 | In other words: | |
7 | both __WXMSW__ and __WXWINCE__ defined => wxWinCE compilation | |
8 | just __WXMSW__ defined => wxMSW compilation | |
9 | Because: Not defining __WXMSW__ for wxWinCE port means that all code doing anything | |
10 | Win32-specific would need to be changed to work with wxWinCE which doesn't | |
11 | seem at all like a good idea. (VZ) | |
12 | ||
13 | 2. | |
14 | Shorter way is preferred | |
15 | #if (defined(STRICT) || defined(__GNUC__)) && !defined(__WXWINCE__) | |
16 | Because: Shorter code, single case intead of multiple one (JS) | |
17 | ||
18 | 3. | |
19 | it's a good idea to separate GUI details from platform details. | |
20 | It would seem logical to do the same for Windows with WIN32 for the "system" | |
21 | functions and WXMSW and WXWINCE for the places where GUI's are different. | |
22 | If something is really a WIN32 function, #ifdef WIN32 seems much more | |
23 | logical than "#if defined(__WXMSW__) || defined(__WXWINCE__)" | |
24 | Because: Just imagine all the common unix stuff where within "#if defined(__WXGTK__)|| | |
25 | defined(__WXMOTIF__)||defined(__WXX11)" and the mess that would create | |
26 | when trying to compile any of those 3 ports on OS/2, Windows or MacOS. (SN) | |
27 | ||
28 | 4. | |
29 | Project that are not involved with the DLL creation should be stored in another level. | |
30 | Maybe something like /src/msw/wince/mywxbase | |
31 | Because: The main directory remain clearer. (MC) | |
32 | ||
33 | 5. Definitely do not use #if defined (__WXWINCE__) in common headers or not MSW headers (JS) | |
34 | ||
35 | ||
36 | 6. Note that wx/msw/private.h shouldn't be included neither from the | |
37 | headers -- only from the .cpp files. And there you should include it after | |
38 | everything, i.e.: | |
39 | #include "wx/dc.h" | |
40 | ... | |
41 | #include "wx/msw/private.h" | |
42 | (VZ) | |
43 | ||
44 | Marco Cavallini | |
45 | www.koansoftware.com |