From 6bc3b8e9680e8aa3d50ae4bb41dad22c6dd3ce1b Mon Sep 17 00:00:00 2001 From: Dimitri Schoolwerth Date: Wed, 18 Aug 2004 15:37:01 +0000 Subject: [PATCH] fixes for CW8 Mac Classic compilation git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/mac/classic/toplevel.h | 1 - src/mac/classic/app.cpp | 16 ++++++++-------- src/mac/classic/bmpbuttn.cpp | 2 +- src/mac/classic/button.cpp | 2 +- src/mac/classic/checkbox.cpp | 2 +- src/mac/classic/checklst.cpp | 2 +- src/mac/classic/choice.cpp | 2 +- src/mac/classic/control.cpp | 6 +++--- src/mac/classic/dialog.cpp | 2 +- src/mac/classic/dnd.cpp | 2 +- src/mac/classic/gauge.cpp | 2 +- src/mac/classic/listbox.cpp | 2 +- src/mac/classic/notebmac.cpp | 2 +- src/mac/classic/radiobox.cpp | 2 +- src/mac/classic/radiobut.cpp | 2 +- src/mac/classic/scrolbar.cpp | 2 +- src/mac/classic/slider.cpp | 2 +- src/mac/classic/spinbutt.cpp | 2 +- src/mac/classic/statbox.cpp | 2 +- src/mac/classic/statlmac.cpp | 2 +- src/mac/classic/tabctrl.cpp | 2 +- src/mac/classic/textctrl.cpp | 4 ++-- src/mac/classic/toolbar.cpp | 4 ++-- src/mac/classic/toplevel.cpp | 9 +++++---- src/mac/classic/window.cpp | 16 ++++++++-------- 25 files changed, 46 insertions(+), 46 deletions(-) diff --git a/include/wx/mac/classic/toplevel.h b/include/wx/mac/classic/toplevel.h index ffb0bcd288..24818b4920 100644 --- a/include/wx/mac/classic/toplevel.h +++ b/include/wx/mac/classic/toplevel.h @@ -138,7 +138,6 @@ extern WXDLLEXPORT_DATA(wxWindowList) wxModelessWindows; // associate mac windows with wx counterparts wxTopLevelWindowMac* wxFindWinFromMacWindow( WXWindow inWindow ) ; -void wxAssociateWinWithMacWindow(WXWindow inWindow, wxTopLevelWindowMac *win) ; void wxRemoveMacWindowAssociation(wxTopLevelWindowMac *win) ; diff --git a/src/mac/classic/app.cpp b/src/mac/classic/app.cpp index 85c556b21d..1623ec6def 100644 --- a/src/mac/classic/app.cpp +++ b/src/mac/classic/app.cpp @@ -1533,7 +1533,7 @@ void wxApp::MacHandleMouseDownEvent( WXEVENTREF evr ) ::GetWindowAttributes( frontWindow , &frontWindowAttributes ) ; short windowPart = ::FindWindow(ev->where, &window); - wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ; + wxTopLevelWindowMac* win = wxFindWinFromMacWindow( (WXWindow) window ) ; if ( wxPendingDelete.Member(win) ) return ; @@ -1707,7 +1707,7 @@ void wxApp::MacHandleMouseUpEvent( WXEVENTREF evr ) break ; default: { - wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ; + wxTopLevelWindowMac* win = wxFindWinFromMacWindow( (WXWindow) window ) ; if ( win ) win->MacMouseUp( ev , windowPart ) ; } @@ -2025,7 +2025,7 @@ bool wxApp::MacSendKeyDownEvent( wxWindow* focus , long keymessage , long modifi { // if window is not having a focus still testing for default enter or cancel // TODO add the UMA version for ActiveNonFloatingWindow - wxWindow* focus = wxFindWinFromMacWindow( FrontWindow() ) ; + wxWindow* focus = wxFindWinFromMacWindow( (WXWindow) FrontWindow() ) ; if ( focus ) { if ( keyval == WXK_RETURN ) @@ -2109,7 +2109,7 @@ void wxApp::MacHandleActivateEvent( WXEVENTREF evr ) // if it is a floater we activate/deactivate the front non-floating window instead window = ::FrontNonFloatingWindow() ; } - wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ; + wxTopLevelWindowMac* win = wxFindWinFromMacWindow( (WXWindow) window ) ; if ( win ) win->MacActivate( ev->when , activate ) ; } @@ -2119,7 +2119,7 @@ void wxApp::MacHandleUpdateEvent( WXEVENTREF evr ) { EventRecord* ev = (EventRecord*) evr ; WindowRef window = (WindowRef) ev->message ; - wxTopLevelWindowMac * win = wxFindWinFromMacWindow( window ) ; + wxTopLevelWindowMac * win = wxFindWinFromMacWindow( (WXWindow) window ) ; if ( win ) { if ( !wxPendingDelete.Member(win) ) @@ -2177,13 +2177,13 @@ void wxApp::MacHandleOSEvent( WXEVENTREF evr ) if ( oldFrontWindow ) { - wxTopLevelWindowMac* win = wxFindWinFromMacWindow( oldFrontWindow ) ; + wxTopLevelWindowMac* win = wxFindWinFromMacWindow( (WXWindow) oldFrontWindow ) ; if ( win ) win->MacActivate( ev->when , false ) ; } if ( newFrontWindow ) { - wxTopLevelWindowMac* win = wxFindWinFromMacWindow( newFrontWindow ) ; + wxTopLevelWindowMac* win = wxFindWinFromMacWindow( (WXWindow) newFrontWindow ) ; if ( win ) win->MacActivate( ev->when , true ) ; } @@ -2265,7 +2265,7 @@ void wxApp::MacHandleOSEvent( WXEVENTREF evr ) { case inContent : { - wxTopLevelWindowMac* win = wxFindWinFromMacWindow( window ) ; + wxTopLevelWindowMac* win = wxFindWinFromMacWindow( (WXWindow) window ) ; if ( win ) win->MacMouseMoved( ev , windowPart ) ; else diff --git a/src/mac/classic/bmpbuttn.cpp b/src/mac/classic/bmpbuttn.cpp index d08470d719..b1bd49dff0 100644 --- a/src/mac/classic/bmpbuttn.cpp +++ b/src/mac/classic/bmpbuttn.cpp @@ -70,7 +70,7 @@ bool wxBitmapButton::Create(wxWindow *parent, wxWindowID id, const wxBitmap& bit MacPreControlCreate( parent , id , wxEmptyString , pos , wxSize( width , height ) ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , kControlBehaviorOffsetContents + ( bmap && bmap->m_bitmapType == kMacBitmapTypeIcon ? kControlContentCIconHandle : kControlContentPictHandle ) , 0, diff --git a/src/mac/classic/button.cpp b/src/mac/classic/button.cpp index 82e4e34c5f..3ce18b2e27 100644 --- a/src/mac/classic/button.cpp +++ b/src/mac/classic/button.cpp @@ -48,7 +48,7 @@ bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label, MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, kControlPushButtonProc , (long) this ) ; wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ; diff --git a/src/mac/classic/checkbox.cpp b/src/mac/classic/checkbox.cpp index 6e6aa299b2..ba85d2fe53 100644 --- a/src/mac/classic/checkbox.cpp +++ b/src/mac/classic/checkbox.cpp @@ -45,7 +45,7 @@ bool wxCheckBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, maxValue = 2 /* kControlCheckboxMixedValue */; } - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , maxValue, + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , maxValue, kControlCheckBoxProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/classic/checklst.cpp b/src/mac/classic/checklst.cpp index c442bbdfcb..c33ad14c5f 100644 --- a/src/mac/classic/checklst.cpp +++ b/src/mac/classic/checklst.cpp @@ -262,7 +262,7 @@ bool wxCheckListBox::Create(wxWindow *parent, long result ; wxStAppResource resload ; - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , kwxMacListWithVerticalScrollbar , 0 , 0, kControlListBoxProc , (long) this ) ; ::GetControlData( (ControlHandle) m_macControl , kControlNoPart , kControlListBoxListHandleTag , diff --git a/src/mac/classic/choice.cpp b/src/mac/classic/choice.cpp index 9f8494db9a..2eafe3f433 100644 --- a/src/mac/classic/choice.cpp +++ b/src/mac/classic/choice.cpp @@ -67,7 +67,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, Str255 title ; MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , -12345 , 0 , + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , -12345 , 0 , kControlPopupButtonProc + kControlPopupFixedWidthVariant , (long) this ) ; m_macPopUpMenuHandle = NewUniqueMenu() ; diff --git a/src/mac/classic/control.cpp b/src/mac/classic/control.cpp index 473bdec9fd..e63e29d691 100644 --- a/src/mac/classic/control.cpp +++ b/src/mac/classic/control.cpp @@ -78,7 +78,7 @@ pascal void wxMacLiveScrollbarActionProc( ControlHandle control , ControlPartCod wxControl* wx = (wxControl*) GetControlReference( control ) ; if ( wx ) { - wx->MacHandleControlClick( control , partCode , true /* stillDown */ ) ; + wx->MacHandleControlClick( (WXWidget) control , partCode , true /* stillDown */ ) ; } } } @@ -727,7 +727,7 @@ void wxControl::OnMouseEvent( wxMouseEvent &event ) wxTheApp->s_lastMouseDown = 0 ; if ( control && controlpart != kControlNoPart ) { - MacHandleControlClick( control , controlpart , false /* mouse not down anymore */ ) ; + MacHandleControlClick( (WXWidget) control , controlpart , false /* mouse not down anymore */ ) ; } } } @@ -770,7 +770,7 @@ void wxControl::DoSetWindowVariant( wxWindowVariant variant ) // and make this NORMAL later, but first // we have a few calculations that we must fix - if ( variant == wxWINDOW_VARIANT_DEFAULT ) + if ( variant == wxWINDOW_VARIANT_NORMAL ) { if ( IsKindOf( CLASSINFO( wxScrollBar ) ) ) variant = wxWINDOW_VARIANT_NORMAL ; diff --git a/src/mac/classic/dialog.cpp b/src/mac/classic/dialog.cpp index c5f6c57119..6c9646751c 100644 --- a/src/mac/classic/dialog.cpp +++ b/src/mac/classic/dialog.cpp @@ -44,7 +44,7 @@ END_EVENT_TABLE() #endif -wxDialog::Init() +void wxDialog::Init() { m_isModalStyle = false; SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE)); diff --git a/src/mac/classic/dnd.cpp b/src/mac/classic/dnd.cpp index 22ced39ede..22c096128a 100644 --- a/src/mac/classic/dnd.cpp +++ b/src/mac/classic/dnd.cpp @@ -432,7 +432,7 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind Point mouse, localMouse; DragAttributes attributes; GetDragAttributes(theDrag, &attributes); - wxTopLevelWindowMac* toplevel = wxFindWinFromMacWindow( theWindow ) ; + wxTopLevelWindowMac* toplevel = wxFindWinFromMacWindow( (WXWindow) theWindow ) ; KeyMap keymap; GetKeys(keymap); diff --git a/src/mac/classic/gauge.cpp b/src/mac/classic/gauge.cpp index b950e1b3bc..1225771389 100644 --- a/src/mac/classic/gauge.cpp +++ b/src/mac/classic/gauge.cpp @@ -45,7 +45,7 @@ bool wxGauge::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style & 0xE0FFFFFF /* no borders on mac */ , validator , name , &bounds , title ) ; - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , range, + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , range, kControlProgressBarProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/classic/listbox.cpp b/src/mac/classic/listbox.cpp index a0d3e05482..44b2948d33 100644 --- a/src/mac/classic/listbox.cpp +++ b/src/mac/classic/listbox.cpp @@ -265,7 +265,7 @@ bool wxListBox::Create(wxWindow *parent, wxWindowID id, long result ; wxStAppResource resload ; - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , (style & wxLB_HSCROLL) ? kwxMacListWithVerticalAndHorizontalScrollbar : kwxMacListWithVerticalScrollbar , 0 , 0, kControlListBoxProc , (long) this ) ; ::GetControlData( (ControlHandle) m_macControl , kControlNoPart , kControlListBoxListHandleTag , diff --git a/src/mac/classic/notebmac.cpp b/src/mac/classic/notebmac.cpp index fbc6c4a092..a553ef66f1 100644 --- a/src/mac/classic/notebmac.cpp +++ b/src/mac/classic/notebmac.cpp @@ -195,7 +195,7 @@ bool wxNotebook::Create(wxWindow *parent, tabstyle = kControlTabSmallSouthProc ; - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, tabstyle , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/classic/radiobox.cpp b/src/mac/classic/radiobox.cpp index 103d68ca44..2b0d11d3e9 100644 --- a/src/mac/classic/radiobox.cpp +++ b/src/mac/classic/radiobox.cpp @@ -132,7 +132,7 @@ bool wxRadioBox::Create(wxWindow *parent, wxWindowID id, const wxString& label, MacPreControlCreate( parent , id , wxStripMenuCodes(label) , pos , size ,style, val , name , &bounds , title ) ; - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, kControlGroupBoxTextTitleProc , (long) this ) ; for (i = 0; i < n; i++) diff --git a/src/mac/classic/radiobut.cpp b/src/mac/classic/radiobut.cpp index 991c8be68f..36f7358259 100644 --- a/src/mac/classic/radiobut.cpp +++ b/src/mac/classic/radiobut.cpp @@ -38,7 +38,7 @@ bool wxRadioButton::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , label , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, kControlRadioButtonProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/classic/scrolbar.cpp b/src/mac/classic/scrolbar.cpp index 3b08c25ecc..70545c7c8d 100644 --- a/src/mac/classic/scrolbar.cpp +++ b/src/mac/classic/scrolbar.cpp @@ -48,7 +48,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, validator , name , &bounds , title ) ; - m_macControl = ::NewControl(MAC_WXHWND(parent->MacGetRootWindow()) , + m_macControl = (WXWidget) ::NewControl(MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 100, kControlScrollBarLiveProc , (long) this) ; diff --git a/src/mac/classic/slider.cpp b/src/mac/classic/slider.cpp index 4bd4bab532..aa5b52847d 100644 --- a/src/mac/classic/slider.cpp +++ b/src/mac/classic/slider.cpp @@ -86,7 +86,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id, } - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()), &bounds, title, false, + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()), &bounds, title, false, value, minValue, maxValue, procID, (long) this); wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ; diff --git a/src/mac/classic/spinbutt.cpp b/src/mac/classic/spinbutt.cpp index f8dcca8bd9..a4e47edc17 100644 --- a/src/mac/classic/spinbutt.cpp +++ b/src/mac/classic/spinbutt.cpp @@ -53,7 +53,7 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style,*( (wxValidator*) NULL ) , name , &bounds , title ) ; - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 100, + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 100, kControlLittleArrowsProc , (long) this ) ; wxASSERT_MSG( (ControlHandle) m_macControl != NULL , wxT("No valid mac control") ) ; diff --git a/src/mac/classic/statbox.cpp b/src/mac/classic/statbox.cpp index 13c7daf669..3ab92b74e4 100644 --- a/src/mac/classic/statbox.cpp +++ b/src/mac/classic/statbox.cpp @@ -47,7 +47,7 @@ bool wxStaticBox::Create(wxWindow *parent, wxWindowID id, MacPreControlCreate( parent , id , label , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ; - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, kControlGroupBoxTextTitleProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/classic/statlmac.cpp b/src/mac/classic/statlmac.cpp index a7a116ba57..39b09c1a39 100644 --- a/src/mac/classic/statlmac.cpp +++ b/src/mac/classic/statlmac.cpp @@ -58,7 +58,7 @@ bool wxStaticLine::Create( wxWindow *parent, MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ; - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, kControlSeparatorLineProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/classic/tabctrl.cpp b/src/mac/classic/tabctrl.cpp index f879b78447..4cec805ec2 100644 --- a/src/mac/classic/tabctrl.cpp +++ b/src/mac/classic/tabctrl.cpp @@ -45,7 +45,7 @@ bool wxTabCtrl::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, cons MacPreControlCreate( parent , id , wxEmptyString , pos , size ,style, wxDefaultValidator , name , &bounds , title ) ; - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , 0 , 1, kControlTabSmallProc , (long) this ) ; MacPostControlCreate() ; diff --git a/src/mac/classic/textctrl.cpp b/src/mac/classic/textctrl.cpp index 078f722035..9fa64095ac 100644 --- a/src/mac/classic/textctrl.cpp +++ b/src/mac/classic/textctrl.cpp @@ -774,7 +774,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, wxMacConvertNewlines13To10( &st ) ; if ( !m_macUsesTXN ) { - m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , "\p" , false , 0 , 0 , 1, + m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , "\p" , false , 0 , 0 , 1, (style & wxTE_PASSWORD) ? kControlEditTextPasswordProc : kControlEditTextProc , (long) this ) ; long size ; ::GetControlData((ControlHandle) m_macControl , 0, kControlEditTextTEHandleTag , sizeof( TEHandle ) , (char*)((TEHandle *)&m_macTE) , &size ) ; @@ -788,7 +788,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id, | kControlWantsActivate | kControlHandlesTracking | kControlHasSpecialBackground | kControlGetsFocusOnClick | kControlSupportsLiveFeedback; /* create the control */ - m_macControl = NewControl(MAC_WXHWND(parent->MacGetRootWindow()), &bounds, "\p", false , featurSet, 0, featurSet, kControlUserPaneProc, 0); + m_macControl = (WXWidget) ::NewControl(MAC_WXHWND(parent->MacGetRootWindow()), &bounds, "\p", false , featurSet, 0, featurSet, kControlUserPaneProc, 0); /* set up the mUP specific features and data */ mUPOpenControl((ControlHandle) m_macControl, m_windowStyle ); } diff --git a/src/mac/classic/toolbar.cpp b/src/mac/classic/toolbar.cpp index 1b4b9733d0..15ecb363a9 100644 --- a/src/mac/classic/toolbar.cpp +++ b/src/mac/classic/toolbar.cpp @@ -401,7 +401,7 @@ void wxToolBar::MacHandleControlClick( WXWidget control , wxInt16 controlpart , wxToolBarTool* tool = (wxToolBarTool*) node->GetData() ; if ( tool->IsButton() ) { - if( tool->GetControlHandle() == control ) + if( (WXWidget) tool->GetControlHandle() == control ) { if ( tool->CanBeToggled() ) { @@ -611,7 +611,7 @@ void wxToolBar::OnMouse( wxMouseEvent &event ) wxTheApp->s_lastMouseDown = 0 ; if ( control && controlpart != kControlNoPart ) // otherwise we will get the event twice { - MacHandleControlClick( control , controlpart , false /* not down anymore */ ) ; + MacHandleControlClick( (WXWidget) control , controlpart , false /* not down anymore */ ) ; } } } diff --git a/src/mac/classic/toplevel.cpp b/src/mac/classic/toplevel.cpp index 878c27f2a9..efa241a3d1 100644 --- a/src/mac/classic/toplevel.cpp +++ b/src/mac/classic/toplevel.cpp @@ -479,7 +479,8 @@ wxTopLevelWindowMac *wxFindWinFromMacWindow(WXWindow inWindowRef) return (wxTopLevelWindowMac *)node->GetData(); } -void wxAssociateWinWithMacWindow(WXWindow inWindowRef, wxTopLevelWindowMac *win) +void wxAssociateWinWithMacWindow(WindowRef inWindowRef, wxTopLevelWindowMac *win); +void wxAssociateWinWithMacWindow(WindowRef inWindowRef, wxTopLevelWindowMac *win) { // adding NULL WindowRef is (first) surely a result of an error and // (secondly) breaks menu command processing @@ -499,7 +500,7 @@ void wxRemoveMacWindowAssociation(wxTopLevelWindowMac *win) // wxTopLevelWindowMac creation // ---------------------------------------------------------------------------- -WXHWND wxTopLevelWindowMac::s_macWindowInUpdate = NULL; +WXWindow wxTopLevelWindowMac::s_macWindowInUpdate = NULL; wxTopLevelWindowMac *wxTopLevelWindowMac::s_macDeactivateWindow = NULL; bool wxTopLevelWindowMac::s_macWindowCompositing = FALSE; @@ -774,7 +775,7 @@ void wxTopLevelWindowMac::MacCreateRealWindow( const wxString& title, } wxCHECK_RET( err == noErr, wxT("Mac OS error when trying to create new window") ); - wxAssociateWinWithMacWindow( m_macWindow , this ) ; + wxAssociateWinWithMacWindow( (WindowRef) m_macWindow , this ) ; UMASetWTitle( (WindowRef)m_macWindow , title , m_font.GetEncoding() ) ; if ( wxTopLevelWindowMac::s_macWindowCompositing ) { @@ -812,7 +813,7 @@ bool wxTopLevelWindowMac::MacEnableCompositing( bool useCompositing ) return oldval; } -void wxTopLevelWindowMac::MacGetPortParams(WXPOINTPTR localOrigin, WXRECTPTR clipRect, WXHWND *window , wxWindowMac** rootwin) +void wxTopLevelWindowMac::MacGetPortParams(WXPOINTPTR localOrigin, WXRECTPTR clipRect, WXWindow *window , wxWindowMac** rootwin) { ((Point*)localOrigin)->h = 0; ((Point*)localOrigin)->v = 0; diff --git a/src/mac/classic/window.cpp b/src/mac/classic/window.cpp index 037b9af61e..db17efd0b3 100644 --- a/src/mac/classic/window.cpp +++ b/src/mac/classic/window.cpp @@ -977,7 +977,7 @@ const wxBrush& wxWindowMac::MacGetBackgroundBrush() wxWindowMac* parent = GetParent() ; while( parent ) { - if ( parent->MacGetRootWindow() != window ) + if ( parent->MacGetRootWindow() != (WXWindow) window ) { // we are in a different window on the mac system parent = NULL ; @@ -1427,7 +1427,7 @@ bool wxWindowMac::MacGetWindowFromPointSub( const wxPoint &point , wxWindowMac** { wxWindowMac *child = node->GetData(); // added the m_isShown test --dmazzoni - if ( child->MacGetRootWindow() == window && child->m_isShown ) + if ( child->MacGetRootWindow() == (WXWindow) window && child->m_isShown ) { if (child->MacGetWindowFromPointSub(newPoint , outWin )) return TRUE; @@ -1446,7 +1446,7 @@ bool wxWindowMac::MacGetWindowFromPoint( const wxPoint &screenpoint , wxWindowMa if ( ::FindWindow( pt , &window ) == 3 ) { - wxWindowMac* win = wxFindWinFromMacWindow( window ) ; + wxWindowMac* win = wxFindWinFromMacWindow( (WXWindow) window ) ; if ( win ) { // No, this yields the CLIENT are, we need the whole frame. RR. @@ -1531,7 +1531,7 @@ bool wxWindowMac::MacDispatchMouseEvent(wxMouseEvent& event) for (wxWindowListNode *node = GetChildren().GetFirst(); node; node = node->GetNext()) { wxWindowMac *child = node->GetData(); - if ( child->MacGetRootWindow() == window && child->IsShown() && child->IsEnabled() ) + if ( child->MacGetRootWindow() == (WXWindow) window && child->IsShown() && child->IsEnabled() ) { if (child->MacDispatchMouseEvent(event)) return TRUE; @@ -1634,7 +1634,7 @@ wxTopLevelWindowMac* wxWindowMac::MacGetTopLevelWindow() const WindowRef window = (WindowRef) MacGetRootWindow() ; if ( window ) { - win = wxFindWinFromMacWindow( window ) ; + win = wxFindWinFromMacWindow( (WXWindow) window ) ; } return win ; } @@ -1797,7 +1797,7 @@ void wxWindowMac::MacRedraw( WXHRGN updatergnr , long time, bool erase) { wxControl *child = wxDynamicCast( ( wxWindow*)node->GetData() , wxControl ) ; - if ( child && child->MacGetRootWindow() == window && child->IsShown() && child->GetMacControl() ) + if ( child && child->MacGetRootWindow() == (WXWindow) window && child->IsShown() && child->GetMacControl() ) { SetControlVisibility( (ControlHandle) child->GetMacControl() , false , false ) ; hiddenWindows.Append( child ) ; @@ -1832,7 +1832,7 @@ void wxWindowMac::MacRedraw( WXHRGN updatergnr , long time, bool erase) SetRectRgn( childupdate , child->m_x , child->m_y , child->m_x + child->m_width , child->m_y + child->m_height ) ; SectRgn( childupdate , updatergn , childupdate ) ; OffsetRgn( childupdate , -child->m_x , -child->m_y ) ; - if ( child->MacGetRootWindow() == window && child->IsShown() && !EmptyRgn( childupdate ) ) + if ( child->MacGetRootWindow() == (WXWindow) window && child->IsShown() && !EmptyRgn( childupdate ) ) { // because dialogs may also be children child->MacRedraw( childupdate , time , erase ) ; @@ -1843,7 +1843,7 @@ void wxWindowMac::MacRedraw( WXHRGN updatergnr , long time, bool erase) } -WXHWND wxWindowMac::MacGetRootWindow() const +WXWindow wxWindowMac::MacGetRootWindow() const { wxWindowMac *iter = (wxWindowMac*)this ;