1 /*
2  *  Copyright (C) 2005-2018 Team Kodi
3  *  This file is part of Kodi - https://kodi.tv
4  *
5  *  SPDX-License-Identifier: GPL-2.0-or-later
6  *  See LICENSES/README.md for more information.
7  */
8 
9 #pragma once
10 
11 #include "guilib/IWindowManagerCallback.h"
12 
13 class CAppParamParser;
14 
15 // Do not change the numbering, external scripts depend on them
16 enum {
17   EXITCODE_QUIT      = 0,
18   EXITCODE_POWERDOWN = 64,
19   EXITCODE_RESTARTAPP= 65,
20   EXITCODE_REBOOT    = 66,
21 };
22 
23 class CXBApplicationEx : public IWindowManagerCallback
24 {
25 public:
26   CXBApplicationEx();
27   ~CXBApplicationEx() override;
28 
29   // Variables for timing
30   bool m_bStop;
31   int  m_ExitCode;
32   bool m_AppFocused;
33   bool m_renderGUI;
34 
35   // Overridable functions for the 3D scene created by the app
Initialize()36   virtual bool Initialize() { return true; }
Cleanup()37   virtual bool Cleanup() { return true; }
38 
39 public:
40   int Run(const CAppParamParser &params);
41   void Destroy();
42 
43 private:
44 };
45 
46