11 #include "DirtyRegionTracker.h" 15 #include "guilib/WindowIDs.h" 16 #include "messaging/IMessageTarget.h" 19 #include <unordered_map> 26 #ifdef TARGET_WINDOWS_STORE 29 enum class DialogModalityType;
30 #ifdef TARGET_WINDOWS_STORE 38 class CApplicationMessenger;
42 #define WINDOW_ID_MASK 0xffff 56 bool SendMessage(
int message,
int senderID,
int destID,
int param1 = 0,
int param2 = 0);
64 void ActivateWindow(
int iWindowID,
const std::string &strPath =
"");
65 void ForceActivateWindow(
int iWindowID,
const std::string &strPath =
"");
66 void ChangeActiveWindow(
int iNewID,
const std::string &strPath =
"");
67 void ActivateWindow(
int iWindowID,
const std::vector<std::string>& params,
bool swappingWindows =
false,
bool force =
false);
68 void PreviousWindow();
76 bool SwitchToFullScreen(
bool force =
false);
78 void CloseDialogs(
bool forceClose =
false)
const;
79 void CloseInternalModalDialogs(
bool forceClose =
false)
const;
82 int GetMessageMask()
override;
87 bool OnAction(
const CAction &action)
const;
91 void Process(
unsigned int currentTime);
99 void MarkDirty(
const CRect& rect);
108 void RenderEx()
const;
129 void CreateWindows();
135 bool DestroyWindows();
141 void DestroyWindow(
int id);
151 typename std::enable_if<std::is_base_of<CGUIWindow, T>::value>::type* =
nullptr>
152 T* GetWindow(
int id)
const 154 return dynamic_cast<T*
>(GetWindow(
id));
179 void RemoveDialog(
int id);
186 int GetTopmostDialog(
bool ignoreClosing =
false)
const;
193 int GetTopmostModalDialog(
bool ignoreClosing =
false)
const;
195 void SendThreadMessage(
CGUIMessage& message,
int window = 0);
196 void DispatchThreadMessages();
199 int RemoveThreadMessageByMessageIds(
int *pMessageIDList);
201 int GetActiveWindow()
const;
202 int GetActiveWindowOrDialog()
const;
203 bool HasModalDialog(
bool ignoreClosing)
const;
204 bool HasVisibleModalDialog()
const;
205 bool IsDialogTopmost(
int id,
bool modal =
false)
const;
206 bool IsDialogTopmost(
const std::string &xmlFile,
bool modal =
false)
const;
207 bool IsModalDialogTopmost(
int id)
const;
208 bool IsModalDialogTopmost(
const std::string &xmlFile)
const;
209 bool IsWindowActive(
int id,
bool ignoreClosing =
true)
const;
210 bool IsWindowVisible(
int id)
const;
211 bool IsWindowActive(
const std::string &xmlFile,
bool ignoreClosing =
true)
const;
212 bool IsWindowVisible(
const std::string &xmlFile)
const;
217 bool IsAddonWindow(
int id)
const {
return (
id >= WINDOW_ADDON_START &&
id <= WINDOW_ADDON_END); }
222 bool IsPythonWindow(
int id)
const 224 return (
id >= WINDOW_PYTHON_START &&
id <= WINDOW_PYTHON_END);
227 bool HasVisibleControls();
230 void DumpTextureUse();
233 void RenderPass()
const;
235 void LoadNotOnDemandWindows();
236 void UnloadNotOnDemandWindows();
237 void AddToWindowHistory(
int newWindowID);
246 void RemoveFromWindowHistory(
int windowID);
247 void ClearWindowHistory();
248 void CloseWindowSync(
CGUIWindow *window,
int nextWindowID = 0);
249 int GetTopmostDialog(
bool modal,
bool ignoreClosing)
const;
260 void ActivateWindow_Internal(
int windowID,
const std::vector<std::string> ¶ms,
bool swappingWindows,
bool force =
false);
262 bool ProcessRenderLoop(
bool renderOnly);
264 bool HandleAction(
const CAction &action)
const;
266 std::unordered_map<int, CGUIWindow*> m_mapWindows;
267 std::vector<CGUIWindow*> m_vecCustomWindows;
268 std::vector<CGUIWindow*> m_activeDialogs;
269 std::vector<CGUIWindow*> m_deleteWindows;
271 std::deque<int> m_windowHistory;
274 std::list< std::pair<CGUIMessage*,int> > m_vecThreadMessages;
275 CCriticalSection m_critSection;
276 std::vector<IMsgTargetCallback*> m_vecMsgTargets;
280 mutable bool m_touchGestureActive{
false};
281 mutable bool m_inhibitTouchGestureEvents{
false};
283 CDirtyRegionList m_dirtyregions;
Definition: DirtyRegionTracker.h:19
A class wishing to receive messages should implement this and call.
Definition: IMessageTarget.h:23
Definition: IWindowManagerCallback.h:20
Definition: ThreadMessage.h:25
Definition: IMsgTargetCallback.h:22
Definition: GUIWindowManager.h:48
class encapsulating information regarding a particular user action to be sent to windows and controls...
Definition: Action.h:22
Definition: GUIDialog.h:35
Controller configuration window.
Definition: AudioDecoder.h:18
bool Initialized() const
Return whether the window manager is initialized. The window manager is initialized on skin load - if...
Definition: GUIWindowManager.h:125
Definition: GUIMessage.h:365
Definition: GUIWindow.h:58
This implements a simple message dispatcher/router for Kodi.
Definition: ApplicationMessenger.h:226