addToBuilderAsBlocking static method

void addToBuilderAsBlocking(
  1. ObjCProtocolBuilder builder, {
  2. DartNSInteger numberOfRowsInTableView_(
    1. NSTableView
    )?,
  3. ObjCObjectBase? tableView_objectValueForTableColumn_row_(
    1. NSTableView,
    2. NSTableColumn?,
    3. DartNSInteger
    )?,
  4. void tableView_setObjectValue_forTableColumn_row_(
    1. NSTableView,
    2. ObjCObjectBase?,
    3. NSTableColumn?,
    4. DartNSInteger,
    )?,
  5. void tableView_sortDescriptorsDidChange_(
    1. NSTableView,
    2. NSArray
    )?,
  6. NSPasteboardWriting? tableView_pasteboardWriterForRow_(
    1. NSTableView,
    2. DartNSInteger
    )?,
  7. void tableView_draggingSession_willBeginAtPoint_forRowIndexes_(
    1. NSTableView,
    2. NSDraggingSession,
    3. NSPoint,
    4. NSIndexSet,
    )?,
  8. void tableView_draggingSession_endedAtPoint_operation_(
    1. NSTableView,
    2. NSDraggingSession,
    3. NSPoint,
    4. NSDragOperation,
    )?,
  9. void tableView_updateDraggingItemsForDrag_(
    1. NSTableView,
    2. NSDraggingInfo
    )?,
  10. bool tableView_writeRowsWithIndexes_toPasteboard_(
    1. NSTableView,
    2. NSIndexSet,
    3. NSPasteboard
    )?,
  11. NSDragOperation tableView_validateDrop_proposedRow_proposedDropOperation_(
    1. NSTableView,
    2. NSDraggingInfo,
    3. DartNSInteger,
    4. NSTableViewDropOperation,
    )?,
  12. bool tableView_acceptDrop_row_dropOperation_(
    1. NSTableView,
    2. NSDraggingInfo,
    3. DartNSInteger,
    4. NSTableViewDropOperation,
    )?,
  13. NSArray tableView_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes_(
    1. NSTableView,
    2. NSURL,
    3. NSIndexSet
    )?,
  14. bool $keepIsolateAlive = true,
})

Adds the implementation of the NSTableViewDataSource 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, {
  DartNSInteger Function(NSTableView)? numberOfRowsInTableView_,
  objc.ObjCObjectBase? Function(NSTableView, NSTableColumn?, DartNSInteger)?
  tableView_objectValueForTableColumn_row_,
  void Function(
    NSTableView,
    objc.ObjCObjectBase?,
    NSTableColumn?,
    DartNSInteger,
  )?
  tableView_setObjectValue_forTableColumn_row_,
  void Function(NSTableView, objc.NSArray)?
  tableView_sortDescriptorsDidChange_,
  NSPasteboardWriting? Function(NSTableView, DartNSInteger)?
  tableView_pasteboardWriterForRow_,
  void Function(NSTableView, NSDraggingSession, NSPoint, objc.NSIndexSet)?
  tableView_draggingSession_willBeginAtPoint_forRowIndexes_,
  void Function(NSTableView, NSDraggingSession, NSPoint, NSDragOperation)?
  tableView_draggingSession_endedAtPoint_operation_,
  void Function(NSTableView, NSDraggingInfo)?
  tableView_updateDraggingItemsForDrag_,
  bool Function(NSTableView, objc.NSIndexSet, NSPasteboard)?
  tableView_writeRowsWithIndexes_toPasteboard_,
  NSDragOperation Function(
    NSTableView,
    NSDraggingInfo,
    DartNSInteger,
    NSTableViewDropOperation,
  )?
  tableView_validateDrop_proposedRow_proposedDropOperation_,
  bool Function(
    NSTableView,
    NSDraggingInfo,
    DartNSInteger,
    NSTableViewDropOperation,
  )?
  tableView_acceptDrop_row_dropOperation_,
  objc.NSArray Function(NSTableView, objc.NSURL, objc.NSIndexSet)?
  tableView_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes_,
  bool $keepIsolateAlive = true,
}) {
  NSTableViewDataSource.numberOfRowsInTableView_.implement(
    builder,
    numberOfRowsInTableView_,
  );
  NSTableViewDataSource.tableView_objectValueForTableColumn_row_.implement(
    builder,
    tableView_objectValueForTableColumn_row_,
  );
  NSTableViewDataSource.tableView_setObjectValue_forTableColumn_row_
      .implementAsBlocking(
        builder,
        tableView_setObjectValue_forTableColumn_row_,
      );
  NSTableViewDataSource.tableView_sortDescriptorsDidChange_
      .implementAsBlocking(builder, tableView_sortDescriptorsDidChange_);
  NSTableViewDataSource.tableView_pasteboardWriterForRow_.implement(
    builder,
    tableView_pasteboardWriterForRow_,
  );
  NSTableViewDataSource
      .tableView_draggingSession_willBeginAtPoint_forRowIndexes_
      .implementAsBlocking(
        builder,
        tableView_draggingSession_willBeginAtPoint_forRowIndexes_,
      );
  NSTableViewDataSource.tableView_draggingSession_endedAtPoint_operation_
      .implementAsBlocking(
        builder,
        tableView_draggingSession_endedAtPoint_operation_,
      );
  NSTableViewDataSource.tableView_updateDraggingItemsForDrag_
      .implementAsBlocking(builder, tableView_updateDraggingItemsForDrag_);
  NSTableViewDataSource.tableView_writeRowsWithIndexes_toPasteboard_
      .implement(builder, tableView_writeRowsWithIndexes_toPasteboard_);
  NSTableViewDataSource
      .tableView_validateDrop_proposedRow_proposedDropOperation_
      .implement(
        builder,
        tableView_validateDrop_proposedRow_proposedDropOperation_,
      );
  NSTableViewDataSource.tableView_acceptDrop_row_dropOperation_.implement(
    builder,
    tableView_acceptDrop_row_dropOperation_,
  );
  NSTableViewDataSource
      .tableView_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes_
      .implement(
        builder,
        tableView_namesOfPromisedFilesDroppedAtDestination_forDraggedRowsWithIndexes_,
      );
  builder.addProtocol($protocol);
}