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 #ifndef FXJSAPI_H | 7 #ifndef FXJSAPI_H |
8 #define FXJSAPI_H | 8 #define FXJSAPI_H |
9 | 9 |
10 #include <v8.h> | 10 #include <v8.h> |
(...skipping 24 matching lines...) Expand all Loading... |
35 const wchar_t* srcline; | 35 const wchar_t* srcline; |
36 unsigned linnum; | 36 unsigned linnum; |
37 }; | 37 }; |
38 | 38 |
39 /* --------------------------------------------- API ---------------------------
------------------ */ | 39 /* --------------------------------------------- API ---------------------------
------------------ */ |
40 | 40 |
41 typedef v8::Isolate IJS_Runtime; | 41 typedef v8::Isolate IJS_Runtime; |
42 class IFXJS_Context; | 42 class IFXJS_Context; |
43 class IFXJS_Runtime; | 43 class IFXJS_Runtime; |
44 | 44 |
45 typedef unsigned (*LP_CONSTRUCTOR)(IFXJS_Context* cc, v8::Handle<v8::Object> obj
, v8::Handle<v8::Object> global); | 45 typedef void (*LP_CONSTRUCTOR)(IFXJS_Context* cc, v8::Handle<v8::Object> obj, v8
::Handle<v8::Object> global); |
46 typedef unsigned (*LP_DESTRUCTOR)(v8::Handle<v8::Object> obj); | 46 typedef void (*LP_DESTRUCTOR)(v8::Handle<v8::Object> obj); |
47 | 47 |
48 | 48 |
49 int JS_DefineObj(IJS
_Runtime* pJSRuntime, const wchar_t* sObjName, FXJSOBJTYPE eObjType, LP_CONSTRUC
TOR pConstructor, LP_DESTRUCTOR pDestructor, unsigned bApplyNew); | 49 int JS_DefineObj(IJS
_Runtime* pJSRuntime, const wchar_t* sObjName, FXJSOBJTYPE eObjType, LP_CONSTRUC
TOR pConstructor, LP_DESTRUCTOR pDestructor, unsigned bApplyNew); |
50 int JS_DefineObjMeth
od(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sMethodName, v8::Func
tionCallback pMethodCall, unsigned nParamNum); | 50 int JS_DefineObjMeth
od(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sMethodName, v8::Func
tionCallback pMethodCall, unsigned nParamNum); |
51 int JS_DefineObjProp
erty(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sPropName, v8::Acce
ssorGetterCallback pPropGet, v8::AccessorSetterCallback pPropPut); | 51 int JS_DefineObjProp
erty(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sPropName, v8::Acce
ssorGetterCallback pPropGet, v8::AccessorSetterCallback pPropPut); |
52 int JS_DefineObjAllP
roperties(IJS_Runtime* pJSRuntime, int nObjDefnID, v8::NamedPropertyQueryCallbac
k pPropQurey, v8::NamedPropertyGetterCallback pPropGet, v8::NamedPropertySetterC
allback pPropPut, v8::NamedPropertyDeleterCallback pPropDel); | 52 int JS_DefineObjAllP
roperties(IJS_Runtime* pJSRuntime, int nObjDefnID, v8::NamedPropertyQueryCallbac
k pPropQurey, v8::NamedPropertyGetterCallback pPropGet, v8::NamedPropertySetterC
allback pPropPut, v8::NamedPropertyDeleterCallback pPropDel); |
53 int JS_DefineObjCons
t(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sConstName, v8::Handle
<v8::Value> pDefault); | 53 int JS_DefineObjCons
t(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sConstName, v8::Handle
<v8::Value> pDefault); |
54 int JS_DefineGlobalM
ethod(IJS_Runtime* pJSRuntime, const wchar_t* sMethodName, v8::FunctionCallback
pMethodCall, unsigned nParamNum); | 54 int JS_DefineGlobalM
ethod(IJS_Runtime* pJSRuntime, const wchar_t* sMethodName, v8::FunctionCallback
pMethodCall, unsigned nParamNum); |
55 int JS_DefineGlobalC
onst(IJS_Runtime* pJSRuntime, const wchar_t* sConstName, v8::Handle<v8::Value> p
Default); | 55 int JS_DefineGlobalC
onst(IJS_Runtime* pJSRuntime, const wchar_t* sConstName, v8::Handle<v8::Value> p
Default); |
56 | 56 |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
122 int JS_GetMinFromTim
e(double dt); | 122 int JS_GetMinFromTim
e(double dt); |
123 int JS_GetSecFromTim
e(double dt); | 123 int JS_GetSecFromTim
e(double dt); |
124 double JS_DateParse(const wchar
_t* string); | 124 double JS_DateParse(const wchar
_t* string); |
125 double JS_MakeDay(int nYear, in
t nMonth, int nDay); | 125 double JS_MakeDay(int nYear, in
t nMonth, int nDay); |
126 double JS_MakeTime(int nHour, i
nt nMin, int nSec, int nMs); | 126 double JS_MakeTime(int nHour, i
nt nMin, int nSec, int nMs); |
127 double JS_MakeDate(double day,
double time); | 127 double JS_MakeDate(double day,
double time); |
128 bool JS_PortIsNan(double d); | 128 bool JS_PortIsNan(double d); |
129 double JS_LocalTime(double d); | 129 double JS_LocalTime(double d); |
130 | 130 |
131 #endif //FXJSAPI_H | 131 #endif //FXJSAPI_H |
OLD | NEW |