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_FWL_CORE_IFWL_APP_H_ | 7 #ifndef XFA_FWL_CORE_IFWL_APP_H_ |
8 #define XFA_FWL_CORE_IFWL_APP_H_ | 8 #define XFA_FWL_CORE_IFWL_APP_H_ |
9 | 9 |
10 // The FWL thread/app code contains three parallel inheritance hierarchies, | |
Tom Sepez
2016/04/27 20:23:34
s/parallel inheritance hierarchies/parallel classe
dsinclair
2016/04/27 20:58:55
Done.
| |
11 // which reference each other via pointers as follows: | |
12 // | |
13 // m_pIface m_pImpl | |
14 // CXFA_FFApp ------------> IFWL_App -----------> CFWL_AppImp | |
15 // <----------- | |
16 // m_pIface | |
17 | |
10 #include "core/fxcrt/include/fx_string.h" | 18 #include "core/fxcrt/include/fx_string.h" |
11 #include "xfa/fwl/core/ifwl_thread.h" | 19 #include "xfa/fwl/core/fwl_error.h" |
12 | 20 |
21 class CFWL_AppImp; | |
22 class CFWL_NoteDriver; | |
13 class IFWL_AdapterNative; | 23 class IFWL_AdapterNative; |
24 class IFWL_AdapterWidgetMgr; | |
25 class IFWL_ThemeProvider; | |
14 class IFWL_Widget; | 26 class IFWL_Widget; |
15 class IFWL_WidgetMgr; | 27 class IFWL_WidgetMgr; |
16 class IFWL_ThemeProvider; | |
17 class IFWL_AdapterWidgetMgr; | |
18 | 28 |
19 class IFWL_App : public IFWL_Thread { | 29 class IFWL_App { |
20 public: | 30 public: |
21 static IFWL_App* Create(IFWL_AdapterNative* pAdapter); | 31 static IFWL_App* Create(IFWL_AdapterNative* pAdapter); |
22 | 32 |
33 virtual ~IFWL_App() {} | |
34 | |
23 FWL_ERR Initialize(); | 35 FWL_ERR Initialize(); |
24 FWL_ERR Finalize(); | 36 FWL_ERR Finalize(); |
25 IFWL_AdapterNative* GetAdapterNative(); | 37 IFWL_AdapterNative* GetAdapterNative(); |
26 IFWL_WidgetMgr* GetWidgetMgr(); | 38 IFWL_WidgetMgr* GetWidgetMgr(); |
27 IFWL_ThemeProvider* GetThemeProvider(); | 39 IFWL_ThemeProvider* GetThemeProvider(); |
28 FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider); | 40 FWL_ERR SetThemeProvider(IFWL_ThemeProvider* pThemeProvider); |
29 FWL_ERR Exit(int32_t iExitCode); | 41 FWL_ERR Exit(int32_t iExitCode); |
30 | 42 |
43 // These call into polymorphic methods in the impl; no need to override. | |
44 void Release(); | |
45 | |
46 CFWL_AppImp* GetImpl() const { return m_pImpl; } | |
47 void SetImpl(CFWL_AppImp* pImpl) { m_pImpl = pImpl; } | |
48 | |
49 CFWL_NoteDriver* GetNoteDriver() const; | |
50 | |
31 private: | 51 private: |
32 IFWL_App() {} | 52 IFWL_App() {} |
53 | |
54 CFWL_AppImp* m_pImpl; | |
33 }; | 55 }; |
34 | 56 |
35 IFWL_App* FWL_GetApp(); | 57 IFWL_App* FWL_GetApp(); |
36 void FWL_SetApp(IFWL_App* pApp); | 58 void FWL_SetApp(IFWL_App* pApp); |
37 | 59 |
38 IFWL_AdapterNative* FWL_GetAdapterNative(); | 60 IFWL_AdapterNative* FWL_GetAdapterNative(); |
39 IFWL_AdapterWidgetMgr* FWL_GetAdapterWidgetMgr(); | 61 IFWL_AdapterWidgetMgr* FWL_GetAdapterWidgetMgr(); |
40 | 62 |
41 #endif // XFA_FWL_CORE_IFWL_APP_H_ | 63 #endif // XFA_FWL_CORE_IFWL_APP_H_ |
OLD | NEW |