2014-06-14 23:32:11 +04:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2014-12-01 13:47:38 +03:00
|
|
|
the official desktop version of Telegram messaging app, see https://telegram.org
|
2016-10-02 16:54:27 +03:00
|
|
|
|
2014-06-14 23:32:11 +04:00
|
|
|
Telegram Desktop is free software: you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation, either version 3 of the License, or
|
|
|
|
(at your option) any later version.
|
2016-10-02 16:54:27 +03:00
|
|
|
|
2014-06-14 23:32:11 +04:00
|
|
|
It is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
2016-10-02 16:54:27 +03:00
|
|
|
|
2014-06-14 23:32:11 +04:00
|
|
|
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
2017-01-11 22:31:31 +04:00
|
|
|
Copyright (c) 2014-2017 John Preston, https://desktop.telegram.org
|
2014-06-14 23:32:11 +04:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
2016-11-08 17:07:25 +03:00
|
|
|
// e is NSEvent*
|
|
|
|
bool objc_handleMediaKeyEvent(void *e);
|
2014-06-14 23:32:11 +04:00
|
|
|
|
2014-11-18 15:40:43 +03:00
|
|
|
bool objc_darkMode();
|
2014-10-17 16:57:14 +04:00
|
|
|
void objc_showOverAll(WId winId, bool canFocus = true);
|
|
|
|
void objc_bringToBack(WId winId);
|
|
|
|
|
2014-06-25 11:25:55 +04:00
|
|
|
void objc_debugShowAlert(const QString &str);
|
|
|
|
void objc_outputDebugString(const QString &str);
|
2015-03-02 15:34:16 +03:00
|
|
|
bool objc_idleSupported();
|
2016-12-01 22:20:33 +03:00
|
|
|
bool objc_idleTime(TimeMs &idleTime);
|
2014-06-17 10:06:01 +04:00
|
|
|
|
2014-09-20 14:31:03 -07:00
|
|
|
void objc_start();
|
2017-04-12 14:58:37 +03:00
|
|
|
void objc_ignoreApplicationActivationRightNow();
|
2014-06-18 22:37:44 +04:00
|
|
|
void objc_finish();
|
2014-06-25 11:25:55 +04:00
|
|
|
|
2014-12-03 16:10:32 +03:00
|
|
|
void objc_registerCustomScheme();
|
|
|
|
|
2015-08-12 21:02:20 +03:00
|
|
|
void objc_activateProgram(WId winId);
|
2014-06-25 11:25:55 +04:00
|
|
|
bool objc_moveFile(const QString &from, const QString &to);
|
|
|
|
void objc_deleteDir(const QString &dir);
|
|
|
|
|
2016-01-30 21:24:18 +03:00
|
|
|
double objc_appkitVersion();
|
|
|
|
|
2016-08-31 11:58:46 -06:00
|
|
|
QString objc_documentsPath();
|
2014-06-25 11:25:55 +04:00
|
|
|
QString objc_appDataPath();
|
2014-09-30 07:11:09 -07:00
|
|
|
QString objc_downloadPath();
|
2015-11-26 20:34:52 +03:00
|
|
|
QByteArray objc_downloadPathBookmark(const QString &path);
|
|
|
|
QByteArray objc_pathBookmark(const QString &path);
|
|
|
|
void objc_downloadPathEnableAccess(const QByteArray &bookmark);
|
|
|
|
|
|
|
|
class objc_FileBookmark {
|
|
|
|
public:
|
|
|
|
objc_FileBookmark(const QByteArray &bookmark);
|
|
|
|
bool valid() const;
|
|
|
|
bool enable() const;
|
|
|
|
void disable() const;
|
|
|
|
|
|
|
|
const QString &name(const QString &original) const;
|
|
|
|
QByteArray bookmark() const;
|
|
|
|
|
|
|
|
~objc_FileBookmark();
|
|
|
|
|
2016-08-31 11:58:46 -06:00
|
|
|
private:
|
2016-09-02 12:57:44 -04:00
|
|
|
#ifdef OS_MAC_STORE
|
|
|
|
class objc_FileBookmarkData;
|
2016-08-31 11:58:46 -06:00
|
|
|
objc_FileBookmarkData *data = nullptr;
|
2016-09-02 12:57:44 -04:00
|
|
|
#endif // OS_MAC_STORE
|
2016-08-31 11:58:46 -06:00
|
|
|
|
2015-11-26 20:34:52 +03:00
|
|
|
};
|