implement static method
NSViewLayerContentScaleDelegate
implement({})
Builds an object that implements the NSViewLayerContentScaleDelegate 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 NSViewLayerContentScaleDelegate implement({
bool Function(CALayer, DartCGFloat, NSWindow)?
layer_shouldInheritContentsScale_fromWindow_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(
debugName: 'NSViewLayerContentScaleDelegate',
);
NSViewLayerContentScaleDelegate.layer_shouldInheritContentsScale_fromWindow_
.implement(builder, layer_shouldInheritContentsScale_fromWindow_);
builder.addProtocol($protocol);
return NSViewLayerContentScaleDelegate.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}