addToBuilder static method

void addToBuilder(
  1. ObjCProtocolBuilder builder, {
  2. void candidateListTouchBarItem_beginSelectingCandidateAtIndex_(
    1. NSCandidateListTouchBarItem,
    2. DartNSInteger
    )?,
  3. void candidateListTouchBarItem_changeSelectionFromCandidateAtIndex_toIndex_(
    1. NSCandidateListTouchBarItem,
    2. DartNSInteger,
    3. DartNSInteger
    )?,
  4. void candidateListTouchBarItem_endSelectingCandidateAtIndex_(
    1. NSCandidateListTouchBarItem,
    2. DartNSInteger
    )?,
  5. void candidateListTouchBarItem_changedCandidateListVisibility_(
    1. NSCandidateListTouchBarItem,
    2. bool
    )?,
  6. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSCandidateListTouchBarItemDelegate 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, {
  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,
}) {
  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);
}