From: Kevin Ollivier Date: Sat, 20 Sep 2008 23:06:58 +0000 (+0000) Subject: Source changes needed to get MDI support compiling on OS X Cocoa, and a explicit... X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/cfea8e619a9ccc2f8e90c28120239d069fb7de22 Source changes needed to get MDI support compiling on OS X Cocoa, and a explicit cast to CGImageRef so the compiler doesn't complain. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@55751 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/osx/cocoa/chkconf.h b/include/wx/osx/cocoa/chkconf.h index c4b80425e7..9780efedf3 100644 --- a/include/wx/osx/cocoa/chkconf.h +++ b/include/wx/osx/cocoa/chkconf.h @@ -44,16 +44,6 @@ * turning off capabilities that don't work under cocoa yet */ -#if wxUSE_MDI -#undef wxUSE_MDI -#define wxUSE_MDI 0 -#endif - -#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 @@ -74,12 +64,6 @@ #define wxUSE_DATAVIEWCTRL 0 #endif -#if wxUSE_DOC_VIEW_ARCHITECTURE -#undef wxUSE_DOC_VIEW_ARCHITECTURE -#endif - -#define wxUSE_DOC_VIEW_ARCHITECTURE 0 - #if wxUSE_WXHTML_HELP #undef wxUSE_WXHTML_HELP #endif diff --git a/include/wx/osx/uma.h b/include/wx/osx/uma.h index 46ded9e42b..899dae109e 100644 --- a/include/wx/osx/uma.h +++ b/include/wx/osx/uma.h @@ -1,5 +1,3 @@ -#ifdef __WXMAC_CLASSIC__ -#include "wx/osx/classic/uma.h" -#else +#if __WXOSX_CARBON__ #include "wx/osx/carbon/uma.h" #endif diff --git a/src/osx/carbon/mdi.cpp b/src/osx/carbon/mdi.cpp index cee55ca047..3cd460be75 100644 --- a/src/osx/carbon/mdi.cpp +++ b/src/osx/carbon/mdi.cpp @@ -50,7 +50,7 @@ static const int IDM_WINDOWTILEVERT = 4005; void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) { -#if 1 // TODO REMOVE +#if wxOSX_USE_CARBON // TODO REMOVE if ( inWindowRef ) { // bool isHighlighted = IsWindowHighlited( inWindowRef ) ; @@ -74,6 +74,8 @@ void UMAHighlightAndActivateWindow( WindowRef inWindowRef , bool inActivate ) SetPort( port ) ; #endif } +#elif defined(wxOSX_USE_COCOA) +// TODO: implement me! #endif } diff --git a/src/osx/cocoa/utils.mm b/src/osx/cocoa/utils.mm index d2374b6b8c..ab7f2f4cff 100644 --- a/src/osx/cocoa/utils.mm +++ b/src/osx/cocoa/utils.mm @@ -163,7 +163,7 @@ wxBitmap wxWindowDCImpl::DoGetAsBitmap(const wxRect *subrect) const NSBitmapImageRep *rep = [[[NSBitmapImageRep alloc] initWithFocusedViewRect: [view bounds]] retain]; [view unlockFocus]; - CGImageRef cgImageRef = [rep CGImage]; + CGImageRef cgImageRef = (CGImageRef)[rep CGImage]; wxBitmap bitmap(CGImageGetWidth(cgImageRef) , CGImageGetHeight(cgImageRef) ); CGRect r = CGRectMake( 0 , 0 , CGImageGetWidth(cgImageRef) , CGImageGetHeight(cgImageRef) );