| OLD | NEW |
| (Empty) |
| 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 #include "xfa/fwl/lightwidget/cfwl_app.h" | |
| 8 | |
| 9 #include "core/fxcrt/include/fx_coordinates.h" | |
| 10 #include "xfa/fwl/core/fwl_error.h" | |
| 11 #include "xfa/fwl/core/ifwl_app.h" | |
| 12 #include "xfa/fwl/lightwidget/cfwl_theme.h" | |
| 13 | |
| 14 CFWL_App::CFWL_App() : m_pIface(IFWL_App::Create(nullptr)), m_pTheme(nullptr) {} | |
| 15 | |
| 16 CFWL_App::~CFWL_App() { | |
| 17 if (m_pTheme) { | |
| 18 m_pTheme->Finalize(); | |
| 19 delete m_pTheme; | |
| 20 } | |
| 21 m_pIface->Release(); | |
| 22 } | |
| 23 | |
| 24 FWL_ERR CFWL_App::Initialize() { | |
| 25 m_pTheme = new CFWL_Theme; | |
| 26 m_pTheme->Initialize(); | |
| 27 m_pIface->SetThemeProvider(m_pTheme); | |
| 28 return m_pIface->Initialize(); | |
| 29 } | |
| 30 | |
| 31 FWL_ERR CFWL_App::Exit(int32_t iExitCode) { | |
| 32 if (!m_pIface) | |
| 33 return FWL_ERR_Indefinite; | |
| 34 return m_pIface->Exit(iExitCode); | |
| 35 } | |
| OLD | NEW |