specific_mac.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. This file is part of Telegram Desktop,
  3. the official desktop application for the Telegram messaging service.
  4. For license and copyright information please follow this link:
  5. https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
  6. */
  7. #pragma once
  8. #include "platform/platform_specific.h"
  9. #include "platform/mac/specific_mac_p.h"
  10. namespace Data {
  11. class LocationPoint;
  12. } // namespace Data
  13. namespace Platform {
  14. inline bool AutostartSupported() {
  15. return false;
  16. }
  17. inline void AutostartRequestStateFromSystem(Fn<void(bool)> callback) {
  18. }
  19. inline bool TrayIconSupported() {
  20. return true;
  21. }
  22. inline bool SkipTaskbarSupported() {
  23. return false;
  24. }
  25. void ActivateThisProcess();
  26. inline uint64 ActivationWindowId(not_null<QWidget*> window) {
  27. return 1;
  28. }
  29. inline void ActivateOtherProcess(uint64 processId, uint64 windowId) {
  30. }
  31. inline QString ApplicationIconName() {
  32. return {};
  33. }
  34. inline QString ExecutablePathForShortcuts() {
  35. return cExeDir() + cExeName();
  36. }
  37. namespace ThirdParty {
  38. inline void start() {
  39. }
  40. } // namespace ThirdParty
  41. } // namespace Platform
  42. inline void psCheckLocalSocket(const QString &serverName) {
  43. QFile address(serverName);
  44. if (address.exists()) {
  45. address.remove();
  46. }
  47. }
  48. QString psAppDataPath();
  49. void psSendToMenu(bool send, bool silent = false);
  50. int psCleanup();
  51. int psFixPrevious();
  52. void psDownloadPathEnableAccess();
  53. QByteArray psDownloadPathBookmark(const QString &path);
  54. QByteArray psPathBookmark(const QString &path);
  55. bool psLaunchMaps(const Data::LocationPoint &point);