implementAsBlocking static method
NSCloudSharingServiceDelegate
implementAsBlocking({
- void sharingService_didCompleteForItems_error_(
- NSSharingService,
- NSArray,
- NSError?
- void sharingService_didStopSharing_()?,
- NSView? anchoringViewForSharingService_showRelativeToRect_preferredEdge_()?,
- bool $keepIsolateAlive = true,
override
Builds an object that implements the NSCloudSharingServiceDelegate protocol. To implement
multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly. All
methods that can be implemented as blocking listeners will be.
If $keepIsolateAlive is true, this protocol will keep this isolate
alive until it is garbage collected by both Dart and ObjC.
Implementation
static NSCloudSharingServiceDelegate implementAsBlocking({
void Function(NSSharingService, objc.NSArray, objc.NSError?)?
sharingService_didCompleteForItems_error_,
NSCloudKitSharingServiceOptions Function(
NSSharingService,
objc.NSItemProvider,
)?
optionsForSharingService_shareProvider_,
void Function(NSSharingService, CKShare)? sharingService_didSaveShare_,
void Function(NSSharingService, CKShare)? sharingService_didStopSharing_,
void Function(NSSharingService, objc.NSArray)?
sharingService_willShareItems_,
void Function(NSSharingService, objc.NSArray, objc.NSError)?
sharingService_didFailToShareItems_error_,
void Function(NSSharingService, objc.NSArray)?
sharingService_didShareItems_,
NSRect Function(NSSharingService, objc.ObjCObjectBase)?
sharingService_sourceFrameOnScreenForShareItem_,
NSImage? Function(
NSSharingService,
objc.ObjCObjectBase,
ffi.Pointer<NSRect>,
)?
sharingService_transitionImageForShareItem_contentRect_,
NSWindow? Function(NSSharingService, objc.NSArray, ffi.Pointer<NSInteger>)?
sharingService_sourceWindowForShareItems_sharingContentScope_,
NSView? Function(
NSSharingService,
ffi.Pointer<NSRect>,
ffi.Pointer<NSUInteger>,
)?
anchoringViewForSharingService_showRelativeToRect_preferredEdge_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(
debugName: 'NSCloudSharingServiceDelegate',
);
NSCloudSharingServiceDelegate.sharingService_didCompleteForItems_error_
.implementAsBlocking(
builder,
sharingService_didCompleteForItems_error_,
);
NSCloudSharingServiceDelegate.optionsForSharingService_shareProvider_
.implement(builder, optionsForSharingService_shareProvider_);
NSCloudSharingServiceDelegate.sharingService_didSaveShare_
.implementAsBlocking(builder, sharingService_didSaveShare_);
NSCloudSharingServiceDelegate.sharingService_didStopSharing_
.implementAsBlocking(builder, sharingService_didStopSharing_);
NSCloudSharingServiceDelegate.sharingService_willShareItems_
.implementAsBlocking(builder, sharingService_willShareItems_);
NSCloudSharingServiceDelegate.sharingService_didFailToShareItems_error_
.implementAsBlocking(
builder,
sharingService_didFailToShareItems_error_,
);
NSCloudSharingServiceDelegate.sharingService_didShareItems_
.implementAsBlocking(builder, sharingService_didShareItems_);
NSCloudSharingServiceDelegate
.sharingService_sourceFrameOnScreenForShareItem_
.implement(builder, sharingService_sourceFrameOnScreenForShareItem_);
NSCloudSharingServiceDelegate
.sharingService_transitionImageForShareItem_contentRect_
.implement(
builder,
sharingService_transitionImageForShareItem_contentRect_,
);
NSCloudSharingServiceDelegate
.sharingService_sourceWindowForShareItems_sharingContentScope_
.implement(
builder,
sharingService_sourceWindowForShareItems_sharingContentScope_,
);
NSCloudSharingServiceDelegate
.anchoringViewForSharingService_showRelativeToRect_preferredEdge_
.implement(
builder,
anchoringViewForSharingService_showRelativeToRect_preferredEdge_,
);
builder.addProtocol($protocol);
return NSCloudSharingServiceDelegate.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}