X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/76a5e5d21ee1a6230d777ce0209b2df4c6075f0f..59b9edf0b390f9cd8e80475913ec94675ae8a427:/src/mac/carbon/dnd.cpp diff --git a/src/mac/carbon/dnd.cpp b/src/mac/carbon/dnd.cpp index e81ad045d2..5369a1cf34 100644 --- a/src/mac/carbon/dnd.cpp +++ b/src/mac/carbon/dnd.cpp @@ -86,7 +86,7 @@ bool wxDropTarget::CurrentDragHasSupportedFormat() if ( data ) { - int formatcount = data->GetFormatCount() ; + size_t formatcount = data->GetFormatCount() ; wxDataFormat *array = new wxDataFormat[ formatcount ]; data->GetAllFormats( array ); for (size_t i = 0; !supported && i < formatcount ; i++) @@ -142,7 +142,7 @@ bool wxDropTarget::GetData() if ( data ) { - int formatcount = data->GetFormatCount() ; + size_t formatcount = data->GetFormatCount() ; wxDataFormat *array = new wxDataFormat[ formatcount ]; data->GetAllFormats( array ); for (size_t i = 0; !transferred && i < formatcount ; i++) @@ -211,7 +211,7 @@ bool wxDropTarget::GetData() { HFSFlavor* theFile = (HFSFlavor*) theData ; wxString name = wxMacFSSpec2MacFilename( &theFile->fileSpec ) ; - m_dataObject->SetData( format , name.Length() + 1, name ) ; + ((wxFileDataObject*)m_dataObject)->AddFile( name ) ; } else { @@ -259,7 +259,7 @@ wxDropSource::~wxDropSource() } -wxDragResult wxDropSource::DoDragDrop( bool allowMove ) +wxDragResult wxDropSource::DoDragDrop(int WXUNUSED(flags)) { wxASSERT_MSG( m_data, wxT("Drop source: no data") ); @@ -272,7 +272,7 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove ) OSErr result; DragReference theDrag; RgnHandle dragRegion; - if (result = NewDrag(&theDrag)) + if ((result = NewDrag(&theDrag))) { return wxDragNone ; } @@ -281,7 +281,7 @@ wxDragResult wxDropSource::DoDragDrop( bool allowMove ) wxDataFormat *formats = new wxDataFormat[formatCount] ; m_data->GetAllFormats( formats ) ; ItemReference theItem = 1 ; - for ( int i = 0 ; i < formatCount ; ++i ) + for ( size_t i = 0 ; i < formatCount ; ++i ) { size_t dataSize = m_data->GetDataSize( formats[i] ) ; Ptr dataPtr = new char[dataSize] ; @@ -396,7 +396,6 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind MacTrackingGlobals* trackingGlobals = (MacTrackingGlobals*) handlerRefCon; Point mouse, localMouse; DragAttributes attributes; - RgnHandle hiliteRgn; GetDragAttributes(theDrag, &attributes); wxTopLevelWindowMac* toplevel = wxFindWinFromMacWindow( theWindow ) ; switch(theMessage) @@ -491,8 +490,9 @@ pascal OSErr wxMacWindowDragTrackingHandler(DragTrackingMessage theMessage, Wind return(noErr); } -pascal OSErr wxMacWindowDragReceiveHandler(WindowPtr theWindow, void *handlerRefCon, -DragReference theDrag) +pascal OSErr wxMacWindowDragReceiveHandler(WindowPtr theWindow, + void *handlerRefCon, + DragReference theDrag) { MacTrackingGlobals* trackingGlobals = (MacTrackingGlobals*) handlerRefCon; if ( trackingGlobals->m_currentTarget )