xdg_foreign_unstable_v2 ↗
Copyright
Copyright © 2015-2016 Red Hat Inc. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice (including the next paragraph) shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
- zxdg_exporter_v2 — interface for exporting surfaces
- zxdg_importer_v2 — interface for importing surfaces
- zxdg_exported_v2 — an exported surface handle
- zxdg_imported_v2 — an imported surface handle
Protocol for exporting xdg surface handles
This protocol specifies a way for making it possible to reference a surface of a different client. With such a reference, a client can, by using the interfaces provided by this protocol, manipulate the relationship between its own surfaces and the surface of some other client. For example, stack some of its own surface above the other clients surface.
In order for a client A to get a reference of a surface of client B, client B must first export its surface using xdg_exporter.export_toplevel. Upon doing this, client B will receive a handle (a unique string) that it may share with client A in some way (for example D-Bus). After client A has received the handle from client B, it may use xdg_importer.import_toplevel to create a reference to the surface client B just exported. See the corresponding requests for details.
A possible use case for this is out-of-process dialogs. For example when a sandboxed client without file system access needs the user to select a file on the file system, given sandbox environment support, it can export its surface, passing the exported surface handle to an unsandboxed process that can show a file browser dialog and stack it above the sandboxed client's surface.
Warning! The protocol described in this file is experimental and backward incompatible changes may be made. Backward compatible changes may be added together with the corresponding interface version bump. Backward incompatible changes are done by bumping the version number in the protocol and interface names and resetting the interface version. Once the protocol is to be declared stable, the 'z' prefix and the version number in the protocol and interface names are removed and the interface version number is reset.
xdg_foreign_unstable_v2
zxdg_exporter_v2
- destroy — destroy the xdg_exporter object
- error — error values
- export_toplevel — export a toplevel surface
interface for exporting surfaces
A global interface used for exporting surfaces that can later be imported using xdg_importer.
xdg_foreign_unstable_v2
zxdg_importer_v2
- destroy — destroy the xdg_importer object
- import_toplevel — import a toplevel surface
interface for importing surfaces
A global interface used for importing surfaces exported by xdg_exporter. With this interface, a client can create a reference to a surface of another client.
xdg_foreign_unstable_v2
zxdg_exported_v2
an exported surface handle
An xdg_exported object represents an exported reference to a surface. The exported surface may be referenced as long as the xdg_exported object not destroyed. Destroying the xdg_exported invalidates any relationship the importer may have established using xdg_imported.
xdg_foreign_unstable_v2
zxdg_imported_v2
- error — error values
- destroy — destroy the xdg_imported object
- set_parent_of — set as the parent of some surface
- destroyed — the imported surface handle has been destroyed
an imported surface handle
An xdg_imported object represents an imported reference to surface exported by some client. A client can use this interface to manipulate relationships between its own surfaces and the imported surface.