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_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ | 7 #ifndef FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ |
8 #define FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ | 8 #define FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ |
9 | 9 |
| 10 #ifdef PDF_ENABLE_XFA |
10 #include "../../../xfa/include/fxjse/fxjse.h" | 11 #include "../../../xfa/include/fxjse/fxjse.h" |
| 12 #endif |
11 #include "core/include/fxcrt/fx_string.h" | 13 #include "core/include/fxcrt/fx_string.h" |
12 #include "core/include/fxcrt/fx_system.h" | 14 #include "core/include/fxcrt/fx_system.h" |
13 | 15 |
14 class CPDFDoc_Environment; | 16 class CPDFDoc_Environment; |
15 class CPDFSDK_Annot; | 17 class CPDFSDK_Annot; |
16 class CPDFSDK_Document; | 18 class CPDFSDK_Document; |
17 class CPDF_Bookmark; | 19 class CPDF_Bookmark; |
18 class CPDF_FormField; | 20 class CPDF_FormField; |
19 | 21 |
20 // Records the details of an event and triggers JS execution for it. | 22 // Records the details of an event and triggers JS execution for it. |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
142 | 144 |
143 virtual IJS_Context* NewContext() = 0; | 145 virtual IJS_Context* NewContext() = 0; |
144 virtual void ReleaseContext(IJS_Context* pContext) = 0; | 146 virtual void ReleaseContext(IJS_Context* pContext) = 0; |
145 virtual IJS_Context* GetCurrentContext() = 0; | 147 virtual IJS_Context* GetCurrentContext() = 0; |
146 virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0; | 148 virtual void SetReaderDocument(CPDFSDK_Document* pReaderDoc) = 0; |
147 virtual CPDFSDK_Document* GetReaderDocument() = 0; | 149 virtual CPDFSDK_Document* GetReaderDocument() = 0; |
148 virtual int Execute(IJS_Context* cc, | 150 virtual int Execute(IJS_Context* cc, |
149 const wchar_t* script, | 151 const wchar_t* script, |
150 CFX_WideString* info) = 0; | 152 CFX_WideString* info) = 0; |
151 | 153 |
| 154 #ifdef PDF_ENABLE_XFA |
152 virtual FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name, | 155 virtual FX_BOOL GetHValueByName(const CFX_ByteStringC& utf8Name, |
153 FXJSE_HVALUE hValue) = 0; | 156 FXJSE_HVALUE hValue) = 0; |
154 virtual FX_BOOL SetHValueByName(const CFX_ByteStringC& utf8Name, | 157 virtual FX_BOOL SetHValueByName(const CFX_ByteStringC& utf8Name, |
155 FXJSE_HVALUE hValue) = 0; | 158 FXJSE_HVALUE hValue) = 0; |
156 | 159 |
| 160 #endif |
157 protected: | 161 protected: |
158 IJS_Runtime() {} | 162 IJS_Runtime() {} |
159 }; | 163 }; |
160 | 164 |
161 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ | 165 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ |
OLD | NEW |