addToBuilderAsBlocking static method

void addToBuilderAsBlocking(
  1. ObjCProtocolBuilder builder, {
  2. void handleMachMessage_(
    1. Pointer<Void>
    )?,
  3. void handlePortMessage_(
    1. NSPortMessage
    )?,
  4. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSMachPortDelegate protocol to an existing objc.ObjCProtocolBuilder. All methods that can be implemented as blocking listeners will be.

Note: You cannot call this method after you have called builder.build.

Implementation

static void addToBuilderAsBlocking(
  objc.ObjCProtocolBuilder builder, {
  void Function(ffi.Pointer<ffi.Void>)? handleMachMessage_,
  void Function(objc.NSPortMessage)? handlePortMessage_,
  bool $keepIsolateAlive = true,
}) {
  NSMachPortDelegate.handleMachMessage_.implementAsBlocking(
    builder,
    handleMachMessage_,
  );
  NSMachPortDelegate.handlePortMessage_.implementAsBlocking(
    builder,
    handlePortMessage_,
  );
  builder.addProtocol($protocol);
}