594 }
595 }
596
597 DLog2(@"[CDropTarget draggingUpdated]: returning %lu\n", (unsigned long) dragOp);
598
599 return dragOp;
600 }
601
602 - (void)draggingExited:(id<NSDraggingInfo>)sender
603 {
604 DLog2(@"[CDropTarget draggingExited]: %@\n", self);
605
606 sCurrentDropTarget = nil;
607
608 JNIEnv* env = [ThreadUtilities getJNIEnv];
609
610 if (sDraggingExited == FALSE && sDraggingError == FALSE) {
611 JNF_MEMBER_CACHE(handleExitMessageMethod, jc_CDropTargetContextPeer, "handleExitMessage", "(Ljava/awt/Component;J)V");
612 if (sDraggingError == FALSE) {
613 DLog3(@" - dragExit: loc native %f, %f\n", sDraggingLocation.x, sDraggingLocation.y);
614 // AWT_THREADING Safe (CToolkitThreadBlockedHandler)
615 JNFCallVoidMethod(env, fDropTargetContextPeer,
616 handleExitMessageMethod, fComponent, ptr_to_jlong(self));
617 }
618
619 // 5-27-03 Note: [Radar 3270455]
620 // -draggingExited: can be called both by the AppKit and by -performDragOperation: but shouldn't execute
621 // twice per drop since cleanup code like that in swing/plaf/basic/BasicDropTargetListener would throw NPEs.
622 sDraggingExited = TRUE;
623 }
624
625 DLog(@"[CDropTarget draggingExited]: returning.\n");
626 }
627
628 - (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
629 {
630 DLog2(@"[CDropTarget prepareForDragOperation]: %@\n", self);
631 DLog2(@"[CDropTarget prepareForDragOperation]: returning %@\n", (sDraggingError ? @"NO" : @"YES"));
632
633 return sDraggingError ? NO : YES;
634 }
|
594 }
595 }
596
597 DLog2(@"[CDropTarget draggingUpdated]: returning %lu\n", (unsigned long) dragOp);
598
599 return dragOp;
600 }
601
602 - (void)draggingExited:(id<NSDraggingInfo>)sender
603 {
604 DLog2(@"[CDropTarget draggingExited]: %@\n", self);
605
606 sCurrentDropTarget = nil;
607
608 JNIEnv* env = [ThreadUtilities getJNIEnv];
609
610 if (sDraggingExited == FALSE && sDraggingError == FALSE) {
611 JNF_MEMBER_CACHE(handleExitMessageMethod, jc_CDropTargetContextPeer, "handleExitMessage", "(Ljava/awt/Component;J)V");
612 if (sDraggingError == FALSE) {
613 DLog3(@" - dragExit: loc native %f, %f\n", sDraggingLocation.x, sDraggingLocation.y);
614 // AWT_THREADING Safe (CToolkitThreadBlockedHandler)
615 JNFCallVoidMethod(env, fDropTargetContextPeer,
616 handleExitMessageMethod, fComponent, ptr_to_jlong(self));
617 }
618
619 // 5-27-03 Note: [Radar 3270455]
620 // -draggingExited: can be called both by the AppKit and by -performDragOperation: but shouldn't execute
621 // twice per drop since cleanup code like that in swing/plaf/basic/BasicDropTargetListener would throw NPEs.
622 sDraggingExited = TRUE;
623 }
624
625 DLog(@"[CDropTarget draggingExited]: returning.\n");
626 }
627
628 - (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender
629 {
630 DLog2(@"[CDropTarget prepareForDragOperation]: %@\n", self);
631 DLog2(@"[CDropTarget prepareForDragOperation]: returning %@\n", (sDraggingError ? @"NO" : @"YES"));
632
633 return sDraggingError ? NO : YES;
634 }
|