2014-05-30 12:53:19 +04:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2018-01-03 13:23:14 +03:00
|
|
|
the official desktop application for the Telegram messaging service.
|
2014-05-30 12:53:19 +04:00
|
|
|
|
2018-01-03 13:23:14 +03:00
|
|
|
For license and copyright information please follow this link:
|
|
|
|
https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
2014-05-30 12:53:19 +04:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2016-06-16 15:59:54 +03:00
|
|
|
namespace Platform {
|
2016-01-11 23:43:29 +08:00
|
|
|
|
2016-06-16 15:59:54 +03:00
|
|
|
void start();
|
|
|
|
void finish();
|
2018-10-17 09:09:59 +03:00
|
|
|
|
2018-09-30 18:42:50 +03:00
|
|
|
enum class PermissionStatus {
|
|
|
|
Granted,
|
|
|
|
CanRequest,
|
|
|
|
Denied,
|
|
|
|
};
|
2018-10-17 09:09:59 +03:00
|
|
|
|
2018-09-30 18:42:50 +03:00
|
|
|
enum class PermissionType {
|
|
|
|
Microphone,
|
|
|
|
};
|
2016-01-11 23:43:29 +08:00
|
|
|
|
2019-01-05 14:08:02 +03:00
|
|
|
enum class SystemSettingsType {
|
|
|
|
Audio,
|
|
|
|
};
|
|
|
|
|
2016-10-22 17:35:37 +03:00
|
|
|
void SetWatchingMediaKeys(bool watching);
|
2018-08-04 15:06:39 +03:00
|
|
|
bool IsApplicationActive();
|
2018-10-24 12:28:11 +04:00
|
|
|
void SetApplicationIcon(const QIcon &icon);
|
2017-05-02 12:08:08 +03:00
|
|
|
bool TranslucentWindowsSupported(QPoint globalPosition);
|
|
|
|
void StartTranslucentPaint(QPainter &p, QPaintEvent *e);
|
2017-05-02 10:25:20 +03:00
|
|
|
void InitOnTopPanel(QWidget *panel);
|
2017-05-02 12:08:08 +03:00
|
|
|
void DeInitOnTopPanel(QWidget *panel);
|
|
|
|
void ReInitOnTopPanel(QWidget *panel);
|
2018-03-18 12:51:14 +04:00
|
|
|
void RegisterCustomScheme();
|
2018-09-30 18:42:50 +03:00
|
|
|
PermissionStatus GetPermissionStatus(PermissionType type);
|
|
|
|
void RequestPermission(PermissionType type, Fn<void(PermissionStatus)> resultCallback);
|
|
|
|
void OpenSystemSettingsForPermission(PermissionType type);
|
2019-01-05 14:08:02 +03:00
|
|
|
bool OpenSystemSettings(SystemSettingsType type);
|
2017-05-02 10:25:20 +03:00
|
|
|
|
2017-04-13 20:59:05 +03:00
|
|
|
QString SystemLanguage();
|
|
|
|
QString SystemCountry();
|
|
|
|
|
2016-06-16 15:59:54 +03:00
|
|
|
namespace ThirdParty {
|
2016-01-11 23:43:29 +08:00
|
|
|
|
2016-06-16 15:59:54 +03:00
|
|
|
void start();
|
|
|
|
void finish();
|
2016-02-21 17:45:07 +03:00
|
|
|
|
2016-06-16 15:59:54 +03:00
|
|
|
} // namespace ThirdParty
|
|
|
|
} // namespace Platform
|
2017-04-13 20:59:05 +03:00
|
|
|
|
|
|
|
#ifdef Q_OS_MAC
|
|
|
|
#include "platform/mac/specific_mac.h"
|
|
|
|
#elif defined Q_OS_LINUX // Q_OS_MAC
|
|
|
|
#include "platform/linux/specific_linux.h"
|
|
|
|
#elif defined Q_OS_WIN // Q_OS_MAC || Q_OS_LINUX
|
|
|
|
#include "platform/win/specific_win.h"
|
|
|
|
#endif // Q_OS_MAC || Q_OS_LINUX || Q_OS_WIN
|