X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4f305456585c3f53b58f90803d25f1392eaedb36..245c5d2e02f338927e4099adc56ece165aeb5924:/include/wx/mac/carbon/private.h diff --git a/include/wx/mac/carbon/private.h b/include/wx/mac/carbon/private.h index c64fcbb0b3..b41aecbf20 100644 --- a/include/wx/mac/carbon/private.h +++ b/include/wx/mac/carbon/private.h @@ -105,10 +105,23 @@ public: wxMacWindowClipper( const wxWindow* win ) ; ~wxMacWindowClipper() ; private: + GrafPtr m_newPort ; RgnHandle m_formerClip ; RgnHandle m_newClip ; } ; +class WXDLLEXPORT wxMacWindowStateSaver : public wxMacWindowClipper +{ + DECLARE_NO_COPY_CLASS(wxMacWindowStateSaver) + +public: + wxMacWindowStateSaver( const wxWindow* win ) ; + ~wxMacWindowStateSaver() ; +private: + GrafPtr m_newPort ; + ThemeDrawingState m_themeDrawingState ; +} ; + /* class wxMacDrawingHelper { @@ -186,7 +199,7 @@ wxWindow *wxFindControlFromMacControl(ControlRef inControl ) ; wxTopLevelWindowMac* wxFindWinFromMacWindow( WindowRef inWindow ) ; extern wxWindow* g_MacLastWindow ; pascal OSStatus wxMacTopLevelMouseEventHandler( EventHandlerCallRef handler , EventRef event , void *data ) ; -Rect wxMacGetBoundsForControl( wxWindow* window , const wxPoint& pos , const wxSize &size ) ; +Rect wxMacGetBoundsForControl( wxWindow* window , const wxPoint& pos , const wxSize &size , bool adjustForOrigin = true ) ; template EventParamType wxMacGetEventParamType() { wxFAIL_MSG( wxT("Unknown Param Type") ) ; return 0 ; } template<> inline EventParamType wxMacGetEventParamType() { return typeQDRgnHandle ; } @@ -248,14 +261,22 @@ public : OSStatus SetParameter( EventParamName inName, EventParamType inType, UInt32 inSize, void * inData) ; - template OSStatus SetParameter( EventParamName inName, EventParamType type , T *data ) + template OSStatus SetParameter( EventParamName inName, EventParamType inDesiredType , T *data ) { - return SetParameter( inName, type , sizeof( T ) , data ) ; + return SetParameter( inName, inDesiredType , sizeof( T ) , data ) ; + } + template OSStatus SetParameter( EventParamName inName, EventParamType inDesiredType , T data ) + { + return SetParameter( inName, inDesiredType , &data ) ; } template OSStatus SetParameter( EventParamName inName, T *data ) { return SetParameter( inName, wxMacGetEventParamType() , data ) ; } + template OSStatus SetParameter( EventParamName inName, T data ) + { + return SetParameter( inName, wxMacGetEventParamType() , &data ) ; + } EventKind GetKind() { @@ -352,11 +373,14 @@ private: #endif - +// utils.cpp wxUint32 wxMacGetSystemEncFromFontEnc(wxFontEncoding encoding) ; wxFontEncoding wxMacGetFontEncFromSystemEnc(wxUint32 encoding) ; +// toplevel.cpp + +ControlRef wxMacFindControlUnderMouse( Point location , WindowRef window , ControlPartCode *outPart ) ; #endif // _WX_PRIVATE_H_