]> git.saurik.com Git - wxWidgets.git/commitdiff
osx regrouping
authorStefan Csomor <csomor@advancedconcepts.ch>
Tue, 29 Jul 2008 20:22:57 +0000 (20:22 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Tue, 29 Jul 2008 20:22:57 +0000 (20:22 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54824 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/defs.h
include/wx/filename.h
include/wx/icon.h
include/wx/math.h
include/wx/overlay.h
include/wx/platinfo.h
include/wx/region.h
include/wx/renderer.h
include/wx/thread.h

index 5440cd9b3c9d5033040c7fbaa97f04fbc281f325..15552318263070de7a1c888cbf9447e61c05f092 100644 (file)
@@ -2662,8 +2662,10 @@ typedef unsigned long   WXDWORD;
 typedef unsigned short  WXWORD;
 
 typedef WX_OPAQUE_TYPE(PicHandle ) * WXHMETAFILE ;
+#if wxOSX_USE_CARBON
 typedef WX_OPAQUE_TYPE(ControlRef ) * WXWidget ;
 typedef WX_OPAQUE_TYPE(WindowRef) * WXWindow ;
+#endif
 
 typedef void*       WXDisplay;
 
@@ -2800,15 +2802,33 @@ DECLARE_WXCOCOA_OBJC_CLASS(NSTextStorage);
 DECLARE_WXCOCOA_OBJC_CLASS(NSThread);
 DECLARE_WXCOCOA_OBJC_CLASS(NSWindow);
 DECLARE_WXCOCOA_OBJC_CLASS(NSView);
-#ifdef __WXMAC__
-// things added for __WXMAC__
-DECLARE_WXCOCOA_OBJC_CLASS(NSString);
-#else
-// things only for __WXCOCOA__
+#ifndef __WXMAC__
 typedef WX_NSView WXWidget; /*  wxWidgets BASE definition */
 #endif
 #endif /*  __WXCOCOA__  || ( __WXMAC__ &__DARWIN__)*/
 
+#ifdef __WXMAC__
+
+DECLARE_WXCOCOA_OBJC_CLASS(NSString);
+
+#if wxOSX_USE_COCOA
+
+typedef WX_NSWindow WXWindow;
+typedef WX_NSView WXWidget;
+
+#elif wxOSX_USE_IPHONE
+
+DECLARE_WXCOCOA_OBJC_CLASS(UIWindow);
+DECLARE_WXCOCOA_OBJC_CLASS(UIView);
+DECLARE_WXCOCOA_OBJC_CLASS(UIFont);
+
+typedef WX_UIWindow WXWindow;
+typedef WX_UIView WXWidget;
+
+#endif
+
+#endif // __WXMAC__
+
 #if defined(__WXPALMOS__)
 
 typedef void *          WXHWND;
index 023366e020ea3a5201a371ad8abd1adf097bd492..93b12c510733f9e528d2e8ff9bcc396384291044 100644 (file)
@@ -248,7 +248,7 @@ public:
     }
 #endif // wxUSE_DATETIME
 
-#ifdef __WXMAC__
+#if defined( __WXOSX_MAC__ ) && wxOSX_USE_CARBON
     bool MacSetTypeAndCreator( wxUint32 type , wxUint32 creator ) ;
     bool MacGetTypeAndCreator( wxUint32 *type , wxUint32 *creator ) ;
     // gets the 'common' type and creator for a certain extension
index 7d5b946ca59b1d480f70f17bf3a6a8b3db6a2bec..23ece7720ebe71f29dad422cecf767985760e849 100644 (file)
 #elif defined(__WXDFB__)
   #include "wx/generic/icon.h"
 #elif defined(__WXMAC__)
+#if wxOSX_USE_CARBON
   #include "wx/osx/icon.h"
+#else
+  #include "wx/generic/icon.h"
+#endif
 #elif defined(__WXCOCOA__)
   #include "wx/cocoa/icon.h"
 #elif defined(__WXPM__)
index b7096cbfdb04152e94e458defb5dd717758f6ce4..121a59062b47ea00067c35552f634e62ddf777b3 100644 (file)
@@ -57,9 +57,9 @@
 #if defined(__VISUALC__) || defined(__BORLANDC__) || defined(__WATCOMC__)
     #include <float.h>
     #define wxFinite(x) _finite(x)
-#elif defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \
+#elif defined(__GNUG__)||defined(__GNUWIN32__)||defined(__DJGPP__)|| \
       defined(__SGI_CC__)||defined(__SUNCC__)||defined(__XLC__)|| \
-      defined(__HPUX__)||defined(__MWERKS__)
+      defined(__HPUX__)||defined(__MWERKS__) ) && ( !defined(wxOSX_USE_IPHONE) || wxOSX_USE_IPHONE == 0 )
 #ifdef __SOLARIS__
 #include <ieeefp.h>
 #endif
