]> git.saurik.com Git - wxWidgets.git/commitdiff
Further WinCE mods
authorJulian Smart <julian@anthemion.co.uk>
Fri, 11 Jul 2003 11:15:59 +0000 (11:15 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 11 Jul 2003 11:15:59 +0000 (11:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21889 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/datetime.h
include/wx/list.h
include/wx/msw/private.h
include/wx/platform.h
include/wx/wxchar.h

index 21e98adb728b0095050091aa4dc4fd257eaffecd..463d6602d373d7d43cd2b015d488131a2448323f 100644 (file)
 
 #if wxUSE_DATETIME
 
+#ifndef __WXWINCE__
 #include <time.h>
+#else
+#include "wx/msw/wince/time.h"
+#endif
+
 #include <limits.h>             // for INT_MIN
 
 #include "wx/longlong.h"
@@ -323,6 +328,12 @@ public:
         // day or not
         //
         // TODO move this to intl.h
+
+// Required for WinCE
+#ifdef USA
+#undef USA
+#endif
+
     enum Country
     {
         Country_Unknown, // no special information for this country
@@ -342,10 +353,8 @@ public:
         Country_WesternEurope_End = UK,
 
         Russia,
-
         USA
     };
-
         // symbolic names for the months
     enum Month
     {
index 8e1d5169ebc3c223cf7c28ec5adcff8f0ea4b933..247b602e34e72b1b4cfa3d6859c3b0e3b42cd8bc 100644 (file)
@@ -54,6 +54,7 @@
 // type of compare function for list sort operation (as in 'qsort'): it should
 // return a negative value, 0 or positive value if the first element is less
 // than, equal or greater than the second
+
 extern "C"
 {
 typedef int (* LINKAGEMODE wxSortCompareFunction)(const void *elem1, const void *elem2);
index 70242208339f84eeb4b51617ec729a6fba975e5d..41c090c5955cf1d038f9fc9cb6545ac3c827fcbd 100644 (file)
@@ -552,10 +552,54 @@ WXDLLEXPORT extern wxWindow* wxFindWinFromHandle(WXHWND hWnd);
 // returns the wxWindow corresponding to the given HWND or NULL.
 WXDLLEXPORT extern wxWindow *wxGetWindowFromHWND(WXHWND hwnd);
 
-
 // Get the size of an icon
 WXDLLEXPORT extern wxSize wxGetHiconSize(HICON hicon);
 
+// LocalAlloc should be used on WinCE
+#ifdef __WXWINCE__
+#include <winbase.h>
+
+#define GlobalAlloc LocalAlloc
+#define GlobalFree LocalFree
+#define GlobalLock(mem) mem
+#define GlobalUnlock(mem)
+#define GPTR LPTR
+
+#if 0
+
+HLOCAL
+WINAPI
+LocalAlloc (
+    UINT fuFlags,
+    UINT cbBytes
+    );
+
+HLOCAL
+WINAPI
+LocalFree (
+    HLOCAL hMem
+    );
+
+#ifndef LMEM_FIXED
+#define LMEM_FIXED          0x0000
+#define LMEM_MOVEABLE       0x0002
+#define LMEM_NOCOMPACT      0x0010       /**** Used for Moveable Memory  ***/
+#define LMEM_NODISCARD      0x0020       /**** Ignored *****/
+#define LMEM_ZEROINIT       0x0040
+#define LMEM_MODIFY         0x0080       /*** Used only in LocalReAlloc() **/
+#define LMEM_DISCARDABLE    0x0F00       /**** Ignored ****/
+#define LMEM_VALID_FLAGS    0x0F72
+#define LMEM_INVALID_HANDLE 0x8000
+
+#define LHND                (LMEM_MOVEABLE | LMEM_ZEROINIT)
+#define LPTR                (LMEM_FIXED | LMEM_ZEROINIT)
+#endif
+
+#endif
+    // 0
+
+#endif
+    // __WXWINCE__
 #endif // wxUSE_GUI
 
 #endif
index 2a268134d0f0384864657b8673e872364c7f9eda..3a761c91f3dd6af4965faeb259d003b30c141a18 100644 (file)
     #endif
 #endif
 
+/*
+ * Define symbols that are not yet in
+ * configure or possibly some setup.h files.
+ * They will need to be added.
+ */
+
+#ifndef wxUSE_FILECONFIG
+    #if wxUSE_CONFIG
+        #define wxUSE_FILECONFIG 1
+    #else
+        #define wxUSE_FILECONFIG 0
+    #endif
+#endif
+
+#ifndef wxUSE_HOTKEY
+    #define wxUSE_HOTKEY 0
+#endif
+
 #endif /* _WX_PLATFORM_H_ */
 
index 3b34a8f848604e6aa062bb7e622bfe1912ab8fec..5cac45dfc9b96b79aa374d0399fd99dc7efe59dc 100644 (file)
         #define  wxRemove    wxMSLU__tremove
         #define  wxRename    wxMSLU__trename
     #else
-        #define  wxRemove    _tremove
-        #define  wxRename    _trename
+        #ifdef __WXWINCE__
+            #define  wxRemove    DeleteFile
+        #else
+            #define  wxRemove    _tremove
+            #define  wxRename    _trename
+        #endif
     #endif
 
     // stdlib.h functions