xdg_foreign

package
v0.0.0-...-1fbd8b4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 29, 2024 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Exported

type Exported struct {
	client.BaseProxy
	// contains filtered or unexported fields
}

Exported : 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.

func NewExported

func NewExported(ctx *client.Context) *Exported

NewExported : 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.

func (*Exported) Destroy

func (i *Exported) Destroy() error

Destroy : unexport the exported surface

Revoke the previously exported surface. This invalidates any relationship the importer may have set up using the xdg_imported created given the handle sent via xdg_exported.handle.

func (*Exported) Dispatch

func (i *Exported) Dispatch(opcode uint32, fd int, data []byte)

func (*Exported) SetHandleHandler

func (i *Exported) SetHandleHandler(f ExportedHandleHandlerFunc)

SetHandleHandler : sets handler for ExportedHandleEvent

type ExportedHandleEvent

type ExportedHandleEvent struct {
	Handle string
}

ExportedHandleEvent : the exported surface handle

The handle event contains the unique handle of this exported surface reference. It may be shared with any client, which then can use it to import the surface by calling xdg_importer.import. A handle may be used to import the surface multiple times.

type ExportedHandleHandlerFunc

type ExportedHandleHandlerFunc func(ExportedHandleEvent)

type Exporter

type Exporter struct {
	client.BaseProxy
}

Exporter : interface for exporting surfaces

A global interface used for exporting surfaces that can later be imported using xdg_importer.

func NewExporter

func NewExporter(ctx *client.Context) *Exporter

NewExporter : interface for exporting surfaces

A global interface used for exporting surfaces that can later be imported using xdg_importer.

func (*Exporter) Destroy

func (i *Exporter) Destroy() error

Destroy : destroy the xdg_exporter object

Notify the compositor that the xdg_exporter object will no longer be used.

func (*Exporter) Export

func (i *Exporter) Export(surface *client.Surface) (*Exported, error)

Export : export a surface

The export request exports the passed surface so that it can later be imported via xdg_importer. When called, a new xdg_exported object will be created and xdg_exported.handle will be sent immediately. See the corresponding interface and event for details.

A surface may be exported multiple times, and each exported handle may be used to create an xdg_imported multiple times. Only xdg_surface surfaces may be exported.

surface: the surface to export

type Imported

type Imported struct {
	client.BaseProxy
	// contains filtered or unexported fields
}

Imported : 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.

func NewImported

func NewImported(ctx *client.Context) *Imported

NewImported : 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.

func (*Imported) Destroy

func (i *Imported) Destroy() error

Destroy : destroy the xdg_imported object

Notify the compositor that it will no longer use the xdg_imported object. Any relationship that may have been set up will at this point be invalidated.

func (*Imported) Dispatch

func (i *Imported) Dispatch(opcode uint32, fd int, data []byte)

func (*Imported) SetDestroyedHandler

func (i *Imported) SetDestroyedHandler(f ImportedDestroyedHandlerFunc)

SetDestroyedHandler : sets handler for ImportedDestroyedEvent

func (*Imported) SetParentOf

func (i *Imported) SetParentOf(surface *client.Surface) error

SetParentOf : set as the parent of some surface

Set the imported surface as the parent of some surface of the client. The passed surface must be a toplevel xdg_surface. Calling this function sets up a surface to surface relation with the same stacking and positioning semantics as xdg_surface.set_parent.

surface: the child surface

type ImportedDestroyedEvent

type ImportedDestroyedEvent struct{}

ImportedDestroyedEvent : the imported surface handle has been destroyed

The imported surface handle has been destroyed and any relationship set up has been invalidated. This may happen for various reasons, for example if the exported surface or the exported surface handle has been destroyed, if the handle used for importing was invalid.

type ImportedDestroyedHandlerFunc

type ImportedDestroyedHandlerFunc func(ImportedDestroyedEvent)

type Importer

type Importer struct {
	client.BaseProxy
}

Importer : 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.

func NewImporter

func NewImporter(ctx *client.Context) *Importer

NewImporter : 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.

func (*Importer) Destroy

func (i *Importer) Destroy() error

Destroy : destroy the xdg_importer object

Notify the compositor that the xdg_importer object will no longer be used.

func (*Importer) Import

func (i *Importer) Import(handle string) (*Imported, error)

Import : import a surface

The import request imports a surface from any client given a handle retrieved by exporting said surface using xdg_exporter.export. When called, a new xdg_imported object will be created. This new object represents the imported surface, and the importing client can manipulate its relationship using it. See xdg_imported for details.

handle: the exported surface handle

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL