git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50001 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2007-11-16 20:55:57 +00:00
parent fdcc78196e
commit a9479081df
5 changed files with 4 additions and 93 deletions

View File

@@ -17,10 +17,6 @@
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/event.h" #include "wx/event.h"
#ifdef __WXMAC_OSX__
typedef struct __CFRunLoopSource * CFRunLoopSourceRef;
#endif
class WXDLLIMPEXP_FWD_CORE wxFrame; class WXDLLIMPEXP_FWD_CORE wxFrame;
class WXDLLIMPEXP_FWD_CORE wxWindowMac; class WXDLLIMPEXP_FWD_CORE wxWindowMac;
class WXDLLIMPEXP_FWD_CORE wxApp ; class WXDLLIMPEXP_FWD_CORE wxApp ;
@@ -92,9 +88,7 @@ private:
WXEVENTHANDLERREF m_macEventHandler ; WXEVENTHANDLERREF m_macEventHandler ;
WXEVENTHANDLERCALLREF m_macCurrentEventHandlerCallRef ; WXEVENTHANDLERCALLREF m_macCurrentEventHandlerCallRef ;
WXEVENTREF m_macCurrentEvent ; WXEVENTREF m_macCurrentEvent ;
#ifdef __WXMAC_OSX__
CFRunLoopSourceRef m_macEventPosted ; CFRunLoopSourceRef m_macEventPosted ;
#endif
public: public:
static long s_macAboutMenuItemId ; static long s_macAboutMenuItemId ;

View File

@@ -166,10 +166,9 @@ public:
// returns the 'native' implementation, a GWorldPtr for the content and one for the mask // returns the 'native' implementation, a GWorldPtr for the content and one for the mask
WXHBITMAP GetHBITMAP( WXHBITMAP * mask = NULL ) const; WXHBITMAP GetHBITMAP( WXHBITMAP * mask = NULL ) const;
#ifdef __WXMAC_OSX__
// returns a CGImageRef which must released after usage with CGImageRelease // returns a CGImageRef which must released after usage with CGImageRelease
WXCGIMAGEREF CGImageCreate() const ; WXCGIMAGEREF CGImageCreate() const ;
#endif
// get read only access to the underlying buffer // get read only access to the underlying buffer
void *GetRawAccess() const ; void *GetRawAccess() const ;
// brackets to the underlying OS structure for read/write access // brackets to the underlying OS structure for read/write access

View File

