hyprland/global_shortcuts: add GlobalShortcut

This commit is contained in:
outfoxxed 2024-05-06 22:05:46 -07:00
parent 87a884ca36
commit bba8cb8a7d
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E
14 changed files with 569 additions and 6 deletions

View file

@ -0,0 +1,32 @@
#pragma once
#include <qobject.h>
#include <qtclasshelpermacros.h>
#include <qtmetamacros.h>
#include <qtypes.h>
#include <qwayland-hyprland-global-shortcuts-v1.h>
namespace qs::hyprland::global_shortcuts::impl {
class GlobalShortcut
: public QObject
, public QtWayland::hyprland_global_shortcut_v1 {
Q_OBJECT;
public:
explicit GlobalShortcut(::hyprland_global_shortcut_v1* shortcut);
~GlobalShortcut() override;
Q_DISABLE_COPY_MOVE(GlobalShortcut);
signals:
void pressed();
void released();
private:
// clang-format off
void hyprland_global_shortcut_v1_pressed(quint32 tvSecHi, quint32 tvSecLo, quint32 tvNsec) override;
void hyprland_global_shortcut_v1_released(quint32 tvSecHi, quint32 tvSecLo, quint32 tvNsec) override;
// clang-format on
};
} // namespace qs::hyprland::global_shortcuts::impl