2014-06-14 19:32:11 +00:00
|
|
|
/*
|
|
|
|
This file is part of Telegram Desktop,
|
2014-12-01 10:47:38 +00:00
|
|
|
the official desktop version of Telegram messaging app, see https://telegram.org
|
2014-06-14 19:32:11 +00: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.
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
Full license: https://github.com/telegramdesktop/tdesktop/blob/master/LICENSE
|
2016-02-08 10:56:18 +00:00
|
|
|
Copyright (c) 2014-2016 John Preston, https://desktop.telegram.org
|
2014-06-14 19:32:11 +00:00
|
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
class PsMacWindowData;
|
|
|
|
|
|
|
|
class PsMacWindowPrivate {
|
|
|
|
public:
|
|
|
|
|
|
|
|
PsMacWindowPrivate();
|
|
|
|
|
2014-06-25 07:25:55 +00:00
|
|
|
void setWindowBadge(const QString &str);
|
2014-06-14 19:32:11 +00:00
|
|
|
void startBounce();
|
2014-09-20 21:31:03 +00:00
|
|
|
|
|
|
|
void updateDelegate();
|
2014-06-14 19:32:11 +00:00
|
|
|
|
2015-03-19 11:24:23 +00:00
|
|
|
void showNotify(uint64 peer, int32 msgId, const QPixmap &pix, const QString &title, const QString &subtitle, const QString &msg, bool withReply);
|
2014-06-25 07:25:55 +00:00
|
|
|
void clearNotifies(uint64 peer = 0);
|
2014-06-15 12:31:03 +00:00
|
|
|
|
|
|
|
void enableShadow(WId winId);
|
2015-07-13 17:55:59 +00:00
|
|
|
|
|
|
|
bool filterNativeEvent(void *event);
|
|
|
|
|
2014-06-14 19:32:11 +00:00
|
|
|
virtual void activeSpaceChanged() {
|
|
|
|
}
|
2014-11-18 12:40:43 +00:00
|
|
|
virtual void darkModeChanged() {
|
|
|
|
}
|
2015-03-19 11:24:23 +00:00
|
|
|
virtual void notifyClicked(unsigned long long peer, int msgid) {
|
2014-06-14 19:32:11 +00:00
|
|
|
}
|
2015-03-19 11:24:23 +00:00
|
|
|
virtual void notifyReplied(unsigned long long peer, int msgid, const char *str) {
|
2014-06-14 19:32:11 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
~PsMacWindowPrivate();
|
|
|
|
|
|
|
|
PsMacWindowData *data;
|
|
|
|
|
|
|
|
};
|
|
|
|
|
2014-10-17 12:57:14 +00:00
|
|
|
void objc_holdOnTop(WId winId);
|
2014-11-18 12:40:43 +00:00
|
|
|
bool objc_darkMode();
|
2014-10-17 12:57:14 +00:00
|
|
|
void objc_showOverAll(WId winId, bool canFocus = true);
|
|
|
|
void objc_bringToBack(WId winId);
|
|
|
|
void objc_activateWnd(WId winId);
|
|
|
|
|
2014-06-25 07:25:55 +00:00
|
|
|
void objc_debugShowAlert(const QString &str);
|
|
|
|
void objc_outputDebugString(const QString &str);
|
2015-03-02 12:34:16 +00:00
|
|
|
bool objc_idleSupported();
|
2015-01-26 13:04:41 +00:00
|
|
|
bool objc_idleTime(int64 &idleTime);
|
2014-06-17 06:06:01 +00:00
|
|
|
|
2015-01-21 10:20:23 +00:00
|
|
|
bool objc_showOpenWithMenu(int x, int y, const QString &file);
|
|
|
|
|
2014-06-25 07:25:55 +00:00
|
|
|
void objc_showInFinder(const QString &file, const QString &path);
|
|
|
|
void objc_openFile(const QString &file, bool openwith);
|
2014-09-20 21:31:03 +00:00
|
|
|
void objc_start();
|
2014-06-18 18:37:44 +00:00
|
|
|
void objc_finish();
|
2014-06-25 07:25:55 +00:00
|
|
|
bool objc_execUpdater();
|
2016-01-30 18:24:18 +00:00
|
|
|
void objc_execTelegram(const QString &crashreport);
|
2014-06-25 07:25:55 +00:00
|
|
|
|
2014-12-03 13:10:32 +00:00
|
|
|
void objc_registerCustomScheme();
|
|
|
|
|
2015-08-12 18:02:20 +00:00
|
|
|
void objc_activateProgram(WId winId);
|
2014-06-25 07:25:55 +00:00
|
|
|
bool objc_moveFile(const QString &from, const QString &to);
|
|
|
|
void objc_deleteDir(const QString &dir);
|
|
|
|
|
2016-01-30 18:24:18 +00:00
|
|
|
double objc_appkitVersion();
|
|
|
|
|
2014-06-25 07:25:55 +00:00
|
|
|
QString objc_appDataPath();
|
2014-09-30 14:11:09 +00:00
|
|
|
QString objc_downloadPath();
|
2014-06-25 07:25:55 +00:00
|
|
|
QString objc_currentCountry();
|
|
|
|
QString objc_currentLang();
|
2014-09-30 14:13:47 +00:00
|
|
|
QString objc_convertFileUrl(const QString &url);
|
2015-11-26 17:34:52 +00: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();
|
|
|
|
|
|
|
|
};
|