v0.5.0 ad674f5

securitycontext.go RawHistoryFolder

1// Code generated by wlgen; DO NOT EDIT.
2package securitycontext
3
4import (
5	"fmt"
6	"github.com/bnema/purego-libwayland/server"
7)
8
9var WpSecurityContextManagerV1Interface *server.Interface
10var WpSecurityContextV1Interface *server.Interface
11
12func init() {
13	WpSecurityContextManagerV1Interface = &server.Interface{Name: "wp_security_context_manager_v1", Version: 1}
14	WpSecurityContextV1Interface = &server.Interface{Name: "wp_security_context_v1", Version: 1}
15	WpSecurityContextManagerV1Interface.Requests = []server.Message{
16		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
17		{Name: "create_listener", Signature: "nhh", Types: []*server.Interface{WpSecurityContextV1Interface, nil, nil}},
18	}
19	WpSecurityContextManagerV1Interface.Events = []server.Message{}
20	WpSecurityContextV1Interface.Requests = []server.Message{
21		{Name: "destroy", Signature: "", Types: []*server.Interface{}},
22		{Name: "set_sandbox_engine", Signature: "s", Types: []*server.Interface{nil}},
23		{Name: "set_app_id", Signature: "s", Types: []*server.Interface{nil}},
24		{Name: "set_instance_id", Signature: "s", Types: []*server.Interface{nil}},
25		{Name: "commit", Signature: "", Types: []*server.Interface{}},
26	}
27	WpSecurityContextV1Interface.Events = []server.Message{}
28	if err := server.NewInterfaces(WpSecurityContextManagerV1Interface, WpSecurityContextV1Interface); err != nil {
29		panic(err)
30	}
31}
32
33// WpSecurityContextManagerV1 client security context manager.
34type WpSecurityContextManagerV1 struct{ *server.Resource }
35
36func WrapWpSecurityContextManagerV1(r *server.Resource) *WpSecurityContextManagerV1 {
37	if r == nil {
38		return nil
39	}
40	return &WpSecurityContextManagerV1{r}
41}
42
43const WpSecurityContextManagerV1RequestDestroy uint32 = 0
44const WpSecurityContextManagerV1RequestCreateListener uint32 = 1
45
46// WpSecurityContextManagerV1Error .
47type WpSecurityContextManagerV1Error uint32
48
49const (
50	WpSecurityContextManagerV1ErrorInvalidListenFd WpSecurityContextManagerV1Error = 1
51	WpSecurityContextManagerV1ErrorNested          WpSecurityContextManagerV1Error = 2
52)
53
54// WpSecurityContextManagerV1Handler handles wp_security_context_manager_v1 requests.
55type WpSecurityContextManagerV1Handler interface {
56	Destroy(self *WpSecurityContextManagerV1)
57	CreateListener(self *WpSecurityContextManagerV1, id uint32, listenFd int, closeFd int)
58}
59
60func NewWpSecurityContextManagerV1(c server.Client, version int32, id uint32, h WpSecurityContextManagerV1Handler) (*WpSecurityContextManagerV1, error) {
61	if h == nil {
62		return nil, fmt.Errorf("purego-libwayland: nil handler for wp_security_context_manager_v1")
63	}
64	var self *WpSecurityContextManagerV1
65	r, err := c.CreateResource(WpSecurityContextManagerV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
66		switch opcode {
67		case 0:
68			h.Destroy(self)
69			self.Destroy()
70		case 1:
71			h.CreateListener(self, args[0].NewID(), args[1].Fd(), args[2].Fd())
72		}
73	})
74	if err != nil {
75		return nil, err
76	}
77	self = WrapWpSecurityContextManagerV1(r)
78	r.Data = self
79	return self, nil
80}
81func NewWpSecurityContextManagerV1Global(d *server.Display, version int32, bind server.BindFunc) error {
82	return d.CreateGlobal(WpSecurityContextManagerV1Interface, version, bind)
83}
84
85// WpSecurityContextV1 client security context.
86type WpSecurityContextV1 struct{ *server.Resource }
87
88func WrapWpSecurityContextV1(r *server.Resource) *WpSecurityContextV1 {
89	if r == nil {
90		return nil
91	}
92	return &WpSecurityContextV1{r}
93}
94
95const WpSecurityContextV1RequestDestroy uint32 = 0
96const WpSecurityContextV1RequestSetSandboxEngine uint32 = 1
97const WpSecurityContextV1RequestSetAppId uint32 = 2
98const WpSecurityContextV1RequestSetInstanceId uint32 = 3
99const WpSecurityContextV1RequestCommit uint32 = 4
100
101// WpSecurityContextV1Error .
102type WpSecurityContextV1Error uint32
103
104const (
105	WpSecurityContextV1ErrorAlreadyUsed     WpSecurityContextV1Error = 1
106	WpSecurityContextV1ErrorAlreadySet      WpSecurityContextV1Error = 2
107	WpSecurityContextV1ErrorInvalidMetadata WpSecurityContextV1Error = 3
108)
109
110// WpSecurityContextV1Handler handles wp_security_context_v1 requests.
111type WpSecurityContextV1Handler interface {
112	Destroy(self *WpSecurityContextV1)
113	SetSandboxEngine(self *WpSecurityContextV1, name string)
114	SetAppId(self *WpSecurityContextV1, appId string)
115	SetInstanceId(self *WpSecurityContextV1, instanceId string)
116	Commit(self *WpSecurityContextV1)
117}
118
119func NewWpSecurityContextV1(c server.Client, version int32, id uint32, h WpSecurityContextV1Handler) (*WpSecurityContextV1, error) {
120	if h == nil {
121		return nil, fmt.Errorf("purego-libwayland: nil handler for wp_security_context_v1")
122	}
123	var self *WpSecurityContextV1
124	r, err := c.CreateResource(WpSecurityContextV1Interface, version, id, func(_ *server.Resource, opcode uint32, args []server.Arg) {
125		switch opcode {
126		case 0:
127			h.Destroy(self)
128			self.Destroy()
129		case 1:
130			h.SetSandboxEngine(self, args[0].String())
131		case 2:
132			h.SetAppId(self, args[0].String())
133		case 3:
134			h.SetInstanceId(self, args[0].String())
135		case 4:
136			h.Commit(self)
137		}
138	})
139	if err != nil {
140		return nil, err
141	}
142	self = WrapWpSecurityContextV1(r)
143	r.Data = self
144	return self, nil
145}
146func NewWpSecurityContextV1Global(d *server.Display, version int32, bind server.BindFunc) error {
147	return d.CreateGlobal(WpSecurityContextV1Interface, version, bind)
148}
149func resourceOf(v interface{ GetResource() *server.Resource }) *server.Resource {
150	if v == nil {
151		return nil
152	}
153	return v.GetResource()
154}
155func (self *WpSecurityContextManagerV1) GetResource() *server.Resource {
156	if self == nil {
157		return nil
158	}
159	return self.Resource
160}
161func (self *WpSecurityContextV1) GetResource() *server.Resource {
162	if self == nil {
163		return nil
164	}
165	return self.Resource
166}

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 1

Tags 14

↑↓ moveenter openesc close