| 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 27 matching lines...) Expand all  Loading... | 
| 38 /* --------------------------------------------- API ---------------------------
     ------------------ */ | 38 /* --------------------------------------------- API ---------------------------
     ------------------ */ | 
| 39 | 39 | 
| 40 typedef v8::Isolate IJS_Runtime; | 40 typedef v8::Isolate IJS_Runtime; | 
| 41 class IFXJS_Context; | 41 class IFXJS_Context; | 
| 42 class IFXJS_Runtime; | 42 class IFXJS_Runtime; | 
| 43 | 43 | 
| 44 | 44 | 
| 45 #ifndef JSCRIPT_ARGS | 45 #ifndef JSCRIPT_ARGS | 
| 46 #define JSCRIPT_ARGS | 46 #define JSCRIPT_ARGS | 
| 47 | 47 | 
| 48 #define JS_PROPGET_ARGS                 v8::Local<v8::String> property,const v8:
     :PropertyCallbackInfo<v8::Value>& info |  | 
| 49 #define JS_PROPPUT_ARGS                 v8::Local<v8::String> property,v8::Local
     <v8::Value> value,const v8::PropertyCallbackInfo<void>& info |  | 
| 50 #define JS_METHOD_ARGS                  const v8::FunctionCallbackInfo<v8::Value
     >& info |  | 
| 51 #define JS_CONSTRUCTOR_ARGS             IFXJS_Context* cc, v8::Handle<v8::Object
     > obj, v8::Handle<v8::Object> global | 48 #define JS_CONSTRUCTOR_ARGS             IFXJS_Context* cc, v8::Handle<v8::Object
     > obj, v8::Handle<v8::Object> global | 
| 52 #define JS_DESTRUCTOR_ARGS              v8::Handle<v8::Object> obj | 49 #define JS_DESTRUCTOR_ARGS              v8::Handle<v8::Object> obj | 
| 53 | 50 | 
| 54 #define JS_PROPQUERY_ARGS               v8::Local<v8::String> property,const v8:
     :PropertyCallbackInfo<v8::Integer>& info | 51 #define JS_PROPQUERY_ARGS               v8::Local<v8::String> property,const v8:
     :PropertyCallbackInfo<v8::Integer>& info | 
| 55 #define JS_NAMED_PROPGET_ARGS»  JS_PROPGET_ARGS»»       »       »       » | 52 #define JS_NAMED_PROPGET_ARGS»          v8::Local<v8::String> property, const v8
     ::PropertyCallbackInfo<v8::Value>& info | 
|  | 53 | 
| 56 #define JS_NAMED_PROPPUT_ARGS   v8::Local<v8::String> property,v8::Local<v8::Val
     ue> value,const v8::PropertyCallbackInfo<v8::Value>& info | 54 #define JS_NAMED_PROPPUT_ARGS   v8::Local<v8::String> property,v8::Local<v8::Val
     ue> value,const v8::PropertyCallbackInfo<v8::Value>& info | 
| 57 #define JS_PROPDEL_ARGS                 v8::Local<v8::String> property,const v8:
     :PropertyCallbackInfo<v8::Boolean>& info | 55 #define JS_PROPDEL_ARGS                 v8::Local<v8::String> property,const v8:
     :PropertyCallbackInfo<v8::Boolean>& info | 
| 58 | 56 | 
| 59 typedef unsigned (*LP_CONSTRUCTOR)(JS_CONSTRUCTOR_ARGS); | 57 typedef unsigned (*LP_CONSTRUCTOR)(JS_CONSTRUCTOR_ARGS); | 
| 60 typedef unsigned (*LP_DESTRUCTOR)(JS_DESTRUCTOR_ARGS); | 58 typedef unsigned (*LP_DESTRUCTOR)(JS_DESTRUCTOR_ARGS); | 
| 61 | 59 | 
| 62 #endif | 60 #endif | 
| 63 | 61 | 
| 64 int                                                             JS_DefineObj(IJS
     _Runtime* pJSRuntime, const wchar_t* sObjName, FXJSOBJTYPE eObjType, LP_CONSTRUC
     TOR pConstructor, LP_DESTRUCTOR pDestructor, unsigned bApplyNew); | 62 int                                                             JS_DefineObj(IJS
     _Runtime* pJSRuntime, const wchar_t* sObjName, FXJSOBJTYPE eObjType, LP_CONSTRUC
     TOR pConstructor, LP_DESTRUCTOR pDestructor, unsigned bApplyNew); | 
| 65 int                                                             JS_DefineObjMeth
     od(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sMethodName, v8::Func
     tionCallback pMethodCall, unsigned nParamNum); | 63 int                                                             JS_DefineObjMeth
     od(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sMethodName, v8::Func
     tionCallback pMethodCall, unsigned nParamNum); | 
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 138 int                                                             JS_GetMinFromTim
     e(double dt); | 136 int                                                             JS_GetMinFromTim
     e(double dt); | 
| 139 int                                                             JS_GetSecFromTim
     e(double dt); | 137 int                                                             JS_GetSecFromTim
     e(double dt); | 
| 140 double                                                  JS_DateParse(const wchar
     _t* string); | 138 double                                                  JS_DateParse(const wchar
     _t* string); | 
| 141 double                                                  JS_MakeDay(int nYear, in
     t nMonth, int nDay); | 139 double                                                  JS_MakeDay(int nYear, in
     t nMonth, int nDay); | 
| 142 double                                                  JS_MakeTime(int nHour, i
     nt nMin, int nSec, int nMs); | 140 double                                                  JS_MakeTime(int nHour, i
     nt nMin, int nSec, int nMs); | 
| 143 double                                                  JS_MakeDate(double day, 
     double time); | 141 double                                                  JS_MakeDate(double day, 
     double time); | 
| 144 bool                                                    JS_PortIsNan(double d); | 142 bool                                                    JS_PortIsNan(double d); | 
| 145 double                                                  JS_LocalTime(double d); | 143 double                                                  JS_LocalTime(double d); | 
| 146 | 144 | 
| 147 #endif //FXJSAPI_H | 145 #endif //FXJSAPI_H | 
| OLD | NEW | 
|---|