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