Documentation for <wlr/types/wlr_xdg_foreign_registry.h>

Back to index

Table of contents

struct wlr_xdg_foreign_exported

struct wlr_xdg_foreign_exported {
	struct wl_list link; // wlr_xdg_foreign_registry.exported_surfaces
	struct wlr_xdg_foreign_registry *registry;
	
	struct wlr_surface *surface;
	
	char handle[];
	
	struct {
		struct wl_signal destroy;
	} events;
};

wlr_xdg_foreign_exported_finish()

void wlr_xdg_foreign_exported_finish(​struct wlr_xdg_foreign_exported *surface);

Remove the given surface from the registry it was previously added in.

wlr_xdg_foreign_exported_init()

bool wlr_xdg_foreign_exported_init(​struct wlr_xdg_foreign_exported *surface, struct wlr_xdg_foreign_registry *registry);

WLR_XDG_FOREIGN_HANDLE_SIZE

#define WLR_XDG_FOREIGN_HANDLE_SIZE

struct wlr_xdg_foreign_registry

struct wlr_xdg_foreign_registry {
	struct wl_list exported_surfaces; // struct wlr_xdg_foreign_exported_surface
	
	struct wl_listener display_destroy;
	struct {
		struct wl_signal destroy;
	} events;
};

struct wlr_xdg_foreign_registry is used for storing a list of exported surfaces with the xdg-foreign family of protocols.

It can be used to allow interoperability between clients using different versions of the protocol (if all versions use the same registry).

wlr_xdg_foreign_registry_create()

struct wlr_xdg_foreign_registry *wlr_xdg_foreign_registry_create(​struct wl_display *display);

Create an empty struct wlr_xdg_foreign_registry.

It will be destroyed when the associated display is destroyed.

wlr_xdg_foreign_registry_find_by_handle()

struct wlr_xdg_foreign_exported *wlr_xdg_foreign_registry_find_by_handle(​struct wlr_xdg_foreign_registry *registry, const char *handle);

Find an exported surface with the given handle, or NULL if such a surface does not exist.