diff options
Diffstat (limited to 'xbmc/windowing/wayland/ShellSurface.cpp')
-rw-r--r-- | xbmc/windowing/wayland/ShellSurface.cpp | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/xbmc/windowing/wayland/ShellSurface.cpp b/xbmc/windowing/wayland/ShellSurface.cpp new file mode 100644 index 0000000..5836689 --- /dev/null +++ b/xbmc/windowing/wayland/ShellSurface.cpp @@ -0,0 +1,35 @@ +/* + * Copyright (C) 2017-2018 Team Kodi + * This file is part of Kodi - https://kodi.tv + * + * SPDX-License-Identifier: GPL-2.0-or-later + * See LICENSES/README.md for more information. + */ + +#include "ShellSurface.h" + +#include "utils/StringUtils.h" + +using namespace KODI::WINDOWING::WAYLAND; + +std::string IShellSurface::StateToString(StateBitset state) +{ + std::vector<std::string> parts; + if (state.test(STATE_ACTIVATED)) + { + parts.emplace_back("activated"); + } + if (state.test(STATE_FULLSCREEN)) + { + parts.emplace_back("fullscreen"); + } + if (state.test(STATE_MAXIMIZED)) + { + parts.emplace_back("maximized"); + } + if (state.test(STATE_RESIZING)) + { + parts.emplace_back("resizing"); + } + return parts.empty() ? "none" : StringUtils::Join(parts, ","); +}
\ No newline at end of file |