OSX reshuffling
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@54847 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Name: wx/mac/chkconf.h
|
* Name: wx/osx/carbon/chkconf.h
|
||||||
* Purpose: Compiler-specific configuration checking
|
* Purpose: Compiler-specific configuration checking
|
||||||
* Author: Julian Smart
|
* Author: Julian Smart
|
||||||
* Modified by:
|
* Modified by:
|
||||||
@@ -9,236 +9,44 @@
|
|||||||
* Licence: wxWindows licence
|
* Licence: wxWindows licence
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef _WX_MAC_CHKCONF_H_
|
#ifndef _WX_OSX_CARBON_CHKCONF_H_
|
||||||
#define _WX_MAC_CHKCONF_H_
|
#define _WX_OSX_CARBON_CHKCONF_H_
|
||||||
|
|
||||||
/*
|
|
||||||
* disable the settings which don't work for some compilers
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(__MWERKS__)
|
|
||||||
#undef wxUSE_DEBUG_NEW_ALWAYS
|
|
||||||
#define wxUSE_DEBUG_NEW_ALWAYS 0
|
|
||||||
|
|
||||||
/* DS: Fixes compilation when wxUSE_ON_FATAL_EXCEPTION is 1 */
|
|
||||||
#ifndef wxTYPE_SA_HANDLER
|
|
||||||
#define wxTYPE_SA_HANDLER int
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* use OS X CoreGraphics (1) or QuickDraw (0) for rendering
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef wxOSX_USE_CORE_GRAPHICS
|
|
||||||
#define wxOSX_USE_CORE_GRAPHICS 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* wxOSX_USE_CORE_GRAPHICS is now implemented in terms of wxUSE_GRAPHICS_CONTEXT
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if wxOSX_USE_CORE_GRAPHICS
|
|
||||||
#undef wxUSE_GRAPHICS_CONTEXT
|
|
||||||
#define wxUSE_GRAPHICS_CONTEXT 1
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* check graphics context option
|
|
||||||
*/
|
|
||||||
#if wxUSE_GRAPHICS_CONTEXT && !wxOSX_USE_CORE_GRAPHICS
|
|
||||||
# error "wxUSE_GRAPHICS_CONTEXT on wxMac requires wxOSX_USE_CORE_GRAPHICS"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* native (1) or emulated (0) toolbar
|
* native (1) or emulated (0) toolbar
|
||||||
|
* also support old notation wxMAC_USE_NATIVE_TOOLBAR
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef wxMAC_USE_NATIVE_TOOLBAR
|
|
||||||
#define wxMAC_USE_NATIVE_TOOLBAR 1
|
|
||||||
|
#ifdef wxMAC_USE_NATIVE_TOOLBAR
|
||||||
|
#define wxOSX_USE_NATIVE_TOOLBAR wxMAC_USE_NATIVE_TOOLBAR
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
#ifndef wxOSX_USE_NATIVE_TOOLBAR
|
||||||
* using mixins of cocoa functionality
|
#define wxOSX_USE_NATIVE_TOOLBAR 1
|
||||||
*/
|
|
||||||
|
|
||||||
#ifndef wxOSX_USE_COCOA
|
|
||||||
#define wxOSX_USE_COCOA 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
* setting flags according to the platform
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef __LP64__
|
|
||||||
#if wxOSX_USE_COCOA == 0
|
|
||||||
#undef wxOSX_USE_COCOA
|
|
||||||
#define wxOSX_USE_COCOA 1
|
|
||||||
#endif
|
|
||||||
#define wxOSX_USE_QUICKDRAW 0
|
|
||||||
#define wxOSX_USE_CARBON 0
|
|
||||||
#define wxOSX_USE_IPHONE 0
|
|
||||||
#else
|
|
||||||
#ifdef __WXOSX_IPHONE__
|
|
||||||
#define wxOSX_USE_QUICKDRAW 0
|
|
||||||
#define wxOSX_USE_CARBON 0
|
|
||||||
#define wxOSX_USE_IPHONE 1
|
|
||||||
#else
|
|
||||||
#define wxOSX_USE_IPHONE 0
|
|
||||||
#if wxOSX_USE_COCOA
|
|
||||||
#define wxOSX_USE_QUICKDRAW 0
|
|
||||||
#define wxOSX_USE_CARBON 0
|
|
||||||
#else
|
|
||||||
#define wxOSX_USE_QUICKDRAW 1
|
|
||||||
#define wxOSX_USE_CARBON 1
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxOSX_USE_COCOA || wxOSX_USE_CARBON
|
|
||||||
#define wxOSX_USE_COCOA_OR_CARBON 1
|
|
||||||
#else
|
|
||||||
#define wxOSX_USE_COCOA_OR_CARBON 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxOSX_USE_COCOA || wxOSX_USE_IPHONE
|
|
||||||
#define wxOSX_USE_COCOA_OR_IPHONE 1
|
|
||||||
#else
|
|
||||||
#define wxOSX_USE_COCOA_OR_IPHONE 0
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* text rendering system
|
* text rendering system
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* we have different options and we turn on all that make sense
|
|
||||||
* under a certain platform
|
|
||||||
*/
|
|
||||||
|
|
||||||
#ifdef __WXOSX_IPHONE__
|
|
||||||
#define wxMAC_USE_CG_TEXT 1
|
|
||||||
#define wxMAC_USE_CORE_TEXT 0
|
|
||||||
#define wxMAC_USE_ATSU_TEXT 0
|
|
||||||
#else // !__WXOSX_IPHONE__
|
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
#if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_5
|
||||||
|
|
||||||
#define wxMAC_USE_CORE_TEXT 1
|
#define wxOSX_USE_CORE_TEXT 1
|
||||||
#define wxMAC_USE_ATSU_TEXT 0
|
#define wxOSX_USE_ATSU_TEXT 0
|
||||||
#define wxMAC_USE_CG_TEXT 0
|
|
||||||
|
|
||||||
#else // platform < 10.5
|
#else // platform < 10.5
|
||||||
|
|
||||||
#define wxMAC_USE_CG_TEXT 0
|
|
||||||
|
|
||||||
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
|
#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_5
|
||||||
#define wxMAC_USE_CORE_TEXT 1
|
#define wxOSX_USE_CORE_TEXT 1
|
||||||
#else
|
#else
|
||||||
#define wxMAC_USE_CORE_TEXT 0
|
#define wxOSX_USE_CORE_TEXT 0
|
||||||
#endif
|
#endif
|
||||||
#define wxMAC_USE_ATSU_TEXT 1
|
#define wxOSX_USE_ATSU_TEXT 1
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#endif // !__WXOSX_IPHONE__
|
|
||||||
|
|
||||||
/*
|
|
||||||
* turning off capabilities that don't work under 64 bit yet
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if wxOSX_USE_COCOA_OR_IPHONE
|
|
||||||
|
|
||||||
#if wxUSE_MDI
|
|
||||||
#undef wxUSE_MDI
|
|
||||||
#define wxUSE_MDI 0
|
|
||||||
#endif
|
#endif
|
||||||
|
/* _WX_OSX_CARBON_CHKCONF_H_ */
|
||||||
#if wxUSE_MDI_ARCHITECTURE
|
|
||||||
#undef wxUSE_MDI_ARCHITECTURE
|
|
||||||
#define wxUSE_MDI_ARCHITECTURE 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_DRAG_AND_DROP
|
|
||||||
#undef wxUSE_DRAG_AND_DROP
|
|
||||||
#define wxUSE_DRAG_AND_DROP 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_TASKBARICON
|
|
||||||
#undef wxUSE_TASKBARICON
|
|
||||||
#define wxUSE_TASKBARICON 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_TOOLTIPS
|
|
||||||
#undef wxUSE_TOOLTIPS
|
|
||||||
#define wxUSE_TOOLTIPS 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_DATAVIEWCTRL
|
|
||||||
#undef wxUSE_DATAVIEWCTRL
|
|
||||||
#define wxUSE_DATAVIEWCTRL 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_DRAG_AND_DROP
|
|
||||||
#undef wxUSE_DRAG_AND_DROP
|
|
||||||
#define wxUSE_DRAG_AND_DROP 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_TASKBARICON
|
|
||||||
#undef wxUSE_TASKBARICON
|
|
||||||
#define wxUSE_TASKBARICON 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/*
|
|
||||||
#if wxUSE_POPUPWIN
|
|
||||||
#undef wxUSE_POPUPWIN
|
|
||||||
#define wxUSE_POPUPWIN 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_COMBOBOX
|
|
||||||
#undef wxUSE_COMBOBOX
|
|
||||||
#define wxUSE_COMBOBOX 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
|
||||||
#if wxUSE_MENUS
|
|
||||||
#undef wxUSE_MENUS
|
|
||||||
#define wxUSE_MENUS 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_CALENDARCTRL
|
|
||||||
#undef wxUSE_CALENDARCTRL
|
|
||||||
#define wxUSE_CALENDARCTRL 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_WXHTML_HELP
|
|
||||||
#undef wxUSE_WXHTML_HELP
|
|
||||||
#define wxUSE_WXHTML_HELP 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_DOC_VIEW_ARCHITECTURE
|
|
||||||
#undef wxUSE_DOC_VIEW_ARCHITECTURE
|
|
||||||
#define wxUSE_DOC_VIEW_ARCHITECTURE 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#if wxUSE_PRINTING_ARCHITECTURE
|
|
||||||
#undef wxUSE_PRINTING_ARCHITECTURE
|
|
||||||
#define wxUSE_PRINTING_ARCHITECTURE 0
|
|
||||||
#endif
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
#endif // wxOSX_USE_COCOA_OR_IPHON
|
|
||||||
|
|
||||||
#if wxOSX_USE_IPHONE
|
|
||||||
|
|
||||||
#if wxUSE_CLIPBOARD
|
|
||||||
#undef wxUSE_CLIPBOARD
|
|
||||||
#define wxUSE_CLIPBOARD 0
|
|
||||||
#endif // wxUSE_CLIPBOARD
|
|
||||||
|
|
||||||
#endif //wxOSX_USE_IPHONE
|
|
||||||
|
|
||||||
#endif
|
|
||||||
/* _WX_MAC_CHKCONF_H_ */
|
|
||||||
|
|
||||||
|
@@ -47,14 +47,14 @@ public:
|
|||||||
CGColorRef GetCGColor() const { return m_cgColour; };
|
CGColorRef GetCGColor() const { return m_cgColour; };
|
||||||
CGColorRef CreateCGColor() const { return wxCFRetain( (CGColorRef)m_cgColour ); };
|
CGColorRef CreateCGColor() const { return wxCFRetain( (CGColorRef)m_cgColour ); };
|
||||||
|
|
||||||
#if wxOSX_USE_QUICKDRAW
|
#if wxOSX_USE_CARBON
|
||||||
void GetRGBColor( RGBColor *col ) const;
|
void GetRGBColor( RGBColor *col ) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// Mac-specific ctor and assignment operator from the native colour
|
// Mac-specific ctor and assignment operator from the native colour
|
||||||
// assumes ownership of CGColorRef
|
// assumes ownership of CGColorRef
|
||||||
wxColour( CGColorRef col );
|
wxColour( CGColorRef col );
|
||||||
#if wxOSX_USE_QUICKDRAW
|
#if wxOSX_USE_CARBON
|
||||||
wxColour(const RGBColor& col);
|
wxColour(const RGBColor& col);
|
||||||
wxColour& operator=(const RGBColor& col);
|
wxColour& operator=(const RGBColor& col);
|
||||||
#endif
|
#endif
|
||||||
@@ -64,7 +64,7 @@ public:
|
|||||||
protected :
|
protected :
|
||||||
virtual void
|
virtual void
|
||||||
InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a);
|
InitRGBA(ChannelType r, ChannelType g, ChannelType b, ChannelType a);
|
||||||
#if wxOSX_USE_QUICKDRAW
|
#if wxOSX_USE_CARBON
|
||||||
void InitRGBColor( const RGBColor& col );
|
void InitRGBColor( const RGBColor& col );
|
||||||
#endif
|
#endif
|
||||||
void InitCGColorRef( CGColorRef col );
|
void InitCGColorRef( CGColorRef col );
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
#ifndef _WX_MAC_CARBON_EVTLOOP_H_
|
#ifndef _WX_MAC_CARBON_EVTLOOP_H_
|
||||||
#define _WX_MAC_CARBON_EVTLOOP_H_
|
#define _WX_MAC_CARBON_EVTLOOP_H_
|
||||||
|
|
||||||
// set wxMAC_USE_RUN_APP_EVENT_LOOP to 1 if the standard
|
// set wxOSX_USE_RUN_APP_EVENT_LOOP to 1 if the standard
|
||||||
// RunApplicationEventLoop function should be used, otherwise
|
// RunApplicationEventLoop function should be used, otherwise
|
||||||
// the lower level CarbonEventLoop will be used
|
// the lower level CarbonEventLoop will be used
|
||||||
//
|
//
|
||||||
@@ -21,13 +21,13 @@
|
|||||||
// events etc and perhaps we will also have to pipe events through an
|
// events etc and perhaps we will also have to pipe events through an
|
||||||
// ueber-event-handler to make sure we have one place to do all these
|
// ueber-event-handler to make sure we have one place to do all these
|
||||||
// house-keeping functions
|
// house-keeping functions
|
||||||
#define wxMAC_USE_RUN_APP_EVENT_LOOP 0
|
#define wxOSX_USE_RUN_APP_EVENT_LOOP 0
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxEventLoop
|
// wxEventLoop
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
#if wxMAC_USE_RUN_APP_EVENT_LOOP
|
#if wxOSX_USE_RUN_APP_EVENT_LOOP
|
||||||
|
|
||||||
class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxEventLoopBase
|
class WXDLLIMPEXP_CORE wxGUIEventLoop : public wxEventLoopBase
|
||||||
{
|
{
|
||||||
|
@@ -51,7 +51,7 @@ public:
|
|||||||
bool Create(const wxNativeFontInfo& info);
|
bool Create(const wxNativeFontInfo& info);
|
||||||
|
|
||||||
bool MacCreateFromThemeFont( wxUint16 themeFontID ) ;
|
bool MacCreateFromThemeFont( wxUint16 themeFontID ) ;
|
||||||
#if wxMAC_USE_CORE_TEXT
|
#if wxOSX_USE_CORE_TEXT
|
||||||
bool MacCreateFromUIFont( wxUint32 coreTextFontType );
|
bool MacCreateFromUIFont( wxUint32 coreTextFontType );
|
||||||
bool MacCreateFromCTFontDescriptor( const void * ctFontDescriptor, int pointSize = 0 );
|
bool MacCreateFromCTFontDescriptor( const void * ctFontDescriptor, int pointSize = 0 );
|
||||||
bool MacCreateFromCTFont( const void * ctFont );
|
bool MacCreateFromCTFont( const void * ctFont );
|
||||||
@@ -89,7 +89,7 @@ public:
|
|||||||
|
|
||||||
// Mac-specific, risks to change, don't use in portable code
|
// Mac-specific, risks to change, don't use in portable code
|
||||||
|
|
||||||
#if wxMAC_USE_ATSU_TEXT
|
#if wxOSX_USE_ATSU_TEXT
|
||||||
// 'old' Quickdraw accessors
|
// 'old' Quickdraw accessors
|
||||||
short MacGetFontNum() const;
|
short MacGetFontNum() const;
|
||||||
short MacGetFontSize() const;
|
short MacGetFontSize() const;
|
||||||
@@ -102,11 +102,11 @@ public:
|
|||||||
|
|
||||||
// Returns an ATSUStyle not ATSUStyle*
|
// Returns an ATSUStyle not ATSUStyle*
|
||||||
#endif
|
#endif
|
||||||
#if wxMAC_USE_CORE_TEXT
|
#if wxOSX_USE_CORE_TEXT
|
||||||
const void * MacGetCTFont() const;
|
const void * MacGetCTFont() const;
|
||||||
const void * MacGetCTFontDescriptor() const;
|
const void * MacGetCTFontDescriptor() const;
|
||||||
#endif
|
#endif
|
||||||
#if wxMAC_USE_CORE_TEXT || wxMAC_USE_ATSU_TEXT
|
#if wxOSX_USE_CORE_TEXT || wxOSX_USE_ATSU_TEXT
|
||||||
void* MacGetATSUStyle() const ;
|
void* MacGetATSUStyle() const ;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@@ -19,11 +19,18 @@
|
|||||||
* Font dialog
|
* Font dialog
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#ifndef wxMAC_USE_EXPERIMENTAL_FONTDIALOG
|
/*
|
||||||
#define wxMAC_USE_EXPERIMENTAL_FONTDIALOG 1
|
* support old notation
|
||||||
|
*/
|
||||||
|
#ifdef wxMAC_USE_EXPERIMENTAL_FONTDIALOG
|
||||||
|
#define wxOSX_USE_EXPERIMENTAL_FONTDIALOG wxMAC_USE_EXPERIMENTAL_FONTDIALOG
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxMAC_USE_EXPERIMENTAL_FONTDIALOG
|
#ifndef wxOSX_USE_EXPERIMENTAL_FONTDIALOG
|
||||||
|
#define wxOSX_USE_EXPERIMENTAL_FONTDIALOG 1
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if wxOSX_USE_EXPERIMENTAL_FONTDIALOG
|
||||||
|
|
||||||
class WXDLLIMPEXP_CORE wxFontDialog : public wxDialog
|
class WXDLLIMPEXP_CORE wxFontDialog : public wxDialog
|
||||||
{
|
{
|
||||||
@@ -45,7 +52,7 @@ protected:
|
|||||||
|
|
||||||
extern "C" int RunMixedFontDialog(wxFontDialog* dialog) ;
|
extern "C" int RunMixedFontDialog(wxFontDialog* dialog) ;
|
||||||
|
|
||||||
#else // wxMAC_USE_EXPERIMENTAL_FONTDIALOG
|
#else // wxOSX_USE_EXPERIMENTAL_FONTDIALOG
|
||||||
|
|
||||||
#if !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
|
#if !USE_NATIVE_FONT_DIALOG_FOR_MACOSX
|
||||||
|
|
||||||
|
@@ -67,7 +67,7 @@ class WXDLLIMPEXP_CORE wxToolBar: public wxToolBarBase
|
|||||||
void OnMouse(wxMouseEvent& event) ;
|
void OnMouse(wxMouseEvent& event) ;
|
||||||
virtual void MacSuperChangedPosition() ;
|
virtual void MacSuperChangedPosition() ;
|
||||||
|
|
||||||
#if wxMAC_USE_NATIVE_TOOLBAR
|
#if wxOSX_USE_NATIVE_TOOLBAR
|
||||||
bool MacInstallNativeToolbar(bool usesNative);
|
bool MacInstallNativeToolbar(bool usesNative);
|
||||||
bool MacWantsNativeToolbar();
|
bool MacWantsNativeToolbar();
|
||||||
bool MacTopLevelHasNativeToolbar(bool *ownToolbarInstalled) const;
|
bool MacTopLevelHasNativeToolbar(bool *ownToolbarInstalled) const;
|
||||||
@@ -97,7 +97,7 @@ protected:
|
|||||||
const wxString& label);
|
const wxString& label);
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
DECLARE_EVENT_TABLE()
|
||||||
#if wxMAC_USE_NATIVE_TOOLBAR
|
#if wxOSX_USE_NATIVE_TOOLBAR
|
||||||
bool m_macUsesNativeToolbar ;
|
bool m_macUsesNativeToolbar ;
|
||||||
void* m_macHIToolbarRef ;
|
void* m_macHIToolbarRef ;
|
||||||
#endif
|
#endif
|
||||||
|
Reference in New Issue
Block a user