diff options
Diffstat (limited to 'fpdfsdk/include/jsapi')
-rw-r--r-- | fpdfsdk/include/jsapi/fxjs_v8.h | 26 |
1 files changed, 6 insertions, 20 deletions
diff --git a/fpdfsdk/include/jsapi/fxjs_v8.h b/fpdfsdk/include/jsapi/fxjs_v8.h index e08196d6f1..b6ea60be13 100644 --- a/fpdfsdk/include/jsapi/fxjs_v8.h +++ b/fpdfsdk/include/jsapi/fxjs_v8.h @@ -1,7 +1,7 @@ // Copyright 2014 PDFium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. - + // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com #ifndef FXJSAPI_H @@ -30,8 +30,8 @@ enum FXJSVALUETYPE struct FXJSErr { - const wchar_t* message; - const wchar_t* srcline; + const wchar_t* message; + const wchar_t* srcline; unsigned linnum; }; @@ -41,23 +41,9 @@ typedef v8::Isolate IJS_Runtime; class IFXJS_Context; class IFXJS_Runtime; +typedef unsigned (*LP_CONSTRUCTOR)(IFXJS_Context* cc, v8::Handle<v8::Object> obj, v8::Handle<v8::Object> global); +typedef unsigned (*LP_DESTRUCTOR)(v8::Handle<v8::Object> obj); -#ifndef JSCRIPT_ARGS -#define JSCRIPT_ARGS - -#define JS_CONSTRUCTOR_ARGS IFXJS_Context* cc, v8::Handle<v8::Object> obj, v8::Handle<v8::Object> global -#define JS_DESTRUCTOR_ARGS v8::Handle<v8::Object> obj - -#define JS_PROPQUERY_ARGS v8::Local<v8::String> property,const v8::PropertyCallbackInfo<v8::Integer>& info -#define JS_NAMED_PROPGET_ARGS v8::Local<v8::String> property, const v8::PropertyCallbackInfo<v8::Value>& info - -#define JS_NAMED_PROPPUT_ARGS v8::Local<v8::String> property,v8::Local<v8::Value> value,const v8::PropertyCallbackInfo<v8::Value>& info -#define JS_PROPDEL_ARGS v8::Local<v8::String> property,const v8::PropertyCallbackInfo<v8::Boolean>& info - -typedef unsigned (*LP_CONSTRUCTOR)(JS_CONSTRUCTOR_ARGS); -typedef unsigned (*LP_DESTRUCTOR)(JS_DESTRUCTOR_ARGS); - -#endif int JS_DefineObj(IJS_Runtime* pJSRuntime, const wchar_t* sObjName, FXJSOBJTYPE eObjType, LP_CONSTRUCTOR pConstructor, LP_DESTRUCTOR pDestructor, unsigned bApplyNew); int JS_DefineObjMethod(IJS_Runtime* pJSRuntime, int nObjDefnID, const wchar_t* sMethodName, v8::FunctionCallback pMethodCall, unsigned nParamNum); @@ -69,7 +55,7 @@ int JS_DefineGlobalConst(IJS_Runtime* pJSRuntime, const wchar_t* sConstNa void JS_InitialRuntime(IJS_Runtime* pJSRuntime,IFXJS_Runtime* pFXRuntime, IFXJS_Context* context, v8::Persistent<v8::Context>& v8PersistentContext); void JS_ReleaseRuntime(IJS_Runtime* pJSRuntime, v8::Persistent<v8::Context>& v8PersistentContext); -void JS_Initial(); +void JS_Initial(); void JS_Release(); int JS_Parse(IJS_Runtime* pJSRuntime, IFXJS_Context* pJSContext, const wchar_t* script, long length, FXJSErr* perror); int JS_Execute(IJS_Runtime* pJSRuntime, IFXJS_Context* pJSContext, const wchar_t* script, long length, FXJSErr* perror); |