Documentation
¶
Overview ¶
Package server accepts Wayland clients and runs the core protocol objects.
Index ¶
- Variables
- func Event(out *wire.Conn, r wire.Resource, name string, write func(*wire.Encoder)) error
- func KeepFile(r wire.Resource, request string, offset int64, data []byte) error
- func OnDestroy(r wire.Resource, f func() error)
- func Track[T comparable](r wire.Resource, list *[]T, x T)
- type BindFunc
- type Client
- func (c *Client) Add(r wire.Resource) error
- func (c *Client) Conn() *wire.Conn
- func (c *Client) Creds() peercred.Credentials
- func (c *Client) Fail(err error) error
- func (c *Client) Get(id wire.ObjectID) (wire.Resource, bool)
- func (c *Client) Gone() bool
- func (c *Client) JournalFileBytes() int
- func (c *Client) JournalSize() (records, messages int)
- func (c *Client) NewID() (wire.ObjectID, error)
- func (c *Client) Objects() []wire.Resource
- func (c *Client) Remove(id wire.ObjectID) error
- func (c *Client) Restoring() bool
- func (c *Client) SecurityContext() (SecurityContext, bool)
- func (c *Client) String() string
- type ClientState
- type Display
- func (d *Display) AddClient(fd int) (*Client, error)
- func (d *Display) AddGlobal(iface *wire.Interface, version uint32, bind BindFunc) (*Global, error)
- func (d *Display) AddGlobalFor(iface *wire.Interface, version uint32, visible func(*Client) bool, ...) (*Global, error)
- func (d *Display) AddSandbox(listener Listener, closeFD int, ctx SecurityContext) error
- func (d *Display) AppendProtocol(b []byte) ([]byte, error)
- func (d *Display) CheckKeepable(f func(c *Client) string)
- func (d *Display) Clients() []*Client
- func (d *Display) Close() error
- func (d *Display) KeepHandoverJournal()
- func (d *Display) Name() string
- func (d *Display) NextSerial() uint32
- func (d *Display) OnClose(f func() error)
- func (d *Display) OnHandover(f func(c *Client, s *Stream) error)
- func (d *Display) OnPrepareHandover(f func(c *Client, s *Stream) error)
- func (d *Display) OnRetire(f func(c *Client, out *wire.Conn) error)
- func (d *Display) Park() error
- func (d *Display) Path() string
- func (d *Display) RecordProtocol(on bool)
- func (d *Display) RecordingProtocol() bool
- func (d *Display) Restore(st *State, t *handover.FDs) (func() error, error)
- func (d *Display) RestoredClients() []*Client
- func (d *Display) Restrict(ifaces ...*wire.Interface)
- func (d *Display) Resume() error
- func (d *Display) Serial() uint32
- func (d *Display) Snapshot(t *handover.FDs, skip func(*Client) bool) (*State, map[*Client]int, error)
- func (d *Display) StaleAck(serial uint32) bool
- func (d *Display) Unkeepable(skip func(*Client) bool) []Unkeepable
- type Global
- type GlobalState
- type InertObject
- type Listener
- type Options
- type SecurityContext
- type State
- type Stream
- type Unkeepable
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrNotListening = errors.New("not a listening Unix socket")
Functions ¶
func Track ¶
func Track[T comparable](r wire.Resource, list *[]T, x T)
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Creds ¶
func (c *Client) Creds() peercred.Credentials
func (*Client) JournalFileBytes ¶
func (*Client) JournalSize ¶
func (*Client) SecurityContext ¶
func (c *Client) SecurityContext() (SecurityContext, bool)
type ClientState ¶
type Display ¶
type Display struct {
// contains filtered or unexported fields
}
func (*Display) AddGlobalFor ¶
func (*Display) AddSandbox ¶
func (d *Display) AddSandbox(listener Listener, closeFD int, ctx SecurityContext) error
func (*Display) CheckKeepable ¶
func (*Display) KeepHandoverJournal ¶
func (d *Display) KeepHandoverJournal()
func (*Display) NextSerial ¶
func (*Display) OnPrepareHandover ¶
func (*Display) RecordProtocol ¶
func (*Display) RecordingProtocol ¶
func (*Display) RestoredClients ¶
func (*Display) Unkeepable ¶
func (d *Display) Unkeepable(skip func(*Client) bool) []Unkeepable
type InertObject ¶
type Listener ¶
type Listener struct {
// contains filtered or unexported fields
}
func ListeningSocket ¶
type SecurityContext ¶
type State ¶
type State struct {
Name string
Path string
ListenFD int
LockFD int
Serial uint32
Globals []GlobalState
Clients []ClientState
}
type Stream ¶
type Stream struct {
// contains filtered or unexported fields
}
type Unkeepable ¶
Click to show internal directories.
Click to hide internal directories.