| 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 FPDFSDK_SRC_JAVASCRIPT_COLOR_H_ | 7 #ifndef FPDFSDK_SRC_JAVASCRIPT_COLOR_H_ |
| 8 #define FPDFSDK_SRC_JAVASCRIPT_COLOR_H_ | 8 #define FPDFSDK_SRC_JAVASCRIPT_COLOR_H_ |
| 9 | 9 |
| 10 #include "../../include/pdfwindow/PWL_Wnd.h" // For CPWL_Color. | 10 #include "../../include/pdfwindow/PWL_Wnd.h" // For CPWL_Color. |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 FX_BOOL ltGray(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 24 FX_BOOL ltGray(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 25 FX_BOOL magenta(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 25 FX_BOOL magenta(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 26 FX_BOOL red(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 26 FX_BOOL red(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 27 FX_BOOL transparent(IJS_Context* cc, | 27 FX_BOOL transparent(IJS_Context* cc, |
| 28 CJS_PropValue& vp, | 28 CJS_PropValue& vp, |
| 29 CFX_WideString& sError); | 29 CFX_WideString& sError); |
| 30 FX_BOOL white(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 30 FX_BOOL white(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 31 FX_BOOL yellow(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); | 31 FX_BOOL yellow(IJS_Context* cc, CJS_PropValue& vp, CFX_WideString& sError); |
| 32 | 32 |
| 33 FX_BOOL convert(IJS_Context* cc, | 33 FX_BOOL convert(IJS_Context* cc, |
| 34 const CJS_Parameters& params, | 34 const std::vector<CJS_Value>& params, |
| 35 CJS_Value& vRet, | 35 CJS_Value& vRet, |
| 36 CFX_WideString& sError); | 36 CFX_WideString& sError); |
| 37 FX_BOOL equal(IJS_Context* cc, | 37 FX_BOOL equal(IJS_Context* cc, |
| 38 const CJS_Parameters& params, | 38 const std::vector<CJS_Value>& params, |
| 39 CJS_Value& vRet, | 39 CJS_Value& vRet, |
| 40 CFX_WideString& sError); | 40 CFX_WideString& sError); |
| 41 | 41 |
| 42 public: | 42 public: |
| 43 static void ConvertPWLColorToArray(const CPWL_Color& color, CJS_Array& array); | 43 static void ConvertPWLColorToArray(const CPWL_Color& color, CJS_Array& array); |
| 44 static void ConvertArrayToPWLColor(CJS_Array& array, CPWL_Color& color); | 44 static void ConvertArrayToPWLColor(CJS_Array& array, CPWL_Color& color); |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 CPWL_Color m_crTransparent; | 47 CPWL_Color m_crTransparent; |
| 48 CPWL_Color m_crBlack; | 48 CPWL_Color m_crBlack; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 76 JS_STATIC_PROP(red, color); | 76 JS_STATIC_PROP(red, color); |
| 77 JS_STATIC_PROP(transparent, color); | 77 JS_STATIC_PROP(transparent, color); |
| 78 JS_STATIC_PROP(white, color); | 78 JS_STATIC_PROP(white, color); |
| 79 JS_STATIC_PROP(yellow, color); | 79 JS_STATIC_PROP(yellow, color); |
| 80 | 80 |
| 81 JS_STATIC_METHOD(convert, color); | 81 JS_STATIC_METHOD(convert, color); |
| 82 JS_STATIC_METHOD(equal, color); | 82 JS_STATIC_METHOD(equal, color); |
| 83 }; | 83 }; |
| 84 | 84 |
| 85 #endif // FPDFSDK_SRC_JAVASCRIPT_COLOR_H_ | 85 #endif // FPDFSDK_SRC_JAVASCRIPT_COLOR_H_ |
| OLD | NEW |