Path: blob/master/src/java.desktop/macosx/native/libawt_lwawt/awt/CDropTarget.h
41152 views
/*1* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.2* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.3*4* This code is free software; you can redistribute it and/or modify it5* under the terms of the GNU General Public License version 2 only, as6* published by the Free Software Foundation. Oracle designates this7* particular file as subject to the "Classpath" exception as provided8* by Oracle in the LICENSE file that accompanied this code.9*10* This code is distributed in the hope that it will be useful, but WITHOUT11* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or12* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License13* version 2 for more details (a copy is included in the LICENSE file that14* accompanied this code).15*16* You should have received a copy of the GNU General Public License version17* 2 along with this work; if not, write to the Free Software Foundation,18* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.19*20* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA21* or visit www.oracle.com if you need additional information or have any22* questions.23*/2425#ifndef CDropTarget_h26#define CDropTarget_h2728#import <AppKit/AppKit.h>29#import <jni.h>3031@class ControlModel;3233@class CDropTarget;3435@protocol CDropTargetHolder36- (void) setDropTarget:(CDropTarget *)target;37@end3839@interface CDropTarget : NSObject {40@private41NSView<CDropTargetHolder>* fView;42jobject fComponent;43jobject fDropTarget;44jobject fDropTargetContextPeer;45}4647+ (CDropTarget *) currentDropTarget;4849// Common methods:50- (id)init:(jobject)dropTarget component:(jobject)jcomponent control:(id)control;51- (void)controlModelControlValid;52- (void)removeFromView:(JNIEnv *)env;5354- (NSInteger)getDraggingSequenceNumber;55- (jobject)copyDraggingDataForFormat:(jlong)format;56- (void)javaDraggingEnded:(jlong)draggingSequenceNumber success:(BOOL)jsuccess action:(jint)jdropaction;5758// dnd APIs (see AppKit/NSDragging.h, NSDraggingDestination):59- (NSDragOperation)draggingEntered:(id <NSDraggingInfo>)sender;60- (NSDragOperation)draggingUpdated:(id <NSDraggingInfo>)sender;61- (void)draggingExited:(id <NSDraggingInfo>)sender;62- (BOOL)prepareForDragOperation:(id <NSDraggingInfo>)sender;63- (BOOL)performDragOperation:(id <NSDraggingInfo>)sender;64- (void)concludeDragOperation:(id <NSDraggingInfo>)sender;65- (void)draggingEnded:(id <NSDraggingInfo>)sender;6667- (jint)currentJavaActions;6869@end7071#endif // CDropTarget_h727374