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 #include "../../../core/include/fxcrt/fx_string.h" | 10 #include "../../../core/include/fxcrt/fx_string.h" |
11 #include "../../../core/include/fxcrt/fx_system.h" | 11 #include "../../../core/include/fxcrt/fx_system.h" |
12 #include "../../../xfa/include/fxjse/fxjse.h" | 12 #include "../../../xfa/include/fxjse/fxjse.h" |
13 | 13 |
14 class CPDF_Bookmark; | 14 class CPDF_Bookmark; |
15 class CPDF_FormField; | 15 class CPDF_FormField; |
16 class CPDFSDK_Annot; | 16 class CPDFSDK_Annot; |
17 class CPDFSDK_Document; | 17 class CPDFSDK_Document; |
18 | 18 |
19 class IFXJS_Context { | 19 class IFXJS_Context { |
20 public: | 20 public: |
21 virtual FX_BOOL Compile(const CFX_WideString& script, | |
22 CFX_WideString& info) = 0; | |
23 virtual FX_BOOL RunScript(const CFX_WideString& script, | 21 virtual FX_BOOL RunScript(const CFX_WideString& script, |
24 CFX_WideString& info) = 0; | 22 CFX_WideString& info) = 0; |
25 | 23 |
26 virtual void OnApp_Init() = 0; | 24 virtual void OnApp_Init() = 0; |
27 | 25 |
28 virtual void OnDoc_Open(CPDFSDK_Document* pDoc, | 26 virtual void OnDoc_Open(CPDFSDK_Document* pDoc, |
29 const CFX_WideString& strTargetName) = 0; | 27 const CFX_WideString& strTargetName) = 0; |
30 virtual void OnDoc_WillPrint(CPDFSDK_Document* pDoc) = 0; | 28 virtual void OnDoc_WillPrint(CPDFSDK_Document* pDoc) = 0; |
31 virtual void OnDoc_DidPrint(CPDFSDK_Document* pDoc) = 0; | 29 virtual void OnDoc_DidPrint(CPDFSDK_Document* pDoc) = 0; |
32 virtual void OnDoc_WillSave(CPDFSDK_Document* pDoc) = 0; | 30 virtual void OnDoc_WillSave(CPDFSDK_Document* pDoc) = 0; |
(...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
169 void ReleaseGlobalData(); | 167 void ReleaseGlobalData(); |
170 | 168 |
171 private: | 169 private: |
172 FX_BOOL m_bInit; | 170 FX_BOOL m_bInit; |
173 int m_nRef; | 171 int m_nRef; |
174 CJS_GlobalData* m_pGlobalData; | 172 CJS_GlobalData* m_pGlobalData; |
175 int32_t m_nGlobalDataCount; | 173 int32_t m_nGlobalDataCount; |
176 }; | 174 }; |
177 | 175 |
178 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ | 176 #endif // FPDFSDK_INCLUDE_JAVASCRIPT_IJAVASCRIPT_H_ |
OLD | NEW |