addToBuilder static method

void addToBuilder(
  1. ObjCProtocolBuilder builder, {
  2. void sharingService_didCompleteForItems_error_(
    1. NSSharingService,
    2. NSArray,
    3. NSError?
    )?,
  3. NSCloudKitSharingServiceOptions optionsForSharingService_shareProvider_(
    1. NSSharingService,
    2. NSItemProvider
    )?,
  4. void sharingService_didSaveShare_(
    1. NSSharingService,
    2. CKShare
    )?,
  5. void sharingService_didStopSharing_(
    1. NSSharingService,
    2. CKShare
    )?,
  6. void sharingService_willShareItems_(
    1. NSSharingService,
    2. NSArray
    )?,
  7. void sharingService_didFailToShareItems_error_(
    1. NSSharingService,
    2. NSArray,
    3. NSError
    )?,
  8. void sharingService_didShareItems_(
    1. NSSharingService,
    2. NSArray
    )?,
  9. NSRect sharingService_sourceFrameOnScreenForShareItem_(
    1. NSSharingService,
    2. ObjCObjectBase
    )?,
  10. NSImage? sharingService_transitionImageForShareItem_contentRect_(
    1. NSSharingService,
    2. ObjCObjectBase,
    3. Pointer<NSRect>
    )?,
  11. NSWindow? sharingService_sourceWindowForShareItems_sharingContentScope_(
    1. NSSharingService,
    2. NSArray,
    3. Pointer<NSInteger>
    )?,
  12. NSView? anchoringViewForSharingService_showRelativeToRect_preferredEdge_(
    1. NSSharingService,
    2. Pointer<NSRect>,
    3. Pointer<NSUInteger>
    )?,
  13. bool $keepIsolateAlive = true,
})
override

Adds the implementation of the NSCloudSharingServiceDelegate 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, 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,
}) {
  NSCloudSharingServiceDelegate.sharingService_didCompleteForItems_error_
      .implement(builder, sharingService_didCompleteForItems_error_);
  NSCloudSharingServiceDelegate.optionsForSharingService_shareProvider_
      .implement(builder, optionsForSharingService_shareProvider_);
  NSCloudSharingServiceDelegate.sharingService_didSaveShare_.implement(
    builder,
    sharingService_didSaveShare_,
  );
  NSCloudSharingServiceDelegate.sharingService_didStopSharing_.implement(
    builder,
    sharingService_didStopSharing_,
  );
  NSCloudSharingServiceDelegate.sharingService_willShareItems_.implement(
    builder,
    sharingService_willShareItems_,
  );
  NSCloudSharingServiceDelegate.sharingService_didFailToShareItems_error_
      .implement(builder, sharingService_didFailToShareItems_error_);
  NSCloudSharingServiceDelegate.sharingService_didShareItems_.implement(
    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);
}