| 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_OBJECT_H_ | 7 #ifndef _JS_OBJECT_H_ |
| 8 #define _JS_OBJECT_H_ | 8 #define _JS_OBJECT_H_ |
| 9 | 9 |
| 10 #include "../fsdk_define.h" // For FX_UINT | 10 #include "../fsdk_define.h" // For FX_UINT |
| 11 #include "../fsdk_mgr.h" // For CPDFDoc_Environment | 11 #include "../fsdk_mgr.h" // For CPDFDoc_Environment |
| 12 #include "../fx_systemhandler.h" // For IFX_SystemHandler | 12 #include "../fx_systemhandler.h" // For IFX_SystemHandler |
| 13 #include "../jsapi/fxjs_v8.h" | 13 #include "../jsapi/fxjs_v8.h" |
| 14 | 14 |
| 15 class CPDFSDK_PageView; | 15 class CPDFSDK_PageView; |
| 16 class CJS_Object; | 16 class CJS_Object; |
| 17 class CJS_Timer; | 17 class CJS_Timer; |
| 18 class CJS_Context; | 18 class CJS_Context; |
| 19 | 19 |
| 20 class CJS_EmbedObj : public CFX_Object | 20 class CJS_EmbedObj |
| 21 { | 21 { |
| 22 public: | 22 public: |
| 23 CJS_EmbedObj(CJS_Object* pJSObject); | 23 CJS_EmbedObj(CJS_Object* pJSObject); |
| 24 virtual ~CJS_EmbedObj(); | 24 virtual ~CJS_EmbedObj(); |
| 25 | 25 |
| 26 virtual void TimerProc(CJS_Timer* pTimer){}; | 26 virtual void TimerProc(CJS_Timer* pTimer){}; |
| 27 | 27 |
| 28 CJS_Timer* BeginTimer(CPDFDoc_Envir
onment * pApp, FX_UINT nElapse); | 28 CJS_Timer* BeginTimer(CPDFDoc_Envir
onment * pApp, FX_UINT nElapse); |
| 29 void EndTimer(CJS_Timer* pTim
er); | 29 void EndTimer(CJS_Timer* pTim
er); |
| 30 | 30 |
| 31 CJS_Object* GetJSObject(){return m_p
JSObject;}; | 31 CJS_Object* GetJSObject(){return m_p
JSObject;}; |
| 32 operator CJS_Object* (){return m_
pJSObject;}; | 32 operator CJS_Object* (){return m_
pJSObject;}; |
| 33 | 33 |
| 34 CPDFSDK_PageView * JSGetPageView(IFXJS_Context* cc)
; | 34 CPDFSDK_PageView * JSGetPageView(IFXJS_Context* cc)
; |
| 35 int MsgBox(CPDFDoc_E
nvironment* pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTi
tle = NULL, FX_UINT nType = 0, FX_UINT nIcon = 0); | 35 int MsgBox(CPDFDoc_E
nvironment* pApp, CPDFSDK_PageView* pPageView, FX_LPCWSTR swMsg, FX_LPCWSTR swTi
tle = NULL, FX_UINT nType = 0, FX_UINT nIcon = 0); |
| 36 void Alert(CJS_Context* pCont
ext, FX_LPCWSTR swMsg); | 36 void Alert(CJS_Context* pCont
ext, FX_LPCWSTR swMsg); |
| 37 | 37 |
| 38 protected: | 38 protected: |
| 39 CJS_Object* m_pJSObject; | 39 CJS_Object* m_pJSObject; |
| 40 }; | 40 }; |
| 41 | 41 |
| 42 class CJS_Object : public CFX_Object | 42 class CJS_Object |
| 43 { | 43 { |
| 44 public: | 44 public: |
| 45 CJS_Object(JSFXObject pObject); | 45 CJS_Object(JSFXObject pObject); |
| 46 virtual ~CJS_Object(void); | 46 virtual ~CJS_Object(void); |
| 47 | 47 |
| 48 void MakeWeak(); | 48 void MakeWeak(); |
| 49 | 49 |
| 50 virtual FX_BOOL IsType(FX_LPCSTR sClassName){ret
urn TRUE;}; | 50 virtual FX_BOOL IsType(FX_LPCSTR sClassName){ret
urn TRUE;}; |
| 51 virtual CFX_ByteString GetClassName(){return "";}; | 51 virtual CFX_ByteString GetClassName(){return "";}; |
| 52 | 52 |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 284 FX_DWORD m_dwStar
tTime; | 284 FX_DWORD m_dwStar
tTime; |
| 285 FX_DWORD m_dwTime
Out; | 285 FX_DWORD m_dwTime
Out; |
| 286 FX_DWORD m_dwElapse; | 286 FX_DWORD m_dwElapse; |
| 287 CJS_Runtime* m_pRuntime; | 287 CJS_Runtime* m_pRuntime; |
| 288 CFX_WideString m_swJScript; | 288 CFX_WideString m_swJScript; |
| 289 int m_nType;
//0:Interval; 1:TimeOut | 289 int m_nType;
//0:Interval; 1:TimeOut |
| 290 | 290 |
| 291 CPDFDoc_Environment* m_pApp; | 291 CPDFDoc_Environment* m_pApp; |
| 292 }; | 292 }; |
| 293 #endif //_JS_OBJECT_H_ | 293 #endif //_JS_OBJECT_H_ |
| OLD | NEW |