| 276 | } |
| 277 | |
| 278 | MaaBool CustomTouchDown(int32_t contact, int32_t x, int32_t y, int32_t pressure, void* trans_arg) |
| 279 | { |
| 280 | auto customCtx = reinterpret_cast<CustomControllerContext*>(trans_arg); |
| 281 | auto ctx = customCtx->callbacks["touch_down"]; |
| 282 | return ctx->Call<bool>([&](maajs::FunctionType func) { |
| 283 | return func.Call( |
| 284 | { |
| 285 | maajs::NumberType::New(func.Env(), contact), |
| 286 | maajs::NumberType::New(func.Env(), x), |
| 287 | maajs::NumberType::New(func.Env(), y), |
| 288 | maajs::NumberType::New(func.Env(), pressure), |
| 289 | }); |
| 290 | }); |
| 291 | } |
| 292 | |
| 293 | MaaBool CustomTouchMove(int32_t contact, int32_t x, int32_t y, int32_t pressure, void* trans_arg) |
| 294 | { |