| OLD | NEW |
| 1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
| 6 | 6 |
| 7 // PDFium wrapper around V8 APIs. PDFium code should include this file rather | 7 // PDFium wrapper around V8 APIs. PDFium code should include this file rather |
| 8 // than including V8 headers directly. | 8 // than including V8 headers directly. |
| 9 | 9 |
| 10 #ifndef FXJSAPI_H | 10 #ifndef FXJSAPI_H |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 47 | 47 |
| 48 typedef v8::Isolate IJS_Runtime; | 48 typedef v8::Isolate IJS_Runtime; |
| 49 class IFXJS_Context; | 49 class IFXJS_Context; |
| 50 class IFXJS_Runtime; | 50 class IFXJS_Runtime; |
| 51 | 51 |
| 52 typedef void (*LP_CONSTRUCTOR)(IFXJS_Context* cc, v8::Handle<v8::Object> obj, v8
::Handle<v8::Object> global); | 52 typedef void (*LP_CONSTRUCTOR)(IFXJS_Context* cc, v8::Handle<v8::Object> obj, v8
::Handle<v8::Object> global); |
| 53 typedef void (*LP_DESTRUCTOR)(v8::Handle<v8::Object> obj); | 53 typedef void (*LP_DESTRUCTOR)(v8::Handle<v8::Object> obj); |
| 54 | 54 |
| 55 | 55 |
| 56 int JS_DefineObj(IJS
_Runtime* pJSRuntime, const wchar_t* sObjName, FXJSOBJTYPE eObjType, LP_CONSTRUC
TOR pConstructor, LP_DESTRUCTOR pDestructor, unsigned bApplyNew); | 56 int JS_DefineObj(IJS
_Runtime* pJSRuntime, const wchar_t* sObjName, FXJSOBJTYPE eObjType, LP_CONSTRUC
TOR pConstructor, LP_DESTRUCTOR pDestructor, unsigned bApplyNew); |
| 57 int» » » » » » » » JS_DefineObjMeth
od(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sMethodName, v8::Func
tionCallback pMethodCall, unsigned nParamNum); | 57 int» » » » » » » » JS_DefineObjMeth
od(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sMethodName, v8::Func
tionCallback pMethodCall); |
| 58 int JS_DefineObjProp
erty(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sPropName, v8::Acce
ssorGetterCallback pPropGet, v8::AccessorSetterCallback pPropPut); | 58 int JS_DefineObjProp
erty(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sPropName, v8::Acce
ssorGetterCallback pPropGet, v8::AccessorSetterCallback pPropPut); |
| 59 int JS_DefineObjAllP
roperties(IJS_Runtime* pJSRuntime, int nObjDefnID, v8::NamedPropertyQueryCallbac
k pPropQurey, v8::NamedPropertyGetterCallback pPropGet, v8::NamedPropertySetterC
allback pPropPut, v8::NamedPropertyDeleterCallback pPropDel); | 59 int JS_DefineObjAllP
roperties(IJS_Runtime* pJSRuntime, int nObjDefnID, v8::NamedPropertyQueryCallbac
k pPropQurey, v8::NamedPropertyGetterCallback pPropGet, v8::NamedPropertySetterC
allback pPropPut, v8::NamedPropertyDeleterCallback pPropDel); |
| 60 int JS_DefineObjCons
t(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sConstName, v8::Handle
<v8::Value> pDefault); | 60 int JS_DefineObjCons
t(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sConstName, v8::Handle
<v8::Value> pDefault); |
| 61 int» » » » » » » » JS_DefineGlobalM
ethod(IJS_Runtime* pJSRuntime, const wchar_t* sMethodName, v8::FunctionCallback
pMethodCall, unsigned nParamNum); | 61 int» » » » » » » » JS_DefineGlobalM
ethod(IJS_Runtime* pJSRuntime, const wchar_t* sMethodName, v8::FunctionCallback
pMethodCall); |
| 62 int JS_DefineGlobalC
onst(IJS_Runtime* pJSRuntime, const wchar_t* sConstName, v8::Handle<v8::Value> p
Default); | 62 int JS_DefineGlobalC
onst(IJS_Runtime* pJSRuntime, const wchar_t* sConstName, v8::Handle<v8::Value> p
Default); |
| 63 | 63 |
| 64 void JS_InitialRuntime(IJS_Ru
ntime* pJSRuntime,IFXJS_Runtime* pFXRuntime, IFXJS_Context* context, v8::Persist
ent<v8::Context>& v8PersistentContext); | 64 void JS_InitialRuntime(IJS_Ru
ntime* pJSRuntime,IFXJS_Runtime* pFXRuntime, IFXJS_Context* context, v8::Persist
ent<v8::Context>& v8PersistentContext); |
| 65 void JS_ReleaseRuntime(IJS_Ru
ntime* pJSRuntime, v8::Persistent<v8::Context>& v8PersistentContext); | 65 void JS_ReleaseRuntime(IJS_Ru
ntime* pJSRuntime, v8::Persistent<v8::Context>& v8PersistentContext); |
| 66 void JS_Initial(); | 66 void JS_Initial(); |
| 67 void JS_Release(); | 67 void JS_Release(); |
| 68 int JS_Parse(IJS_Run
time* pJSRuntime, IFXJS_Context* pJSContext, const wchar_t* script, long length,
FXJSErr* perror); | 68 int JS_Parse(IJS_Run
time* pJSRuntime, IFXJS_Context* pJSContext, const wchar_t* script, long length,
FXJSErr* perror); |
| 69 int JS_Execute(IJS_R
untime* pJSRuntime, IFXJS_Context* pJSContext, const wchar_t* script, long lengt
h, FXJSErr* perror); | 69 int JS_Execute(IJS_R
untime* pJSRuntime, IFXJS_Context* pJSContext, const wchar_t* script, long lengt
h, FXJSErr* perror); |
| 70 v8::Handle<v8::Object> JS_NewFxDynamicObj(IJS_Runtime* pJSRunti
me, IFXJS_Context* pJSContext, int nObjDefnID); | 70 v8::Handle<v8::Object> JS_NewFxDynamicObj(IJS_Runtime* pJSRunti
me, IFXJS_Context* pJSContext, int nObjDefnID); |
| 71 v8::Handle<v8::Object> JS_GetStaticObj(IJS_Runtime* pJSRuntime,
int nObjDefnID); | 71 v8::Handle<v8::Object> JS_GetStaticObj(IJS_Runtime* pJSRuntime,
int nObjDefnID); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 129 int JS_GetMinFromTim
e(double dt); | 129 int JS_GetMinFromTim
e(double dt); |
| 130 int JS_GetSecFromTim
e(double dt); | 130 int JS_GetSecFromTim
e(double dt); |
| 131 double JS_DateParse(const wchar
_t* string); | 131 double JS_DateParse(const wchar
_t* string); |
| 132 double JS_MakeDay(int nYear, in
t nMonth, int nDay); | 132 double JS_MakeDay(int nYear, in
t nMonth, int nDay); |
| 133 double JS_MakeTime(int nHour, i
nt nMin, int nSec, int nMs); | 133 double JS_MakeTime(int nHour, i
nt nMin, int nSec, int nMs); |
| 134 double JS_MakeDate(double day,
double time); | 134 double JS_MakeDate(double day,
double time); |
| 135 bool JS_PortIsNan(double d); | 135 bool JS_PortIsNan(double d); |
| 136 double JS_LocalTime(double d); | 136 double JS_LocalTime(double d); |
| 137 | 137 |
| 138 #endif //FXJSAPI_H | 138 #endif //FXJSAPI_H |
| OLD | NEW |