mac cgcolor changes & cleanup

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50171 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Csomor
2007-11-22 17:47:10 +00:00
parent efb190955c
commit 115563867d
3 changed files with 11 additions and 3 deletions

View File

@@ -42,7 +42,7 @@ public:
virtual void SetStyle(int style) ; virtual void SetStyle(int style) ;
virtual void SetStipple(const wxBitmap& stipple) ; virtual void SetStipple(const wxBitmap& stipple) ;
virtual void MacSetTheme(short macThemeBrush) ; virtual void MacSetTheme(short macThemeBrush) ;
virtual void MacSetThemeBackground(unsigned long macThemeBackground , WXRECTPTR extent) ; // TODO REMOVE virtual void MacSetThemeBackground(unsigned long macThemeBackground , WXRECTPTR extent) ;
bool operator == (const wxBrush& brush) const; bool operator == (const wxBrush& brush) const;
bool operator != (const wxBrush& brush) const bool operator != (const wxBrush& brush) const
@@ -50,7 +50,7 @@ public:
wxMacBrushKind MacGetBrushKind() const ; wxMacBrushKind MacGetBrushKind() const ;
unsigned long MacGetThemeBackground(WXRECTPTR extent) const ; // TODO REMOVE unsigned long MacGetThemeBackground(WXRECTPTR extent) const ;
short MacGetTheme() const ; short MacGetTheme() const ;
wxColour& GetColour() const ; wxColour& GetColour() const ;
virtual int GetStyle() const ; virtual int GetStyle() const ;

View File

@@ -57,10 +57,12 @@ public:
// Implementation // Implementation
WXHMETAFILE GetHMETAFILE() const ; WXHMETAFILE GetHMETAFILE() const ;
void SetHMETAFILE(WXHMETAFILE mf) ; void SetHMETAFILE(WXHMETAFILE mf) ;
#ifndef __LP64__
// Since the native metafile format is PDF for Quartz // Since the native metafile format is PDF for Quartz
// we need a call that allows setting PICT content for // we need a call that allows setting PICT content for
// backwards compatibility // backwards compatibility
void SetPICT(void* pictHandle) ; void SetPICT(void* pictHandle) ;
#endif
}; };
class WXDLLEXPORT wxMetafileDC: public wxDC class WXDLLEXPORT wxMetafileDC: public wxDC

View File

@@ -438,7 +438,6 @@ void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bi
void wxMacReleaseBitmapButton( ControlButtonContentInfo*info ); void wxMacReleaseBitmapButton( ControlButtonContentInfo*info );
CGImageRef wxMacCreateCGImageFromBitmap( const wxBitmap& bitmap ); CGImageRef wxMacCreateCGImageFromBitmap( const wxBitmap& bitmap );
#define MAC_WXCOLORREF(a) (*((RGBColor*)&(a)))
#define MAC_WXHBITMAP(a) (GWorldPtr(a)) #define MAC_WXHBITMAP(a) (GWorldPtr(a))
#define MAC_WXHMETAFILE(a) (PicHandle(a)) #define MAC_WXHMETAFILE(a) (PicHandle(a))
#define MAC_WXHICON(a) (IconRef(a)) #define MAC_WXHICON(a) (IconRef(a))
@@ -1073,6 +1072,13 @@ public:
// graphics implementation // graphics implementation
// ============================================================================ // ============================================================================
// draw the image 'upside down' corrected as HIViewDrawCGImage does
OSStatus WXDLLEXPORT wxMacDrawCGImage(
CGContextRef inContext,
const HIRect * inBounds,
CGImageRef inImage) ;
// make sure we all use one class for all conversions from wx to native colour // make sure we all use one class for all conversions from wx to native colour
class wxMacCoreGraphicsColour class wxMacCoreGraphicsColour