main f2d166b

lease.go RawHistoryFolder

1package ports
2
3import "os"
4
5// LeaseConnector identifies a non-desktop connector available for DRM leasing.
6type LeaseConnector struct {
7	Card, Name, Description string
8	ConnectorID             uint32
9}
10
11// LeaseMessage is an adapter-to-adapter DRM lease channel message.
12type LeaseMessage interface{ leaseMessage() }
13
14// LeaseConnectors replaces the available connector inventory for Card.
15// Device is a non-master DRM fd owned by the receiver, which closes it.
16// An empty Connectors list with nil Device removes the card's global and closes
17// the display's fd. A later nonempty inventory creates a new global.
18type LeaseConnectors struct {
19	Card       string
20	Device     *os.File
21	Connectors []LeaseConnector
22}
23
24func (LeaseConnectors) leaseMessage() {}
25
26// CloseLeaseFiles closes the fd a lease message owns, for a message that is
27// dropped instead of delivered.
28func CloseLeaseFiles(msg LeaseMessage) {
29	switch m := msg.(type) {
30	case LeaseConnectors:
31		if m.Device != nil {
32			m.Device.Close()
33		}
34	case LeaseReply:
35		if m.FD != nil {
36			m.FD.Close()
37		}
38	}
39}
40
41type LeaseRequest struct {
42	ID         uint64
43	Card       string
44	Connectors []string
45}
46
47func (LeaseRequest) leaseMessage() {}
48
49// LeaseReply transfers ownership of FD to Wayland.
50type LeaseReply struct {
51	ID      uint64
52	FD      *os.File
53	LeaseID uint32
54	Err     error
55}
56
57func (LeaseReply) leaseMessage() {}
58
59type LeaseRevoke struct {
60	Card    string
61	LeaseID uint32
62}
63
64func (LeaseRevoke) leaseMessage() {}
65
66type LeaseFinished struct {
67	Card    string
68	LeaseID uint32
69}
70
71func (LeaseFinished) leaseMessage() {}

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 25

Tags 10

↑↓ moveenter openesc close