/
diev
/
stelegramdesktop-tdesktop
Обзор
Документация
Войти
/
diev
/
stelegramdesktop-tdesktop
Код
Запросы
0
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
dev
Telegram/SourceFiles/platform/linux/linux_desktop_environment.h
44 строки
818 B
Ilya Fedin
Rework DE detection
07 янв 2022, 19:14
07 янв 2022, 19:14
726aa33
Код
Авторство
О чём код?
/* 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, Cinnamon, KDE, Unity, MATE, }; std::vector<Type> Get(); inline bool IsGnome() { return ranges::contains(Get(), Type::Gnome); } 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); } inline bool IsMATE() { return ranges::contains(Get(), Type::MATE); } } // namespace DesktopEnvironment } // namespace Platform