Applied some of patch [ 650957 ] wxWinCE diff-0.0.4
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@18175 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
45
docs/msw/wince/guidelines.txt
Normal file
45
docs/msw/wince/guidelines.txt
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
General guidelines for
|
||||||
|
wxWin/CE porting contributors.
|
||||||
|
|
||||||
|
1.
|
||||||
|
define __WXMSW__ when __WXWINCE__ is defined.
|
||||||
|
In other words:
|
||||||
|
both __WXMSW__ and __WXWINCE__ defined => wxWinCE compilation
|
||||||
|
just __WXMSW__ defined => wxMSW compilation
|
||||||
|
Because: Not defining __WXMSW__ for wxWinCE port means that all code doing anything
|
||||||
|
Win32-specific would need to be changed to work with wxWinCE which doesn't
|
||||||
|
seem at all like a good idea. (VZ)
|
||||||
|
|
||||||
|
2.
|
||||||
|
Shorter way is preferred
|
||||||
|
#if (defined(STRICT) || defined(__GNUC__)) && !defined(__WXWINCE__)
|
||||||
|
Because: Shorter code, single case intead of multiple one (JS)
|
||||||
|
|
||||||
|
3.
|
||||||
|
it's a good idea to separate GUI details from platform details.
|
||||||
|
It would seem logical to do the same for Windows with WIN32 for the "system"
|
||||||
|
functions and WXMSW and WXWINCE for the places where GUI's are different.
|
||||||
|
If something is really a WIN32 function, #ifdef WIN32 seems much more
|
||||||
|
logical than "#if defined(__WXMSW__) || defined(__WXWINCE__)"
|
||||||
|
Because: Just imagine all the common unix stuff where within "#if defined(__WXGTK__)||
|
||||||
|
defined(__WXMOTIF__)||defined(__WXX11)" and the mess that would create
|
||||||
|
when trying to compile any of those 3 ports on OS/2, Windows or MacOS. (SN)
|
||||||
|
|
||||||
|
4.
|
||||||
|
Project that are not involved with the DLL creation should be stored in another level.
|
||||||
|
Maybe something like /src/msw/wince/mywxbase
|
||||||
|
Because: The main directory remain clearer. (MC)
|
||||||
|
|
||||||
|
5. Definitely do not use #if defined (__WXWINCE__) in common headers or not MSW headers (JS)
|
||||||
|
|
||||||
|
|
||||||
|
6. Note that wx/msw/private.h shouldn't be included neither from the
|
||||||
|
headers -- only from the .cpp files. And there you should include it after
|
||||||
|
everything, i.e.:
|
||||||
|
#include "wx/dc.h"
|
||||||
|
...
|
||||||
|
#include "wx/msw/private.h"
|
||||||
|
(VZ)
|
||||||
|
|
||||||
|
Marco Cavallini
|
||||||
|
www.koansoftware.com
|
@@ -56,6 +56,7 @@ Add
|
|||||||
|
|
||||||
Incompatibility stuff & Missing headers
|
Incompatibility stuff & Missing headers
|
||||||
---------------------------------------
|
---------------------------------------
|
||||||
|
ANSI is not supported, WinCE has only Unicode
|
||||||
<time.h>
|
<time.h>
|
||||||
<sys\types.h>
|
<sys\types.h>
|
||||||
<assert.h>
|
<assert.h>
|
||||||
@@ -77,8 +78,8 @@ NOTES
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
==========================================================
|
===========================================================
|
||||||
Koan s.a.s. - Industrial Automation and Embedded Software
|
Koan s.a.s. - Industrial Automation and Embedded Software
|
||||||
Via Pascoli, 3 / Int.1 - 24121 Bergamo - ITALIA
|
Via Pascoli, 3 / Int.1 - 24121 Bergamo - ITALIA
|
||||||
Tel./Fax (++39) +35 - 255.235 - www.koansoftware.com
|
www.koansoftware.com
|
||||||
==========================================================
|
===========================================================
|
||||||
|
@@ -20,6 +20,13 @@
|
|||||||
|
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
|
|
||||||
|
#if defined (__WXWINCE__)
|
||||||
|
#include <wingdi.h> // RGB, COLORREF
|
||||||
|
#include <winuser.h> // Global Namespaces ::GetKeyState, ::GetWindowRect
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#ifdef __WXMICROWIN__
|
#ifdef __WXMICROWIN__
|
||||||
// Extra prototypes and symbols not defined by MicroWindows
|
// Extra prototypes and symbols not defined by MicroWindows
|
||||||
#include "wx/msw/microwin.h"
|
#include "wx/msw/microwin.h"
|
||||||
|
@@ -27,7 +27,8 @@
|
|||||||
|
|
||||||
// CreateDialog
|
// CreateDialog
|
||||||
|
|
||||||
#ifdef CreateDialog
|
//#ifdef(CreateDialog)
|
||||||
|
#if !defined(__WXWINCE__) && defined(CreateDialog)
|
||||||
#undef CreateDialog
|
#undef CreateDialog
|
||||||
|
|
||||||
inline HWND CreateDialog(HINSTANCE hInstance,
|
inline HWND CreateDialog(HINSTANCE hInstance,
|
||||||
@@ -356,6 +357,16 @@
|
|||||||
#undef Yield
|
#undef Yield
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
#if defined(__WXWINCE__) && defined(DrawIcon) //#ifdef DrawIcon
|
||||||
|
#undef DrawIcon
|
||||||
|
inline BOOL DrawIcon(HDC hdc, int x, int y, HICON hicon)
|
||||||
|
{
|
||||||
|
return DrawIconEx(hdc,x,y,hicon,0,0,0,NULL, DI_NORMAL) ;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// GetWindowProc
|
// GetWindowProc
|
||||||
//ifdef GetWindowProc
|
//ifdef GetWindowProc
|
||||||
// #undef GetWindowProc
|
// #undef GetWindowProc
|
||||||
|
@@ -2091,7 +2091,7 @@ static wxArrayString::CompareFunction gs_compareFunction = NULL;
|
|||||||
static bool gs_sortAscending = TRUE;
|
static bool gs_sortAscending = TRUE;
|
||||||
|
|
||||||
// function which is called by quick sort
|
// function which is called by quick sort
|
||||||
extern "C" int LINKAGEMODE
|
extern "C" int wxC_CALLING_CONV // LINKAGEMODE
|
||||||
wxStringCompareFunction(const void *first, const void *second)
|
wxStringCompareFunction(const void *first, const void *second)
|
||||||
{
|
{
|
||||||
wxString *strFirst = (wxString *)first;
|
wxString *strFirst = (wxString *)first;
|
||||||
|
@@ -63,11 +63,11 @@
|
|||||||
|
|
||||||
|
|
||||||
/////////////////////////////////
|
/////////////////////////////////
|
||||||
// Peform some macro test
|
// Print out the actual platform
|
||||||
/////////////////////////////////
|
/////////////////////////////////
|
||||||
|
|
||||||
#if wxUSE_GUI
|
#if wxUSE_GUI
|
||||||
#if defined(__WXMSW__)
|
#if defined(__WXMSW__) && !defined(__WXWINCE__)
|
||||||
#pragma message("\t CE : __WXMSW__")
|
#pragma message("\t CE : __WXMSW__")
|
||||||
#elif defined(__WXWINCE__)
|
#elif defined(__WXWINCE__)
|
||||||
#pragma message("\t CE : __WXWINCE__")
|
#pragma message("\t CE : __WXWINCE__")
|
||||||
|
Reference in New Issue
Block a user