Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
#include <cjs_runtime.h>
Public Types | |
using | FieldEvent = std::pair<WideString, CJS_EventContext::Kind> |
Public Types inherited from CFXJS_Engine | |
using | Constructor |
using | Destructor = std::function<void(v8::Local<v8::Object> obj)> |
Public Member Functions | |
CJS_Runtime (CPDFSDK_FormFillEnvironment *pFormFillEnv) | |
~CJS_Runtime () override | |
CJS_Runtime * | AsCJSRuntime () override |
IJS_EventContext * | NewEventContext () override |
void | ReleaseEventContext (IJS_EventContext *pContext) override |
CPDFSDK_FormFillEnvironment * | GetFormFillEnv () const override |
absl::optional< IJS_Runtime::JS_Error > | ExecuteScript (const WideString &script) override |
CJS_EventContext * | GetCurrentEventContext () const |
CFX_Timer::HandlerIface * | GetTimerHandler () const |
bool | AddEventToSet (const FieldEvent &event) |
void | RemoveEventFromSet (const FieldEvent &event) |
void | BeginBlock () |
void | EndBlock () |
bool | IsBlocking () const |
v8::Local< v8::Value > | MaybeCoerceToNumber (v8::Local< v8::Value > value) |
v8::Local< v8::Value > | GetValueByNameFromGlobalObject (ByteStringView utf8Name) |
bool | SetValueByNameInGlobalObject (ByteStringView utf8Name, v8::Local< v8::Value > pValue) |
Public Member Functions inherited from IJS_Runtime | |
virtual | ~IJS_Runtime () |
Public Member Functions inherited from CFXJS_Engine | |
CFXJS_Engine (v8::Isolate *pIsolate) | |
~CFXJS_Engine () override | |
uint32_t | DefineObj (const char *sObjName, FXJSOBJTYPE eObjType, Constructor pConstructor, Destructor pDestructor) |
void | DefineObjMethod (uint32_t nObjDefnID, const char *sMethodName, v8::FunctionCallback pMethodCall) |
void | DefineObjProperty (uint32_t nObjDefnID, const char *sPropName, v8::AccessorGetterCallback pPropGet, v8::AccessorSetterCallback pPropPut) |
void | DefineObjAllProperties (uint32_t nObjDefnID, v8::GenericNamedPropertyQueryCallback pPropQurey, v8::GenericNamedPropertyGetterCallback pPropGet, v8::GenericNamedPropertySetterCallback pPropPut, v8::GenericNamedPropertyDeleterCallback pPropDel, v8::GenericNamedPropertyEnumeratorCallback pPropEnum) |
void | DefineObjConst (uint32_t nObjDefnID, const char *sConstName, v8::Local< v8::Value > pDefault) |
void | DefineGlobalMethod (const char *sMethodName, v8::FunctionCallback pMethodCall) |
void | DefineGlobalConst (const wchar_t *sConstName, v8::FunctionCallback pConstGetter) |
void | InitializeEngine () |
void | ReleaseEngine () |
absl::optional< IJS_Runtime::JS_Error > | Execute (const WideString &script) |
v8::Local< v8::Object > | GetThisObj () |
v8::Local< v8::Object > | NewFXJSBoundObject (uint32_t nObjDefnID, FXJSOBJTYPE type) |
void | Error (const WideString &message) |
v8::Local< v8::Context > | GetV8Context () |
v8::Local< v8::Array > | GetConstArray (const WideString &name) |
void | SetConstArray (const WideString &name, v8::Local< v8::Array > array) |
Public Member Functions inherited from CFX_V8 | |
CFX_V8 (v8::Isolate *pIsolate) | |
virtual | ~CFX_V8 () |
v8::Isolate * | GetIsolate () const |
v8::Local< v8::Value > | NewNull () |
v8::Local< v8::Value > | NewUndefined () |
v8::Local< v8::Array > | NewArray () |
v8::Local< v8::Object > | NewObject () |
v8::Local< v8::Number > | NewNumber (int number) |
v8::Local< v8::Number > | NewNumber (double number) |
v8::Local< v8::Number > | NewNumber (float number) |
v8::Local< v8::Boolean > | NewBoolean (bool b) |
v8::Local< v8::String > | NewString (ByteStringView str) |
v8::Local< v8::String > | NewString (WideStringView str) |
v8::Local< v8::Date > | NewDate (double d) |
int | ToInt32 (v8::Local< v8::Value > pValue) |
bool | ToBoolean (v8::Local< v8::Value > pValue) |
double | ToDouble (v8::Local< v8::Value > pValue) |
WideString | ToWideString (v8::Local< v8::Value > pValue) |
ByteString | ToByteString (v8::Local< v8::Value > pValue) |
v8::Local< v8::Object > | ToObject (v8::Local< v8::Value > pValue) |
v8::Local< v8::Array > | ToArray (v8::Local< v8::Value > pValue) |
size_t | GetArrayLength (v8::Local< v8::Array > pArray) |
v8::Local< v8::Value > | GetArrayElement (v8::Local< v8::Array > pArray, size_t index) |
void | PutArrayElement (v8::Local< v8::Array > pArray, size_t index, v8::Local< v8::Value > pValue) |
std::vector< WideString > | GetObjectPropertyNames (v8::Local< v8::Object > pObj) |
v8::Local< v8::Value > | GetObjectProperty (v8::Local< v8::Object > pObj, ByteStringView bsUTF8PropertyName) |
void | PutObjectProperty (v8::Local< v8::Object > pObj, ByteStringView bsUTF8PropertyName, v8::Local< v8::Value > pValue) |
Public Member Functions inherited from fxcrt::Observable | |
Observable () | |
Observable (const Observable &that)=delete | |
Observable & | operator= (const Observable &that)=delete |
~Observable () | |
void | AddObserver (ObserverIface *pObserver) |
void | RemoveObserver (ObserverIface *pObserver) |
void | NotifyObservers () |
Additional Inherited Members | |
Static Public Member Functions inherited from IJS_Runtime | |
static void | Initialize (unsigned int slot, void *isolate, void *platform) |
static void | Destroy () |
static std::unique_ptr< IJS_Runtime > | Create (CPDFSDK_FormFillEnvironment *pFormFillEnv) |
Static Public Member Functions inherited from CFXJS_Engine | |
static uint32_t | GetObjDefnID (v8::Local< v8::Object > pObj) |
static CJS_Object * | GetObjectPrivate (v8::Isolate *pIsolate, v8::Local< v8::Object > pObj) |
static void | SetObjectPrivate (v8::Local< v8::Object > pObj, std::unique_ptr< CJS_Object > p) |
static void | FreeObjectPrivate (v8::Local< v8::Object > pObj) |
Protected Member Functions inherited from IJS_Runtime | |
IJS_Runtime ()=default | |
Protected Member Functions inherited from CFXJS_Engine | |
CFXJS_Engine () | |
Protected Member Functions inherited from CFX_V8 | |
void | SetIsolate (v8::Isolate *pIsolate) |
void | DisposeIsolate () |
Protected Member Functions inherited from fxcrt::Observable | |
size_t | ActiveObserversForTesting () const |
Definition at line 23 of file cjs_runtime.h.
using CJS_Runtime::FieldEvent = std::pair<WideString, CJS_EventContext::Kind> |
Definition at line 27 of file cjs_runtime.h.
|
explicit |
Definition at line 47 of file cjs_runtime.cpp.
References CJS_Runtime(), CFXJS_Engine::InitializeEngine(), _IPDF_JsPlatform::m_isolate, _IPDF_JsPlatform::m_v8EmbedderSlot, and _IPDF_JsPlatform::version.
Referenced by CJS_Runtime().
|
override |
Definition at line 75 of file cjs_runtime.cpp.
References CFX_V8::DisposeIsolate(), fxcrt::Observable::NotifyObservers(), and CFXJS_Engine::ReleaseEngine().
bool CJS_Runtime::AddEventToSet | ( | const FieldEvent & | event | ) |
Definition at line 174 of file cjs_runtime.cpp.
|
overridevirtual |
Implements IJS_Runtime.
Definition at line 182 of file cjs_runtime.cpp.
|
inline |
Definition at line 47 of file cjs_runtime.h.
|
inline |
Definition at line 48 of file cjs_runtime.h.
|
overridevirtual |
Implements IJS_Runtime.
Definition at line 169 of file cjs_runtime.cpp.
CJS_EventContext * CJS_Runtime::GetCurrentEventContext | ( | ) | const |
Definition at line 139 of file cjs_runtime.cpp.
Referenced by CJS_PublicMethods::AFDate_FormatEx(), CJS_PublicMethods::AFDate_KeystrokeEx(), CJS_PublicMethods::AFMergeChange(), CJS_PublicMethods::AFNumber_Keystroke(), CJS_PublicMethods::AFParseDateEx(), CJS_PublicMethods::AFRange_Validate(), CJS_PublicMethods::AFSimple_Calculate(), CJS_PublicMethods::AFSpecial_Format(), CJS_PublicMethods::AFSpecial_Keystroke(), CJS_PublicMethods::AFSpecial_KeystrokeEx(), TEST_F(), and TEST_F().
|
overridevirtual |
Implements IJS_Runtime.
Definition at line 165 of file cjs_runtime.cpp.
Referenced by CJS_PublicMethods::AFSimple_Calculate().
CFX_Timer::HandlerIface * CJS_Runtime::GetTimerHandler | ( | ) | const |
Definition at line 144 of file cjs_runtime.cpp.
Referenced by GlobalTimer::GlobalTimer().
v8::Local< v8::Value > CJS_Runtime::GetValueByNameFromGlobalObject | ( | ByteStringView | utf8Name | ) |
Definition at line 186 of file cjs_runtime.cpp.
|
inline |
Definition at line 49 of file cjs_runtime.h.
v8::Local< v8::Value > CJS_Runtime::MaybeCoerceToNumber | ( | v8::Local< v8::Value > | value | ) |
Definition at line 212 of file cjs_runtime.cpp.
|
overridevirtual |
Implements IJS_Runtime.
Definition at line 129 of file cjs_runtime.cpp.
Referenced by TEST_F(), and TEST_F().
|
overridevirtual |
Implements IJS_Runtime.
Definition at line 134 of file cjs_runtime.cpp.
void CJS_Runtime::RemoveEventFromSet | ( | const FieldEvent & | event | ) |
Definition at line 178 of file cjs_runtime.cpp.
bool CJS_Runtime::SetValueByNameInGlobalObject | ( | ByteStringView | utf8Name, |
v8::Local< v8::Value > | pValue ) |
Definition at line 198 of file cjs_runtime.cpp.