addToBuilder static method

void addToBuilder(
  1. ObjCProtocolBuilder builder, {
  2. NSImage? imageDidNotDraw_inRect_(
    1. NSImage,
    2. NSRect
    )?,
  3. void image_willLoadRepresentation_(
    1. NSImage,
    2. NSImageRep
    )?,
  4. void image_didLoadRepresentationHeader_(
    1. NSImage,
    2. NSImageRep
    )?,
  5. void image_didLoadPartOfRepresentation_withValidRows_(
    1. NSImage,
    2. NSImageRep,
    3. DartNSInteger
    )?,
  6. void image_didLoadRepresentation_withStatus_(
    1. NSImage,
    2. NSImageRep,
    3. NSImageLoadStatus
    )?,
  7. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSImageDelegate 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, {
  NSImage? Function(NSImage, NSRect)? imageDidNotDraw_inRect_,
  void Function(NSImage, NSImageRep)? image_willLoadRepresentation_,
  void Function(NSImage, NSImageRep)? image_didLoadRepresentationHeader_,
  void Function(NSImage, NSImageRep, DartNSInteger)?
  image_didLoadPartOfRepresentation_withValidRows_,
  void Function(NSImage, NSImageRep, NSImageLoadStatus)?
  image_didLoadRepresentation_withStatus_,
  bool $keepIsolateAlive = true,
}) {
  NSImageDelegate.imageDidNotDraw_inRect_.implement(
    builder,
    imageDidNotDraw_inRect_,
  );
  NSImageDelegate.image_willLoadRepresentation_.implement(
    builder,
    image_willLoadRepresentation_,
  );
  NSImageDelegate.image_didLoadRepresentationHeader_.implement(
    builder,
    image_didLoadRepresentationHeader_,
  );
  NSImageDelegate.image_didLoadPartOfRepresentation_withValidRows_.implement(
    builder,
    image_didLoadPartOfRepresentation_withValidRows_,
  );
  NSImageDelegate.image_didLoadRepresentation_withStatus_.implement(
    builder,
    image_didLoadRepresentation_withStatus_,
  );
  builder.addProtocol($protocol);
}