implementAsBlocking static method
NSInputServerMouseTracker
implementAsBlocking({
- required bool mouseDownOnCharacterIndex_atCoordinate_withModifier_client_(
- DartNSUInteger,
- NSPoint,
- DartNSUInteger,
- ObjCObjectBase,
- required bool mouseDraggedOnCharacterIndex_atCoordinate_withModifier_client_(
- DartNSUInteger,
- NSPoint,
- DartNSUInteger,
- ObjCObjectBase,
- required void mouseUpOnCharacterIndex_atCoordinate_withModifier_client_(
- DartNSUInteger,
- NSPoint,
- DartNSUInteger,
- ObjCObjectBase,
- bool $keepIsolateAlive = true,
Builds an object that implements the NSInputServerMouseTracker protocol. To implement
multiple protocols, use addToBuilder or objc.ObjCProtocolBuilder directly. All
methods that can be implemented as blocking listeners will be.
If $keepIsolateAlive is true, this protocol will keep this isolate
alive until it is garbage collected by both Dart and ObjC.
Implementation
static NSInputServerMouseTracker implementAsBlocking({
required bool Function(
DartNSUInteger,
NSPoint,
DartNSUInteger,
objc.ObjCObjectBase,
)
mouseDownOnCharacterIndex_atCoordinate_withModifier_client_,
required bool Function(
DartNSUInteger,
NSPoint,
DartNSUInteger,
objc.ObjCObjectBase,
)
mouseDraggedOnCharacterIndex_atCoordinate_withModifier_client_,
required void Function(
DartNSUInteger,
NSPoint,
DartNSUInteger,
objc.ObjCObjectBase,
)
mouseUpOnCharacterIndex_atCoordinate_withModifier_client_,
bool $keepIsolateAlive = true,
}) {
final builder = objc.ObjCProtocolBuilder(
debugName: 'NSInputServerMouseTracker',
);
NSInputServerMouseTracker
.mouseDownOnCharacterIndex_atCoordinate_withModifier_client_
.implement(
builder,
mouseDownOnCharacterIndex_atCoordinate_withModifier_client_,
);
NSInputServerMouseTracker
.mouseDraggedOnCharacterIndex_atCoordinate_withModifier_client_
.implement(
builder,
mouseDraggedOnCharacterIndex_atCoordinate_withModifier_client_,
);
NSInputServerMouseTracker
.mouseUpOnCharacterIndex_atCoordinate_withModifier_client_
.implementAsBlocking(
builder,
mouseUpOnCharacterIndex_atCoordinate_withModifier_client_,
);
builder.addProtocol($protocol);
return NSInputServerMouseTracker.castFrom(
builder.build(keepIsolateAlive: $keepIsolateAlive),
);
}