addToBuilderAsBlocking static method

void addToBuilderAsBlocking(
  1. ObjCProtocolBuilder builder, {
  2. bool drawerShouldOpen_(
    1. NSDrawer
    )?,
  3. bool drawerShouldClose_(
    1. NSDrawer
    )?,
  4. NSSize drawerWillResizeContents_toSize_(
    1. NSDrawer,
    2. NSSize
    )?,
  5. void drawerWillOpen_(
    1. NSNotification
    )?,
  6. void drawerDidOpen_(
    1. NSNotification
    )?,
  7. void drawerWillClose_(
    1. NSNotification
    )?,
  8. void drawerDidClose_(
    1. NSNotification
    )?,
  9. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSDrawerDelegate 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, {
  bool Function(NSDrawer)? drawerShouldOpen_,
  bool Function(NSDrawer)? drawerShouldClose_,
  NSSize Function(NSDrawer, NSSize)? drawerWillResizeContents_toSize_,
  void Function(objc.NSNotification)? drawerWillOpen_,
  void Function(objc.NSNotification)? drawerDidOpen_,
  void Function(objc.NSNotification)? drawerWillClose_,
  void Function(objc.NSNotification)? drawerDidClose_,
  bool $keepIsolateAlive = true,
}) {
  NSDrawerDelegate.drawerShouldOpen_.implement(builder, drawerShouldOpen_);
  NSDrawerDelegate.drawerShouldClose_.implement(builder, drawerShouldClose_);
  NSDrawerDelegate.drawerWillResizeContents_toSize_.implement(
    builder,
    drawerWillResizeContents_toSize_,
  );
  NSDrawerDelegate.drawerWillOpen_.implementAsBlocking(
    builder,
    drawerWillOpen_,
  );
  NSDrawerDelegate.drawerDidOpen_.implementAsBlocking(
    builder,
    drawerDidOpen_,
  );
  NSDrawerDelegate.drawerWillClose_.implementAsBlocking(
    builder,
    drawerWillClose_,
  );
  NSDrawerDelegate.drawerDidClose_.implementAsBlocking(
    builder,
    drawerDidClose_,
  );
  builder.addProtocol($protocol);
}