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 XFA_FXFA_FM2JS_XFA_FM2JSCONTEXT_H_ | 7 #ifndef XFA_FXFA_FM2JS_XFA_FM2JSCONTEXT_H_ |
8 #define XFA_FXFA_FM2JS_XFA_FM2JSCONTEXT_H_ | 8 #define XFA_FXFA_FM2JS_XFA_FM2JSCONTEXT_H_ |
9 | 9 |
10 #include "xfa/fxfa/parser/xfa_script.h" | 10 #include "xfa/fxfa/parser/xfa_script.h" |
(...skipping 413 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
424 static FXJSE_HVALUE GetSimpleHValue(FXJSE_HOBJECT hThis, | 424 static FXJSE_HVALUE GetSimpleHValue(FXJSE_HOBJECT hThis, |
425 CFXJSE_Arguments& args, | 425 CFXJSE_Arguments& args, |
426 uint32_t index); | 426 uint32_t index); |
427 static FX_BOOL HValueIsNull(FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue); | 427 static FX_BOOL HValueIsNull(FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue); |
428 static int32_t HValueToInteger(FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue); | 428 static int32_t HValueToInteger(FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue); |
429 static FX_DOUBLE StringToDouble(const CFX_ByteStringC& szStringVal); | 429 static FX_DOUBLE StringToDouble(const CFX_ByteStringC& szStringVal); |
430 static FX_FLOAT HValueToFloat(FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue); | 430 static FX_FLOAT HValueToFloat(FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue); |
431 static FX_DOUBLE HValueToDouble(FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue); | 431 static FX_DOUBLE HValueToDouble(FXJSE_HOBJECT hThis, FXJSE_HVALUE hValue); |
432 static void HValueToUTF8String(FXJSE_HVALUE hValue, | 432 static void HValueToUTF8String(FXJSE_HVALUE hValue, |
433 CFX_ByteString& outputValue); | 433 CFX_ByteString& outputValue); |
| 434 |
434 CXFA_FM2JSContext(); | 435 CXFA_FM2JSContext(); |
435 ~CXFA_FM2JSContext(); | 436 ~CXFA_FM2JSContext(); |
436 static CXFA_FM2JSContext* Create(); | 437 |
437 void Initialize(FXJSE_HRUNTIME hScriptRuntime, | 438 void Initialize(FXJSE_HRUNTIME hScriptRuntime, |
438 FXJSE_HCONTEXT hScriptContext, | 439 FXJSE_HCONTEXT hScriptContext, |
439 CXFA_Document* pDoc); | 440 CXFA_Document* pDoc); |
440 void GlobalPropertyGetter(FXJSE_HVALUE hValue); | 441 void GlobalPropertyGetter(FXJSE_HVALUE hValue); |
441 void Release(); | 442 |
442 FXJSE_HRUNTIME GetScriptRuntime() const { return m_hScriptRuntime; } | 443 FXJSE_HRUNTIME GetScriptRuntime() const { return m_hScriptRuntime; } |
443 CXFA_Document* GetDocument() const { return m_pDocument; } | 444 CXFA_Document* GetDocument() const { return m_pDocument; } |
444 void ThrowScriptErrorMessage(int32_t iStringID, ...); | 445 void ThrowScriptErrorMessage(int32_t iStringID, ...); |
445 | 446 |
446 private: | 447 private: |
447 FXJSE_HRUNTIME m_hScriptRuntime; | 448 FXJSE_HRUNTIME m_hScriptRuntime; |
448 FXJSE_CLASS m_fmClass; | 449 FXJSE_CLASS m_fmClass; |
449 FXJSE_HCLASS m_hFMClass; | 450 FXJSE_HCLASS m_hFMClass; |
450 FXJSE_HVALUE m_hValue; | 451 FXJSE_HVALUE m_hValue; |
451 CXFA_Document* m_pDocument; | 452 CXFA_Document* m_pDocument; |
452 }; | 453 }; |
453 | 454 |
454 #endif // XFA_FXFA_FM2JS_XFA_FM2JSCONTEXT_H_ | 455 #endif // XFA_FXFA_FM2JS_XFA_FM2JSCONTEXT_H_ |
OLD | NEW |