xdg-desktop-portal-hyprland/include/global_shortcuts.h

31 lines
766 B
C
Raw Normal View History

2023-03-26 01:20:47 +01:00
#pragma once
2023-03-26 17:16:56 +02:00
#include <stdbool.h>
2023-03-26 01:20:47 +01:00
#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;
2023-03-26 17:16:56 +02:00
bool bound;
2023-03-26 01:20:47 +01:00
};
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);