addToBuilderAsBlocking static method

void addToBuilderAsBlocking(
  1. ObjCProtocolBuilder builder, {
  2. required NSAttributedString? annotatedSubstringForProposedRange_actualRange_(
    1. NSRange,
    2. NSRangePointer
    ),
  3. required void setAnnotations_range_(
    1. NSDictionary,
    2. NSRange
    ),
  4. required void addAnnotations_range_(
    1. NSDictionary,
    2. NSRange
    ),
  5. required void removeAnnotation_range_(
    1. DartNSAttributedStringKey,
    2. NSRange
    ),
  6. required void replaceCharactersInRange_withAnnotatedString_(
    1. NSRange,
    2. NSAttributedString
    ),
  7. required void selectAndShowRange_(
    1. NSRange range
    ),
  8. required NSView? viewForRange_firstRect_actualRange_(
    1. NSRange,
    2. NSRectPointer,
    3. NSRangePointer
    ),
  9. required NSCandidateListTouchBarItem? candidateListTouchBarItem(),
  10. required void insertText_replacementRange_(
    1. ObjCObjectBase,
    2. NSRange
    ),
  11. required void doCommandBySelector_(
    1. Pointer<ObjCSelector> aSelector
    ),
  12. required void setMarkedText_selectedRange_replacementRange_(
    1. ObjCObjectBase,
    2. NSRange,
    3. NSRange
    ),
  13. required void unmarkText(),
  14. required NSRange selectedRange(),
  15. required NSRange markedRange(),
  16. required bool hasMarkedText(),
  17. required NSAttributedString? attributedSubstringForProposedRange_actualRange_(
    1. NSRange,
    2. NSRangePointer
    ),
  18. required NSArray validAttributesForMarkedText(),
  19. required NSRect firstRectForCharacterRange_actualRange_(
    1. NSRange,
    2. NSRangePointer
    ),
  20. required DartNSInteger characterIndexForPoint_(
    1. NSPoint point
    ),
  21. NSAttributedString attributedString()?,
  22. DartCGFloat fractionOfDistanceThroughGlyphForPoint_(
    1. NSPoint
    )?,
  23. DartCGFloat baselineDeltaForCharacterAtIndex_(
    1. DartNSUInteger
    )?,
  24. DartNSInteger windowLevel()?,
  25. bool drawsVerticallyForCharacterAtIndex_(
    1. DartNSUInteger
    )?,
  26. NSTextCursorAccessoryPlacement preferredTextAccessoryPlacement()?,
  27. NSRect unionRectInVisibleSelectedRange()?,
  28. NSRect documentVisibleRect()?,
  29. bool supportsAdaptiveImageGlyph()?,
  30. void insertAdaptiveImageGlyph_replacementRange_(
    1. NSAdaptiveImageGlyph,
    2. NSRange
    )?,
  31. NSTextInputTraitType autocorrectionType()?,
  32. void setAutocorrectionType_(
    1. NSTextInputTraitType
    )?,
  33. NSTextInputTraitType spellCheckingType()?,
  34. void setSpellCheckingType_(
    1. NSTextInputTraitType
    )?,
  35. NSTextInputTraitType grammarCheckingType()?,
  36. void setGrammarCheckingType_(
    1. NSTextInputTraitType
    )?,
  37. NSTextInputTraitType smartQuotesType()?,
  38. void setSmartQuotesType_(
    1. NSTextInputTraitType
    )?,
  39. NSTextInputTraitType smartDashesType()?,
  40. void setSmartDashesType_(
    1. NSTextInputTraitType
    )?,
  41. NSTextInputTraitType smartInsertDeleteType()?,
  42. void setSmartInsertDeleteType_(
    1. NSTextInputTraitType
    )?,
  43. NSTextInputTraitType textReplacementType()?,
  44. void setTextReplacementType_(
    1. NSTextInputTraitType
    )?,
  45. NSTextInputTraitType dataDetectionType()?,
  46. void setDataDetectionType_(
    1. NSTextInputTraitType
    )?,
  47. NSTextInputTraitType linkDetectionType()?,
  48. void setLinkDetectionType_(
    1. NSTextInputTraitType
    )?,
  49. NSTextInputTraitType textCompletionType()?,
  50. void setTextCompletionType_(
    1. NSTextInputTraitType
    )?,
  51. NSTextInputTraitType inlinePredictionType()?,
  52. void setInlinePredictionType_(
    1. NSTextInputTraitType
    )?,
  53. NSTextInputTraitType mathExpressionCompletionType()?,
  54. void setMathExpressionCompletionType_(
    1. NSTextInputTraitType
    )?,
  55. NSWritingToolsBehavior writingToolsBehavior()?,
  56. void setWritingToolsBehavior_(
    1. NSWritingToolsBehavior
    )?,
  57. NSWritingToolsResultOptions allowedWritingToolsResultOptions()?,
  58. void setAllowedWritingToolsResultOptions_(
    1. NSWritingToolsResultOptions
    )?,
  59. bool $keepIsolateAlive = true,
})
override

