• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 
7 #ifndef _JS_MODULE_H_
8 #define _JS_MODULE_H_
9 
10 class CJS_GlobalData;
11 class CJS_ConsoleDlg;
12 
13 class CJS_Module : public IReader_Module
14 {
15 public:
16 	CJS_Module(HMODULE hModule, CReader_App* pApp);
17 	virtual ~CJS_Module();
18 
Destroy()19 	virtual void					Destroy(){delete this;}
20 	virtual CFX_ByteString			GetModuleName();
21 
22 public:
23 	static CJS_Module*				GetModule(CReader_App* pApp);
24 
25 	IFXJS_Runtime*					NewJSRuntime();
26 	CJS_GlobalData*					NewGlobalData();
27 	void							ReleaseGlobalData();
28 
29 public:
30 	//console
31 	void							ShowConsole();
32 	void							HideConsole();
33 	void							ClearConsole();
34 	void							PrintLineConsole(FX_LPCWSTR string);
35 
36 private:
37 	HMODULE							m_hModule;
38 	CReader_App*					m_pApp;
39 
40 	FX_BOOL							m_bInitial;
41 	CJS_GlobalData*					m_pGlobalData;
42 	FX_INT32						m_nGlobalDataCount;
43 
44 	CJS_ConsoleDlg*					m_pConsole;
45 };
46 
47 #endif //_JS_MODULE_H_