mirror of
https://git.outfoxxed.me/quickshell/quickshell.git
synced 2025-11-04 19:04:56 +11:00
hyprland/global_shortcuts: add GlobalShortcut
This commit is contained in:
parent
87a884ca36
commit
bba8cb8a7d
14 changed files with 569 additions and 6 deletions
33
src/wayland/hyprland/global_shortcuts/shortcut.cpp
Normal file
33
src/wayland/hyprland/global_shortcuts/shortcut.cpp
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
#include "shortcut.hpp"
|
||||
|
||||
#include <qtmetamacros.h>
|
||||
#include <qtypes.h>
|
||||
#include <wayland-hyprland-global-shortcuts-v1-client-protocol.h>
|
||||
|
||||
namespace qs::hyprland::global_shortcuts::impl {
|
||||
|
||||
GlobalShortcut::GlobalShortcut(::hyprland_global_shortcut_v1* shortcut) { this->init(shortcut); }
|
||||
|
||||
GlobalShortcut::~GlobalShortcut() {
|
||||
if (this->isInitialized()) {
|
||||
this->destroy();
|
||||
}
|
||||
}
|
||||
|
||||
void GlobalShortcut::hyprland_global_shortcut_v1_pressed(
|
||||
quint32 /*unused*/,
|
||||
quint32 /*unused*/,
|
||||
quint32 /*unused*/
|
||||
) {
|
||||
emit this->pressed();
|
||||
}
|
||||
|
||||
void GlobalShortcut::hyprland_global_shortcut_v1_released(
|
||||
quint32 /*unused*/,
|
||||
quint32 /*unused*/,
|
||||
quint32 /*unused*/
|
||||
) {
|
||||
emit this->released();
|
||||
}
|
||||
|
||||
} // namespace qs::hyprland::global_shortcuts::impl
|
||||
Loading…
Add table
Add a link
Reference in a new issue