addToBuilderAsBlocking static method

void addToBuilderAsBlocking(
  1. ObjCProtocolBuilder builder, {
  2. required void insertText_client_(
    1. ObjCObjectBase,
    2. ObjCObjectBase
    ),
  3. required void doCommandBySelector_client_(
    1. Pointer<ObjCSelector>,
    2. ObjCObjectBase
    ),
  4. required void markedTextAbandoned_(
    1. ObjCObjectBase? sender
    ),
  5. required void markedTextSelectionChanged_client_(
    1. NSRange,
    2. ObjCObjectBase
    ),
  6. required void terminate_(
    1. ObjCObjectBase? sender
    ),
  7. required bool canBeDisabled(),
  8. required bool wantsToInterpretAllKeystrokes(),
  9. required bool wantsToHandleMouseEvents(),
  10. required bool wantsToDelayTextChangeNotifications(),
  11. required void inputClientBecomeActive_(
    1. ObjCObjectBase? sender
    ),
  12. required void inputClientResignActive_(
    1. ObjCObjectBase? sender
    ),
  13. required void inputClientEnabled_(
    1. ObjCObjectBase? sender
    ),
  14. required void inputClientDisabled_(
    1. ObjCObjectBase? sender
    ),
  15. required void activeConversationWillChange_fromOldConversation_(
    1. ObjCObjectBase,
    2. DartNSInteger
    ),
  16. required void activeConversationChanged_toNewConversation_(
    1. ObjCObjectBase,
    2. DartNSInteger
    ),
  17. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSInputServiceProvider 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, {
  required void Function(objc.ObjCObjectBase, objc.ObjCObjectBase)
  insertText_client_,
  required void Function(ffi.Pointer<objc.ObjCSelector>, objc.ObjCObjectBase)
  doCommandBySelector_client_,
  required void Function(objc.ObjCObjectBase?) markedTextAbandoned_,
  required void Function(NSRange, objc.ObjCObjectBase)
  markedTextSelectionChanged_client_,
  required void Function(objc.ObjCObjectBase?) terminate_,
  required bool Function() canBeDisabled,
  required bool Function() wantsToInterpretAllKeystrokes,
  required bool Function() wantsToHandleMouseEvents,
  required bool Function() wantsToDelayTextChangeNotifications,
  required void Function(objc.ObjCObjectBase?) inputClientBecomeActive_,
  required void Function(objc.ObjCObjectBase?) inputClientResignActive_,
  required void Function(objc.ObjCObjectBase?) inputClientEnabled_,
  required void Function(objc.ObjCObjectBase?) inputClientDisabled_,
  required void Function(objc.ObjCObjectBase, DartNSInteger)
  activeConversationWillChange_fromOldConversation_,
  required void Function(objc.ObjCObjectBase, DartNSInteger)
  activeConversationChanged_toNewConversation_,
  bool $keepIsolateAlive = true,
}) {
  NSInputServiceProvider.insertText_client_.implementAsBlocking(
    builder,
    insertText_client_,
  );
  NSInputServiceProvider.doCommandBySelector_client_.implementAsBlocking(
    builder,
    doCommandBySelector_client_,
  );
  NSInputServiceProvider.markedTextAbandoned_.implementAsBlocking(
    builder,
    markedTextAbandoned_,
  );
  NSInputServiceProvider.markedTextSelectionChanged_client_
      .implementAsBlocking(builder, markedTextSelectionChanged_client_);
  NSInputServiceProvider.terminate_.implementAsBlocking(builder, terminate_);
  NSInputServiceProvider.canBeDisabled.implement(builder, canBeDisabled);
  NSInputServiceProvider.wantsToInterpretAllKeystrokes.implement(
    builder,
    wantsToInterpretAllKeystrokes,
  );
  NSInputServiceProvider.wantsToHandleMouseEvents.implement(
    builder,
    wantsToHandleMouseEvents,
  );
  NSInputServiceProvider.wantsToDelayTextChangeNotifications.implement(
    builder,
    wantsToDelayTextChangeNotifications,
  );
  NSInputServiceProvider.inputClientBecomeActive_.implementAsBlocking(
    builder,
    inputClientBecomeActive_,
  );
  NSInputServiceProvider.inputClientResignActive_.implementAsBlocking(
    builder,
    inputClientResignActive_,
  );
  NSInputServiceProvider.inputClientEnabled_.implementAsBlocking(
    builder,
    inputClientEnabled_,
  );
  NSInputServiceProvider.inputClientDisabled_.implementAsBlocking(
    builder,
    inputClientDisabled_,
  );
  NSInputServiceProvider.activeConversationWillChange_fromOldConversation_
      .implementAsBlocking(
        builder,
        activeConversationWillChange_fromOldConversation_,
      );
  NSInputServiceProvider.activeConversationChanged_toNewConversation_
      .implementAsBlocking(
        builder,
        activeConversationChanged_toNewConversation_,
      );
  builder.addProtocol($protocol);
}