]> git.saurik.com Git - wxWidgets.git/commitdiff
fixes for CW8 Mac Classic compilation
authorDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Wed, 18 Aug 2004 15:37:01 +0000 (15:37 +0000)
committerDimitri Schoolwerth <dimitri.schoolwerth@gmail.com>
Wed, 18 Aug 2004 15:37:01 +0000 (15:37 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28829 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

25 files changed:
include/wx/mac/classic/toplevel.h
src/mac/classic/app.cpp
src/mac/classic/bmpbuttn.cpp
src/mac/classic/button.cpp
src/mac/classic/checkbox.cpp
src/mac/classic/checklst.cpp
src/mac/classic/choice.cpp
src/mac/classic/control.cpp
src/mac/classic/dialog.cpp
src/mac/classic/dnd.cpp
src/mac/classic/gauge.cpp
src/mac/classic/listbox.cpp
src/mac/classic/notebmac.cpp
src/mac/classic/radiobox.cpp
src/mac/classic/radiobut.cpp
src/mac/classic/scrolbar.cpp
src/mac/classic/slider.cpp
src/mac/classic/spinbutt.cpp
src/mac/classic/statbox.cpp
src/mac/classic/statlmac.cpp
src/mac/classic/tabctrl.cpp
src/mac/classic/textctrl.cpp
src/mac/classic/toolbar.cpp
src/mac/classic/toplevel.cpp
src/mac/classic/window.cpp

index ffb0bcd288f30ff962c2f161a8b87bbc5db52bcf..24818b4920bf3990f76ff5215534c38b63e4464f 100644 (file)
@@ -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) ;
 
 
index 85c556b21dd1f930207ad68f76f76f374bd3af60..1623ec6defea138624ab63910a73f3fda132a067 100644 (file)
@@ -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
index d08470d719a5e5f85eb61881755518a793b606d8..b1bd49dff016b8483fa59b8d6ec6c20beeab63ac 100644 (file)
@@ -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, 
index 82e4e34c5f29f54f0d4dffe91a19694863dc01d0..3ce18b2e27f0333a1c44d79343c191dca112992b 100644 (file)
@@ -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") ) ;
     
index 6e6aa299b2cd2470ba715ac7f41ace0f540ebf3e..ba85d2fe53e9d650a9f7c354f785b85e84ee128f 100644 (file)
@@ -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() ;
index c442bbdfcbe1ba76124b99e5a1f40deffd3eecd3..c33ad14c5fd1b43a392b6f7e036169a704472fa3 100644 (file)
@@ -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 ,
index 9f8494db9a9234f08cef387d4e60975e76063f3c..2eafe3f43310cfea6e5472ee2d0d6031062675aa 100644 (file)
@@ -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() ;
index 473bdec9fd3e7467cc6057b9edaeb4cada4386b2..e63e29d691ca03dfb5da746c3432ac23efdd0bdb 100644 (file)
@@ -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 ;
index c5f6c57119ab613fac4853efe99837e2cb4ef2b7..6c9646751c84777aabcf33e350aaec93104f3b45 100644 (file)
@@ -44,7 +44,7 @@ END_EVENT_TABLE()
 
 #endif
 
-wxDialog::Init()
+void wxDialog::Init()
 {
     m_isModalStyle = false;
     SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
index 22ced39ede9fbf79b9fbd1cc2cf95cd94d7cc111..22c096128a2723048c293673b883332b61f88330 100644 (file)
@@ -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);
index b950e1b3bc825d0521d56061ec5719fcf7999ed4..122577138944392923f948cfdfbe92742b9b2e1b 100644 (file)
@@ -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() ;
index a0d3e0548238634d174d503921fe3f9ba8840ba2..44b2948d33dd70271c76035d82d92de12945febe 100644 (file)
@@ -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 ,
index fbc6c4a0922659c49a48af908afeaa52d6c45337..a553ef66f1eca408eaa81748b181c8b6256cd497 100644 (file)
@@ -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() ;
index 103d68ca440e684148637c4b011267d31b503bfc..2b0d11d3e9550b9326473cf570a3dae3c1af1cd3 100644 (file)
@@ -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++)
index 991c8be68f7d0ea0db3d04e12889f50b016be9c3..36f7358259ed7722316fc8c8fed55d968113b484 100644 (file)
@@ -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() ;
index 3b08c25ecccd30e61c82e8e4cacf4cf92d2b7982..70545c7c8d3a20445431a12cc54ee170ede4afe1 100644 (file)
@@ -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) ;
 
index 4bd4bab5325fa0f31f5847b5ff6e3bcc0ad4e429..aa5b52847d11b05ee3621aebd2657c664edb296c 100644 (file)
@@ -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") ) ;
index f8dcca8bd9ad8ab8c3e5a42cb6df012b01bbdd30..a4e47edc175eff2cd2751ac9f43f89f57f30e1d6 100644 (file)
@@ -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") ) ;
index 13c7daf6696a6d4b7d0132fdc283538f92e5e504..3ab92b74e46309197d55e9383a117ca79b081907 100644 (file)
@@ -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() ;
index a7a116ba571cc17d391ba59d5f5edf3b2f0bb31e..39b09c1a39bc1fea06a46537dcf56441ad47d203 100644 (file)
@@ -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() ;
index f879b78447ee48b39f29593830cdf32cd40949b2..4cec805ec2d2f7b13f8d484808c95e735dbb3fe0 100644 (file)
@@ -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() ;
index 078f722035c69b79786ba092615cc0463184ed60..9fa64095ac4beea29f719473d26299d72d3300bc 100644 (file)
@@ -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 );
     }
index 1b4b9733d0f172aab6cd7b47bbd3fd37ec9c35a8..15ecb363a9b7ca7ecfe0f4e6c6a514df73a9a081 100644 (file)
@@ -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 */ ) ;
                     }
                 }
             }
index 878c27f2a9231ae355861ed6684d67b093e89e5e..efa241a3d14a51d132a8b732600ad2a3dc930dca 100644 (file)
@@ -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;
index 037b9af61efa6d6112b6faecf56a76ad24a7e37b..db17efd0b379170e5dbc87dab4d7eddf735ce941 100644 (file)
@@ -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 ;