@@ -16,54 +16,10 @@
#include "wx/defs.h" #include "wx/defs.h"
#ifdef __DARWIN__
#include <Carbon/Carbon.h> #include <Carbon/Carbon.h>
#else
# include <Debugging.h>
# include <Quickdraw.h>
# include <Appearance.h>
# include <Folders.h>
# include <Controls.h>
# include <ControlDefinitions.h>
# include <LowMem.h>
# include <Gestalt.h>
# include <FixMath.h>
# include <CoreServices.h>
#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
#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/cfstring.h"
#include "wx/mac/corefoundation/cfdataref.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 #if MAC_OS_X_VERSION_MAX_ALLOWED < MAC_OS_X_VERSION_10_5
typedef UInt32 URefCon; typedef UInt32 URefCon;
@@ -227,16 +183,12 @@ template<> inline EventParamType wxMacGetEventParamType<SInt16>() { return typeS
template<> inline EventParamType wxMacGetEventParamType<SInt32>() { return typeSInt32; } template<> inline EventParamType wxMacGetEventParamType<SInt32>() { return typeSInt32; }
template<> inline EventParamType wxMacGetEventParamType<UInt32>() { return typeUInt32; } template<> inline EventParamType wxMacGetEventParamType<UInt32>() { return typeUInt32; }
template<> inline EventParamType wxMacGetEventParamType<RGBColor>() { return typeRGBColor; } template<> inline EventParamType wxMacGetEventParamType<RGBColor>() { return typeRGBColor; }
#if TARGET_API_MAC_OSX
template<> inline EventParamType wxMacGetEventParamType<HICommand>() { return typeHICommand; } template<> inline EventParamType wxMacGetEventParamType<HICommand>() { return typeHICommand; }
template<> inline EventParamType wxMacGetEventParamType<HIPoint>() { return typeHIPoint; } template<> inline EventParamType wxMacGetEventParamType<HIPoint>() { return typeHIPoint; }
template<> inline EventParamType wxMacGetEventParamType<HISize>() { return typeHISize; } template<> inline EventParamType wxMacGetEventParamType<HISize>() { return typeHISize; }
template<> inline EventParamType wxMacGetEventParamType<HIRect>() { return typeHIRect; } template<> inline EventParamType wxMacGetEventParamType<HIRect>() { return typeHIRect; }
template<> inline EventParamType wxMacGetEventParamType<void*>() { return typeVoidPtr; } template<> inline EventParamType wxMacGetEventParamType<void*>() { return typeVoidPtr; }
#endif
#if TARGET_API_MAC_OSX
template<> inline EventParamType wxMacGetEventParamType<CFDictionaryRef>() { return typeCFDictionaryRef; } template<> inline EventParamType wxMacGetEventParamType<CFDictionaryRef>() { return typeCFDictionaryRef; }
#endif
template<> inline EventParamType wxMacGetEventParamType<Collection>() { return typeCollection; } template<> inline EventParamType wxMacGetEventParamType<Collection>() { return typeCollection; }
template<> inline EventParamType wxMacGetEventParamType<CGContextRef>() { return typeCGContextRef; } template<> inline EventParamType wxMacGetEventParamType<CGContextRef>() { return typeCGContextRef; }
/* /*
@@ -473,9 +425,7 @@ private :
#if wxUSE_TIMER #if wxUSE_TIMER
wxMacToolTipTimer* m_timer ; wxMacToolTipTimer* m_timer ;
#endif #endif
#if TARGET_CARBON
wxMacCFStringHolder m_helpTextRef ; wxMacCFStringHolder m_helpTextRef ;
#endif
} ; } ;
/* /*
@@ -654,9 +604,8 @@ public :
// invalidates this control and all children // invalidates this control and all children
virtual void InvalidateWithChildren(); virtual void InvalidateWithChildren();
virtual void SetDrawingEnabled( bool enable ); virtual void SetDrawingEnabled( bool enable );
#ifdef __WXMAC_OSX__
virtual bool GetNeedsDisplay() const; virtual bool GetNeedsDisplay() const;
#endif
// where is in native window relative coordinates // where is in native window relative coordinates
virtual void SetNeedsDisplay( RgnHandle where ); virtual void SetNeedsDisplay( RgnHandle where );
// where is in native window relative coordinates // where is in native window relative coordinates
@@ -1225,13 +1174,9 @@ private:
#endif // wxMAC_USE_CORE_GRAPHICS #endif // wxMAC_USE_CORE_GRAPHICS
#ifdef __WXMAC_OSX__
CGColorSpaceRef wxMacGetGenericRGBColorSpace(void); CGColorSpaceRef wxMacGetGenericRGBColorSpace(void);
void wxMacMemoryBufferReleaseProc(void *info, const void *data, size_t size); void wxMacMemoryBufferReleaseProc(void *info, const void *data, size_t size);
#endif
class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData class WXDLLEXPORT wxBitmapRefData: public wxGDIRefData
{ {
friend class WXDLLIMPEXP_FWD_CORE wxIcon; friend class WXDLLIMPEXP_FWD_CORE wxIcon;
@@ -1269,9 +1214,7 @@ public:
#endif // wxUSE_PALETTE #endif // wxUSE_PALETTE
wxMask * m_bitmapMask; // Optional mask wxMask * m_bitmapMask; // Optional mask
#ifdef __WXMAC_OSX__
CGImageRef CGImageCreate() const; CGImageRef CGImageCreate() const;
#endif
// returns true if the bitmap has a size that // returns true if the bitmap has a size that
// can be natively transferred into a true icon // can be natively transferred into a true icon
@@ -1305,9 +1248,8 @@ private :
wxMemoryBuffer m_memBuf; wxMemoryBuffer m_memBuf;
int m_rawAccessCount; int m_rawAccessCount;
bool m_ok; bool m_ok;
#ifdef __WXMAC_OSX__
mutable CGImageRef m_cgImageRef; mutable CGImageRef m_cgImageRef;
#endif
IconRef m_iconRef; IconRef m_iconRef;
PicHandle m_pictHandle; PicHandle m_pictHandle;
#if wxMAC_USE_CORE_GRAPHICS #if wxMAC_USE_CORE_GRAPHICS
@@ -1355,8 +1297,6 @@ protected :
WindowRef m_macWindow ; WindowRef m_macWindow ;
} ; } ;
ControlRef wxMacFindControlUnderMouse( wxTopLevelWindowMac* toplevelWindow, const Point& location , WindowRef window , ControlPartCode *outPart );
#ifndef __LP64__ #ifndef __LP64__
#ifdef WORDS_BIGENDIAN #ifdef WORDS_BIGENDIAN

View File

@@ -175,17 +175,6 @@ public:
virtual void MacSuperChangedPosition(); virtual void MacSuperChangedPosition();
virtual void MacCheckSpelling(bool check); 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 wxMacTextControl * GetPeer() const
{ return (wxMacTextControl*) m_peer; } { return (wxMacTextControl*) m_peer; }

View File

@@ -236,17 +236,6 @@ public:
wxList& GetSubcontrols() { return m_subControls; } wxList& GetSubcontrols() { return m_subControls; }
WXEVENTHANDLERREF MacGetControlEventHandler() { return m_macControlEventHandler ; } 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 // translate wxWidgets coords into ones suitable
// to be passed to CreateControl calls // to be passed to CreateControl calls
// //