-# elif !defined(__WXMOTIF__) && !defined(__WXMSW__) && !defined(__WXGTK__) && \
- !defined(__WXPM__) && !defined(__WXMAC__) && !defined(__WXCOCOA__) && \
- !defined(__X__) && !defined(__WXMGL__) && !defined(__WXX11__) && \
- wxUSE_GUI
+# elif defined(__WXMSW__) && defined(__PALMOS__)
+# error "Target can't be both PalmOS and Windows"
+# elif !defined(__WXMOTIF__) && \
+ !defined(__WXMSW__) && \
+ !defined(__WXPALMOS__)&& \
+ !defined(__WXGTK__) && \
+ !defined(__WXPM__) && \
+ !defined(__WXMAC__) && \
+ !defined(__WXCOCOA__) && \
+ !defined(__X__) && \
+ !defined(__WXMGL__) && \
+ !defined(__WXX11__) && \
+ wxUSE_GUI
+/* provide replacement for C99 va_copy() if the compiler doesn't have it */
+
+/* could be already defined by configure or the user */
+#ifndef wxVaCopy
+ /* if va_copy is a macro or configure detected that we have it, use it */
+ #if defined(va_copy) || defined(HAVE_VA_COPY)
+ #define wxVaCopy va_copy
+ #else /* no va_copy, try to provide a replacement */
+ /*
+ configure tries to determine whether va_list is an array or struct
+ type, but it may not be used under Windows, so deal with a few
+ special cases.
+ */
+
+ #ifdef __WATCOMC__
+ /* Watcom uses array type for va_list except for PPC and Alpha */
+ #if !defined(__PPC__) && !defined(__AXP__)
+ #define VA_LIST_IS_ARRAY
+ #endif
+ #endif /* __WATCOMC__ */
+
+ #if defined(__PPC__) && (defined(_CALL_SYSV) || defined (_WIN32))
+ /*
+ PPC using SysV ABI and NT/PPC are special in that they use an
+ extra level of indirection.
+ */
+ #define VA_LIST_IS_POINTER
+ #endif /* SysV or Win32 on __PPC__ */
+
+ /*
+ note that we use memmove(), not memcpy(), in case anybody tries
+ to do wxVaCopy(ap, ap)
+ */
+ #if defined(VA_LIST_IS_POINTER)
+ #define wxVaCopy(d, s) memmove(*(d), *(s), sizeof(va_list))
+ #elif defined(VA_LIST_IS_ARRAY)
+ #define wxVaCopy(d, s) memmove((d), (s), sizeof(va_list))
+ #else /* we can only hope that va_lists are simple lvalues */
+ #define wxVaCopy(d, s) ((d) = (s))
+ #endif
+ #endif /* va_copy/!va_copy */
+#endif // wxVaCopy
+
+
+#ifdef __cplusplus
+/* And also define a couple of simple functions to cast pointer to/from it. */
+inline wxUIntPtr wxPtrToUInt(const void *p)
+{
+ /*
+ VC++ 7.1 gives warnings about casts such as below even when they're
+ explicit with /Wp64 option, suppress them as we really know what we're
+ doing here
+ */
+#ifdef __VISUALC__
+ #pragma warning(disable: 4311) /* pointer truncation from '' to '' */
+#endif
+
+ return wx_reinterpret_cast(wxUIntPtr, p);
+
+#ifdef __VISUALC__
+ #pragma warning(default: 4311)
+#endif
+}
+
+inline void *wxUIntToPtr(wxUIntPtr p)
+{
+#ifdef __VISUALC__
+ #pragma warning(disable: 4312) /* conversion to type of greater size */
+#endif
+
+ return wx_reinterpret_cast(void *, p);
+
+#ifdef __VISUALC__
+ #pragma warning(default: 4312)
+#endif
+}
+#endif /*__cplusplus*/
+
+
-/*
- * wxFrame/wxDialog style flags
- */
-#define wxSTAY_ON_TOP 0x8000
-#define wxICONIZE 0x4000
-#define wxMINIMIZE wxICONIZE
-#define wxMAXIMIZE 0x2000
-#define wxCLOSE_BOX 0x1000
-
-#define wxSYSTEM_MENU 0x0800
-#define wxMINIMIZE_BOX 0x0400
-#define wxMAXIMIZE_BOX 0x0200
-#define wxTINY_CAPTION_HORIZ 0x0100
-#define wxTINY_CAPTION_VERT 0x0080
-#define wxRESIZE_BORDER 0x0040
-
-#define wxDIALOG_NO_PARENT 0x0001 /* Don't make owned by apps top window */
-#define wxFRAME_NO_TASKBAR 0x0002 /* No taskbar button (MSW only) */
-#define wxFRAME_TOOL_WINDOW 0x0004 /* No taskbar button, no system menu */
-#define wxFRAME_FLOAT_ON_PARENT 0x0008 /* Always above its parent */
-#define wxFRAME_SHAPED 0x0010 /* Create a window that is able to be shaped */
-
-/* deprecated versions defined for compatibility reasons */
-#define wxRESIZE_BOX wxMAXIMIZE_BOX
-#define wxTHICK_FRAME wxRESIZE_BORDER
-
-/* obsolete styles, unused any more */
-#define wxDIALOG_MODAL 0x0020 /* free flag value 0x0020 */
-#define wxDIALOG_MODELESS 0
-#define wxNO_3D 0
-#define wxUSER_COLOURS 0
-
+/* Create a window which is attachable to another top level window */
+#define wxFRAME_DRAWER 0x0020
- wxCLEAR, wxROP_BLACK = wxCLEAR, wxBLIT_BLACKNESS = wxCLEAR, /* 0 */
- wxXOR, wxROP_XORPEN = wxXOR, wxBLIT_SRCINVERT = wxXOR, /* src XOR dst */
- wxINVERT, wxROP_NOT = wxINVERT, wxBLIT_DSTINVERT = wxINVERT, /* NOT dst */
- wxOR_REVERSE, wxROP_MERGEPENNOT = wxOR_REVERSE, wxBLIT_00DD0228 = wxOR_REVERSE, /* src OR (NOT dst) */
- wxAND_REVERSE, wxROP_MASKPENNOT = wxAND_REVERSE, wxBLIT_SRCERASE = wxAND_REVERSE, /* src AND (NOT dst) */
- wxCOPY, wxROP_COPYPEN = wxCOPY, wxBLIT_SRCCOPY = wxCOPY, /* src */
- wxAND, wxROP_MASKPEN = wxAND, wxBLIT_SRCAND = wxAND, /* src AND dst */
- wxAND_INVERT, wxROP_MASKNOTPEN = wxAND_INVERT, wxBLIT_00220326 = wxAND_INVERT, /* (NOT src) AND dst */
- wxNO_OP, wxROP_NOP = wxNO_OP, wxBLIT_00AA0029 = wxNO_OP, /* dst */
- wxNOR, wxROP_NOTMERGEPEN = wxNOR, wxBLIT_NOTSRCERASE = wxNOR, /* (NOT src) AND (NOT dst) */
- wxEQUIV, wxROP_NOTXORPEN = wxEQUIV, wxBLIT_00990066 = wxEQUIV, /* (NOT src) XOR dst */
- wxSRC_INVERT, wxROP_NOTCOPYPEN = wxSRC_INVERT, wxBLIT_NOTSCRCOPY = wxSRC_INVERT, /* (NOT src) */
- wxOR_INVERT, wxROP_MERGENOTPEN = wxOR_INVERT, wxBLIT_MERGEPAINT = wxOR_INVERT, /* (NOT src) OR dst */
- wxNAND, wxROP_NOTMASKPEN = wxNAND, wxBLIT_007700E6 = wxNAND, /* (NOT src) OR (NOT dst) */
- wxOR, wxROP_MERGEPEN = wxOR, wxBLIT_SRCPAINT = wxOR, /* src OR dst */
- wxSET, wxROP_WHITE = wxSET, wxBLIT_WHITENESS = wxSET /* 1 */
+ wxCLEAR, wxROP_BLACK = wxCLEAR, wxBLIT_BLACKNESS = wxCLEAR, /* 0 */
+ wxXOR, wxROP_XORPEN = wxXOR, wxBLIT_SRCINVERT = wxXOR, /* src XOR dst */
+ wxINVERT, wxROP_NOT = wxINVERT, wxBLIT_DSTINVERT = wxINVERT, /* NOT dst */
+ wxOR_REVERSE, wxROP_MERGEPENNOT = wxOR_REVERSE, wxBLIT_00DD0228 = wxOR_REVERSE, /* src OR (NOT dst) */
+ wxAND_REVERSE, wxROP_MASKPENNOT = wxAND_REVERSE, wxBLIT_SRCERASE = wxAND_REVERSE, /* src AND (NOT dst) */
+ wxCOPY, wxROP_COPYPEN = wxCOPY, wxBLIT_SRCCOPY = wxCOPY, /* src */
+ wxAND, wxROP_MASKPEN = wxAND, wxBLIT_SRCAND = wxAND, /* src AND dst */
+ wxAND_INVERT, wxROP_MASKNOTPEN = wxAND_INVERT, wxBLIT_00220326 = wxAND_INVERT, /* (NOT src) AND dst */
+ wxNO_OP, wxROP_NOP = wxNO_OP, wxBLIT_00AA0029 = wxNO_OP, /* dst */
+ wxNOR, wxROP_NOTMERGEPEN = wxNOR, wxBLIT_NOTSRCERASE = wxNOR, /* (NOT src) AND (NOT dst) */
+ wxEQUIV, wxROP_NOTXORPEN = wxEQUIV, wxBLIT_00990066 = wxEQUIV, /* (NOT src) XOR dst */
+ wxSRC_INVERT, wxROP_NOTCOPYPEN = wxSRC_INVERT, wxBLIT_NOTSCRCOPY = wxSRC_INVERT, /* (NOT src) */
+ wxOR_INVERT, wxROP_MERGENOTPEN = wxOR_INVERT, wxBLIT_MERGEPAINT = wxOR_INVERT, /* (NOT src) OR dst */
+ wxNAND, wxROP_NOTMASKPEN = wxNAND, wxBLIT_007700E6 = wxNAND, /* (NOT src) OR (NOT dst) */
+ wxOR, wxROP_MERGEPEN = wxOR, wxBLIT_SRCPAINT = wxOR, /* src OR dst */
+ wxSET, wxROP_WHITE = wxSET, wxBLIT_WHITENESS = wxSET /* 1 */
-/* Stand-ins for Windows types or OS/2, to avoid #including all of windows.h or os2.h */
+/* Stand-ins for Windows types to avoid #including all of windows.h */
+typedef void * WXHWND;
+typedef void * WXHANDLE;
+typedef void * WXHICON;
+typedef void * WXHFONT;
+typedef void * WXHMENU;
+typedef void * WXHPEN;
+typedef void * WXHBRUSH;
+typedef void * WXHPALETTE;
+typedef void * WXHCURSOR;
+typedef void * WXHRGN;
+typedef void * WXHACCEL;
+typedef void WXFAR * WXHINSTANCE;
+typedef void * WXHBITMAP;
+typedef void * WXHIMAGELIST;
+typedef void * WXHGLOBAL;
+typedef void * WXHDC;
+typedef unsigned int WXUINT;
+typedef unsigned long WXDWORD;
+typedef unsigned short WXWORD;
+
+typedef unsigned long WXCOLORREF;
+typedef void * WXRGNDATA;
+typedef struct tagMSG WXMSG;
+typedef void * WXHCONV;
+typedef void * WXHKEY;
+typedef void * WXHTREEITEM;
+
+typedef void * WXDRAWITEMSTRUCT;
+typedef void * WXMEASUREITEMSTRUCT;
+typedef void * WXLPCREATESTRUCT;
+
+typedef WXHWND WXWidget;
+
+#ifdef __WIN64__
+typedef unsigned __int64 WXWPARAM;
+typedef __int64 WXLPARAM;
+typedef __int64 WXLRESULT;
+#else
+typedef unsigned int WXWPARAM;
+typedef long WXLPARAM;
+typedef long WXLRESULT;
+#endif
+
+#if !defined(__WIN32__) || defined(__GNUWIN32__) || defined(__WXMICROWIN__)
+typedef int (*WXFARPROC)();
+#else
+typedef int (__stdcall *WXFARPROC)();
+#endif
+#endif /* __WXMSW__ */
+
+
+#if defined(__WXPM__) || defined(__EMX__)
+#ifdef __WXPM__
+/* Stand-ins for OS/2 types, to avoid #including all of os2.h */