Adds the implementation of the NSTextCheckingClient protocol to an existing objc.ObjCProtocolBuilder. All methods that can be implemented as blocking listeners will be.

Note: You cannot call this method after you have called builder.build.

Implementation

static void addToBuilderAsBlocking(
  objc.ObjCProtocolBuilder builder, {
  required NSAttributedString? Function(NSRange, NSRangePointer)
  annotatedSubstringForProposedRange_actualRange_,
  required void Function(objc.NSDictionary, NSRange) setAnnotations_range_,
  required void Function(objc.NSDictionary, NSRange) addAnnotations_range_,
  required void Function(DartNSAttributedStringKey, NSRange)
  removeAnnotation_range_,
  required void Function(NSRange, NSAttributedString)
  replaceCharactersInRange_withAnnotatedString_,
  required void Function(NSRange) selectAndShowRange_,
  required NSView? Function(NSRange, NSRectPointer, NSRangePointer)
  viewForRange_firstRect_actualRange_,
  required NSCandidateListTouchBarItem? Function() candidateListTouchBarItem,
  required void Function(objc.ObjCObjectBase, NSRange)
  insertText_replacementRange_,
  required void Function(ffi.Pointer<objc.ObjCSelector>) doCommandBySelector_,
  required void Function(objc.ObjCObjectBase, NSRange, NSRange)
  setMarkedText_selectedRange_replacementRange_,
  required void Function() unmarkText,
  required NSRange Function() selectedRange,
  required NSRange Function() markedRange,
  required bool Function() hasMarkedText,
  required NSAttributedString? Function(NSRange, NSRangePointer)
  attributedSubstringForProposedRange_actualRange_,
  required objc.NSArray Function() validAttributesForMarkedText,
  required NSRect Function(NSRange, NSRangePointer)
  firstRectForCharacterRange_actualRange_,
  required DartNSUInteger Function(NSPoint) characterIndexForPoint_,
  NSAttributedString Function()? attributedString,
  DartCGFloat Function(NSPoint)? fractionOfDistanceThroughGlyphForPoint_,
  DartCGFloat Function(DartNSUInteger)? baselineDeltaForCharacterAtIndex_,
  DartNSInteger Function()? windowLevel,
  bool Function(DartNSUInteger)? drawsVerticallyForCharacterAtIndex_,
  NSTextCursorAccessoryPlacement Function()? preferredTextAccessoryPlacement,
  NSRect Function()? unionRectInVisibleSelectedRange,
  NSRect Function()? documentVisibleRect,
  bool Function()? supportsAdaptiveImageGlyph,
  void Function(NSAdaptiveImageGlyph, NSRange)?
  insertAdaptiveImageGlyph_replacementRange_,
  NSTextInputTraitType Function()? autocorrectionType,
  void Function(NSTextInputTraitType)? setAutocorrectionType_,
  NSTextInputTraitType Function()? spellCheckingType,
  void Function(NSTextInputTraitType)? setSpellCheckingType_,
  NSTextInputTraitType Function()? grammarCheckingType,
  void Function(NSTextInputTraitType)? setGrammarCheckingType_,
  NSTextInputTraitType Function()? smartQuotesType,
  void Function(NSTextInputTraitType)? setSmartQuotesType_,
  NSTextInputTraitType Function()? smartDashesType,
  void Function(NSTextInputTraitType)? setSmartDashesType_,
  NSTextInputTraitType Function()? smartInsertDeleteType,
  void Function(NSTextInputTraitType)? setSmartInsertDeleteType_,
  NSTextInputTraitType Function()? textReplacementType,
  void Function(NSTextInputTraitType)? setTextReplacementType_,
  NSTextInputTraitType Function()? dataDetectionType,
  void Function(NSTextInputTraitType)? setDataDetectionType_,
  NSTextInputTraitType Function()? linkDetectionType,
  void Function(NSTextInputTraitType)? setLinkDetectionType_,
  NSTextInputTraitType Function()? textCompletionType,
  void Function(NSTextInputTraitType)? setTextCompletionType_,
  NSTextInputTraitType Function()? inlinePredictionType,
  void Function(NSTextInputTraitType)? setInlinePredictionType_,
  NSTextInputTraitType Function()? mathExpressionCompletionType,
  void Function(NSTextInputTraitType)? setMathExpressionCompletionType_,
  NSWritingToolsBehavior Function()? writingToolsBehavior,
  void Function(NSWritingToolsBehavior)? setWritingToolsBehavior_,
  NSWritingToolsResultOptions Function()? allowedWritingToolsResultOptions,
  void Function(NSWritingToolsResultOptions)?
  setAllowedWritingToolsResultOptions_,
  bool $keepIsolateAlive = true,
}) {
  NSTextCheckingClient.annotatedSubstringForProposedRange_actualRange_
      .implement(builder, annotatedSubstringForProposedRange_actualRange_);
  NSTextCheckingClient.setAnnotations_range_.implementAsBlocking(
    builder,
    setAnnotations_range_,
  );
  NSTextCheckingClient.addAnnotations_range_.implementAsBlocking(
    builder,
    addAnnotations_range_,
  );
  NSTextCheckingClient.removeAnnotation_range_.implementAsBlocking(
    builder,
    removeAnnotation_range_,
  );
  NSTextCheckingClient.replaceCharactersInRange_withAnnotatedString_
      .implementAsBlocking(
        builder,
        replaceCharactersInRange_withAnnotatedString_,
      );
  NSTextCheckingClient.selectAndShowRange_.implementAsBlocking(
    builder,
    selectAndShowRange_,
  );
  NSTextCheckingClient.viewForRange_firstRect_actualRange_.implement(
    builder,
    viewForRange_firstRect_actualRange_,
  );
  NSTextCheckingClient.candidateListTouchBarItem.implement(
    builder,
    candidateListTouchBarItem,
  );
  NSTextCheckingClient.insertText_replacementRange_.implementAsBlocking(
    builder,
    insertText_replacementRange_,
  );
  NSTextCheckingClient.doCommandBySelector_.implementAsBlocking(
    builder,
    doCommandBySelector_,
  );
  NSTextCheckingClient.setMarkedText_selectedRange_replacementRange_
      .implementAsBlocking(
        builder,
        setMarkedText_selectedRange_replacementRange_,
      );
  NSTextCheckingClient.unmarkText.implementAsBlocking(builder, unmarkText);
  NSTextCheckingClient.selectedRange.implement(builder, selectedRange);
  NSTextCheckingClient.markedRange.implement(builder, markedRange);
  NSTextCheckingClient.hasMarkedText.implement(builder, hasMarkedText);
  NSTextCheckingClient.attributedSubstringForProposedRange_actualRange_
      .implement(builder, attributedSubstringForProposedRange_actualRange_);
  NSTextCheckingClient.validAttributesForMarkedText.implement(
    builder,
    validAttributesForMarkedText,
  );
  NSTextCheckingClient.firstRectForCharacterRange_actualRange_.implement(
    builder,
    firstRectForCharacterRange_actualRange_,
  );
  NSTextCheckingClient.characterIndexForPoint_.implement(
    builder,
    characterIndexForPoint_,
  );
  NSTextCheckingClient.attributedString.implement(builder, attributedString);
  NSTextCheckingClient.fractionOfDistanceThroughGlyphForPoint_.implement(
    builder,
    fractionOfDistanceThroughGlyphForPoint_,
  );
  NSTextCheckingClient.baselineDeltaForCharacterAtIndex_.implement(
    builder,
    baselineDeltaForCharacterAtIndex_,
  );
  NSTextCheckingClient.windowLevel.implement(builder, windowLevel);
  NSTextCheckingClient.drawsVerticallyForCharacterAtIndex_.implement(
    builder,
    drawsVerticallyForCharacterAtIndex_,
  );
  NSTextCheckingClient.preferredTextAccessoryPlacement.implement(
    builder,
    preferredTextAccessoryPlacement,
  );
  NSTextCheckingClient.unionRectInVisibleSelectedRange.implement(
    builder,
    unionRectInVisibleSelectedRange,
  );
  NSTextCheckingClient.documentVisibleRect.implement(
    builder,
    documentVisibleRect,
  );
  NSTextCheckingClient.supportsAdaptiveImageGlyph.implement(
    builder,
    supportsAdaptiveImageGlyph,
  );
  NSTextCheckingClient.insertAdaptiveImageGlyph_replacementRange_
      .implementAsBlocking(
        builder,
        insertAdaptiveImageGlyph_replacementRange_,
      );
  NSTextCheckingClient.autocorrectionType.implement(
    builder,
    autocorrectionType,
  );
  NSTextCheckingClient.setAutocorrectionType_.implementAsBlocking(
    builder,
    setAutocorrectionType_,
  );
  NSTextCheckingClient.spellCheckingType.implement(
    builder,
    spellCheckingType,
  );
  NSTextCheckingClient.setSpellCheckingType_.implementAsBlocking(
    builder,
    setSpellCheckingType_,
  );
  NSTextCheckingClient.grammarCheckingType.implement(
    builder,
    grammarCheckingType,
  );
  NSTextCheckingClient.setGrammarCheckingType_.implementAsBlocking(
    builder,
    setGrammarCheckingType_,
  );
  NSTextCheckingClient.smartQuotesType.implement(builder, smartQuotesType);
  NSTextCheckingClient.setSmartQuotesType_.implementAsBlocking(
    builder,
    setSmartQuotesType_,
  );
  NSTextCheckingClient.smartDashesType.implement(builder, smartDashesType);
  NSTextCheckingClient.setSmartDashesType_.implementAsBlocking(
    builder,
    setSmartDashesType_,
  );
  NSTextCheckingClient.smartInsertDeleteType.implement(
    builder,
    smartInsertDeleteType,
  );
  NSTextCheckingClient.setSmartInsertDeleteType_.implementAsBlocking(
    builder,
    setSmartInsertDeleteType_,
  );
  NSTextCheckingClient.textReplacementType.implement(
    builder,
    textReplacementType,
  );
  NSTextCheckingClient.setTextReplacementType_.implementAsBlocking(
    builder,
    setTextReplacementType_,
  );
  NSTextCheckingClient.dataDetectionType.implement(
    builder,
    dataDetectionType,
  );
  NSTextCheckingClient.setDataDetectionType_.implementAsBlocking(
    builder,
    setDataDetectionType_,
  );
  NSTextCheckingClient.linkDetectionType.implement(
    builder,
    linkDetectionType,
  );
  NSTextCheckingClient.setLinkDetectionType_.implementAsBlocking(
    builder,
    setLinkDetectionType_,
  );
  NSTextCheckingClient.textCompletionType.implement(
    builder,
    textCompletionType,
  );
  NSTextCheckingClient.setTextCompletionType_.implementAsBlocking(
    builder,
    setTextCompletionType_,
  );
  NSTextCheckingClient.inlinePredictionType.implement(
    builder,
    inlinePredictionType,
  );
  NSTextCheckingClient.setInlinePredictionType_.implementAsBlocking(
    builder,
    setInlinePredictionType_,
  );
  NSTextCheckingClient.mathExpressionCompletionType.implement(
    builder,
    mathExpressionCompletionType,
  );
  NSTextCheckingClient.setMathExpressionCompletionType_.implementAsBlocking(
    builder,
    setMathExpressionCompletionType_,
  );
  NSTextCheckingClient.writingToolsBehavior.implement(
    builder,
    writingToolsBehavior,
  );
  NSTextCheckingClient.setWritingToolsBehavior_.implementAsBlocking(
    builder,
    setWritingToolsBehavior_,
  );
  NSTextCheckingClient.allowedWritingToolsResultOptions.implement(
    builder,
    allowedWritingToolsResultOptions,
  );
  NSTextCheckingClient.setAllowedWritingToolsResultOptions_
      .implementAsBlocking(builder, setAllowedWritingToolsResultOptions_);
  builder.addProtocol($protocol);
}