v0.2.0 4c97002

adapters_gen.go RawHistoryFolder

1// Code generated by pipewiregen. DO NOT EDIT.
2
3package capi
4
5import "unsafe"
6
7
8// InitCAPIAdapter forwards calls to the generated CAPI variables.
9type InitCAPIAdapter struct{}
10
11func (a *InitCAPIAdapter) PWInit(argc *int32, argv ***byte) {
12	pw_init(argc, argv)
13}
14
15func (a *InitCAPIAdapter) PWDeinit() {
16	pw_deinit()
17}
18
19
20// LoopCAPIAdapter forwards calls to the generated CAPI variables.
21type LoopCAPIAdapter struct{}
22
23func (a *LoopCAPIAdapter) PWMainLoopNew(props unsafe.Pointer) unsafe.Pointer {
24	return pw_main_loop_new(props)
25}
26
27func (a *LoopCAPIAdapter) PWMainLoopDestroy(loop unsafe.Pointer) {
28	pw_main_loop_destroy(loop)
29}
30
31func (a *LoopCAPIAdapter) PWMainLoopRun(loop unsafe.Pointer) int32 {
32	return pw_main_loop_run(loop)
33}
34
35func (a *LoopCAPIAdapter) PWMainLoopQuit(loop unsafe.Pointer) int32 {
36	return pw_main_loop_quit(loop)
37}
38
39func (a *LoopCAPIAdapter) PWMainLoopGetLoop(loop unsafe.Pointer) unsafe.Pointer {
40	return pw_main_loop_get_loop(loop)
41}
42
43
44// StreamPlaybackCAPIAdapter forwards calls to the generated CAPI variables.
45type StreamPlaybackCAPIAdapter struct{}
46
47func (a *StreamPlaybackCAPIAdapter) PWStreamNewSimple(context unsafe.Pointer, name *byte, props unsafe.Pointer, events unsafe.Pointer, data unsafe.Pointer) unsafe.Pointer {
48	return pw_stream_new_simple(context, name, props, events, data)
49}
50
51func (a *StreamPlaybackCAPIAdapter) PWStreamConnect(stream unsafe.Pointer, direction int32, id uint32, flags uint32, ports unsafe.Pointer, n_ports uint32) int32 {
52	return pw_stream_connect(stream, direction, id, flags, ports, n_ports)
53}
54
55func (a *StreamPlaybackCAPIAdapter) PWStreamSetActive(stream unsafe.Pointer, active bool) int32 {
56	return pw_stream_set_active(stream, active)
57}
58
59func (a *StreamPlaybackCAPIAdapter) PWStreamDisconnect(stream unsafe.Pointer) int32 {
60	return pw_stream_disconnect(stream)
61}
62
63func (a *StreamPlaybackCAPIAdapter) PWStreamDequeueBuffer(stream unsafe.Pointer) unsafe.Pointer {
64	return pw_stream_dequeue_buffer(stream)
65}
66
67func (a *StreamPlaybackCAPIAdapter) PWStreamQueueBuffer(stream unsafe.Pointer, buffer unsafe.Pointer) int32 {
68	return pw_stream_queue_buffer(stream, buffer)
69}
70
71func (a *StreamPlaybackCAPIAdapter) PWStreamAddListener(stream unsafe.Pointer, listener unsafe.Pointer, events unsafe.Pointer, data unsafe.Pointer) int32 {
72	return pw_stream_add_listener(stream, listener, events, data)
73}
74
75func (a *StreamPlaybackCAPIAdapter) PWStreamDestroy(stream unsafe.Pointer) {
76	pw_stream_destroy(stream)
77}
78
79
80// VideoCAPIAdapter forwards calls to the generated CAPI variables.
81type VideoCAPIAdapter struct{}
82
83func (a *VideoCAPIAdapter) PWLoopNew(props unsafe.Pointer) unsafe.Pointer {
84	return pw_loop_new(props)
85}
86
87func (a *VideoCAPIAdapter) PWLoopDestroy(loop unsafe.Pointer) {
88	pw_loop_destroy(loop)
89}
90
91func (a *VideoCAPIAdapter) PWLoopGetFd(loop unsafe.Pointer) int32 {
92	return pw_loop_get_fd(loop)
93}
94
95func (a *VideoCAPIAdapter) PWLoopEnter(loop unsafe.Pointer) {
96	pw_loop_enter(loop)
97}
98
99func (a *VideoCAPIAdapter) PWLoopLeave(loop unsafe.Pointer) {
100	pw_loop_leave(loop)
101}
102
103func (a *VideoCAPIAdapter) PWLoopIterate(loop unsafe.Pointer, timeout int32) int32 {
104	return pw_loop_iterate(loop, timeout)
105}
106
107func (a *VideoCAPIAdapter) PWContextNew(loop unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer {
108	return pw_context_new(loop, props, user_data_size)
109}
110
111func (a *VideoCAPIAdapter) PWContextConnect(context unsafe.Pointer, props unsafe.Pointer, user_data_size uintptr) unsafe.Pointer {
112	return pw_context_connect(context, props, user_data_size)
113}
114
115func (a *VideoCAPIAdapter) PWContextDestroy(context unsafe.Pointer) {
116	pw_context_destroy(context)
117}
118
119func (a *VideoCAPIAdapter) PWCoreDisconnect(core unsafe.Pointer) int32 {
120	return pw_core_disconnect(core)
121}
122
123func (a *VideoCAPIAdapter) PWPropertiesNewString(args *byte) unsafe.Pointer {
124	return pw_properties_new_string(args)
125}
126
127func (a *VideoCAPIAdapter) PWStreamNew(core unsafe.Pointer, name *byte, props unsafe.Pointer) unsafe.Pointer {
128	return pw_stream_new(core, name, props)
129}
130
131func (a *VideoCAPIAdapter) PWStreamUpdateParams(stream unsafe.Pointer, params unsafe.Pointer, n_params uint32) int32 {
132	return pw_stream_update_params(stream, params, n_params)
133}
134
135func (a *VideoCAPIAdapter) PWStreamGetNodeId(stream unsafe.Pointer) uint32 {
136	return pw_stream_get_node_id(stream)
137}
138
139func (a *VideoCAPIAdapter) PWStreamTriggerProcess(stream unsafe.Pointer) int32 {
140	return pw_stream_trigger_process(stream)
141}
142
143func (a *VideoCAPIAdapter) PWStreamIsDriving(stream unsafe.Pointer) bool {
144	return pw_stream_is_driving(stream)
145}
146
147func (a *VideoCAPIAdapter) PWStreamReturnBuffer(stream unsafe.Pointer, buffer unsafe.Pointer) int32 {
148	return pw_stream_return_buffer(stream, buffer)
149}
150
151
152
153// defaultCAPI implements the portout.CAPI composite interface by embedding
154// all generated group adapters. It is constructed by newDefaultCAPI.
155type defaultCAPI struct {
156	InitCAPIAdapter
157	LoopCAPIAdapter
158	StreamPlaybackCAPIAdapter
159	VideoCAPIAdapter
160}
161
162// newDefaultCAPI returns a defaultCAPI whose embedded adapters forward
163// every method to the corresponding generated C function variable.
164func newDefaultCAPI() *defaultCAPI {
165	return &defaultCAPI{}
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 8

↑↓ moveenter openesc close