Ручное слияние для Windows-клиента: оригинал в dev не попадал с v7.3.1, так как синхронизация v7.3.2-v7.3.4 встала на конфликте lib_ui. Таймер upstream-sync на время слияния остановлен. - lib_ui: форк 7e5d8bc (слияние с оригиналом 1ff7be7). - Версия 7.3.4 без бета-признака: BetaChannel 0, AppBetaVersion false. - mtproto: «плохая конфигурация прокси» теперь учитывает прокси (колбэк рантайма, делегат сессии, соединение); правки session_private перенесены в mtproto/session/private/* (лимиты длины, пустые RPC-ответы, DEBUG_LOG дампов). - update_checker: ограничение размера ответа и отключение HTTP/2 оригинала поверх гонки зеркал форка. - thanos_effect_renderer: версия оригинала (R32F вместо RGBA32F); проверка возможностей — по compute. - download_manager_mtproto: проверка слишком большой части оригинала. - prepare.py: патчи qtsvg и Windows 7 оригинала вместе с patches_extra форка. - Файлы .agents/.claude/.github, удалённые форком, остаются удалёнными. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
96 lines
3 KiB
C++
96 lines
3 KiB
C++
/*
|
|
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 Core {
|
|
enum class QuitReason;
|
|
} // namespace Core
|
|
|
|
namespace Data {
|
|
class LocationPoint;
|
|
} // namespace Data
|
|
|
|
namespace Platform {
|
|
|
|
void start();
|
|
void finish();
|
|
|
|
// Passed to the instance relaunched from its original location after an
|
|
// App Translocation fix, so a relaunch that is still translocated stops
|
|
// instead of trying again.
|
|
inline constexpr auto kUntranslocatedArgument = "-untranslocated";
|
|
|
|
// Returns false when startup must stop right away: the process was
|
|
// started by macOS from a read-only translocated copy of the bundle and
|
|
// either relaunched itself from the original location or told the user.
|
|
[[nodiscard]] bool CheckAppTranslocation();
|
|
|
|
enum class PermissionStatus {
|
|
Granted,
|
|
CanRequest,
|
|
Denied,
|
|
};
|
|
|
|
enum class PermissionType {
|
|
Microphone,
|
|
Camera,
|
|
};
|
|
|
|
enum class SystemSettingsType {
|
|
Audio,
|
|
};
|
|
|
|
void SetApplicationIcon(const QIcon &icon);
|
|
[[nodiscard]] QString SingleInstanceLocalServerName(const QString &hash);
|
|
[[nodiscard]] bool LocalSocketPeerAllowed(qintptr descriptor);
|
|
[[nodiscard]] PermissionStatus GetPermissionStatus(PermissionType type);
|
|
void RequestPermission(PermissionType type, Fn<void(PermissionStatus)> resultCallback);
|
|
void OpenSystemSettingsForPermission(PermissionType type);
|
|
bool OpenSystemSettings(SystemSettingsType type);
|
|
void IgnoreApplicationActivationRightNow();
|
|
[[nodiscard]] int64 ClipboardChangeCount();
|
|
[[nodiscard]] bool AutostartSupported();
|
|
void AutostartRequestStateFromSystem(Fn<void(bool)> callback);
|
|
void AutostartToggle(bool enabled, Fn<void(bool)> done = nullptr);
|
|
void AutostartValidate();
|
|
[[nodiscard]] bool AutostartSkip();
|
|
[[nodiscard]] bool TrayIconSupported();
|
|
[[nodiscard]] bool SkipTaskbarSupported();
|
|
[[nodiscard]] bool ScreenshotProtectionSupported();
|
|
[[nodiscard]] bool AmbientScreenshotProtectionSupported();
|
|
void SetWindowScreenshotProtection(not_null<QWidget*> window, bool enabled);
|
|
void WriteCrashDumpDetails();
|
|
void NewVersionLaunched(int oldVersion);
|
|
[[nodiscard]] QImage DefaultApplicationIcon();
|
|
[[nodiscard]] QString ApplicationIconName();
|
|
[[nodiscard]] bool PreventsQuit(Core::QuitReason reason);
|
|
[[nodiscard]] QString ExecutablePathForShortcuts();
|
|
void LaunchMaps(const Data::LocationPoint &point, Fn<void()> fail);
|
|
[[nodiscard]] QString LocalizedCurrencyName(
|
|
const QString ¤cy,
|
|
const QString &languageId);
|
|
|
|
#if QT_VERSION < QT_VERSION_CHECK(6, 5, 0)
|
|
[[nodiscard]] std::optional<bool> IsDarkMode();
|
|
#endif // Qt < 6.5.0
|
|
|
|
namespace ThirdParty {
|
|
|
|
void start();
|
|
void finish();
|
|
|
|
} // namespace ThirdParty
|
|
} // namespace Platform
|
|
|
|
#ifdef Q_OS_WIN
|
|
#include "platform/win/specific_win.h"
|
|
#elif defined Q_OS_MAC // Q_OS_WIN
|
|
#include "platform/mac/specific_mac.h"
|
|
#else // Q_OS_WIN || Q_OS_MAC
|
|
#include "platform/linux/specific_linux.h"
|
|
#endif // else for Q_OS_WIN || Q_OS_MAC
|