addToBuilder static method

void addToBuilder(
  1. ObjCProtocolBuilder builder, {
  2. required void willShow(),
  3. required bool shouldHide(),
  4. required bool saveValuesAndReturnError_(
    1. Pointer<Pointer<ObjCObject>> error
    ),
  5. required bool restoreValuesAndReturnError_(
    1. Pointer<Pointer<ObjCObject>> error
    ),
  6. NSArray? supportedPPDOptionKeys()?,
  7. required void PPDOptionKeyValueDidChange_ppdChoice_(
    1. NSString,
    2. NSString
    ),
  8. required NSView? panelView(),
  9. required DartCADynamicRange panelName(),
  10. required DartCADynamicRange panelKind(),
  11. required NSDictionary? summaryInfo(),
  12. bool shouldShowHelp()?,
  13. bool shouldPrint()?,
  14. void printWindowWillClose_(
    1. bool
    )?,
  15. bool $keepIsolateAlive = true,
})

Adds the implementation of the PDEPanel 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 void Function() willShow,
  required bool Function() shouldHide,
  required bool Function(ffi.Pointer<ffi.Pointer<objc.ObjCObject>>)
  saveValuesAndReturnError_,
  required bool Function(ffi.Pointer<ffi.Pointer<objc.ObjCObject>>)
  restoreValuesAndReturnError_,
  objc.NSArray? Function()? supportedPPDOptionKeys,
  required void Function(objc.NSString, objc.NSString)
  PPDOptionKeyValueDidChange_ppdChoice_,
  required NSView? Function() panelView,
  required objc.NSString Function() panelName,
  required objc.NSString Function() panelKind,
  required objc.NSDictionary? Function() summaryInfo,
  bool Function()? shouldShowHelp,
  bool Function()? shouldPrint,
  void Function(bool)? printWindowWillClose_,
  bool $keepIsolateAlive = true,
}) {
  PDEPanel.willShow.implement(builder, willShow);
  PDEPanel.shouldHide.implement(builder, shouldHide);
  PDEPanel.saveValuesAndReturnError_.implement(
    builder,
    saveValuesAndReturnError_,
  );
  PDEPanel.restoreValuesAndReturnError_.implement(
    builder,
    restoreValuesAndReturnError_,
  );
  PDEPanel.supportedPPDOptionKeys.implement(builder, supportedPPDOptionKeys);
  PDEPanel.PPDOptionKeyValueDidChange_ppdChoice_.implement(
    builder,
    PPDOptionKeyValueDidChange_ppdChoice_,
  );
  PDEPanel.panelView.implement(builder, panelView);
  PDEPanel.panelName.implement(builder, panelName);
  PDEPanel.panelKind.implement(builder, panelKind);
  PDEPanel.summaryInfo.implement(builder, summaryInfo);
  PDEPanel.shouldShowHelp.implement(builder, shouldShowHelp);
  PDEPanel.shouldPrint.implement(builder, shouldPrint);
  PDEPanel.printWindowWillClose_.implement(builder, printWindowWillClose_);
  builder.addProtocol($protocol);
}