eis

package
v0.3.9 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2026 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package eis is an EIS server: the receiving end of libei, which remote-desktop clients prefer over the portal's Notify* D-Bus calls. A portal's ConnectToEIS hands the app one end of a socket pair; Serve speaks the ei protocol on the other, advertises a named seat with a pointer and a keyboard, and replays what the client emulates onto a Handler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Pair

func Pair(h Handler, seat string) (*os.File, error)

Pair makes a socket pair, serves h on one end as seat and returns the other for the client.

func Serve

func Serve(conn *net.UnixConn, h Handler, seat string) error

Serve runs the protocol on conn until the client disconnects, advertising a seat called seat whose devices are seat-keyboard and seat-pointer. A clean disconnect is nil.

Types

type Handler

type Handler interface {
	Motion(dx, dy float64)
	Button(code uint32, pressed bool)
	// Scroll is smooth scrolling in logical pixels.
	Scroll(dx, dy float64)
	// ScrollDiscrete is wheel scrolling in 120ths of a detent.
	ScrollDiscrete(dx, dy int32)
	// ScrollStop ends the smooth scrolling on the axes set (the
	// fingers lifted); a cancel ends it the same way.
	ScrollStop(x, y bool)
	Key(code uint32, pressed bool)
	Keysym(sym uint32, pressed bool)
}

Handler receives the emulated input.

Jump to

Keyboard shortcuts

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