implement static method
NSCandidateListTouchBarItemDelegate
implement({
- void candidateListTouchBarItem_beginSelectingCandidateAtIndex_()?,
- void candidateListTouchBarItem_changeSelectionFromCandidateAtIndex_toIndex_()?,
- void candidateListTouchBarItem_endSelectingCandidateAtIndex_()?,
- void candidateListTouchBarItem_changedCandidateListVisibility_()?,
- bool $keepIsolateAlive = true,
Builds an object that implements the NSCandidateListTouchBarItemDelegate protocol. To implement
multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly.
If $keepIsolateAlive is true, this protocol will keep this isolate
alive until it is garbage collected by both Dart and ObjC.
Implementation
static NSCandidateListTouchBarItemDelegate implement({
void Function(NSCandidateListTouchBarItem, DartNSInteger)?
candidateListTouchBarItem_beginSelectingCandidateAtIndex_,
void Function(NSCandidateListTouchBarItem, DartNSInteger, DartNSInteger)?
candidateListTouchBarItem_changeSelectionFromCandidateAtIndex_toIndex_,
void Function(NSCandidateListTouchBarItem, DartNSInteger)?
candidateListTouchBarItem_endSelectingCandidateAtIndex_,
void Function(NSCandidateListTouchBarItem, bool)?
candidateListTouchBarItem_changedCandidateListVisibility_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(
debugName: 'NSCandidateListTouchBarItemDelegate',
);
NSCandidateListTouchBarItemDelegate
.candidateListTouchBarItem_beginSelectingCandidateAtIndex_
.implement(
builder,
candidateListTouchBarItem_beginSelectingCandidateAtIndex_,
);
NSCandidateListTouchBarItemDelegate
.candidateListTouchBarItem_changeSelectionFromCandidateAtIndex_toIndex_
.implement(
builder,
candidateListTouchBarItem_changeSelectionFromCandidateAtIndex_toIndex_,
);
NSCandidateListTouchBarItemDelegate
.candidateListTouchBarItem_endSelectingCandidateAtIndex_
.implement(
builder,
candidateListTouchBarItem_endSelectingCandidateAtIndex_,
);
NSCandidateListTouchBarItemDelegate
.candidateListTouchBarItem_changedCandidateListVisibility_
.implement(
builder,
candidateListTouchBarItem_changedCandidateListVisibility_,
);
builder.addProtocol($protocol);
return NSCandidateListTouchBarItemDelegate.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}