addToBuilderAsBlocking static method
void
addToBuilderAsBlocking(
- ObjCProtocolBuilder builder, {
- required NSTextRange documentRange(),
- required NSTextLocation? enumerateTextElementsFromLocation_options_usingBlock_(
- NSTextLocation?,
- NSTextContentManagerEnumerationOptions,
- ObjCBlock<
Bool Function(NSTextElement)>
- required void replaceContentsInRange_withTextElements_(
- NSTextRange,
- NSArray?
- required void synchronizeToBackingStore_(
- ObjCBlock<
Void Function(NSError?)> ?
- ObjCBlock<
- NSTextLocation? locationFromLocation_withOffset_()?,
- DartNSInteger offsetFromLocation_toLocation_()?,
- NSTextRange? adjustedRangeFromRange_forEditingTextSelection_()?,
- bool $keepIsolateAlive = true,
Adds the implementation of the NSTextElementProvider 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 NSTextRange Function() documentRange,
required NSTextLocation? Function(
NSTextLocation?,
NSTextContentManagerEnumerationOptions,
objc.ObjCBlock<ffi.Bool Function(NSTextElement)>,
)
enumerateTextElementsFromLocation_options_usingBlock_,
required void Function(NSTextRange, objc.NSArray?)
replaceContentsInRange_withTextElements_,
required void Function(objc.ObjCBlock<ffi.Void Function(objc.NSError?)>?)
synchronizeToBackingStore_,
NSTextLocation? Function(NSTextLocation, DartNSInteger)?
locationFromLocation_withOffset_,
DartNSInteger Function(NSTextLocation, NSTextLocation)?
offsetFromLocation_toLocation_,
NSTextRange? Function(NSTextRange, bool)?
adjustedRangeFromRange_forEditingTextSelection_,
bool $keepIsolateAlive = true,
}) {
NSTextElementProvider.documentRange.implement(builder, documentRange);
NSTextElementProvider.enumerateTextElementsFromLocation_options_usingBlock_
.implement(
builder,
enumerateTextElementsFromLocation_options_usingBlock_,
);
NSTextElementProvider.replaceContentsInRange_withTextElements_
.implementAsBlocking(builder, replaceContentsInRange_withTextElements_);
NSTextElementProvider.synchronizeToBackingStore_.implementAsBlocking(
builder,
synchronizeToBackingStore_,
);
NSTextElementProvider.locationFromLocation_withOffset_.implement(
builder,
locationFromLocation_withOffset_,
);
NSTextElementProvider.offsetFromLocation_toLocation_.implement(
builder,
offsetFromLocation_toLocation_,
);
NSTextElementProvider.adjustedRangeFromRange_forEditingTextSelection_
.implement(builder, adjustedRangeFromRange_forEditingTextSelection_);
builder.addProtocol($protocol);
}