wlr-foreign-toplevel-management: add support for relaying DBus annotation

This commit is contained in:
Kondor Dániel 2025-02-16 00:19:09 +01:00
parent 52dac9bd09
commit 34d780bf75
2 changed files with 188 additions and 1 deletions

View file

@ -45,6 +45,13 @@ struct wlr_foreign_toplevel_handle_v1_output {
struct wl_listener output_destroy;
};
struct wlr_foreign_toplevel_handle_v1_dbus_annotation {
struct wl_list link;
char *interface;
char *bus_name;
char *object_path;
};
struct wlr_foreign_toplevel_handle_v1 {
struct wlr_foreign_toplevel_manager_v1 *manager;
struct wl_list resources;
@ -57,6 +64,9 @@ struct wlr_foreign_toplevel_handle_v1 {
struct wl_list outputs; // wlr_foreign_toplevel_v1_output.link
uint32_t state; // enum wlr_foreign_toplevel_v1_state
struct wl_list client_dbus_annotations; // wlr_foreign_toplevel_handle_v1_dbus_annotation.link
struct wl_list surface_dbus_annotations; // wlr_foreign_toplevel_handle_v1_dbus_annotation.link
struct {
// struct wlr_foreign_toplevel_handle_v1_maximized_event
struct wl_signal request_maximize;
@ -149,5 +159,34 @@ void wlr_foreign_toplevel_handle_v1_set_parent(
struct wlr_foreign_toplevel_handle_v1 *toplevel,
struct wlr_foreign_toplevel_handle_v1 *parent);
/**
* Add or update a DBus annotation for the client associated with this
* toplevel. Arguements should not be NULL.
*/
void wlr_foreign_toplevel_handle_v1_add_client_dbus_annotation(
struct wlr_foreign_toplevel_handle_v1 *toplevel, const char *interface,
const char *bus_name, const char *object_path);
/**
* Remove an existing DBus annotation for the client associated with
* this toplevel.
*/
void wlr_foreign_toplevel_handle_v1_remove_client_dbus_annotation(
struct wlr_foreign_toplevel_handle_v1 *toplevel, const char *interface);
/**
* Add or update a DBus annotation for this toplevel. Arguements should not be NULL.
*/
void wlr_foreign_toplevel_handle_v1_add_surface_dbus_annotation(
struct wlr_foreign_toplevel_handle_v1 *toplevel, const char *interface,
const char *bus_name, const char *object_path);
/**
* Remove an existing DBus annotation for this toplevel.
*/
void wlr_foreign_toplevel_handle_v1_remove_surface_dbus_annotation(
struct wlr_foreign_toplevel_handle_v1 *toplevel, const char *interface);
#endif