tdesktop/Telegram/SourceFiles/platform/linux/linux_desktop_environment.h

45 lines
818 B
C
Raw Normal View History

/*
This file is part of Telegram Desktop,
the official desktop application for the Telegram messaging service.
For license and copyright information please follow this link:
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
*/
#pragma once
namespace Platform {
namespace DesktopEnvironment {
enum class Type {
Gnome,
2020-05-29 19:08:45 +00:00
Cinnamon,
KDE,
Unity,
MATE,
};
std::vector<Type> Get();
inline bool IsGnome() {
return ranges::contains(Get(), Type::Gnome);
}
2020-05-29 19:08:45 +00:00
inline bool IsCinnamon() {
return ranges::contains(Get(), Type::Cinnamon);
}
inline bool IsKDE() {
return ranges::contains(Get(), Type::KDE);
}
inline bool IsUnity() {
return ranges::contains(Get(), Type::Unity);
2020-05-29 19:08:45 +00:00
}
inline bool IsMATE() {
return ranges::contains(Get(), Type::MATE);
2020-05-29 19:08:45 +00:00
}
} // namespace DesktopEnvironment
} // namespace Platform