Lines Matching refs:pRuntime
84 CJS_App::CJS_App(v8::Local<v8::Object> pObject, CJS_Runtime* pRuntime) in CJS_App() argument
85 : CJS_Object(pObject, pRuntime) {} in CJS_App()
89 CJS_Result CJS_App::get_active_docs(CJS_Runtime* pRuntime) { in get_active_docs() argument
90 v8::Local<v8::Object> pObj = pRuntime->GetThisObj(); in get_active_docs()
94 v8::Local<v8::Array> aDocs = pRuntime->NewArray(); in get_active_docs()
95 pRuntime->PutArrayElement(aDocs, 0, pJSDocument->ToV8Object()); in get_active_docs()
96 if (pRuntime->GetArrayLength(aDocs) > 0) in get_active_docs()
99 return CJS_Result::Success(pRuntime->NewUndefined()); in get_active_docs()
102 CJS_Result CJS_App::set_active_docs(CJS_Runtime* pRuntime, in set_active_docs() argument
107 CJS_Result CJS_App::get_calculate(CJS_Runtime* pRuntime) { in get_calculate() argument
108 return CJS_Result::Success(pRuntime->NewBoolean(m_bCalculate)); in get_calculate()
111 CJS_Result CJS_App::set_calculate(CJS_Runtime* pRuntime, in set_calculate() argument
113 m_bCalculate = pRuntime->ToBoolean(vp); in set_calculate()
114 pRuntime->GetFormFillEnv()->GetInteractiveForm()->EnableCalculate( in set_calculate()
119 CJS_Result CJS_App::get_forms_version(CJS_Runtime* pRuntime) { in get_forms_version() argument
120 return CJS_Result::Success(pRuntime->NewNumber(JS_NUM_FORMSVERSION)); in get_forms_version()
123 CJS_Result CJS_App::set_forms_version(CJS_Runtime* pRuntime, in set_forms_version() argument
128 CJS_Result CJS_App::get_viewer_type(CJS_Runtime* pRuntime) { in get_viewer_type() argument
129 return CJS_Result::Success(pRuntime->NewString(JS_STR_VIEWERTYPE)); in get_viewer_type()
132 CJS_Result CJS_App::set_viewer_type(CJS_Runtime* pRuntime, in set_viewer_type() argument
137 CJS_Result CJS_App::get_viewer_variation(CJS_Runtime* pRuntime) { in get_viewer_variation() argument
138 return CJS_Result::Success(pRuntime->NewString(JS_STR_VIEWERVARIATION)); in get_viewer_variation()
141 CJS_Result CJS_App::set_viewer_variation(CJS_Runtime* pRuntime, in set_viewer_variation() argument
146 CJS_Result CJS_App::get_viewer_version(CJS_Runtime* pRuntime) { in get_viewer_version() argument
148 pRuntime->GetFormFillEnv()->GetDocExtension(); in get_viewer_version()
152 return CJS_Result::Success(pRuntime->NewNumber(version)); in get_viewer_version()
155 CJS_Result CJS_App::set_viewer_version(CJS_Runtime* pRuntime, in set_viewer_version() argument
160 CJS_Result CJS_App::get_platform(CJS_Runtime* pRuntime) { in get_platform() argument
161 CPDFSDK_FormFillEnvironment* pFormFillEnv = pRuntime->GetFormFillEnv(); in get_platform()
165 return CJS_Result::Success(pRuntime->NewString(platform.AsStringView())); in get_platform()
167 return CJS_Result::Success(pRuntime->NewString(JS_STR_PLATFORM)); in get_platform()
170 CJS_Result CJS_App::set_platform(CJS_Runtime* pRuntime, in set_platform() argument
175 CJS_Result CJS_App::get_language(CJS_Runtime* pRuntime) { in get_language() argument
176 CPDFSDK_FormFillEnvironment* pFormFillEnv = pRuntime->GetFormFillEnv(); in get_language()
180 return CJS_Result::Success(pRuntime->NewString(language.AsStringView())); in get_language()
182 return CJS_Result::Success(pRuntime->NewString(JS_STR_LANGUAGE)); in get_language()
185 CJS_Result CJS_App::set_language(CJS_Runtime* pRuntime, in set_language() argument
194 CJS_Result CJS_App::newFDF(CJS_Runtime* pRuntime, in newFDF() argument
206 CJS_Result CJS_App::openFDF(CJS_Runtime* pRuntime, in openFDF() argument
211 CJS_Result CJS_App::alert(CJS_Runtime* pRuntime, in alert() argument
214 pRuntime, params, 4, "cMsg", "nIcon", "nType", "cTitle"); in alert()
219 CPDFSDK_FormFillEnvironment* pFormFillEnv = pRuntime->GetFormFillEnv(); in alert()
221 return CJS_Result::Success(pRuntime->NewNumber(0)); in alert()
225 v8::Local<v8::Array> carray = pRuntime->ToArray(newParams[0]); in alert()
227 for (size_t i = 0; i < pRuntime->GetArrayLength(carray); ++i) { in alert()
231 swMsg += pRuntime->ToWideString(pRuntime->GetArrayElement(carray, i)); in alert()
235 swMsg = pRuntime->ToWideString(newParams[0]); in alert()
240 iIcon = pRuntime->ToInt32(newParams[1]); in alert()
244 iType = pRuntime->ToInt32(newParams[2]); in alert()
248 swTitle = pRuntime->ToWideString(newParams[3]); in alert()
252 pRuntime->BeginBlock(); in alert()
254 v8::Local<v8::Value> ret = pRuntime->NewNumber( in alert()
256 pRuntime->EndBlock(); in alert()
261 CJS_Result CJS_App::beep(CJS_Runtime* pRuntime, in beep() argument
268 type = pRuntime->ToInt32(params[0]); in beep()
270 pRuntime->GetFormFillEnv()->JS_appBeep(type); in beep()
275 CJS_Runtime* pRuntime, in findComponent() argument
281 CJS_Runtime* pRuntime, in popUpMenuEx() argument
286 CJS_Result CJS_App::get_fs(CJS_Runtime* pRuntime) { in get_fs() argument
290 CJS_Result CJS_App::set_fs(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) { in set_fs() argument
295 CJS_Runtime* pRuntime, in setInterval() argument
300 WideString script = pRuntime->ToWideString(params[0]); in setInterval()
304 uint32_t dwInterval = params.size() > 1 ? pRuntime->ToInt32(params[1]) : 1000; in setInterval()
306 this, pRuntime, GlobalTimer::Type::kRepeating, script, dwInterval, 0); in setInterval()
310 v8::Local<v8::Object> pRetObj = pRuntime->NewFXJSBoundObject( in setInterval()
323 CJS_Runtime* pRuntime, in setTimeOut() argument
328 WideString script = pRuntime->ToWideString(params[0]); in setTimeOut()
332 uint32_t dwTimeOut = params.size() > 1 ? pRuntime->ToInt32(params[1]) : 1000; in setTimeOut()
333 auto timerRef = pdfium::MakeUnique<GlobalTimer>(this, pRuntime, in setTimeOut()
339 v8::Local<v8::Object> pRetObj = pRuntime->NewFXJSBoundObject( in setTimeOut()
352 CJS_Runtime* pRuntime, in clearTimeOut() argument
357 CJS_App::ClearTimerCommon(pRuntime, params[0]); in clearTimeOut()
362 CJS_Runtime* pRuntime, in clearInterval() argument
367 CJS_App::ClearTimerCommon(pRuntime, params[0]); in clearInterval()
371 void CJS_App::ClearTimerCommon(CJS_Runtime* pRuntime, in ClearTimerCommon() argument
376 v8::Local<v8::Object> pObj = pRuntime->ToObject(param); in ClearTimerCommon()
385 CJS_Runtime* pRuntime, in execMenuItem() argument
391 CJS_Runtime* pRuntime = pTimer->GetRuntime(); in TimerProc() local
392 if (pRuntime && (!pTimer->IsOneShot() || pTimer->GetTimeOut() > 0)) in TimerProc()
393 RunJsScript(pRuntime, pTimer->GetJScript()); in TimerProc()
400 void CJS_App::RunJsScript(CJS_Runtime* pRuntime, const WideString& wsScript) { in RunJsScript() argument
401 if (pRuntime->IsBlocking()) in RunJsScript()
404 IJS_Runtime::ScopedEventContext pContext(pRuntime); in RunJsScript()
409 CJS_Result CJS_App::goBack(CJS_Runtime* pRuntime, in goBack() argument
415 CJS_Result CJS_App::goForward(CJS_Runtime* pRuntime, in goForward() argument
421 CJS_Result CJS_App::mailMsg(CJS_Runtime* pRuntime, in mailMsg() argument
424 pRuntime, params, 6, "bUI", "cTo", "cCc", "cBcc", "cSubject", "cMsg"); in mailMsg()
429 bool bUI = pRuntime->ToBoolean(newParams[0]); in mailMsg()
432 cTo = pRuntime->ToWideString(newParams[1]); in mailMsg()
441 cCc = pRuntime->ToWideString(newParams[2]); in mailMsg()
445 cBcc = pRuntime->ToWideString(newParams[3]); in mailMsg()
449 cSubject = pRuntime->ToWideString(newParams[4]); in mailMsg()
453 cMsg = pRuntime->ToWideString(newParams[5]); in mailMsg()
455 pRuntime->BeginBlock(); in mailMsg()
456 pRuntime->GetFormFillEnv()->JS_docmailForm(nullptr, 0, bUI, cTo, cSubject, in mailMsg()
458 pRuntime->EndBlock(); in mailMsg()
462 CJS_Result CJS_App::launchURL(CJS_Runtime* pRuntime, in launchURL() argument
468 CJS_Result CJS_App::get_runtime_highlight(CJS_Runtime* pRuntime) { in get_runtime_highlight() argument
469 return CJS_Result::Success(pRuntime->NewBoolean(m_bRuntimeHighLight)); in get_runtime_highlight()
472 CJS_Result CJS_App::set_runtime_highlight(CJS_Runtime* pRuntime, in set_runtime_highlight() argument
474 m_bRuntimeHighLight = pRuntime->ToBoolean(vp); in set_runtime_highlight()
478 CJS_Result CJS_App::get_fullscreen(CJS_Runtime* pRuntime) { in get_fullscreen() argument
482 CJS_Result CJS_App::set_fullscreen(CJS_Runtime* pRuntime, in set_fullscreen() argument
487 CJS_Result CJS_App::popUpMenu(CJS_Runtime* pRuntime, in popUpMenu() argument
493 CJS_Runtime* pRuntime, in browseForDoc() argument
508 CJS_Result CJS_App::newDoc(CJS_Runtime* pRuntime, in newDoc() argument
513 CJS_Result CJS_App::openDoc(CJS_Runtime* pRuntime, in openDoc() argument
518 CJS_Result CJS_App::response(CJS_Runtime* pRuntime, in response() argument
521 ExpandKeywordParams(pRuntime, params, 5, "cQuestion", "cTitle", in response()
527 WideString swQuestion = pRuntime->ToWideString(newParams[0]); in response()
530 swTitle = pRuntime->ToWideString(newParams[1]); in response()
534 swDefault = pRuntime->ToWideString(newParams[2]); in response()
538 bPassword = pRuntime->ToBoolean(newParams[3]); in response()
542 swLabel = pRuntime->ToWideString(newParams[4]); in response()
546 int nLengthBytes = pRuntime->GetFormFillEnv()->JS_appResponse( in response()
553 return CJS_Result::Success(pRuntime->NewString( in response()
559 CJS_Result CJS_App::get_media(CJS_Runtime* pRuntime) { in get_media() argument
563 CJS_Result CJS_App::set_media(CJS_Runtime* pRuntime, v8::Local<v8::Value> vp) { in set_media() argument
568 CJS_Runtime* pRuntime, in execDialog() argument