index 5de5bc77bbb5b14d8040b9c884602f2a0a7c79ab..cb0b2e5a87c66d7a9cb7f1c13699e5de04fbd858 100644 (file)
@@ -14,7 +14,7 @@
 
 #include "wx/defs.h"
 
-#if defined(wxMAC_USE_CORE_GRAPHICS) && wxMAC_USE_CORE_GRAPHICS && wxMAC_USE_QUICKDRAW
+#if defined(wxOSX_USE_CORE_GRAPHICS) && wxOSX_USE_CORE_GRAPHICS && wxOSX_USE_QUICKDRAW
     #define wxHAS_NATIVE_OVERLAY 1
 #elif defined(__WXDFB__)
     #define wxHAS_NATIVE_OVERLAY 1
index e639d599e7244ee64c6448b33c9142e34f3c5f7a..2a4e8621cfaa7d4160d0f3a9c6dc83e64869695b 100644 (file)
@@ -80,7 +80,8 @@ enum wxPortId
     wxPORT_X11      = 1 << 5,       // wxX11, using wxUniversal
     wxPORT_PM       = 1 << 6,       // wxOS2, using OS/2 Presentation Manager
     wxPORT_OS2      = wxPORT_PM,    // wxOS2, using OS/2 Presentation Manager
-    wxPORT_MAC      = 1 << 7,       // wxMac, using Carbon or Classic Mac API
+    wxPORT_MAC      = 1 << 7,       // wxOSX (former wxMac), using Cocoa, Carbon or iPhone API
+    wxPORT_OSX      = wxPORT_MAC,   // wxOSX, using Cocoa, Carbon or iPhone API
     wxPORT_COCOA    = 1 << 8,       // wxCocoa, using Cocoa NextStep/Mac API
     wxPORT_WINCE    = 1 << 9,       // wxWinCE, toolkit is WinCE SDK API
     wxPORT_PALMOS   = 1 << 10,      // wxPalmOS, toolkit is PalmOS API
index a4cf196b0726fa397a2687c31462322d5fd3db46..38c61ccf9c95979c70bb2cb9f51c4e07149f1f7d 100644 (file)
@@ -183,7 +183,7 @@ protected:
 // ports with Combine() in this class
 #if defined(__WXPALMOS__) || \
     defined(__WXMSW__) || \
-    defined(__WXMAC__) || \
+    ( defined(__WXMAC__) && wxOSX_USE_CARBON ) || \
     defined(__WXPM__)
 
 #define wxHAS_REGION_COMBINE
index 9b842470937ad37466f3d2afa69b3c3725661200..2ed03eea96f29c83e6001b77739c009118773c75 100644 (file)
@@ -35,7 +35,7 @@ class WXDLLIMPEXP_FWD_CORE wxWindow;
 #include "wx/string.h"
 
 // some platforms have their own renderers, others use the generic one
-#if defined(__WXMSW__) || defined(__WXMAC__) || defined(__WXGTK__)
+#if defined(__WXMSW__) || ( defined(__WXMAC__) && wxOSX_USE_COCOA_OR_CARBON ) || defined(__WXGTK__)
     #define wxHAS_NATIVE_RENDERER
 #else
     #undef wxHAS_NATIVE_RENDERER
index 3c3493c3bebc5be5df3967e82ea130f2598f33f8..53e177f51529c48911695e6122392ad889f3a2a1 100644 (file)
@@ -204,7 +204,7 @@ private:
 
 // in order to avoid any overhead under platforms where critical sections are
 // just mutexes make all wxCriticalSection class functions inline
-#if !defined(__WXMSW__) && !defined(__WXMAC__)
+#if !defined(__WXMSW__) && ( !defined(__WXMAC__) || wxOSX_USE_COCOA_OR_IPHONE )
     #define wxCRITSECT_IS_MUTEX 1
 
     #define wxCRITSECT_INLINE inline