| 366 | } |
| 367 | |
| 368 | MaaBool CustomScroll(int32_t dx, int32_t dy, void* trans_arg) |
| 369 | { |
| 370 | auto customCtx = reinterpret_cast<CustomControllerContext*>(trans_arg); |
| 371 | auto ctx = customCtx->callbacks["scroll"]; |
| 372 | return ctx->Call<bool>([&](maajs::FunctionType func) { |
| 373 | return func.Call( |
| 374 | { |
| 375 | maajs::NumberType::New(func.Env(), dx), |
| 376 | maajs::NumberType::New(func.Env(), dy), |
| 377 | }); |
| 378 | }); |
| 379 | } |
| 380 | |
| 381 | MaaBool CustomRelativeMove(int32_t dx, int32_t dy, void* trans_arg) |
| 382 | { |