xdg-desktop-portal-hyprland/include/global_shortcuts.h
Vaxry 510257c0e9
[WIP] Global Shortcuts impl (#35)
Implements the `GlobalShortcuts` portal via `hyprland-global-shortcuts-v1`

---------

Co-authored-by: Mihai Fufezan <fufexan@protonmail.com>
2023-04-09 13:47:05 +01:00

31 lines
No EOL
766 B
C

#pragma once
#include <stdbool.h>
#include "protocols/hyprland-global-shortcuts-v1-client-protocol.h"
struct xdpw_state;
struct xdpw_session;
struct globalShortcut {
char* name;
char* description;
struct wl_list link;
struct hyprland_global_shortcut_v1* hlShortcut;
bool bound;
};
struct globalShortcutsClient {
struct xdpw_session* session;
struct wl_list shortcuts; // struct globalShortcut*
struct wl_list link;
char* parent_window;
bool sentShortcuts;
};
struct globalShortcutsInstance {
struct hyprland_global_shortcuts_manager_v1* manager;
struct wl_list shortcutClients; // struct globalShortcutsClient*
};
void initShortcutsInstance(struct xdpw_state* state, struct globalShortcutsInstance* instance);