Building GXDE Arch Package / detect (push) Skipped
Building GXDE Arch Package / aarch64-arch (push) Skipped
Building GXDE Arch Package / x86_64-arch (push) Skipped
Building GXDE Testing Package / call-arch (push) Skipped
Building Program / call (push) Skipped
Building GXDE Testing Package / call-zhuangzhuang (push) Skipped
Building GXDE Testing Package (zhuangzhuang) / call-i386-zhuangzhuang (push) Skipped
Building GXDE Testing Package (zhuangzhuang) / call-amd64-zhuangzhuang (push) Skipped
Building GXDE Testing Package (zhuangzhuang) / call-arm64-zhuangzhuang (push) Skipped
Building GXDE Testing Package (zhuangzhuang) / call-riscv64-zhuangzhuang (push) Skipped
Building GXDE Testing Package (zhuangzhuang) / call-loong64-zhuangzhuang (push) Skipped
Building GXDE Package / ${{ inputs.display-name || 'Build Job' }} (push) Skipped
- 会话列表拖拽排序/多选/批量删除 - 128k/1024k token 上下文上限 - 待办取消置顶;全屏隐藏联动 - 英文回退翻译补齐;新应用图标 - DTK 关于窗口、分词/朗读对话框、消息常驻操作
52 lines
1.4 KiB
C++
52 lines
1.4 KiB
C++
// SPDX-FileCopyrightText: 2026 GXDE OS Team
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
#pragma once
|
|
|
|
#include <QObject>
|
|
#include <QRect>
|
|
|
|
/**
|
|
* Client for the compositor side "portal" (org.gxde.Portal).
|
|
*
|
|
* Start with \a beginPortal() while a drag hovers the portal zone. The
|
|
* compositor opens the window overview in portal mode and forwards the drag
|
|
* to the window under the cursor, so the target application receives a real
|
|
* wl_data_device drop at the cursor position.
|
|
*/
|
|
class PortalClient : public QObject
|
|
{
|
|
Q_OBJECT
|
|
|
|
public:
|
|
static PortalClient *instance();
|
|
|
|
bool available() const { return m_available; }
|
|
|
|
/** @return true when the compositor opened the overview. */
|
|
bool beginPortal(const QRect &panelRect = QRect());
|
|
void cancelPortal();
|
|
|
|
/** Filter the drag mime types we want to react to. */
|
|
static bool mimeInteresting(const QString &mimeTypes);
|
|
|
|
signals:
|
|
void dragStarted(const QString &mimeTypes);
|
|
void dragEnded();
|
|
void portalClosed();
|
|
void fullscreenChanged(bool fullscreen);
|
|
void dropped(const QString &uuid, bool accepted);
|
|
|
|
private slots:
|
|
void onDragStarted(const QString &mimeTypes);
|
|
void onDragEnded();
|
|
void onPortalClosed();
|
|
void onFullscreenChanged(bool fullscreen);
|
|
void onDropped(const QString &uuid, bool accepted);
|
|
|
|
private:
|
|
explicit PortalClient(QObject *parent = nullptr);
|
|
|
|
bool m_available = false;
|
|
};
|