2021-01-05 20:19:31 +01:00
|
|
|
/*
|
|
|
|
* This an unstable interface of wlroots. No guarantees are made regarding the
|
|
|
|
* future consistency of this API.
|
|
|
|
*/
|
|
|
|
#ifndef WLR_USE_UNSTABLE
|
|
|
|
#error "Add -DWLR_USE_UNSTABLE to enable unstable wlroots features"
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef WLR_TYPES_WLR_XDG_FOREIGN_V1_H
|
|
|
|
#define WLR_TYPES_WLR_XDG_FOREIGN_V1_H
|
|
|
|
|
|
|
|
#include <wayland-server-core.h>
|
|
|
|
#include <wlr/types/wlr_xdg_foreign_registry.h>
|
|
|
|
|
|
|
|
struct wlr_xdg_foreign_v1 {
|
|
|
|
struct {
|
|
|
|
struct wl_global *global;
|
2022-05-24 18:46:59 +02:00
|
|
|
struct wl_list objects; // wlr_xdg_exported_v1.link or wlr_xdg_imported_v1.link
|
2021-01-05 20:19:31 +01:00
|
|
|
} exporter, importer;
|
|
|
|
|
|
|
|
struct wl_listener foreign_registry_destroy;
|
|
|
|
struct wl_listener display_destroy;
|
|
|
|
|
|
|
|
struct wlr_xdg_foreign_registry *registry;
|
|
|
|
|
|
|
|
struct {
|
|
|
|
struct wl_signal destroy;
|
|
|
|
} events;
|
|
|
|
|
|
|
|
void *data;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct wlr_xdg_exported_v1 {
|
|
|
|
struct wlr_xdg_foreign_exported base;
|
|
|
|
|
|
|
|
struct wl_resource *resource;
|
xdg-{shell,decoration}: improve events
This commit changes the behavior of `new_*` signals to better match
their names (see https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3608).
wlr_xdg_shell.events.new_surface is now emitted when an xdg_surface is
created, and wlr_xdg_shell.events.new_{toplevel,popup} events are
introduced to get notified when an xdg_{toplevel,popup} is created.
Same applies to
`wlr_xdg_decoration_manager_v1.events.new_toplevel_decoration`. As a
result, wlr_xdg_surface.added and wlr_xdg_toplevel_decoration_v1.added
are removed, as we no longer need to track whether the corresponding
event was emitted.
Additionally, this commit changes the behavior of
wlr_xdg_surface.events.destroy: it is now emitted when the xdg_surface
is destroyed, as the name suggests.
wlr_xdg_{toplevel,popup}.events.destroy events are added to get
notified when an xdg_{toplevel,popup} is destroyed.
2023-09-05 15:14:25 +02:00
|
|
|
struct wl_listener xdg_toplevel_destroy;
|
2021-01-05 20:19:31 +01:00
|
|
|
|
2022-05-24 18:46:59 +02:00
|
|
|
struct wl_list link; // wlr_xdg_foreign_v1.exporter.objects
|
2021-01-05 20:19:31 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
struct wlr_xdg_imported_v1 {
|
|
|
|
struct wlr_xdg_foreign_exported *exported;
|
|
|
|
struct wl_listener exported_destroyed;
|
|
|
|
|
|
|
|
struct wl_resource *resource;
|
2022-05-24 18:46:59 +02:00
|
|
|
struct wl_list link; // wlr_xdg_foreign_v1.importer.objects
|
2021-01-05 20:19:31 +01:00
|
|
|
struct wl_list children;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct wlr_xdg_imported_child_v1 {
|
|
|
|
struct wlr_xdg_imported_v1 *imported;
|
|
|
|
struct wlr_surface *surface;
|
|
|
|
|
2022-05-24 18:46:59 +02:00
|
|
|
struct wl_list link; // wlr_xdg_imported_v1.children
|
2021-01-05 20:19:31 +01:00
|
|
|
|
xdg-{shell,decoration}: improve events
This commit changes the behavior of `new_*` signals to better match
their names (see https://gitlab.freedesktop.org/wlroots/wlroots/-/issues/3608).
wlr_xdg_shell.events.new_surface is now emitted when an xdg_surface is
created, and wlr_xdg_shell.events.new_{toplevel,popup} events are
introduced to get notified when an xdg_{toplevel,popup} is created.
Same applies to
`wlr_xdg_decoration_manager_v1.events.new_toplevel_decoration`. As a
result, wlr_xdg_surface.added and wlr_xdg_toplevel_decoration_v1.added
are removed, as we no longer need to track whether the corresponding
event was emitted.
Additionally, this commit changes the behavior of
wlr_xdg_surface.events.destroy: it is now emitted when the xdg_surface
is destroyed, as the name suggests.
wlr_xdg_{toplevel,popup}.events.destroy events are added to get
notified when an xdg_{toplevel,popup} is destroyed.
2023-09-05 15:14:25 +02:00
|
|
|
struct wl_listener xdg_toplevel_destroy;
|
2021-01-05 20:19:31 +01:00
|
|
|
struct wl_listener xdg_toplevel_set_parent;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct wlr_xdg_foreign_v1 *wlr_xdg_foreign_v1_create(
|
|
|
|
struct wl_display *display, struct wlr_xdg_foreign_registry *registry);
|
|
|
|
|
|
|
|
#endif
|