| 388 | } |
| 389 | |
| 390 | int LuaEngine::handleCommonEvent(void* data) |
| 391 | { |
| 392 | if (NULL == data) |
| 393 | return 0; |
| 394 | |
| 395 | CommonScriptData* commonInfo = static_cast<CommonScriptData*>(data); |
| 396 | if (0 == commonInfo->handler) |
| 397 | return 0; |
| 398 | |
| 399 | _stack->pushString(commonInfo->eventName); |
| 400 | if (NULL != commonInfo->eventSource) |
| 401 | { |
| 402 | if (strlen(commonInfo->eventSourceClassName) > 0) |
| 403 | { |
| 404 | _stack->pushObject(commonInfo->eventSource, commonInfo->eventSourceClassName); |
| 405 | } |
| 406 | else |
| 407 | { |
| 408 | _stack->pushObject(commonInfo->eventSource, "ax.Object"); |
| 409 | } |
| 410 | } |
| 411 | int ret = _stack->executeFunctionByHandler(commonInfo->handler, commonInfo->eventSource ? 2 : 1); |
| 412 | _stack->clean(); |
| 413 | return ret; |
| 414 | } |
| 415 | |
| 416 | int LuaEngine::handleTouchEvent(void* data) |
| 417 | { |
nothing calls this directly
no test coverage detected