addToBuilder static method
void
addToBuilder(
- ObjCProtocolBuilder builder, {
- required NSTextRange documentRange(),
- required void enumerateSubstringsFromLocation_options_usingBlock_(
- NSTextLocation,
- NSStringEnumerationOptions,
- ObjCBlock<
Void Function(NSString?, NSTextRange, NSTextRange?, Pointer< Bool> )>
- required NSTextRange? textRangeForSelectionGranularity_enclosingLocation_(),
- required NSTextLocation? locationFromLocation_withOffset_(),
- required DartNSInteger offsetFromLocation_toLocation_(),
- required NSTextSelectionNavigationWritingDirection baseWritingDirectionAtLocation_(),
- required void enumerateCaretOffsetsInLineFragmentAtLocation_usingBlock_(),
- required NSTextRange? lineFragmentRangeForPoint_inContainerAtLocation_(
- CGPoint,
- NSTextLocation
- void enumerateContainerBoundariesFromLocation_reverse_usingBlock_()?,
- NSTextSelectionNavigationLayoutOrientation textLayoutOrientationAtLocation_()?,
- bool $keepIsolateAlive = true,
Adds the implementation of the NSTextSelectionDataSource 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, {
required NSTextRange Function() documentRange,
required void Function(
NSTextLocation,
objc.NSStringEnumerationOptions,
objc.ObjCBlock<
ffi.Void Function(
objc.NSString?,
NSTextRange,
NSTextRange?,
ffi.Pointer<ffi.Bool>,
)
>,
)
enumerateSubstringsFromLocation_options_usingBlock_,
required NSTextRange? Function(NSTextSelectionGranularity, NSTextLocation)
textRangeForSelectionGranularity_enclosingLocation_,
required NSTextLocation? Function(NSTextLocation, DartNSInteger)
locationFromLocation_withOffset_,
required DartNSInteger Function(NSTextLocation, NSTextLocation)
offsetFromLocation_toLocation_,
required NSTextSelectionNavigationWritingDirection Function(NSTextLocation)
baseWritingDirectionAtLocation_,
required void Function(
NSTextLocation,
objc.ObjCBlock<
ffi.Void Function(
ffi.Double,
ffi.Pointer<objc.ObjCObject>,
ffi.Bool,
ffi.Pointer<ffi.Bool>,
)
>,
)
enumerateCaretOffsetsInLineFragmentAtLocation_usingBlock_,
required NSTextRange? Function(objc.CGPoint, NSTextLocation)
lineFragmentRangeForPoint_inContainerAtLocation_,
void Function(
NSTextLocation,
bool,
objc.ObjCBlock<
ffi.Void Function(ffi.Pointer<objc.ObjCObject>, ffi.Pointer<ffi.Bool>)
>,
)?
enumerateContainerBoundariesFromLocation_reverse_usingBlock_,
NSTextSelectionNavigationLayoutOrientation Function(NSTextLocation)?
textLayoutOrientationAtLocation_,
bool $keepIsolateAlive = true,
}) {
NSTextSelectionDataSource.documentRange.implement(builder, documentRange);
NSTextSelectionDataSource
.enumerateSubstringsFromLocation_options_usingBlock_
.implement(
builder,
enumerateSubstringsFromLocation_options_usingBlock_,
);
NSTextSelectionDataSource
.textRangeForSelectionGranularity_enclosingLocation_
.implement(
builder,
textRangeForSelectionGranularity_enclosingLocation_,
);
NSTextSelectionDataSource.locationFromLocation_withOffset_.implement(
builder,
locationFromLocation_withOffset_,
);
NSTextSelectionDataSource.offsetFromLocation_toLocation_.implement(
builder,
offsetFromLocation_toLocation_,
);
NSTextSelectionDataSource.baseWritingDirectionAtLocation_.implement(
builder,
baseWritingDirectionAtLocation_,
);
NSTextSelectionDataSource
.enumerateCaretOffsetsInLineFragmentAtLocation_usingBlock_
.implement(
builder,
enumerateCaretOffsetsInLineFragmentAtLocation_usingBlock_,
);
NSTextSelectionDataSource.lineFragmentRangeForPoint_inContainerAtLocation_
.implement(builder, lineFragmentRangeForPoint_inContainerAtLocation_);
NSTextSelectionDataSource
.enumerateContainerBoundariesFromLocation_reverse_usingBlock_
.implement(
builder,
enumerateContainerBoundariesFromLocation_reverse_usingBlock_,
);
NSTextSelectionDataSource.textLayoutOrientationAtLocation_.implement(
builder,
textLayoutOrientationAtLocation_,
);
builder.addProtocol($protocol);
}