2017-09-18 14:33:44 +08:00
|
|
|
/*
|
2018-02-07 11:52:47 +08:00
|
|
|
* Copyright (C) 2011 ~ 2018 Deepin Technology Co., Ltd.
|
2017-09-18 14:33:44 +08:00
|
|
|
*
|
|
|
|
* Author: sbw <sbw@sbw.so>
|
|
|
|
*
|
|
|
|
* Maintainer: sbw <sbw@sbw.so>
|
|
|
|
*
|
|
|
|
* This program 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
|
|
|
|
* any later version.
|
|
|
|
*
|
|
|
|
* This program 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.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU General Public License
|
|
|
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
*/
|
|
|
|
|
2016-06-16 16:56:21 +08:00
|
|
|
#ifndef CONSTANTS_H
|
|
|
|
#define CONSTANTS_H
|
|
|
|
|
2016-06-27 14:33:21 +08:00
|
|
|
#include <QtCore>
|
|
|
|
|
2016-06-21 10:12:43 +08:00
|
|
|
namespace Dock {
|
|
|
|
|
2016-08-08 13:55:00 +08:00
|
|
|
#define DOCK_PLUGIN_MIME "dock/plugin"
|
2022-06-01 21:33:50 +08:00
|
|
|
#define DOCK_PLUGIN_API_VERSION "2.0.0"
|
2016-08-08 13:55:00 +08:00
|
|
|
|
2016-06-27 14:33:21 +08:00
|
|
|
#define PROP_DISPLAY_MODE "DisplayMode"
|
2019-09-03 09:35:11 +08:00
|
|
|
|
|
|
|
#define PLUGIN_BACKGROUND_MAX_SIZE 40
|
|
|
|
#define PLUGIN_BACKGROUND_MIN_SIZE 20
|
|
|
|
|
|
|
|
#define PLUGIN_ICON_MAX_SIZE 20
|
2021-11-06 16:30:46 +08:00
|
|
|
#define PLUGIN_ITEM_WIDTH 300
|
2019-09-05 15:28:39 +08:00
|
|
|
|
2022-10-28 11:03:51 +00:00
|
|
|
#define QUICK_PATH "/plugins/quick-trays"
|
|
|
|
#define PLUGIN_PATH "/plugins"
|
|
|
|
#define TRAY_PATH "/plugins/system-trays"
|
|
|
|
|
2019-09-05 15:28:39 +08:00
|
|
|
// 需求变更成插件图标始终保持20x20,但16x16的资源还在。所以暂时保留此宏
|
|
|
|
#define PLUGIN_ICON_MIN_SIZE 20
|
|
|
|
|
|
|
|
// 插件最小尺寸,图标采用深色
|
|
|
|
#define PLUGIN_MIN_ICON_NAME "-dark"
|
2019-09-06 14:44:07 +08:00
|
|
|
|
2022-08-25 19:31:31 +00:00
|
|
|
// dock最小尺寸
|
|
|
|
#define DOCK_MIN_SIZE 40
|
2019-09-06 14:44:07 +08:00
|
|
|
// dock最大尺寸
|
|
|
|
#define DOCK_MAX_SIZE 100
|
2016-09-07 16:45:57 +08:00
|
|
|
///
|
|
|
|
/// \brief The DisplayMode enum
|
|
|
|
/// spec dock display mode
|
|
|
|
///
|
2019-09-05 15:28:39 +08:00
|
|
|
enum DisplayMode {
|
2016-06-21 10:12:43 +08:00
|
|
|
Fashion = 0,
|
|
|
|
Efficient = 1,
|
|
|
|
// deprecreated
|
|
|
|
// Classic = 2,
|
|
|
|
};
|
|
|
|
|
2016-06-27 14:33:21 +08:00
|
|
|
#define PROP_HIDE_MODE "HideMode"
|
2016-09-07 16:45:57 +08:00
|
|
|
///
|
|
|
|
/// \brief The HideMode enum
|
|
|
|
/// spec dock hide behavior
|
|
|
|
///
|
2019-09-05 15:28:39 +08:00
|
|
|
enum HideMode {
|
2016-06-21 10:12:43 +08:00
|
|
|
KeepShowing = 0,
|
|
|
|
KeepHidden = 1,
|
2022-11-18 17:08:32 +08:00
|
|
|
SmartHide = 2
|
2016-06-21 10:12:43 +08:00
|
|
|
};
|
|
|
|
|
2016-06-27 14:33:21 +08:00
|
|
|
#define PROP_POSITION "Position"
|
2016-09-07 16:45:57 +08:00
|
|
|
///
|
|
|
|
/// \brief The Position enum
|
|
|
|
/// spec dock position, dock always placed at primary screen,
|
|
|
|
/// so all position is the primary screen edge.
|
|
|
|
///
|
2019-09-05 15:28:39 +08:00
|
|
|
enum Position {
|
2016-06-21 10:12:43 +08:00
|
|
|
Top = 0,
|
|
|
|
Right = 1,
|
|
|
|
Bottom = 2,
|
|
|
|
Left = 3,
|
|
|
|
};
|
|
|
|
|
2016-06-27 14:33:21 +08:00
|
|
|
#define PROP_HIDE_STATE "HideState"
|
2016-09-07 16:45:57 +08:00
|
|
|
///
|
|
|
|
/// \brief The HideState enum
|
|
|
|
/// spec current dock should hide or shown.
|
|
|
|
/// this argument works only HideMode is SmartHide
|
|
|
|
///
|
2019-09-05 15:28:39 +08:00
|
|
|
enum HideState {
|
2016-06-21 10:12:43 +08:00
|
|
|
Unknown = 0,
|
|
|
|
Show = 1,
|
|
|
|
Hide = 2,
|
2016-06-16 16:56:21 +08:00
|
|
|
};
|
|
|
|
|
2022-08-25 19:31:31 +00:00
|
|
|
enum class AniAction {
|
|
|
|
Show = 0,
|
|
|
|
Hide
|
|
|
|
};
|
|
|
|
|
2020-09-07 23:51:50 +08:00
|
|
|
#define IS_TOUCH_STATE "isTouchState"
|
|
|
|
|
2016-06-21 10:12:43 +08:00
|
|
|
}
|
|
|
|
|
2016-06-27 14:33:21 +08:00
|
|
|
Q_DECLARE_METATYPE(Dock::DisplayMode)
|
|
|
|
Q_DECLARE_METATYPE(Dock::Position)
|
|
|
|
|
2016-06-16 16:56:21 +08:00
|
|
|
#endif // CONSTANTS_H
|