2023-04-28 21:41:41 +01:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-only */
|
2023-05-13 16:10:33 +03:00
|
|
|
#ifndef LABWC_WINDOW_RULES_H
|
|
|
|
|
#define LABWC_WINDOW_RULES_H
|
2023-04-28 21:41:41 +01:00
|
|
|
|
2024-04-22 04:58:57 +09:00
|
|
|
#include <stdbool.h>
|
|
|
|
|
#include <wayland-util.h>
|
|
|
|
|
|
2023-04-28 21:41:41 +01:00
|
|
|
enum window_rule_event {
|
|
|
|
|
LAB_WINDOW_RULE_EVENT_ON_FIRST_MAP = 0,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
enum property {
|
|
|
|
|
LAB_PROP_UNSPECIFIED = 0,
|
|
|
|
|
LAB_PROP_UNSET,
|
|
|
|
|
LAB_PROP_FALSE,
|
|
|
|
|
LAB_PROP_TRUE,
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
* 'identifier' represents:
|
|
|
|
|
* - 'app_id' for native Wayland windows
|
|
|
|
|
* - 'WM_CLASS' for XWayland clients
|
|
|
|
|
*/
|
|
|
|
|
struct window_rule {
|
|
|
|
|
char *identifier;
|
2023-05-09 21:20:05 +01:00
|
|
|
char *title;
|
2024-04-19 20:15:49 +02:00
|
|
|
int window_type;
|
2024-05-16 12:52:47 +03:00
|
|
|
char *sandbox_engine;
|
|
|
|
|
char *sandbox_app_id;
|
2023-06-07 21:44:38 +01:00
|
|
|
bool match_once;
|
2023-04-28 21:41:41 +01:00
|
|
|
|
|
|
|
|
enum window_rule_event event;
|
|
|
|
|
struct wl_list actions;
|
|
|
|
|
|
|
|
|
|
enum property server_decoration;
|
2023-05-20 10:20:36 +01:00
|
|
|
enum property skip_taskbar;
|
|
|
|
|
enum property skip_window_switcher;
|
2023-09-03 14:01:40 +02:00
|
|
|
enum property ignore_focus_request;
|
2024-04-13 20:36:09 +02:00
|
|
|
enum property ignore_configure_request;
|
2023-11-09 21:44:51 +00:00
|
|
|
enum property fixed_position;
|
2023-04-28 21:41:41 +01:00
|
|
|
|
|
|
|
|
struct wl_list link; /* struct rcxml.window_rules */
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
struct view;
|
|
|
|
|
|
|
|
|
|
void window_rules_apply(struct view *view, enum window_rule_event event);
|
|
|
|
|
enum property window_rules_get_property(struct view *view, const char *property);
|
|
|
|
|
|
2023-05-13 16:10:33 +03:00
|
|
|
#endif /* LABWC_WINDOW_RULES_H */
|