kodi
WindowDialogMixin.h
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 "Window.h"
12 
13 // These messages are a side effect of the way dialogs work through the
14 // main ApplicationMessenger. At some point it would be nice to remove
15 // the messenger and have direct (or even drive) communications.
16 #define HACK_CUSTOM_ACTION_CLOSING -3
17 #define HACK_CUSTOM_ACTION_OPENING -4
18 
19 namespace XBMCAddon
20 {
21  namespace xbmcgui
22  {
24  {
25  private:
26  Window* w;
27 
28  protected:
29  inline explicit WindowDialogMixin(Window* window) : w(window) {}
30 
31  public:
32  virtual ~WindowDialogMixin() = default;
33 
34  SWIGHIDDENVIRTUAL void show();
35  SWIGHIDDENVIRTUAL void close();
36 
37 #ifndef SWIG
38  SWIGHIDDENVIRTUAL bool IsDialogRunning() const;
39  SWIGHIDDENVIRTUAL bool OnAction(const CAction &action);
40 #endif
41  };
42  }
43 }
SWIGHIDDENVIRTUAL bool OnAction(const CAction &action)
Definition: WindowDialogMixin.cpp:44
Definition: WindowDialogMixin.h:23
Class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:21
Defining LOG_LIFECYCLE_EVENTS will log all instantiations, deletions and also reference countings (in...
Definition: Addon.cpp:25
Definition: Window.h:186