From: Stefan Csomor Date: Fri, 16 Nov 2007 20:55:57 +0000 (+0000) Subject: cleanup X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/a9479081dfcba1157a5a0a14610940b982362368?ds=sidebyside cleanup git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/mac/carbon/app.h b/include/wx/mac/carbon/app.h index 323ba1f98b..0de63d5dc8 100644 --- a/include/wx/mac/carbon/app.h +++ b/include/wx/mac/carbon/app.h @@ -17,10 +17,6 @@ #include "wx/gdicmn.h" #include "wx/event.h" -#ifdef __WXMAC_OSX__ -typedef struct __CFRunLoopSource * CFRunLoopSourceRef; -#endif - class WXDLLIMPEXP_FWD_CORE wxFrame; class WXDLLIMPEXP_FWD_CORE wxWindowMac; class WXDLLIMPEXP_FWD_CORE wxApp ; @@ -92,9 +88,7 @@ private: WXEVENTHANDLERREF m_macEventHandler ; WXEVENTHANDLERCALLREF m_macCurrentEventHandlerCallRef ; WXEVENTREF m_macCurrentEvent ; -#ifdef __WXMAC_OSX__ CFRunLoopSourceRef m_macEventPosted ; -#endif public: static long s_macAboutMenuItemId ; diff --git a/include/wx/mac/carbon/bitmap.h b/include/wx/mac/carbon/bitmap.h index ce5b1d22bc..b14f3436ea 100644 --- a/include/wx/mac/carbon/bitmap.h +++ b/include/wx/mac/carbon/bitmap.h @@ -166,10 +166,9 @@ public: // returns the 'native' implementation, a GWorldPtr for the content and one for the mask WXHBITMAP GetHBITMAP( WXHBITMAP * mask = NULL ) const; -#ifdef __WXMAC_OSX__ // returns a CGImageRef which must released after usage with CGImageRelease WXCGIMAGEREF CGImageCreate() const ; -#endif + // get read only access to the underlying buffer void *GetRawAccess() const ; // brackets to the underlying OS structure for read/write access diff --git a/include/wx/mac/carbon/private.h b/include/wx/mac/carbon/private.h index 1a0b42d3d3..19d4470e57 100644 --- a/include/wx/mac/carbon/private.h +++ b/include/wx/mac/carbon/private.h @@ -16,54 +16,10 @@ #include "wx/defs.h" -#ifdef __DARWIN__ -# include -#else -# include -# include -# include -# include -# include -# include -# include -# include -# include -# include -#endif - -#if UNIVERSAL_INTERFACES_VERSION < 0x0342 - #error "please update to Apple's latest universal headers from http://developer.apple.com/sdk/" -#endif - -#ifndef MAC_OS_X_VERSION_10_3 - #define MAC_OS_X_VERSION_10_3 1030 -#endif - -#ifndef MAC_OS_X_VERSION_10_4 - #define MAC_OS_X_VERSION_10_4 1040 -#endif +#include -#ifndef MAC_OS_X_VERSION_10_5 - #define MAC_OS_X_VERSION_10_5 1050 -#endif - -#ifdef __WXMAC_CARBON__ #include "wx/mac/corefoundation/cfstring.h" #include "wx/mac/corefoundation/cfdataref.h" -#endif - -#ifndef FixedToInt -// as macro in FixMath.h for 10.3 -inline Fixed IntToFixed( int inInt ) -{ - return (((SInt32) inInt) << 16); -} - -inline int FixedToInt( Fixed inFixed ) -{ - return (((SInt32) inFixed) >> 16); -} -#endif #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5 typedef UInt32 URefCon; @@ -227,16 +183,12 @@ template<> inline EventParamType wxMacGetEventParamType() { return typeS template<> inline EventParamType wxMacGetEventParamType() { return typeSInt32; } template<> inline EventParamType wxMacGetEventParamType() { return typeUInt32; } template<> inline EventParamType wxMacGetEventParamType() { return typeRGBColor; } -#if TARGET_API_MAC_OSX template<> inline EventParamType wxMacGetEventParamType() { return typeHICommand; } template<> inline EventParamType wxMacGetEventParamType() { return typeHIPoint; } template<> inline EventParamType wxMacGetEventParamType() { return typeHISize; } template<> inline EventParamType wxMacGetEventParamType() { return typeHIRect; } template<> inline EventParamType wxMacGetEventParamType() { return typeVoidPtr; } -#endif -#if TARGET_API_MAC_OSX template<> inline EventParamType wxMacGetEventParamType() { return typeCFDictionaryRef; } -#endif template<> inline EventParamType wxMacGetEventParamType() { return typeCollection; } template<> inline EventParamType wxMacGetEventParamType() { return typeCGContextRef; } /* @@ -473,9 +425,7 @@ private : #if wxUSE_TIMER wxMacToolTipTimer* m_timer ; #endif -#if TARGET_CARBON wxMacCFStringHolder m_helpTextRef ; -#endif } ; /* @@ -654,9 +604,8 @@ public : // invalidates this control and all children virtual void InvalidateWithChildren(); virtual void SetDrawingEnabled( bool enable ); -#ifdef __WXMAC_OSX__ virtual bool GetNeedsDisplay() const; -#endif + // where is in native window relative coordinates virtual void SetNeedsDisplay( RgnHandle where ); // where is in native window relative coordinates @@ -1225,13 +1174,9 @@ private: #endif // wxMAC_USE_CORE_GRAPHICS -#ifdef __WXMAC_OSX__ - CGColorSpaceRef wxMacGetGenericRGBColorSpace(void); void wxMacMemoryBufferReleaseProc(void *info, const void *data, size_t size); -#endif - class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData { friend class WXDLLIMPEXP_FWD_CORE wxIcon; @@ -1269,9 +1214,7 @@ public: #endif // wxUSE_PALETTE wxMask * m_bitmapMask; // Optional mask -#ifdef __WXMAC_OSX__ CGImageRef CGImageCreate() const; -#endif // returns true if the bitmap has a size that // can be natively transferred into a true icon @@ -1305,9 +1248,8 @@ private : wxMemoryBuffer m_memBuf; int m_rawAccessCount; bool m_ok; -#ifdef __WXMAC_OSX__ mutable CGImageRef m_cgImageRef; -#endif + IconRef m_iconRef; PicHandle m_pictHandle; #if wxMAC_USE_CORE_GRAPHICS @@ -1355,8 +1297,6 @@ protected : WindowRef m_macWindow ; } ; -ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow, const Point& location , WindowRef window , ControlPartCode *outPart ); - #ifndef __LP64__ #ifdef WORDS_BIGENDIAN diff --git a/include/wx/mac/carbon/textctrl.h b/include/wx/mac/carbon/textctrl.h index 39cf86c3dc..acc52b5b3c 100644 --- a/include/wx/mac/carbon/textctrl.h +++ b/include/wx/mac/carbon/textctrl.h @@ -175,17 +175,6 @@ public: virtual void MacSuperChangedPosition(); virtual void MacCheckSpelling(bool check); -#ifndef __WXMAC_OSX__ - virtual void MacControlUserPaneDrawProc(wxInt16 part); - virtual wxInt16 MacControlUserPaneHitTestProc(wxInt16 x, wxInt16 y); - virtual wxInt16 MacControlUserPaneTrackingProc(wxInt16 x, wxInt16 y, void* actionProc); - virtual void MacControlUserPaneIdleProc(); - virtual wxInt16 MacControlUserPaneKeyDownProc(wxInt16 keyCode, wxInt16 charCode, wxInt16 modifiers); - virtual void MacControlUserPaneActivateProc(bool activating); - virtual wxInt16 MacControlUserPaneFocusProc(wxInt16 action); - virtual void MacControlUserPaneBackgroundProc(void* info); -#endif - wxMacTextControl * GetPeer() const { return (wxMacTextControl*) m_peer; } diff --git a/include/wx/mac/carbon/window.h b/include/wx/mac/carbon/window.h index 2ea9b49990..0ae75eec9b 100644 --- a/include/wx/mac/carbon/window.h +++ b/include/wx/mac/carbon/window.h @@ -236,17 +236,6 @@ public: wxList& GetSubcontrols() { return m_subControls; } WXEVENTHANDLERREF MacGetControlEventHandler() { return m_macControlEventHandler ; } -#ifndef __WXMAC_OSX__ - virtual void MacControlUserPaneDrawProc(wxInt16 part) ; - virtual wxInt16 MacControlUserPaneHitTestProc(wxInt16 x, wxInt16 y) ; - virtual wxInt16 MacControlUserPaneTrackingProc(wxInt16 x, wxInt16 y, void* actionProc) ; - virtual void MacControlUserPaneIdleProc() ; - virtual wxInt16 MacControlUserPaneKeyDownProc(wxInt16 keyCode, wxInt16 charCode, wxInt16 modifiers) ; - virtual void MacControlUserPaneActivateProc(bool activating) ; - virtual wxInt16 MacControlUserPaneFocusProc(wxInt16 action) ; - virtual void MacControlUserPaneBackgroundProc(void* info) ; -#endif - // translate wxWidgets coords into ones suitable // to be passed to CreateControl calls //