]> git.saurik.com Git - wxWidgets.git/commitdiff
cleanup for 10.5
authorStefan Csomor <csomor@advancedconcepts.ch>
Sat, 14 Oct 2006 16:02:39 +0000 (16:02 +0000)
committerStefan Csomor <csomor@advancedconcepts.ch>
Sat, 14 Oct 2006 16:02:39 +0000 (16:02 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/mac/carbon/dirmac.cpp
src/mac/carbon/dnd.cpp
src/mac/carbon/font.cpp
src/mac/carbon/fontenum.cpp

index 3dd53627a6b45a935c9c99cd8c1cf2030f843fa5..979f68a40e18da8724bf6df5e11fe4de796a4b43 100644 (file)
@@ -131,7 +131,7 @@ bool wxDirData::Read(wxString *filename)
         HFSUniStr255 uniname ;
         FSRef fileRef;
         FSCatalogInfo catalogInfo;
-        UInt32 fetched = 0;
+        ItemCount fetched = 0;
 
         err = FSGetCatalogInfoBulk( m_iterator, 1, &fetched, NULL, kFSCatInfoNodeFlags | kFSCatInfoFinderInfo , &catalogInfo , &fileRef, NULL, &uniname );
         
index 0a42702a8fcca677274f8296b00d2be47e9c3d64..29c7ff768b3dfbfac9e913217015f274781d2983 100644 (file)
@@ -264,10 +264,12 @@ bool wxDropTarget::GetData()
                             if (theData != NULL)
                             {
                                 HFSFlavor* theFile = (HFSFlavor*)theData;
+#ifndef __LP64__
                                 wxString name = wxMacFSSpec2MacFilename( &theFile->fileSpec );
 
                                 if (!name.empty())
                                     filenamesPassed += name + wxT("\n");
+#endif
                             }
                             break;
 
@@ -345,7 +347,7 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
     size_t formatCount = m_data->GetFormatCount();
     wxDataFormat *formats = new wxDataFormat[formatCount];
     m_data->GetAllFormats( formats );
-    ItemReference theItem = 1;
+    ItemReference theItem = (ItemReference) 1;
 
     for ( size_t i = 0; i < formatCount; ++i )
     {
@@ -371,6 +373,7 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
         {
             HFSFlavor  theFlavor;
             OSErr err = noErr;
+#ifndef __LP64__
             CInfoPBRec cat;
 
             wxMacFilename2FSSpec( wxString( dataPtr, *wxConvCurrent ), &theFlavor.fileSpec );
@@ -381,8 +384,10 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
             cat.hFileInfo.ioDirID = theFlavor.fileSpec.parID;
             cat.hFileInfo.ioFDirIndex = 0;
             err = PBGetCatInfoSync( &cat );
-            if (err == noErr)
+#endif
+          if (err == noErr)
             {
+#ifndef __LP64__
                 theFlavor.fdFlags = cat.hFileInfo.ioFlFndrInfo.fdFlags;
                 if (theFlavor.fileSpec.parID == fsRtParID)
                 {
@@ -399,7 +404,7 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
                     theFlavor.fileCreator = cat.hFileInfo.ioFlFndrInfo.fdCreator;
                     theFlavor.fileType = cat.hFileInfo.ioFlFndrInfo.fdType;
                 }
-
+#endif
                 AddDragItemFlavor( theDrag, theItem, type, &theFlavor, sizeof(theFlavor), 0 );
             }
         }
@@ -541,7 +546,7 @@ pascal OSErr wxMacWindowDragTrackingHandler(
 
             GetDragMouse( theDrag, &mouse, 0L );
             localMouse = mouse;
-            GlobalToLocal( &localMouse );
+            wxMacGlobalToLocal( theWindow, &localMouse );
 
             {
                 wxWindow *win = NULL;
@@ -566,7 +571,9 @@ pascal OSErr wxMacWindowDragTrackingHandler(
                         // this window is left
                         if ( trackingGlobals->m_currentTarget )
                         {
+#ifndef __LP64__
                             HideDragHilite( theDrag );
+#endif
                             trackingGlobals->m_currentTarget->SetCurrentDrag( theDrag );
                             trackingGlobals->m_currentTarget->OnLeave();
                             trackingGlobals->m_currentTarget = NULL;
@@ -595,7 +602,9 @@ pascal OSErr wxMacWindowDragTrackingHandler(
                                 RgnHandle hiliteRgn = NewRgn();
                                 Rect r = { y, x, y + win->GetSize().y, x + win->GetSize().x };
                                 RectRgn( hiliteRgn, &r );
+#ifndef __LP64__
                                 ShowDragHilite( theDrag, hiliteRgn, true );
+#endif
                                 DisposeRgn( hiliteRgn );
                             }
                         }
@@ -657,7 +666,9 @@ pascal OSErr wxMacWindowDragTrackingHandler(
             {
                 trackingGlobals->m_currentTarget->SetCurrentDrag( theDrag );
                 trackingGlobals->m_currentTarget->OnLeave();
+#ifndef __LP64__
                 HideDragHilite( theDrag );
+#endif
                 trackingGlobals->m_currentTarget = NULL;
             }
             trackingGlobals->m_currentTargetWindow = NULL;
@@ -684,7 +695,7 @@ pascal OSErr wxMacWindowDragReceiveHandler(
         trackingGlobals->m_currentTarget->SetCurrentDrag( theDrag );
         GetDragMouse( theDrag, &mouse, 0L );
         localMouse = mouse;
-        GlobalToLocal( &localMouse );
+        wxMacGlobalToLocal( theWindow, &localMouse );
         localx = localMouse.h;
         localy = localMouse.v;
 
index ff9671bd6c5765b9ed79128900fb31b15aba1450..e2c9d4f9a0bcb11b1fa35192d57d94c584ffeedd 100644 (file)
@@ -220,8 +220,9 @@ void wxFontRefData::MacFindFont()
         if ( m_macFontStyle & underline )
             m_underlined = true ;
         m_pointSize = m_macFontSize ;
-
+#ifndef __LP64__
         m_macFontFamily = FMGetFontFamilyFromName( qdFontName );
+#endif
     }
     else
     {
@@ -229,9 +230,11 @@ void wxFontRefData::MacFindFont()
         {
             if ( m_family == wxDEFAULT )
             {
+#ifndef __LP64__
                 m_macFontFamily = GetAppFont();
                 FMGetFontFamilyName(m_macFontFamily,qdFontName);
                 m_faceName = wxMacMakeStringFromPascal( qdFontName );
+#endif
             }
             else
             {
@@ -255,17 +258,26 @@ void wxFontRefData::MacFindFont()
                         m_faceName =  wxT("Times");
                         break ;
                 }
+#ifndef __LP64__
                 wxMacStringToPascal( m_faceName , qdFontName );
                 m_macFontFamily = FMGetFontFamilyFromName( qdFontName );
+#endif
             }
         }
         else
         {
+#ifndef __LP64__
             if ( m_faceName == wxT("systemfont") )
                 m_macFontFamily = GetSysFont();
             else if ( m_faceName == wxT("applicationfont") )
                 m_macFontFamily = GetAppFont();
             else
+#else
+            if ( m_faceName == wxT("systemfont") )
+                m_faceName =  wxT("Lucida Grande");
+            else if ( m_faceName == wxT("applicationfont") )
+                m_faceName =  wxT("Lucida Grande");
+#endif
             {
                 wxMacCFStringHolder cf( m_faceName, wxLocale::GetSystemEncoding() );
                 ATSFontFamilyRef atsfamily = ATSFontFamilyFindFromName( cf , kATSOptionFlagsDefault );
@@ -289,9 +301,10 @@ void wxFontRefData::MacFindFont()
 
     // ATSUFontID and FMFont are equivalent
     FMFontStyle intrinsicStyle = 0 ;
+#ifndef __LP64__
     status = FMGetFontFromFontFamilyInstance( m_macFontFamily , m_macFontStyle , &m_macATSUFontID , &intrinsicStyle);
     wxASSERT_MSG( status == noErr , wxT("couldn't get an ATSUFont from font family") );
-
+#endif
     m_macATSUAdditionalQDStyles = m_macFontStyle & (~intrinsicStyle );
 
     if ( m_macATSUStyle )
index f99cc1fd028ca5ef11df4d269b83bd5fddf247a8..3cbe7bad1bdb43a50d403f013973e6fb6bf26e75 100644 (file)
@@ -57,6 +57,8 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
         status = ATSFontFamilyIteratorNext( theFontFamilyIterator, &theATSFontFamilyRef );
         if(status == noErr)
         {
+ #ifndef __LP64__
+            // TODO CS : Find replacement
             // added CS : avoid showing fonts that won't be displayable
             FMFontStyle intrinsicStyle = 0 ;
             FMFont fontInstance ;
@@ -67,7 +69,7 @@ bool wxFontEnumerator::EnumerateFacenames(wxFontEncoding encoding,
                 status = noErr;
                 continue ;
             }
-            
+#endif
             if ( encoding != wxFONTENCODING_SYSTEM )
             {
                 TextEncoding fontFamiliyEncoding = ATSFontFamilyGetEncoding(theATSFontFamilyRef) ;