addToBuilder static method

void addToBuilder(
  1. ObjCProtocolBuilder builder, {
  2. NSTextElement? textContentManager_textElementAtLocation_(
    1. NSTextContentManager,
    2. NSTextLocation
    )?,
  3. bool textContentManager_shouldEnumerateTextElement_options_(
    1. NSTextContentManager,
    2. NSTextElement,
    3. NSTextContentManagerEnumerationOptions
    )?,
  4. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSTextContentManagerDelegate 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, {
  NSTextElement? Function(NSTextContentManager, NSTextLocation)?
  textContentManager_textElementAtLocation_,
  bool Function(
    NSTextContentManager,
    NSTextElement,
    NSTextContentManagerEnumerationOptions,
  )?
  textContentManager_shouldEnumerateTextElement_options_,
  bool $keepIsolateAlive = true,
}) {
  NSTextContentManagerDelegate.textContentManager_textElementAtLocation_
      .implement(builder, textContentManager_textElementAtLocation_);
  NSTextContentManagerDelegate
      .textContentManager_shouldEnumerateTextElement_options_
      .implement(
        builder,
        textContentManager_shouldEnumerateTextElement_options_,
      );
  builder.addProtocol($protocol);
}