File indexing completed on 2024-09-29 10:47:56
0001 /* 0002 * SPDX-FileCopyrightText: 2022 Aleix Pol Gonzalez <aleixpol@kde.org> 0003 * 0004 * SPDX-License-Identifier: LGPL-2.0-or-later 0005 */ 0006 0007 #pragma once 0008 0009 #include <QDBusAbstractAdaptor> 0010 #include <QDBusObjectPath> 0011 0012 #include "dbushelpers.h" 0013 0014 class GlobalShortcutsPortal : public QDBusAbstractAdaptor 0015 { 0016 Q_OBJECT 0017 Q_DISABLE_COPY(GlobalShortcutsPortal) 0018 Q_CLASSINFO("D-Bus Interface", "org.freedesktop.impl.portal.GlobalShortcuts") 0019 Q_PROPERTY(uint version READ version CONSTANT) 0020 public: 0021 explicit GlobalShortcutsPortal(QObject *parent); 0022 ~GlobalShortcutsPortal() override; 0023 0024 uint version() const; 0025 0026 public Q_SLOTS: 0027 uint BindShortcuts(const QDBusObjectPath &handle, 0028 const QDBusObjectPath &session_handle, 0029 const Shortcuts &shortcuts, 0030 const QString &parent_window, 0031 const QVariantMap &options, 0032 QVariantMap &results); 0033 uint CreateSession(const QDBusObjectPath &handle, 0034 const QDBusObjectPath &session_handle, 0035 const QString &app_id, 0036 const QVariantMap &options, 0037 QVariantMap &results); 0038 uint ListShortcuts(const QDBusObjectPath &handle, const QDBusObjectPath &session_handle, QVariantMap &results); 0039 0040 Q_SIGNALS: 0041 void Activated(const QDBusObjectPath &session_handle, const QString &shortcutId, quint64 timestamp, const QVariantMap &unused = {}); 0042 void Deactivated(const QDBusObjectPath &session_handle, const QString &shortcutId, quint64 timestamp, const QVariantMap &unused = {}); 0043 void ShortcutsChanged(const QDBusObjectPath &session_handle, const Shortcuts &shortcuts); 0044 };