addToBuilder static method
void
addToBuilder(})
Adds the implementation of the NSSharingServiceDelegate protocol to an existing
objc.ObjCProtocolBuilder.
Note: You cannot call this method after you have called builder.build.
Implementation
static void addToBuilder(
objc.ObjCProtocolBuilder builder, {
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,
}) {
NSSharingServiceDelegate.sharingService_willShareItems_.implement(
builder,
sharingService_willShareItems_,
);
NSSharingServiceDelegate.sharingService_didFailToShareItems_error_
.implement(builder, sharingService_didFailToShareItems_error_);
NSSharingServiceDelegate.sharingService_didShareItems_.implement(
builder,
sharingService_didShareItems_,
);
NSSharingServiceDelegate.sharingService_sourceFrameOnScreenForShareItem_
.implement(builder, sharingService_sourceFrameOnScreenForShareItem_);
NSSharingServiceDelegate
.sharingService_transitionImageForShareItem_contentRect_
.implement(
builder,
sharingService_transitionImageForShareItem_contentRect_,
);
NSSharingServiceDelegate
.sharingService_sourceWindowForShareItems_sharingContentScope_
.implement(
builder,
sharingService_sourceWindowForShareItems_sharingContentScope_,
);
NSSharingServiceDelegate
.anchoringViewForSharingService_showRelativeToRect_preferredEdge_
.implement(
builder,
anchoringViewForSharingService_showRelativeToRect_preferredEdge_,
);
builder.addProtocol($protocol);
}