| 291 | } |
| 292 | |
| 293 | MaaBool CustomTouchMove(int32_t contact, int32_t x, int32_t y, int32_t pressure, void* trans_arg) |
| 294 | { |
| 295 | auto customCtx = reinterpret_cast<CustomControllerContext*>(trans_arg); |
| 296 | auto ctx = customCtx->callbacks["touch_move"]; |
| 297 | return ctx->Call<bool>([&](maajs::FunctionType func) { |
| 298 | return func.Call( |
| 299 | { |
| 300 | maajs::NumberType::New(func.Env(), contact), |
| 301 | maajs::NumberType::New(func.Env(), x), |
| 302 | maajs::NumberType::New(func.Env(), y), |
| 303 | maajs::NumberType::New(func.Env(), pressure), |
| 304 | }); |
| 305 | }); |
| 306 | } |
| 307 | |
| 308 | MaaBool CustomTouchUp(int32_t contact, void* trans_arg) |
| 309 | { |