MCPcopy Create free account
hub / github.com/9miao/CrossApp / executeLayerTouchEvent

Method executeLayerTouchEvent

scripting/javascript/bindings/ScriptingCore.cpp:846–859  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

844}
845
846int ScriptingCore::executeLayerTouchEvent(CAView* pLayer, int eventType, CATouch *pTouch)
847{
848 std::string funcName = "";
849 getTouchFuncName(eventType, funcName);
850
851 jsval jsret;
852 getJSTouchObject(this->getGlobalContext(), pTouch, jsret);
853 JSObject *jsObj = JSVAL_TO_OBJECT(jsret);
854 bool retval = executeFunctionWithObjectData(pLayer, funcName.c_str(), jsObj);
855
856 removeJSTouchObject(this->getGlobalContext(), pTouch, jsret);
857
858 return retval;
859}
860
861bool ScriptingCore::executeFunctionWithObjectData(CAView *self, const char *name, JSObject *obj) {
862

Callers

nothing calls this directly

Calls 6

getGlobalContextMethod · 0.95
getTouchFuncNameFunction · 0.85
getJSTouchObjectFunction · 0.85
removeJSTouchObjectFunction · 0.85
JSVAL_TO_OBJECTFunction · 0.50
c_strMethod · 0.45

Tested by

no test coverage detected