Fix preprocessor definitions for wxBase build under OS X.
Define __WXOSX__ for non-GUI build under Darwin. Ensure that the rest of the code compiles correctly when just __WXOSX__ is defined but neither of __WXOSX_{CARBON,COCOA,IPHONE}__ is. This ensures that wxBase can actually be built under Mac. Move OS X symbols definitions in wx/platform.h after wx/setup.h inclusion as they rely on __DARWIN__ and wxUSE_GUI values which are both define in that file now. Still keep them before wx/chkconf.h inclusion which relies on __WXOSX_XXX__ being defined. Yes, it's a mess and should be cleaned up more permanently some day. Also remove some redundancy from wx/osx/{carbon,cocoa}/private.h by factoring out common parts into wx/osx/core/private.h. Also include this header itself from wx/osx/private.h directly instead of including it thrice from different sub-ports headers. Closes #12660. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -14,20 +14,8 @@
|
||||
#ifndef _WX_PRIVATE_COCOA_H_
|
||||
#define _WX_PRIVATE_COCOA_H_
|
||||
|
||||
#include "wx/osx/core/private.h"
|
||||
|
||||
#include "wx/defs.h"
|
||||
|
||||
#include <ApplicationServices/ApplicationServices.h>
|
||||
|
||||
#if wxOSX_USE_ATSU_TEXT
|
||||
// we need theming and atsu
|
||||
#include <Carbon/Carbon.h>
|
||||
#else
|
||||
// we only need theming, if we find a better include replace the following
|
||||
#include <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
||||
#ifdef __OBJC__
|
||||
#import <Cocoa/Cocoa.h>
|
||||
#endif
|
||||
@@ -53,22 +41,9 @@ OSStatus WXDLLIMPEXP_CORE wxMacDrawCGImage(
|
||||
CGImageRef inImage) ;
|
||||
WX_NSImage WXDLLIMPEXP_CORE wxOSXGetNSImageFromCGImage( CGImageRef image );
|
||||
CGImageRef WXDLLIMPEXP_CORE wxOSXCreateCGImageFromNSImage( WX_NSImage nsimage );
|
||||
#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 );
|
||||
WXDLLIMPEXP_BASE wxString wxMacHFSUniStrToString( ConstHFSUniStr255Param uniname );
|
||||
|
||||
class WXDLLIMPEXP_FWD_CORE wxDialog;
|
||||
|
||||
//
|
||||
//
|
||||
//
|
||||
|
||||
#if wxUSE_GUI
|
||||
|
||||
class WXDLLIMPEXP_CORE wxWidgetCocoaImpl : public wxWidgetImpl
|
||||
{
|
||||
public :
|
||||
|
Reference in New Issue
Block a user