summaryrefslogtreecommitdiff
path: root/xfa/fwl/core/fwl_appimp.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'xfa/fwl/core/fwl_appimp.cpp')
-rw-r--r--xfa/fwl/core/fwl_appimp.cpp39
1 files changed, 21 insertions, 18 deletions
diff --git a/xfa/fwl/core/fwl_appimp.cpp b/xfa/fwl/core/fwl_appimp.cpp
index 0017aad8ad..ac00cca144 100644
--- a/xfa/fwl/core/fwl_appimp.cpp
+++ b/xfa/fwl/core/fwl_appimp.cpp
@@ -8,11 +8,11 @@
#include "xfa/fwl/core/fwl_noteimp.h"
#include "xfa/fwl/core/fwl_widgetmgrimp.h"
-#include "xfa/fwl/core/ifwl_adapterwidgetmgr.h"
#include "xfa/fwl/core/ifwl_app.h"
#include "xfa/fwl/core/ifwl_widget.h"
+#include "xfa/fxfa/app/xfa_fwladapter.h"
-IFWL_App* IFWL_App::Create(IFWL_AdapterNative* pAdapter) {
+IFWL_App* IFWL_App::Create(CXFA_FFApp* pAdapter) {
IFWL_App* pApp = new IFWL_App;
pApp->SetImpl(new CFWL_AppImp(pApp, pAdapter));
return pApp;
@@ -28,7 +28,7 @@ FWL_ERR IFWL_App::Finalize() {
return static_cast<CFWL_AppImp*>(GetImpl())->Finalize();
}
-IFWL_AdapterNative* IFWL_App::GetAdapterNative() {
+CXFA_FFApp* IFWL_App::GetAdapterNative() {
return static_cast<CFWL_AppImp*>(GetImpl())->GetAdapterNative();
}
@@ -40,19 +40,19 @@ IFWL_ThemeProvider* IFWL_App::GetThemeProvider() {
return static_cast<CFWL_AppImp*>(GetImpl())->GetThemeProvider();
}
-FWL_ERR IFWL_App::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) {
- return static_cast<CFWL_AppImp*>(GetImpl())->SetThemeProvider(pThemeProvider);
+void IFWL_App::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) {
+ static_cast<CFWL_AppImp*>(GetImpl())->SetThemeProvider(pThemeProvider);
}
-FWL_ERR IFWL_App::Exit(int32_t iExitCode) {
- return static_cast<CFWL_AppImp*>(GetImpl())->Exit(iExitCode);
+void IFWL_App::Exit(int32_t iExitCode) {
+ static_cast<CFWL_AppImp*>(GetImpl())->Exit(iExitCode);
}
CFWL_NoteDriver* IFWL_App::GetNoteDriver() const {
return static_cast<CFWL_AppImp*>(GetImpl())->GetNoteDriver();
}
-CFWL_AppImp::CFWL_AppImp(IFWL_App* pIface, IFWL_AdapterNative* pAdapter)
+CFWL_AppImp::CFWL_AppImp(IFWL_App* pIface, CXFA_FFApp* pAdapter)
: m_pAdapterNative(pAdapter),
m_pThemeProvider(nullptr),
m_pNoteDriver(new CFWL_NoteDriver),
@@ -72,39 +72,42 @@ FWL_ERR CFWL_AppImp::Finalize() {
m_pWidgetMgr.reset();
return FWL_ERR_Succeeded;
}
-IFWL_AdapterNative* CFWL_AppImp::GetAdapterNative() const {
+CXFA_FFApp* CFWL_AppImp::GetAdapterNative() const {
return m_pAdapterNative;
}
-IFWL_AdapterWidgetMgr* FWL_GetAdapterWidgetMgr() {
+CXFA_FWLAdapterWidgetMgr* FWL_GetAdapterWidgetMgr() {
return static_cast<CFWL_WidgetMgr*>(FWL_GetWidgetMgr())
->GetAdapterWidgetMgr();
}
IFWL_WidgetMgr* CFWL_AppImp::GetWidgetMgr() const {
return m_pWidgetMgr.get();
}
-FWL_ERR CFWL_AppImp::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) {
+void CFWL_AppImp::SetThemeProvider(IFWL_ThemeProvider* pThemeProvider) {
m_pThemeProvider = pThemeProvider;
- return FWL_ERR_Succeeded;
}
-FWL_ERR CFWL_AppImp::Exit(int32_t iExitCode) {
+
+void CFWL_AppImp::Exit(int32_t iExitCode) {
while (m_pNoteDriver->PopNoteLoop()) {
continue;
}
- return m_pWidgetMgr->GetAdapterWidgetMgr()->Exit(0);
}
+
IFWL_ThemeProvider* CFWL_AppImp::GetThemeProvider() const {
return m_pThemeProvider;
}
-IFWL_AdapterNative* FWL_GetAdapterNative() {
+
+CXFA_FFApp* FWL_GetAdapterNative() {
IFWL_App* pApp = FWL_GetApp();
if (!pApp)
return NULL;
return pApp->GetAdapterNative();
}
-static IFWL_App* _theApp = NULL;
+
+static IFWL_App* g_theApp = nullptr;
IFWL_App* FWL_GetApp() {
- return _theApp;
+ return g_theApp;
}
+
void FWL_SetApp(IFWL_App* pApp) {
- _theApp = pApp;
+ g_theApp = pApp;
}