WebItemProviderPasteboard.h [plain text]
#import <WebCore/AbstractPasteboard.h>
#if TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000
@class UIItemProvider;
@protocol UIItemProviderWriting;
struct CGSize;
typedef NS_ENUM(NSInteger, WebPreferredPresentationStyle) {
WebPreferredPresentationStyleUnspecified,
WebPreferredPresentationStyleInline,
WebPreferredPresentationStyleAttachment
};
NS_ASSUME_NONNULL_BEGIN
WEBCORE_EXPORT @interface WebItemProviderRegistrationInfo : NSObject
@property (nonatomic, readonly, nullable, strong) id <UIItemProviderWriting> representingObject;
@property (nonatomic, readonly, nullable, strong) NSString *typeIdentifier;
@property (nonatomic, readonly, nullable, strong) NSData *data;
@end
WEBCORE_EXPORT @interface WebItemProviderRegistrationInfoList : NSObject
- (void)addRepresentingObject:(id <UIItemProviderWriting>)object;
- (void)addData:(NSData *)data forType:(NSString *)typeIdentifier;
@property (nonatomic) CGSize preferredPresentationSize;
@property (nonatomic, copy) NSString *suggestedName;
@property (nonatomic, readonly, nullable) UIItemProvider *itemProvider;
@property (nonatomic) WebPreferredPresentationStyle preferredPresentationStyle;
@property (nonatomic, copy) NSData *teamData;
- (NSUInteger)numberOfItems;
- (nullable WebItemProviderRegistrationInfo *)itemAtIndex:(NSUInteger)index;
- (void)enumerateItems:(void(^)(WebItemProviderRegistrationInfo *item, NSUInteger index))block;
@end
typedef void (^WebItemProviderFileLoadBlock)(NSArray<NSURL *> *);
WEBCORE_EXPORT @interface WebItemProviderPasteboard : NSObject<AbstractPasteboard>
+ (instancetype)sharedInstance;
@property (copy, nonatomic, nullable) NSArray<__kindof NSItemProvider *> *itemProviders;
@property (readonly, nonatomic) NSInteger numberOfItems;
@property (readonly, nonatomic) NSInteger changeCount;
@property (readonly, nonatomic) NSArray<NSURL *> *allDroppedFileURLs;
- (nullable NSURL *)preferredFileUploadURLAtIndex:(NSUInteger)index fileType:(NSString *_Nullable *_Nullable)outFileType;
@property (readonly, nonatomic) BOOL hasPendingOperation;
- (void)incrementPendingOperationCount;
- (void)decrementPendingOperationCount;
- (void)enumerateItemProvidersWithBlock:(void (^)(UIItemProvider *itemProvider, NSUInteger index, BOOL *stop))block;
- (void)doAfterLoadingProvidedContentIntoFileURLs:(WebItemProviderFileLoadBlock)action;
- (void)doAfterLoadingProvidedContentIntoFileURLs:(WebItemProviderFileLoadBlock)action synchronousTimeout:(NSTimeInterval)synchronousTimeout;
@end
NS_ASSUME_NONNULL_END
#endif // TARGET_OS_IPHONE && __IPHONE_OS_VERSION_MIN_REQUIRED >= 110000