cleanup for 10.5
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42011 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
f387b80e0e
commit
4913272f9c
@ -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 );
|
||||
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 )
|
||||
|
@ -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) ;
|
||||
|
Loading…
Reference in New Issue
Block a user