]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/carbon/dnd.cpp
GetPixel isn't returning RGBColor anymore, so change call
[wxWidgets.git] / src / mac / carbon / dnd.cpp
index dc9b4b60b1b2482c1403f2f24c71fa560c09402c..11709e12cecf18ef0cbf57fe2c5d24020ee06e28 100644 (file)
@@ -212,11 +212,13 @@ wxDropSource::~wxDropSource()
 {
 }
 
-OSStatus wxMacPromiseKeeper( PasteboardRef inPasteboard, PasteboardItemID inItem, CFStringRef inFlavorType,
-              void *inContext )
+OSStatus wxMacPromiseKeeper(PasteboardRef WXUNUSED(inPasteboard),
+                            PasteboardItemID WXUNUSED(inItem),
+                            CFStringRef WXUNUSED(inFlavorType),
+                            void * WXUNUSED(inContext))
 {
     OSStatus  err = noErr;
-    
+
     // we might add promises here later, inContext is the wxDropSource*
 
     return err;
@@ -233,37 +235,37 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
     RgnHandle dragRegion;
     OSStatus err = noErr;
     PasteboardRef   pasteboard;
-    
+
     // add data to drag
-    
+
     err = PasteboardCreate( kPasteboardUniqueName, &pasteboard );
     if ( err != noErr )
         return wxDragNone;
-    
+
     // we add a dummy promise keeper because of strange messages when linking against carbon debug
-       err = PasteboardSetPromiseKeeper( pasteboard, wxMacPromiseKeeper, this );
+    err = PasteboardSetPromiseKeeper( pasteboard, wxMacPromiseKeeper, this );
     if ( err != noErr )
     {
         CFRelease( pasteboard );
         return wxDragNone;
     }
-    
-       err = PasteboardClear( pasteboard );
+
+    err = PasteboardClear( pasteboard );
     if ( err != noErr )
     {
         CFRelease( pasteboard );
         return wxDragNone;
     }
-       PasteboardSynchronize( pasteboard );
-    
+    PasteboardSynchronize( pasteboard );
+
     m_data->AddToPasteboard( pasteboard, 1 );
-    
+
     if (NewDragWithPasteboard( pasteboard , &theDrag) != noErr)
     {
         CFRelease( pasteboard );
         return wxDragNone;
     }
-    
+
     dragRegion = NewRgn();
     RgnHandle tempRgn = NewRgn();
 
@@ -298,7 +300,7 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
     gTrackingGlobals.m_flags = flags;
 
     err = TrackDrag( theDrag, &rec, dragRegion );
-    
+
     DisposeRgn( dragRegion );
     DisposeDrag( theDrag );
     CFRelease( pasteboard );
@@ -357,7 +359,7 @@ pascal OSErr wxMacWindowDragTrackingHandler(
 
     GetDragAttributes( theDrag, &attributes );
 
-    wxTopLevelWindowMac* toplevel = wxFindWinFromMacWindow( theWindow );
+    wxNonOwnedWindow* toplevel = wxFindWinFromMacWindow( theWindow );
 
     bool optionDown = GetCurrentKeyModifiers() & optionKey;
     wxDragResult result = optionDown ? wxDragCopy : wxDragMove;
@@ -389,8 +391,7 @@ pascal OSErr wxMacWindowDragTrackingHandler(
             {
                 wxWindow *win = NULL;
                 ControlPartCode controlPart;
-                ControlRef control = wxMacFindControlUnderMouse(
-                    toplevel, localMouse, theWindow, &controlPart );
+                ControlRef control = FindControlUnderMouse( localMouse, theWindow, &controlPart );
                 if ( control )
                     win = wxFindControlFromMacControl( control );
                 else