addToBuilder static method

void addToBuilder(
  1. ObjCProtocolBuilder builder, {
  2. void displayLayer_(
    1. CALayer
    )?,
  3. void drawLayer_inContext_(
    1. CALayer,
    2. CGContextRef
    )?,
  4. void layerWillDraw_(
    1. CALayer
    )?,
  5. void layoutSublayersOfLayer_(
    1. CALayer
    )?,
  6. CAAction? actionForLayer_forKey_(
    1. CALayer,
    2. NSString
    )?,
  7. bool $keepIsolateAlive = true,
})

Adds the implementation of the CALayerDelegate 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(CALayer)? displayLayer_,
  void Function(CALayer, CGContextRef)? drawLayer_inContext_,
  void Function(CALayer)? layerWillDraw_,
  void Function(CALayer)? layoutSublayersOfLayer_,
  CAAction? Function(CALayer, objc.NSString)? actionForLayer_forKey_,
  bool $keepIsolateAlive = true,
}) {
  CALayerDelegate.displayLayer_.implement(builder, displayLayer_);
  CALayerDelegate.drawLayer_inContext_.implement(
    builder,
    drawLayer_inContext_,
  );
  CALayerDelegate.layerWillDraw_.implement(builder, layerWillDraw_);
  CALayerDelegate.layoutSublayersOfLayer_.implement(
    builder,
    layoutSublayersOfLayer_,
  );
  CALayerDelegate.actionForLayer_forKey_.implement(
    builder,
    actionForLayer_forKey_,
  );
  builder.addProtocol($protocol);
}