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

114 lines
2.2 KiB
C
Raw Normal View History

2014-07-08 10:24:21 +00:00
/*
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
2014-07-08 10:24:21 +00:00
*/
#pragma once
#include "platform/platform_specific.h"
#include <signal.h>
2019-06-21 12:27:46 +00:00
namespace Data {
class LocationPoint;
} // namespace Data
namespace Platform {
inline void SetWatchingMediaKeys(bool watching) {
}
2020-06-01 08:34:51 +00:00
bool InFlatpak();
bool InSnap();
bool InAppImage();
bool IsStaticBinary();
bool UseGtkIntegration();
bool IsGtkIntegrationForced();
bool UseGtkFileDialog();
2020-05-14 17:03:36 +00:00
bool IsQtPluginsBundled();
2020-01-29 17:41:42 +00:00
bool IsXDGDesktopPortalPresent();
bool UseXDGDesktopPortal();
bool CanOpenDirectoryWithPortal();
2020-01-29 17:41:42 +00:00
QString ProcessNameByPID(const QString &pid);
QString RealExecutablePath(int argc, char *argv[]);
QString AppRuntimeDirectory();
QString GetLauncherBasename();
QString GetLauncherFilename();
QString GetIconName();
2019-09-16 11:14:06 +00:00
inline void IgnoreApplicationActivationRightNow() {
}
void FallbackFontConfigCheckBegin();
void FallbackFontConfigCheckEnd();
} // namespace Platform
2014-07-08 10:24:21 +00:00
inline void psCheckLocalSocket(const QString &serverName) {
QFile address(serverName);
2014-07-08 10:24:21 +00:00
if (address.exists()) {
address.remove();
}
}
2016-01-30 18:24:42 +00:00
void psWriteDump();
void psDeleteDir(const QString &dir);
2014-07-08 10:24:21 +00:00
QStringList psInitLogs();
void psClearInitLogs();
void psActivateProcess(uint64 pid = 0);
2014-07-08 10:24:21 +00:00
QString psLocalServerPrefix();
QString psAppDataPath();
void psAutoStart(bool start, bool silent = false);
void psSendToMenu(bool send, bool silent = false);
2014-07-08 10:24:21 +00:00
QRect psDesktopRect();
2014-07-08 10:24:21 +00:00
int psCleanup();
int psFixPrevious();
void psNewVersion();
inline QByteArray psDownloadPathBookmark(const QString &path) {
return QByteArray();
}
inline QByteArray psPathBookmark(const QString &path) {
return QByteArray();
}
inline void psDownloadPathEnableAccess() {
}
class PsFileBookmark {
public:
PsFileBookmark(const QByteArray &bookmark) {
}
bool check() const {
return true;
}
bool enable() const {
return true;
}
void disable() const {
}
const QString &name(const QString &original) const {
return original;
}
QByteArray bookmark() const {
return QByteArray();
}
};
bool linuxMoveFile(const char *from, const char *to);
2019-06-21 12:27:46 +00:00
bool psLaunchMaps(const Data::LocationPoint &point);