mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-23 06:51:44 +00:00
NSDragging: create NSDraggingSource protocol
Create NSDraggingSource protocol for increased compatibility with GUI.
This commit is contained in:
parent
9ce55e08ca
commit
ac56a5aeae
1 changed files with 33 additions and 0 deletions
|
@ -37,6 +37,7 @@
|
|||
@class NSPasteboard;
|
||||
@class NSImage;
|
||||
@class NSURL;
|
||||
@class NSDraggingSession;
|
||||
|
||||
enum _NSDragOperation {
|
||||
NSDragOperationNone = 0,
|
||||
|
@ -52,6 +53,15 @@ enum _NSDragOperation {
|
|||
|
||||
typedef NSUInteger NSDragOperation;
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
|
||||
typedef NSInteger NSDraggingContext;
|
||||
enum
|
||||
{
|
||||
NSDraggingContextOutsideApplication = 0,
|
||||
NSDraggingContextWithinApplication
|
||||
};
|
||||
#endif
|
||||
|
||||
@protocol NSDraggingInfo
|
||||
|
||||
//
|
||||
|
@ -104,6 +114,29 @@ typedef NSUInteger NSDragOperation;
|
|||
#endif
|
||||
@end
|
||||
|
||||
#if OS_API_VERSION(MAC_OS_X_VERSION_10_7, GS_API_LATEST)
|
||||
@protocol NSDraggingSource <NSObject>
|
||||
- (NSDragOperation) draggingSession:(NSDraggingSession *)session
|
||||
sourceOperationMaskForDraggingContext:(NSDraggingContext)context;
|
||||
|
||||
#if GS_PROTOCOLS_HAVE_OPTIONAL
|
||||
@optional
|
||||
#else
|
||||
@end
|
||||
@interface NSObject (NSDraggingSource107)
|
||||
#endif
|
||||
- (void) draggingSession: (NSDraggingSession *)session
|
||||
willBeginAtPoint: (NSPoint)screenPoint;
|
||||
- (void) draggingSession: (NSDraggingSession *)session
|
||||
movedToPoint: (NSPoint)screenPoint;
|
||||
- (void) draggingSession: (NSDraggingSession *)session
|
||||
endedAtPoint: (NSPoint)screenPoint
|
||||
operation: (NSDragOperation)operation;
|
||||
|
||||
- (BOOL) ignoreModifierKeysForDraggingSession:(NSDraggingSession *)session;
|
||||
@end
|
||||
#endif
|
||||
|
||||
@interface NSObject (NSDraggingSource)
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue