]> git.saurik.com Git - wxWidgets.git/commitdiff
defines reordered, support for non-precomp cocoa
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 6 Sep 2008 16:30:42 +0000 (16:30 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 6 Sep 2008 16:30:42 +0000 (16:30 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55498 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/osx/chkconf.h
include/wx/osx/cocoa/private.h

index 755cc8c9859b32aacb16685faea3cd767d0d5001..77a9ca66c2aa144e00ec0808d08cf8886a8da95a 100644 (file)
  * using mixins of cocoa functionality
  */
  
-#ifndef wxOSX_USE_COCOA
+#ifdef __WXOSX_COCOA__
+    #define wxOSX_USE_COCOA 1
+#else
     #define wxOSX_USE_COCOA 0
 #endif
 
+#ifdef __WXOSX_CARBON__
+    #define wxOSX_USE_CARBON 1
+#else
+    #define wxOSX_USE_CARBON 0
+#endif
+
 /*
  * setting flags according to the platform
  */
     #define wxOSX_USE_IPHONE 0
 #else
     #ifdef __WXOSX_IPHONE__
-        #define wxOSX_USE_CARBON 0
         #define wxOSX_USE_IPHONE 1
     #else
         #define wxOSX_USE_IPHONE 0
-        #if wxOSX_USE_COCOA
-            #define wxOSX_USE_CARBON 0
-        #else
-            #define wxOSX_USE_CARBON 1
-        #endif
     #endif
 #endif
 
index cccac824e9ad556dce55823cb195c71a20d77c9b..9ca03e3511c9df820418437ee686bd6a19d2a1e1 100644 (file)
 
 #include "wx/osx/core/private.h"
 
+#include "wx/defs.h"
+
+#include <ApplicationServices/ApplicationServices.h>
+
 #ifdef __OBJC__
 
     #import <Cocoa/Cocoa.h>
 
+    #if wxUSE_GUI
+
     extern NSRect wxToNSRect( NSView* parent, const wxRect& r );
     extern wxRect wxFromNSRect( NSView* parent, const NSRect& rect );
     extern NSPoint wxToNSPoint( NSView* parent, const wxPoint& p );
@@ -63,6 +69,8 @@
 
     NSRect WXDLLIMPEXP_CORE wxOSXGetFrameForControl( wxWindowMac* window , const wxPoint& pos , const wxSize &size , 
         bool adjustForOrigin = true );
+        
+    #endif // wxUSE_GUI
 
 #endif // __OBJC__
 
 
 // bring in themeing types without pulling in the headers
 
+#if wxUSE_GUI
 typedef SInt16 ThemeBrush;
-long UMAGetSystemVersion() ;
 CGColorRef wxMacCreateCGColorFromHITheme( ThemeBrush brush ) ;
 OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage(
                                CGContextRef    inContext,
                                const CGRect *  inBounds,
                                CGImageRef      inImage) ;
 WX_NSImage  wxOSXCreateNSImageFromCGImage( CGImageRef image );
+#endif
 
+long UMAGetSystemVersion() ;
 WXDLLIMPEXP_BASE void wxMacStringToPascal( const wxString&from , StringPtr to );
 WXDLLIMPEXP_BASE wxString wxMacFSRefToPath( const FSRef *fsRef , CFStringRef additionalPathComponent = NULL );
 WXDLLIMPEXP_BASE OSStatus wxMacPathToFSRef( const wxString&path , FSRef *fsRef );