X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d84afea9d1ec41ee4e2ebb3bf6b87926cf5f04d1..57fbe23f68f9ef92b8ef7e26bd06b399b53e33b2:/include/wx/mac/private.h diff --git a/include/wx/mac/private.h b/include/wx/mac/private.h index af3ab308ec..a27786e53c 100644 --- a/include/wx/mac/private.h +++ b/include/wx/mac/private.h @@ -15,10 +15,10 @@ #define _WX_PRIVATE_H_ #include "wx/defs.h" +#include "wx/app.h" -#if defined(__POWERPC__) && defined(__DARWIN__) +#ifdef __DARWIN__ # include -# define TARGET_CARBON 1 #else # include # include @@ -72,6 +72,18 @@ private: const wxDC* m_dc ; } ; +class WXDLLEXPORT wxMacWindowClipper +{ + DECLARE_NO_COPY_CLASS(wxMacWindowClipper) + +public: + wxMacWindowClipper( const wxWindow* win ) ; + ~wxMacWindowClipper() ; +private: + RgnHandle m_formerClip ; + RgnHandle m_newClip ; +} ; + class wxMacDrawingHelper { DECLARE_NO_COPY_CLASS(wxMacDrawingHelper) @@ -92,6 +104,8 @@ private: bool m_ok ; } ; +// app.h +bool wxMacConvertEventToRecord( EventRef event , EventRecord *rec) ; // filefn.h WXDLLEXPORT wxString wxMacFSSpec2MacFilename( const FSSpec *spec ) ; @@ -115,7 +129,7 @@ PicHandle wxMacCreatePict( GWorldPtr gw , GWorldPtr mask = NULL ) ; CIconHandle wxMacCreateCIcon(GWorldPtr image , GWorldPtr mask , short dstDepth , short iconSize ) ; void wxMacSetColorTableEntry( CTabHandle newColors , int index , int red , int green , int blue ) ; CTabHandle wxMacCreateColorTable( int numColors ) ; -void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap ) ; +void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bitmap , int forceType = 0 ) ; #define MAC_WXCOLORREF(a) (*((RGBColor*)&(a))) #define MAC_WXHBITMAP(a) (GWorldPtr(a)) @@ -127,5 +141,19 @@ void wxMacCreateBitmapButton( ControlButtonContentInfo*info , const wxBitmap& bi #define MAC_WXRECPTR(a) ((Rect*)a) #define MAC_WXPOINTPTR(a) ((Point*)a) #define MAC_WXHMENU(a) ((MenuHandle)a) + +// string conversions / + +#if TARGET_CARBON +// converts this string into a carbon foundation string with optional pc 2 mac encoding +CFStringRef wxMacCreateCFString( const wxString &str , bool pc2macEncoding ) ; + +// converts this string into a carbon foundation string with optional pc 2 mac encoding +inline CFStringRef wxMacCreateCFString( const wxString &str ) + { return wxMacCreateCFString( str , wxApp::s_macDefaultEncodingIsPC ) ; } + +#endif //TARGET_CARBON + + #endif // _WX_PRIVATE_H_