2 * Copyright (C) 2005-2018 Team Kodi
3 * This file is part of Kodi - https://kodi.tv
5 * SPDX-License-Identifier: GPL-2.0-or-later
6 * See LICENSES/README.md for more information.
9 #include "ModuleXbmcgui.h"
11 #include "LanguageHook.h"
12 #include "ServiceBroker.h"
13 #include "guilib/GUIComponent.h"
14 #include "guilib/GUIWindowManager.h"
15 #include "windowing/GraphicContext.h"
19 #define NOTIFICATION_INFO "info"
20 #define NOTIFICATION_WARNING "warning"
21 #define NOTIFICATION_ERROR "error"
27 long getCurrentWindowId()
30 std::unique_lock
<CCriticalSection
> gl(CServiceBroker::GetWinSystem()->GetGfxContext());
31 return CServiceBroker::GetGUI()->GetWindowManager().GetActiveWindow();
34 long getCurrentWindowDialogId()
37 std::unique_lock
<CCriticalSection
> gl(CServiceBroker::GetWinSystem()->GetGfxContext());
38 return CServiceBroker::GetGUI()->GetWindowManager().GetTopmostModalDialog();
41 long getScreenHeight()
44 return CServiceBroker::GetWinSystem()->GetGfxContext().GetHeight();
50 return CServiceBroker::GetWinSystem()->GetGfxContext().GetWidth();
53 const char* getNOTIFICATION_INFO() { return NOTIFICATION_INFO
; }
54 const char* getNOTIFICATION_WARNING() { return NOTIFICATION_WARNING
; }
55 const char* getNOTIFICATION_ERROR() { return NOTIFICATION_ERROR
; }