add bindings for View_pickRenderThread

This commit is contained in:
Nick Fisher
2025-05-13 22:37:52 +08:00
parent 760ae8ed8b
commit fc75aab94b
2 changed files with 31 additions and 1 deletions

View File

@@ -1996,6 +1996,17 @@ external void ColorGrading_createRenderThread(
callback,
);
@ffi.Native<
ffi.Void Function(ffi.Pointer<TView>, ffi.Uint32, ffi.Uint32, ffi.Uint32,
PickCallback)>(isLeaf: true)
external void View_pickRenderThread(
ffi.Pointer<TView> tView,
int requestId,
int x,
int y,
PickCallback callback,
);
@ffi.Native<
ffi.Void Function(ffi.Pointer<TView>, ffi.Pointer<TColorGrading>,
ffi.Uint32, VoidCallback)>(isLeaf: true)

View File

@@ -255,7 +255,7 @@ sealed class Struct extends NativeType {
Struct(this._address);
static create<T extends Struct>() {
switch (T) {
switch (T) {
case double4x4:
final ptr = double4x4.stackAlloc();
final arr1 =
@@ -1494,6 +1494,13 @@ extension type NativeLibrary(JSObject _) implements JSObject {
Pointer<self.NativeFunction<void Function(PointerClass<TColorGrading>)>>
callback,
);
external void _View_pickRenderThread(
Pointer<TView> tView,
int requestId,
int x,
int y,
PickCallback callback,
);
external void _View_setColorGradingRenderThread(
Pointer<TView> tView,
Pointer<TColorGrading> tColorGrading,
@@ -4354,6 +4361,18 @@ void ColorGrading_createRenderThread(
return result;
}
void View_pickRenderThread(
self.Pointer<TView> tView,
int requestId,
int x,
int y,
DartPickCallback callback,
) {
final result = _lib._View_pickRenderThread(tView.cast(), requestId, x, y,
callback as Pointer<self.NativeFunction<PickCallbackFunction>>);
return result;
}
void View_setColorGradingRenderThread(
self.Pointer<TView> tView,
self.Pointer<TColorGrading> tColorGrading,