Lines Matching refs:pRuntime
92 CJS_Return app::get_active_docs(CJS_Runtime* pRuntime) { in get_active_docs() argument
94 v8::Local<v8::Object> pObj = pRuntime->GetThisObj(); in get_active_docs()
96 pJSDocument = static_cast<CJS_Document*>(pRuntime->GetObjectPrivate(pObj)); in get_active_docs()
98 v8::Local<v8::Array> aDocs = pRuntime->NewArray(); in get_active_docs()
99 pRuntime->PutArrayElement( in get_active_docs()
103 if (pRuntime->GetArrayLength(aDocs) > 0) in get_active_docs()
105 return CJS_Return(pRuntime->NewUndefined()); in get_active_docs()
108 CJS_Return app::set_active_docs(CJS_Runtime* pRuntime, in set_active_docs() argument
113 CJS_Return app::get_calculate(CJS_Runtime* pRuntime) { in get_calculate() argument
114 return CJS_Return(pRuntime->NewBoolean(m_bCalculate)); in get_calculate()
117 CJS_Return app::set_calculate(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) { in set_calculate() argument
118 m_bCalculate = pRuntime->ToBoolean(vp); in set_calculate()
119 pRuntime->GetFormFillEnv()->GetInterForm()->EnableCalculate(m_bCalculate); in set_calculate()
123 CJS_Return app::get_forms_version(CJS_Runtime* pRuntime) { in get_forms_version() argument
124 return CJS_Return(pRuntime->NewNumber(JS_NUM_FORMSVERSION)); in get_forms_version()
127 CJS_Return app::set_forms_version(CJS_Runtime* pRuntime, in set_forms_version() argument
132 CJS_Return app::get_viewer_type(CJS_Runtime* pRuntime) { in get_viewer_type() argument
133 return CJS_Return(pRuntime->NewString(JS_STR_VIEWERTYPE)); in get_viewer_type()
136 CJS_Return app::set_viewer_type(CJS_Runtime* pRuntime, in set_viewer_type() argument
141 CJS_Return app::get_viewer_variation(CJS_Runtime* pRuntime) { in get_viewer_variation() argument
142 return CJS_Return(pRuntime->NewString(JS_STR_VIEWERVARIATION)); in get_viewer_variation()
145 CJS_Return app::set_viewer_variation(CJS_Runtime* pRuntime, in set_viewer_variation() argument
150 CJS_Return app::get_viewer_version(CJS_Runtime* pRuntime) { in get_viewer_version() argument
152 CPDFXFA_Context* pXFAContext = pRuntime->GetFormFillEnv()->GetXFAContext(); in get_viewer_version()
154 return CJS_Return(pRuntime->NewNumber(JS_NUM_VIEWERVERSION_XFA)); in get_viewer_version()
156 return CJS_Return(pRuntime->NewNumber(JS_NUM_VIEWERVERSION)); in get_viewer_version()
159 CJS_Return app::set_viewer_version(CJS_Runtime* pRuntime, in set_viewer_version() argument
164 CJS_Return app::get_platform(CJS_Runtime* pRuntime) { in get_platform() argument
166 CPDFSDK_FormFillEnvironment* pFormFillEnv = pRuntime->GetFormFillEnv(); in get_platform()
172 return CJS_Return(pRuntime->NewString(platfrom.c_str())); in get_platform()
174 return CJS_Return(pRuntime->NewString(JS_STR_PLATFORM)); in get_platform()
177 CJS_Return app::set_platform(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) { in set_platform() argument
181 CJS_Return app::get_language(CJS_Runtime* pRuntime) { in get_language() argument
183 CPDFSDK_FormFillEnvironment* pFormFillEnv = pRuntime->GetFormFillEnv(); in get_language()
189 return CJS_Return(pRuntime->NewString(language.c_str())); in get_language()
191 return CJS_Return(pRuntime->NewString(JS_STR_LANGUAGE)); in get_language()
194 CJS_Return app::set_language(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) { in set_language() argument
202 CJS_Return app::newFDF(CJS_Runtime* pRuntime, in newFDF() argument
214 CJS_Return app::openFDF(CJS_Runtime* pRuntime, in openFDF() argument
219 CJS_Return app::alert(CJS_Runtime* pRuntime, in alert() argument
222 pRuntime, params, 4, L"cMsg", L"nIcon", L"nType", L"cTitle"); in alert()
227 CPDFSDK_FormFillEnvironment* pFormFillEnv = pRuntime->GetFormFillEnv(); in alert()
229 return CJS_Return(pRuntime->NewNumber(0)); in alert()
233 v8::Local<v8::Array> carray = pRuntime->ToArray(newParams[0]); in alert()
235 for (size_t i = 0; i < pRuntime->GetArrayLength(carray); ++i) { in alert()
239 swMsg += pRuntime->ToWideString(pRuntime->GetArrayElement(carray, i)); in alert()
243 swMsg = pRuntime->ToWideString(newParams[0]); in alert()
248 iIcon = pRuntime->ToInt32(newParams[1]); in alert()
252 iType = pRuntime->ToInt32(newParams[2]); in alert()
256 swTitle = pRuntime->ToWideString(newParams[3]); in alert()
260 pRuntime->BeginBlock(); in alert()
263 v8::Local<v8::Value> ret = pRuntime->NewNumber( in alert()
265 pRuntime->EndBlock(); in alert()
270 CJS_Return app::beep(CJS_Runtime* pRuntime, in beep() argument
273 pRuntime->GetFormFillEnv()->JS_appBeep(pRuntime->ToInt32(params[0])); in beep()
279 CJS_Return app::findComponent(CJS_Runtime* pRuntime, in findComponent() argument
284 CJS_Return app::popUpMenuEx(CJS_Runtime* pRuntime, in popUpMenuEx() argument
289 CJS_Return app::get_fs(CJS_Runtime* pRuntime) { in get_fs() argument
293 CJS_Return app::set_fs(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) { in set_fs() argument
297 CJS_Return app::setInterval(CJS_Runtime* pRuntime, in setInterval() argument
303 params.size() > 0 ? pRuntime->ToWideString(params[0]) : L""; in setInterval()
307 uint32_t dwInterval = params.size() > 1 ? pRuntime->ToInt32(params[1]) : 1000; in setInterval()
308 GlobalTimer* timerRef = new GlobalTimer(this, pRuntime->GetFormFillEnv(), in setInterval()
309 pRuntime, 0, script, dwInterval, 0); in setInterval()
313 pRuntime->NewFxDynamicObj(CJS_TimerObj::GetObjDefnID()); in setInterval()
318 static_cast<CJS_TimerObj*>(pRuntime->GetObjectPrivate(pRetObj)); in setInterval()
325 CJS_Return app::setTimeOut(CJS_Runtime* pRuntime, in setTimeOut() argument
330 WideString script = pRuntime->ToWideString(params[0]); in setTimeOut()
334 uint32_t dwTimeOut = params.size() > 1 ? pRuntime->ToInt32(params[1]) : 1000; in setTimeOut()
336 new GlobalTimer(this, pRuntime->GetFormFillEnv(), pRuntime, 1, script, in setTimeOut()
341 pRuntime->NewFxDynamicObj(CJS_TimerObj::GetObjDefnID()); in setTimeOut()
346 static_cast<CJS_TimerObj*>(pRuntime->GetObjectPrivate(pRetObj)); in setTimeOut()
353 CJS_Return app::clearTimeOut(CJS_Runtime* pRuntime, in clearTimeOut() argument
358 app::ClearTimerCommon(pRuntime, params[0]); in clearTimeOut()
362 CJS_Return app::clearInterval(CJS_Runtime* pRuntime, in clearInterval() argument
367 app::ClearTimerCommon(pRuntime, params[0]); in clearInterval()
371 void app::ClearTimerCommon(CJS_Runtime* pRuntime, v8::Local<v8::Value> param) { in ClearTimerCommon() argument
375 v8::Local<v8::Object> pObj = pRuntime->ToObject(param); in ClearTimerCommon()
380 static_cast<CJS_Object*>(pRuntime->GetObjectPrivate(pObj)); in ClearTimerCommon()
391 CJS_Return app::execMenuItem(CJS_Runtime* pRuntime, in execMenuItem() argument
397 CJS_Runtime* pRuntime = pTimer->GetRuntime(); in TimerProc() local
398 if (pRuntime && (!pTimer->IsOneShot() || pTimer->GetTimeOut() > 0)) in TimerProc()
399 RunJsScript(pRuntime, pTimer->GetJScript()); in TimerProc()
406 void app::RunJsScript(CJS_Runtime* pRuntime, const WideString& wsScript) { in RunJsScript() argument
407 if (!pRuntime->IsBlocking()) { in RunJsScript()
408 IJS_EventContext* pContext = pRuntime->NewEventContext(); in RunJsScript()
412 pRuntime->ReleaseEventContext(pContext); in RunJsScript()
416 CJS_Return app::goBack(CJS_Runtime* pRuntime, in goBack() argument
422 CJS_Return app::goForward(CJS_Runtime* pRuntime, in goForward() argument
428 CJS_Return app::mailMsg(CJS_Runtime* pRuntime, in mailMsg() argument
431 ExpandKeywordParams(pRuntime, params, 6, L"bUI", L"cTo", L"cCc", L"cBcc", in mailMsg()
437 bool bUI = pRuntime->ToBoolean(newParams[0]); in mailMsg()
440 cTo = pRuntime->ToWideString(newParams[1]); in mailMsg()
449 cCc = pRuntime->ToWideString(newParams[2]); in mailMsg()
453 cBcc = pRuntime->ToWideString(newParams[3]); in mailMsg()
457 cSubject = pRuntime->ToWideString(newParams[4]); in mailMsg()
461 cMsg = pRuntime->ToWideString(newParams[5]); in mailMsg()
463 pRuntime->BeginBlock(); in mailMsg()
464 pRuntime->GetFormFillEnv()->JS_docmailForm(nullptr, 0, bUI, cTo.c_str(), in mailMsg()
467 pRuntime->EndBlock(); in mailMsg()
471 CJS_Return app::launchURL(CJS_Runtime* pRuntime, in launchURL() argument
477 CJS_Return app::get_runtime_highlight(CJS_Runtime* pRuntime) { in get_runtime_highlight() argument
478 return CJS_Return(pRuntime->NewBoolean(m_bRuntimeHighLight)); in get_runtime_highlight()
481 CJS_Return app::set_runtime_highlight(CJS_Runtime* pRuntime, in set_runtime_highlight() argument
483 m_bRuntimeHighLight = pRuntime->ToBoolean(vp); in set_runtime_highlight()
487 CJS_Return app::get_fullscreen(CJS_Runtime* pRuntime) { in get_fullscreen() argument
491 CJS_Return app::set_fullscreen(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) { in set_fullscreen() argument
495 CJS_Return app::popUpMenu(CJS_Runtime* pRuntime, in popUpMenu() argument
500 CJS_Return app::browseForDoc(CJS_Runtime* pRuntime, in browseForDoc() argument
515 CJS_Return app::newDoc(CJS_Runtime* pRuntime, in newDoc() argument
520 CJS_Return app::openDoc(CJS_Runtime* pRuntime, in openDoc() argument
525 CJS_Return app::response(CJS_Runtime* pRuntime, in response() argument
528 ExpandKeywordParams(pRuntime, params, 5, L"cQuestion", L"cTitle", in response()
534 WideString swQuestion = pRuntime->ToWideString(newParams[0]); in response()
537 swTitle = pRuntime->ToWideString(newParams[1]); in response()
541 swDefault = pRuntime->ToWideString(newParams[2]); in response()
545 bPassword = pRuntime->ToBoolean(newParams[3]); in response()
549 swLabel = pRuntime->ToWideString(newParams[4]); in response()
553 int nLengthBytes = pRuntime->GetFormFillEnv()->JS_appResponse( in response()
560 return CJS_Return(pRuntime->NewString( in response()
566 CJS_Return app::get_media(CJS_Runtime* pRuntime) { in get_media() argument
570 CJS_Return app::set_media(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) { in set_media() argument
574 CJS_Return app::execDialog(CJS_Runtime* pRuntime, in execDialog() argument