v0.2.1 c0399be

gdatagrambased.go RawHistoryFolder

1// Package gio was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gio
3
4import (
5	"structs"
6	"unsafe"
7
8	"github.com/ebitengine/purego"
9
10	"github.com/bnema/puregotk/pkg/core"
11	"github.com/bnema/puregotk/v4/glib"
12	"github.com/bnema/puregotk/v4/gobject/types"
13)
14
15// Provides an interface for socket-like objects which have datagram semantics,
16// following the Berkeley sockets API. The interface methods are thin wrappers
17// around the corresponding virtual methods, and no pre-processing of inputs is
18// implemented — so implementations of this API must handle all functionality
19// documented in the interface methods.
20type DatagramBasedInterface struct {
21	_ structs.HostLayout
22
23	GIface uintptr
24
25	xReceiveMessages uintptr
26
27	xSendMessages uintptr
28
29	xCreateSource uintptr
30
31	xConditionCheck uintptr
32
33	xConditionWait uintptr
34}
35
36func (x *DatagramBasedInterface) GoPointer() uintptr {
37	return uintptr(unsafe.Pointer(x))
38}
39
40// OverrideReceiveMessages sets the "receive_messages" callback function.
41// Virtual method for g_datagram_based_receive_messages().
42func (x *DatagramBasedInterface) OverrideReceiveMessages(cb func(DatagramBased, []InputMessage, uint, int, int64, *Cancellable) int) {
43	if cb == nil {
44		x.xReceiveMessages = 0
45	} else {
46		x.xReceiveMessages = purego.NewCallback(func(DatagramBasedVarp uintptr, MessagesVarp []InputMessage, NumMessagesVarp uint, FlagsVarp int, TimeoutVarp int64, CancellableVarp uintptr) int {
47			return cb(&DatagramBasedBase{Ptr: DatagramBasedVarp}, MessagesVarp, NumMessagesVarp, FlagsVarp, TimeoutVarp, CancellableNewFromInternalPtr(CancellableVarp))
48		})
49	}
50}
51
52// GetReceiveMessages gets the "receive_messages" callback function.
53// Virtual method for g_datagram_based_receive_messages().
54func (x *DatagramBasedInterface) GetReceiveMessages() func(DatagramBased, []InputMessage, uint, int, int64, *Cancellable) int {
55	if x.xReceiveMessages == 0 {
56		return nil
57	}
58	var rawCallback func(DatagramBasedVarp uintptr, MessagesVarp []InputMessage, NumMessagesVarp uint, FlagsVarp int, TimeoutVarp int64, CancellableVarp uintptr) int
59	purego.RegisterFunc(&rawCallback, x.xReceiveMessages)
60	return func(DatagramBasedVar DatagramBased, MessagesVar []InputMessage, NumMessagesVar uint, FlagsVar int, TimeoutVar int64, CancellableVar *Cancellable) int {
61		return rawCallback(DatagramBasedVar.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, TimeoutVar, CancellableVar.GoPointer())
62	}
63}
64
65// OverrideSendMessages sets the "send_messages" callback function.
66// Virtual method for g_datagram_based_send_messages().
67func (x *DatagramBasedInterface) OverrideSendMessages(cb func(DatagramBased, []OutputMessage, uint, int, int64, *Cancellable) int) {
68	if cb == nil {
69		x.xSendMessages = 0
70	} else {
71		x.xSendMessages = purego.NewCallback(func(DatagramBasedVarp uintptr, MessagesVarp []OutputMessage, NumMessagesVarp uint, FlagsVarp int, TimeoutVarp int64, CancellableVarp uintptr) int {
72			return cb(&DatagramBasedBase{Ptr: DatagramBasedVarp}, MessagesVarp, NumMessagesVarp, FlagsVarp, TimeoutVarp, CancellableNewFromInternalPtr(CancellableVarp))
73		})
74	}
75}
76
77// GetSendMessages gets the "send_messages" callback function.
78// Virtual method for g_datagram_based_send_messages().
79func (x *DatagramBasedInterface) GetSendMessages() func(DatagramBased, []OutputMessage, uint, int, int64, *Cancellable) int {
80	if x.xSendMessages == 0 {
81		return nil
82	}
83	var rawCallback func(DatagramBasedVarp uintptr, MessagesVarp []OutputMessage, NumMessagesVarp uint, FlagsVarp int, TimeoutVarp int64, CancellableVarp uintptr) int
84	purego.RegisterFunc(&rawCallback, x.xSendMessages)
85	return func(DatagramBasedVar DatagramBased, MessagesVar []OutputMessage, NumMessagesVar uint, FlagsVar int, TimeoutVar int64, CancellableVar *Cancellable) int {
86		return rawCallback(DatagramBasedVar.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, TimeoutVar, CancellableVar.GoPointer())
87	}
88}
89
90// OverrideCreateSource sets the "create_source" callback function.
91// Virtual method for g_datagram_based_create_source().
92func (x *DatagramBasedInterface) OverrideCreateSource(cb func(DatagramBased, glib.IOCondition, *Cancellable) *glib.Source) {
93	if cb == nil {
94		x.xCreateSource = 0
95	} else {
96		x.xCreateSource = purego.NewCallback(func(DatagramBasedVarp uintptr, ConditionVarp glib.IOCondition, CancellableVarp uintptr) *glib.Source {
97			return cb(&DatagramBasedBase{Ptr: DatagramBasedVarp}, ConditionVarp, CancellableNewFromInternalPtr(CancellableVarp))
98		})
99	}
100}
101
102// GetCreateSource gets the "create_source" callback function.
103// Virtual method for g_datagram_based_create_source().
104func (x *DatagramBasedInterface) GetCreateSource() func(DatagramBased, glib.IOCondition, *Cancellable) *glib.Source {
105	if x.xCreateSource == 0 {
106		return nil
107	}
108	var rawCallback func(DatagramBasedVarp uintptr, ConditionVarp glib.IOCondition, CancellableVarp uintptr) *glib.Source
109	purego.RegisterFunc(&rawCallback, x.xCreateSource)
110	return func(DatagramBasedVar DatagramBased, ConditionVar glib.IOCondition, CancellableVar *Cancellable) *glib.Source {
111		return rawCallback(DatagramBasedVar.GoPointer(), ConditionVar, CancellableVar.GoPointer())
112	}
113}
114
115// OverrideConditionCheck sets the "condition_check" callback function.
116// Virtual method for g_datagram_based_condition_check().
117func (x *DatagramBasedInterface) OverrideConditionCheck(cb func(DatagramBased, glib.IOCondition) glib.IOCondition) {
118	if cb == nil {
119		x.xConditionCheck = 0
120	} else {
121		x.xConditionCheck = purego.NewCallback(func(DatagramBasedVarp uintptr, ConditionVarp glib.IOCondition) glib.IOCondition {
122			return cb(&DatagramBasedBase{Ptr: DatagramBasedVarp}, ConditionVarp)
123		})
124	}
125}
126
127// GetConditionCheck gets the "condition_check" callback function.
128// Virtual method for g_datagram_based_condition_check().
129func (x *DatagramBasedInterface) GetConditionCheck() func(DatagramBased, glib.IOCondition) glib.IOCondition {
130	if x.xConditionCheck == 0 {
131		return nil
132	}
133	var rawCallback func(DatagramBasedVarp uintptr, ConditionVarp glib.IOCondition) glib.IOCondition
134	purego.RegisterFunc(&rawCallback, x.xConditionCheck)
135	return func(DatagramBasedVar DatagramBased, ConditionVar glib.IOCondition) glib.IOCondition {
136		return rawCallback(DatagramBasedVar.GoPointer(), ConditionVar)
137	}
138}
139
140// OverrideConditionWait sets the "condition_wait" callback function.
141// Virtual method for
142//
143//	g_datagram_based_condition_wait().
144func (x *DatagramBasedInterface) OverrideConditionWait(cb func(DatagramBased, glib.IOCondition, int64, *Cancellable) bool) {
145	if cb == nil {
146		x.xConditionWait = 0
147	} else {
148		x.xConditionWait = purego.NewCallback(func(DatagramBasedVarp uintptr, ConditionVarp glib.IOCondition, TimeoutVarp int64, CancellableVarp uintptr) bool {
149			return cb(&DatagramBasedBase{Ptr: DatagramBasedVarp}, ConditionVarp, TimeoutVarp, CancellableNewFromInternalPtr(CancellableVarp))
150		})
151	}
152}
153
154// GetConditionWait gets the "condition_wait" callback function.
155// Virtual method for
156//
157//	g_datagram_based_condition_wait().
158func (x *DatagramBasedInterface) GetConditionWait() func(DatagramBased, glib.IOCondition, int64, *Cancellable) bool {
159	if x.xConditionWait == 0 {
160		return nil
161	}
162	var rawCallback func(DatagramBasedVarp uintptr, ConditionVarp glib.IOCondition, TimeoutVarp int64, CancellableVarp uintptr) bool
163	purego.RegisterFunc(&rawCallback, x.xConditionWait)
164	return func(DatagramBasedVar DatagramBased, ConditionVar glib.IOCondition, TimeoutVar int64, CancellableVar *Cancellable) bool {
165		return rawCallback(DatagramBasedVar.GoPointer(), ConditionVar, TimeoutVar, CancellableVar.GoPointer())
166	}
167}
168
169// Interface for socket-like objects with datagram semantics.
170//
171// A `GDatagramBased` is a networking interface for representing datagram-based
172// communications. It is a more or less direct mapping of the core parts of the
173// BSD socket API in a portable GObject interface. It is implemented by
174// [class@Gio.Socket], which wraps the UNIX socket API on UNIX and winsock2 on Windows.
175//
176// `GDatagramBased` is entirely platform independent, and is intended to be used
177// alongside higher-level networking APIs such as [class@Gio.IOStream].
178//
179// It uses vectored scatter/gather I/O by default, allowing for many messages
180// to be sent or received in a single call. Where possible, implementations of
181// the interface should take advantage of vectored I/O to minimise processing
182// or system calls. For example, `GSocket` uses `recvmmsg()` and `sendmmsg()`
183// where possible. Callers should take advantage of scatter/gather I/O (the use of
184// multiple buffers per message) to avoid unnecessary copying of data to
185// assemble or disassemble a message.
186//
187// Each `GDatagramBased` operation has a timeout parameter which may be negative
188// for blocking behaviour, zero for non-blocking behaviour, or positive for
189// timeout behaviour. A blocking operation blocks until finished or there is an
190// error. A non-blocking operation will return immediately with a
191// `G_IO_ERROR_WOULD_BLOCK` error if it cannot make progress. A timeout operation
192// will block until the operation is complete or the timeout expires; if the
193// timeout expires it will return what progress it made, or
194// `G_IO_ERROR_TIMED_OUT` if no progress was made. To know when a call would
195// successfully run you can call [method@Gio.DatagramBased.condition_check] or
196// [method@Gio.DatagramBased.condition_wait]. You can also use
197// [method@Gio.DatagramBased.create_source] and attach it to a [struct@GLib.MainContext]
198// to get callbacks when I/O is possible.
199//
200// When running a non-blocking operation applications should always be able to
201// handle getting a `G_IO_ERROR_WOULD_BLOCK` error even when some other function
202// said that I/O was possible. This can easily happen in case of a race
203// condition in the application, but it can also happen for other reasons. For
204// instance, on Windows a socket is always seen as writable until a write
205// returns `G_IO_ERROR_WOULD_BLOCK`.
206//
207// As with `GSocket`, `GDatagramBased`s can be either connection oriented (for
208// example, SCTP) or connectionless (for example, UDP). `GDatagramBased`s must be
209// datagram-based, not stream-based. The interface does not cover connection
210// establishment — use methods on the underlying type to establish a connection
211// before sending and receiving data through the `GDatagramBased` API. For
212// connectionless socket types the target/source address is specified or
213// received in each I/O operation.
214//
215// Like most other APIs in GLib, `GDatagramBased` is not inherently thread safe.
216// To use a `GDatagramBased` concurrently from multiple threads, you must
217// implement your own locking.
218type DatagramBased interface {
219	GoPointer() uintptr
220	SetGoPointer(uintptr)
221	ConditionCheck(ConditionVar glib.IOCondition) glib.IOCondition
222	ConditionWait(ConditionVar glib.IOCondition, TimeoutVar int64, CancellableVar *Cancellable) (bool, error)
223	CreateSource(ConditionVar glib.IOCondition, CancellableVar *Cancellable) *glib.Source
224	ReceiveMessages(MessagesVar []InputMessage, NumMessagesVar uint, FlagsVar int, TimeoutVar int64, CancellableVar *Cancellable) (int, error)
225	SendMessages(MessagesVar []OutputMessage, NumMessagesVar uint, FlagsVar int, TimeoutVar int64, CancellableVar *Cancellable) (int, error)
226}
227
228var xDatagramBasedGLibType func() types.GType
229
230func DatagramBasedGLibType() types.GType {
231	return xDatagramBasedGLibType()
232}
233
234type DatagramBasedBase struct {
235	Ptr uintptr
236}
237
238func (x *DatagramBasedBase) GoPointer() uintptr {
239	if x == nil {
240		return 0
241	}
242	return x.Ptr
243}
244
245func (x *DatagramBasedBase) SetGoPointer(ptr uintptr) {
246	x.Ptr = ptr
247}
248
249// Checks on the readiness of @datagram_based to perform operations. The
250// operations specified in @condition are checked for and masked against the
251// currently-satisfied conditions on @datagram_based. The result is returned.
252//
253// %G_IO_IN will be set in the return value if data is available to read with
254// g_datagram_based_receive_messages(), or if the connection is closed remotely
255// (EOS); and if the datagram_based has not been closed locally using some
256// implementation-specific method (such as g_socket_close() or
257// g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket).
258//
259// If the connection is shut down or closed (by calling g_socket_close() or
260// g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket, for
261// example), all calls to this function will return %G_IO_ERROR_CLOSED.
262//
263// %G_IO_OUT will be set if it is expected that at least one byte can be sent
264// using g_datagram_based_send_messages() without blocking. It will not be set
265// if the datagram_based has been closed locally.
266//
267// %G_IO_HUP will be set if the connection has been closed locally.
268//
269// %G_IO_ERR will be set if there was an asynchronous error in transmitting data
270// previously enqueued using g_datagram_based_send_messages().
271//
272// Note that on Windows, it is possible for an operation to return
273// %G_IO_ERROR_WOULD_BLOCK even immediately after
274// g_datagram_based_condition_check() has claimed that the #GDatagramBased is
275// ready for writing. Rather than calling g_datagram_based_condition_check() and
276// then writing to the #GDatagramBased if it succeeds, it is generally better to
277// simply try writing right away, and try again later if the initial attempt
278// returns %G_IO_ERROR_WOULD_BLOCK.
279//
280// It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; these
281// conditions will always be set in the output if they are true. Apart from
282// these flags, the output is guaranteed to be masked by @condition.
283//
284// This call never blocks.
285func (x *DatagramBasedBase) ConditionCheck(ConditionVar glib.IOCondition) glib.IOCondition {
286
287	cret := XGDatagramBasedConditionCheck(x.GoPointer(), ConditionVar)
288	return cret
289}
290
291// Waits for up to @timeout microseconds for condition to become true on
292// @datagram_based. If the condition is met, %TRUE is returned.
293//
294// If @cancellable is cancelled before the condition is met, or if @timeout is
295// reached before the condition is met, then %FALSE is returned and @error is
296// set appropriately (%G_IO_ERROR_CANCELLED or %G_IO_ERROR_TIMED_OUT).
297func (x *DatagramBasedBase) ConditionWait(ConditionVar glib.IOCondition, TimeoutVar int64, CancellableVar *Cancellable) (bool, error) {
298	var cerr *glib.Error
299
300	cret := XGDatagramBasedConditionWait(x.GoPointer(), ConditionVar, TimeoutVar, CancellableVar.GoPointer(), &cerr)
301	if cerr == nil {
302		return cret, nil
303	}
304	return cret, cerr
305
306}
307
308// Creates a #GSource that can be attached to a #GMainContext to monitor for
309// the availability of the specified @condition on the #GDatagramBased. The
310// #GSource keeps a reference to the @datagram_based.
311//
312// The callback on the source is of the #GDatagramBasedSourceFunc type.
313//
314// It is meaningless to specify %G_IO_ERR or %G_IO_HUP in @condition; these
315// conditions will always be reported in the callback if they are true.
316//
317// If non-%NULL, @cancellable can be used to cancel the source, which will
318// cause the source to trigger, reporting the current condition (which is
319// likely 0 unless cancellation happened at the same time as a condition
320// change). You can check for this in the callback using
321// g_cancellable_is_cancelled().
322func (x *DatagramBasedBase) CreateSource(ConditionVar glib.IOCondition, CancellableVar *Cancellable) *glib.Source {
323
324	cret := XGDatagramBasedCreateSource(x.GoPointer(), ConditionVar, CancellableVar.GoPointer())
325	return cret
326}
327
328// Receive one or more data messages from @datagram_based in one go.
329//
330// @messages must point to an array of #GInputMessage structs and
331// @num_messages must be the length of this array. Each #GInputMessage
332// contains a pointer to an array of #GInputVector structs describing the
333// buffers that the data received in each message will be written to.
334//
335// @flags modify how all messages are received. The commonly available
336// arguments for this are available in the #GSocketMsgFlags enum, but the
337// values there are the same as the system values, and the flags
338// are passed in as-is, so you can pass in system-specific flags too. These
339// flags affect the overall receive operation. Flags affecting individual
340// messages are returned in #GInputMessage.flags.
341//
342// The other members of #GInputMessage are treated as described in its
343// documentation.
344//
345// If @timeout is negative the call will block until @num_messages have been
346// received, the connection is closed remotely (EOS), @cancellable is cancelled,
347// or an error occurs.
348//
349// If @timeout is 0 the call will return up to @num_messages without blocking,
350// or %G_IO_ERROR_WOULD_BLOCK if no messages are queued in the operating system
351// to be received.
352//
353// If @timeout is positive the call will block on the same conditions as if
354// @timeout were negative. If the timeout is reached
355// before any messages are received, %G_IO_ERROR_TIMED_OUT is returned,
356// otherwise it will return the number of messages received before timing out.
357// (Note: This is effectively the behaviour of `MSG_WAITFORONE` with
358// recvmmsg().)
359//
360// To be notified when messages are available, wait for the %G_IO_IN condition.
361// Note though that you may still receive %G_IO_ERROR_WOULD_BLOCK from
362// g_datagram_based_receive_messages() even if you were previously notified of a
363// %G_IO_IN condition.
364//
365// If the remote peer closes the connection, any messages queued in the
366// underlying receive buffer will be returned, and subsequent calls to
367// g_datagram_based_receive_messages() will return 0 (with no error set).
368//
369// If the connection is shut down or closed (by calling g_socket_close() or
370// g_socket_shutdown() with @shutdown_read set, if it’s a #GSocket, for
371// example), all calls to this function will return %G_IO_ERROR_CLOSED.
372//
373// On error -1 is returned and @error is set accordingly. An error will only
374// be returned if zero messages could be received; otherwise the number of
375// messages successfully received before the error will be returned. If
376// @cancellable is cancelled, %G_IO_ERROR_CANCELLED is returned as with any
377// other error.
378func (x *DatagramBasedBase) ReceiveMessages(MessagesVar []InputMessage, NumMessagesVar uint, FlagsVar int, TimeoutVar int64, CancellableVar *Cancellable) (int, error) {
379	var cerr *glib.Error
380
381	cret := XGDatagramBasedReceiveMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, TimeoutVar, CancellableVar.GoPointer(), &cerr)
382	if cerr == nil {
383		return cret, nil
384	}
385	return cret, cerr
386
387}
388
389// Send one or more data messages from @datagram_based in one go.
390//
391// @messages must point to an array of #GOutputMessage structs and
392// @num_messages must be the length of this array. Each #GOutputMessage
393// contains an address to send the data to, and a pointer to an array of
394// #GOutputVector structs to describe the buffers that the data to be sent
395// for each message will be gathered from.
396//
397// @flags modify how the message is sent. The commonly available arguments
398// for this are available in the #GSocketMsgFlags enum, but the
399// values there are the same as the system values, and the flags
400// are passed in as-is, so you can pass in system-specific flags too.
401//
402// The other members of #GOutputMessage are treated as described in its
403// documentation.
404//
405// If @timeout is negative the call will block until @num_messages have been
406// sent, @cancellable is cancelled, or an error occurs.
407//
408// If @timeout is 0 the call will send up to @num_messages without blocking,
409// or will return %G_IO_ERROR_WOULD_BLOCK if there is no space to send messages.
410//
411// If @timeout is positive the call will block on the same conditions as if
412// @timeout were negative. If the timeout is reached before any messages are
413// sent, %G_IO_ERROR_TIMED_OUT is returned, otherwise it will return the number
414// of messages sent before timing out.
415//
416// To be notified when messages can be sent, wait for the %G_IO_OUT condition.
417// Note though that you may still receive %G_IO_ERROR_WOULD_BLOCK from
418// g_datagram_based_send_messages() even if you were previously notified of a
419// %G_IO_OUT condition. (On Windows in particular, this is very common due to
420// the way the underlying APIs work.)
421//
422// If the connection is shut down or closed (by calling g_socket_close() or
423// g_socket_shutdown() with @shutdown_write set, if it’s a #GSocket, for
424// example), all calls to this function will return %G_IO_ERROR_CLOSED.
425//
426// On error -1 is returned and @error is set accordingly. An error will only
427// be returned if zero messages could be sent; otherwise the number of messages
428// successfully sent before the error will be returned. If @cancellable is
429// cancelled, %G_IO_ERROR_CANCELLED is returned as with any other error.
430func (x *DatagramBasedBase) SendMessages(MessagesVar []OutputMessage, NumMessagesVar uint, FlagsVar int, TimeoutVar int64, CancellableVar *Cancellable) (int, error) {
431	var cerr *glib.Error
432
433	cret := XGDatagramBasedSendMessages(x.GoPointer(), MessagesVar, NumMessagesVar, FlagsVar, TimeoutVar, CancellableVar.GoPointer(), &cerr)
434	if cerr == nil {
435		return cret, nil
436	}
437	return cret, cerr
438
439}
440
441var XGDatagramBasedConditionCheck func(uintptr, glib.IOCondition) glib.IOCondition
442var XGDatagramBasedConditionWait func(uintptr, glib.IOCondition, int64, uintptr, **glib.Error) bool
443var XGDatagramBasedCreateSource func(uintptr, glib.IOCondition, uintptr) *glib.Source
444var XGDatagramBasedReceiveMessages func(uintptr, []InputMessage, uint, int, int64, uintptr, **glib.Error) int
445var XGDatagramBasedSendMessages func(uintptr, []OutputMessage, uint, int, int64, uintptr, **glib.Error) int
446
447func init() {
448	core.SetPackageName("GIO", "gio-2.0")
449	core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0"})
450	var libs []uintptr
451	for _, libPath := range core.GetPaths("GIO") {
452		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
453		if err != nil {
454			panic(err)
455		}
456		libs = append(libs, lib)
457	}
458
459	core.PuregoSafeRegister(&xDatagramBasedGLibType, libs, "g_datagram_based_get_type")
460
461	core.PuregoSafeRegister(&XGDatagramBasedConditionCheck, libs, "g_datagram_based_condition_check")
462	core.PuregoSafeRegister(&XGDatagramBasedConditionWait, libs, "g_datagram_based_condition_wait")
463	core.PuregoSafeRegister(&XGDatagramBasedCreateSource, libs, "g_datagram_based_create_source")
464	core.PuregoSafeRegister(&XGDatagramBasedReceiveMessages, libs, "g_datagram_based_receive_messages")
465	core.PuregoSafeRegister(&XGDatagramBasedSendMessages, libs, "g_datagram_based_send_messages")
466
467}

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 102

↑↓ moveenter openesc close