| 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 _JS_DEFINE_H_ | 7 #ifndef _JS_DEFINE_H_ |
| 8 #define _JS_DEFINE_H_ | 8 #define _JS_DEFINE_H_ |
| 9 | 9 |
| 10 typedef v8::Value JSValue; | 10 typedef v8::Value JSValue; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 37 typedef CFX_WideString JS_ErrorString; | 37 typedef CFX_WideString JS_ErrorString; |
| 38 | 38 |
| 39 #define JS_TRUE (unsigned)1 | 39 #define JS_TRUE (unsigned)1 |
| 40 #define JS_FALSE (unsigned)0 | 40 #define JS_FALSE (unsigned)0 |
| 41 | 41 |
| 42 | 42 |
| 43 #define CJS_PointsArray CFX_ArrayTemplate<float> | 43 #define CJS_PointsArray CFX_ArrayTemplate<float> |
| 44 #define CJS_IntArray CFX_ArrayTemplate<int> | 44 #define CJS_IntArray CFX_ArrayTemplate<int> |
| 45 | 45 |
| 46 /* ====================================== PUBLIC DEFINE SPEC ===================
=========================== */ | 46 /* ====================================== PUBLIC DEFINE SPEC ===================
=========================== */ |
| 47 #ifndef __GNUC__ | 47 #define JS_WIDESTRING(widestring) L###widestring |
| 48 #define JS_WIDESTRING(widestring) L#widestring | |
| 49 #else | |
| 50 #define JS_WIDESTRING(widestring) L""#widestring | |
| 51 #endif | |
| 52 | 48 |
| 53 #define OBJ_PROP_PARAMS IFXJS_Context* cc, CJS_PropValue& vp, JS
_ErrorString& sError | 49 #define OBJ_PROP_PARAMS IFXJS_Context* cc, CJS_PropValue& vp, JS
_ErrorString& sError |
| 54 #define OBJ_METHOD_PARAMS IFXJS_Context* cc, const CJS_Parameters&
params, CJS_Value& vRet, JS_ErrorString& sError | 50 #define OBJ_METHOD_PARAMS IFXJS_Context* cc, const CJS_Parameters&
params, CJS_Value& vRet, JS_ErrorString& sError |
| 55 #define BEGIN_JS_STATIC_CONST(js_class_name) JSConstSpec js_class_name::JS_Class
_Consts[] = { | 51 #define BEGIN_JS_STATIC_CONST(js_class_name) JSConstSpec js_class_name::JS_Class
_Consts[] = { |
| 56 #define JS_STATIC_CONST_ENTRY_NUMBER(const_name, pValue) {JS_WIDESTRING(const_na
me), pValue, L"", 0}, | 52 #define JS_STATIC_CONST_ENTRY_NUMBER(const_name, pValue) {JS_WIDESTRING(const_na
me), pValue, L"", 0}, |
| 57 #define JS_STATIC_CONST_ENTRY_STRING(const_name, pValue) {JS_WIDESTRING(const_na
me), 0, JS_WIDESTRING(pValue), 1}, | 53 #define JS_STATIC_CONST_ENTRY_STRING(const_name, pValue) {JS_WIDESTRING(const_na
me), 0, JS_WIDESTRING(pValue), 1}, |
| 58 #define END_JS_STATIC_CONST() {0, 0, 0, 0}}; | 54 #define END_JS_STATIC_CONST() {0, 0, 0, 0}}; |
| 59 | 55 |
| 60 #define BEGIN_JS_STATIC_PROP(js_class_name) JSPropertySpec js_class_name::JS_Cla
ss_Properties[] = { | 56 #define BEGIN_JS_STATIC_PROP(js_class_name) JSPropertySpec js_class_name::JS_Cla
ss_Properties[] = { |
| 61 #define JS_STATIC_PROP_ENTRY(prop_name) {JS_WIDESTRING(prop_name), get_##prop_na
me##_static, set_##prop_name##_static}, | 57 #define JS_STATIC_PROP_ENTRY(prop_name) {JS_WIDESTRING(prop_name), get_##prop_na
me##_static, set_##prop_name##_static}, |
| (...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 else if (strcmp(sType,VALUE_NAME_NULL) == 0) | 772 else if (strcmp(sType,VALUE_NAME_NULL) == 0) |
| 777 return VT_null; | 773 return VT_null; |
| 778 else if (strcmp(sType,VALUE_NAME_UNDEFINED) == 0) | 774 else if (strcmp(sType,VALUE_NAME_UNDEFINED) == 0) |
| 779 return VT_undefined; | 775 return VT_undefined; |
| 780 */ | 776 */ |
| 781 | 777 |
| 782 return VT_unknown; | 778 return VT_unknown; |
| 783 } | 779 } |
| 784 | 780 |
| 785 #endif //_JS_DEFINE_H_ | 781 #endif //_JS_DEFINE_H_ |
| OLD | NEW |