v0.2.1 c0399be

gsocketlistener.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"
13	"github.com/bnema/puregotk/v4/gobject/types"
14)
15
16// Class structure for #GSocketListener.
17type SocketListenerClass struct {
18	_ structs.HostLayout
19
20	ParentClass gobject.ObjectClass
21
22	xChanged uintptr
23
24	xEvent uintptr
25
26	xGReserved2 uintptr
27
28	xGReserved3 uintptr
29
30	xGReserved4 uintptr
31
32	xGReserved5 uintptr
33
34	xGReserved6 uintptr
35}
36
37func (x *SocketListenerClass) GoPointer() uintptr {
38	return uintptr(unsafe.Pointer(x))
39}
40
41// OverrideChanged sets the "changed" callback function.
42// virtual method called when the set of socket listened to changes
43func (x *SocketListenerClass) OverrideChanged(cb func(*SocketListener)) {
44	if cb == nil {
45		x.xChanged = 0
46	} else {
47		x.xChanged = purego.NewCallback(func(ListenerVarp uintptr) {
48			cb(SocketListenerNewFromInternalPtr(ListenerVarp))
49		})
50	}
51}
52
53// GetChanged gets the "changed" callback function.
54// virtual method called when the set of socket listened to changes
55func (x *SocketListenerClass) GetChanged() func(*SocketListener) {
56	if x.xChanged == 0 {
57		return nil
58	}
59	var rawCallback func(ListenerVarp uintptr)
60	purego.RegisterFunc(&rawCallback, x.xChanged)
61	return func(ListenerVar *SocketListener) {
62		rawCallback(ListenerVar.GoPointer())
63	}
64}
65
66// OverrideEvent sets the "event" callback function.
67func (x *SocketListenerClass) OverrideEvent(cb func(*SocketListener, SocketListenerEvent, *Socket)) {
68	if cb == nil {
69		x.xEvent = 0
70	} else {
71		x.xEvent = purego.NewCallback(func(ListenerVarp uintptr, EventVarp SocketListenerEvent, SocketVarp uintptr) {
72			cb(SocketListenerNewFromInternalPtr(ListenerVarp), EventVarp, SocketNewFromInternalPtr(SocketVarp))
73		})
74	}
75}
76
77// GetEvent gets the "event" callback function.
78func (x *SocketListenerClass) GetEvent() func(*SocketListener, SocketListenerEvent, *Socket) {
79	if x.xEvent == 0 {
80		return nil
81	}
82	var rawCallback func(ListenerVarp uintptr, EventVarp SocketListenerEvent, SocketVarp uintptr)
83	purego.RegisterFunc(&rawCallback, x.xEvent)
84	return func(ListenerVar *SocketListener, EventVar SocketListenerEvent, SocketVar *Socket) {
85		rawCallback(ListenerVar.GoPointer(), EventVar, SocketVar.GoPointer())
86	}
87}
88
89// OverrideGReserved2 sets the "_g_reserved2" callback function.
90func (x *SocketListenerClass) OverrideGReserved2(cb func()) {
91	if cb == nil {
92		x.xGReserved2 = 0
93	} else {
94		x.xGReserved2 = purego.NewCallback(func() {
95			cb()
96		})
97	}
98}
99
100// GetGReserved2 gets the "_g_reserved2" callback function.
101func (x *SocketListenerClass) GetGReserved2() func() {
102	if x.xGReserved2 == 0 {
103		return nil
104	}
105	var rawCallback func()
106	purego.RegisterFunc(&rawCallback, x.xGReserved2)
107	return func() {
108		rawCallback()
109	}
110}
111
112// OverrideGReserved3 sets the "_g_reserved3" callback function.
113func (x *SocketListenerClass) OverrideGReserved3(cb func()) {
114	if cb == nil {
115		x.xGReserved3 = 0
116	} else {
117		x.xGReserved3 = purego.NewCallback(func() {
118			cb()
119		})
120	}
121}
122
123// GetGReserved3 gets the "_g_reserved3" callback function.
124func (x *SocketListenerClass) GetGReserved3() func() {
125	if x.xGReserved3 == 0 {
126		return nil
127	}
128	var rawCallback func()
129	purego.RegisterFunc(&rawCallback, x.xGReserved3)
130	return func() {
131		rawCallback()
132	}
133}
134
135// OverrideGReserved4 sets the "_g_reserved4" callback function.
136func (x *SocketListenerClass) OverrideGReserved4(cb func()) {
137	if cb == nil {
138		x.xGReserved4 = 0
139	} else {
140		x.xGReserved4 = purego.NewCallback(func() {
141			cb()
142		})
143	}
144}
145
146// GetGReserved4 gets the "_g_reserved4" callback function.
147func (x *SocketListenerClass) GetGReserved4() func() {
148	if x.xGReserved4 == 0 {
149		return nil
150	}
151	var rawCallback func()
152	purego.RegisterFunc(&rawCallback, x.xGReserved4)
153	return func() {
154		rawCallback()
155	}
156}
157
158// OverrideGReserved5 sets the "_g_reserved5" callback function.
159func (x *SocketListenerClass) OverrideGReserved5(cb func()) {
160	if cb == nil {
161		x.xGReserved5 = 0
162	} else {
163		x.xGReserved5 = purego.NewCallback(func() {
164			cb()
165		})
166	}
167}
168
169// GetGReserved5 gets the "_g_reserved5" callback function.
170func (x *SocketListenerClass) GetGReserved5() func() {
171	if x.xGReserved5 == 0 {
172		return nil
173	}
174	var rawCallback func()
175	purego.RegisterFunc(&rawCallback, x.xGReserved5)
176	return func() {
177		rawCallback()
178	}
179}
180
181// OverrideGReserved6 sets the "_g_reserved6" callback function.
182func (x *SocketListenerClass) OverrideGReserved6(cb func()) {
183	if cb == nil {
184		x.xGReserved6 = 0
185	} else {
186		x.xGReserved6 = purego.NewCallback(func() {
187			cb()
188		})
189	}
190}
191
192// GetGReserved6 gets the "_g_reserved6" callback function.
193func (x *SocketListenerClass) GetGReserved6() func() {
194	if x.xGReserved6 == 0 {
195		return nil
196	}
197	var rawCallback func()
198	purego.RegisterFunc(&rawCallback, x.xGReserved6)
199	return func() {
200		rawCallback()
201	}
202}
203
204type SocketListenerPrivate struct {
205	_ structs.HostLayout
206}
207
208func (x *SocketListenerPrivate) GoPointer() uintptr {
209	return uintptr(unsafe.Pointer(x))
210}
211
212// A `GSocketListener` is an object that keeps track of a set
213// of server sockets and helps you accept sockets from any of the
214// socket, either sync or async.
215//
216// Add addresses and ports to listen on using
217// [method@Gio.SocketListener.add_address] and
218// [method@Gio.SocketListener.add_inet_port]. These will be listened on until
219// [method@Gio.SocketListener.close] is called. Dropping your final reference to
220// the `GSocketListener` will not cause [method@Gio.SocketListener.close] to be
221// called implicitly, as some references to the `GSocketListener` may be held
222// internally.
223//
224// If you want to implement a network server, also look at
225// [class@Gio.SocketService] and [class@Gio.ThreadedSocketService] which are
226// subclasses of `GSocketListener` that make this even easier.
227type SocketListener struct {
228	gobject.Object
229}
230
231var xSocketListenerGLibType func() types.GType
232
233func SocketListenerGLibType() types.GType {
234	return xSocketListenerGLibType()
235}
236
237func SocketListenerNewFromInternalPtr(ptr uintptr) *SocketListener {
238	cls := &SocketListener{}
239	cls.Ptr = ptr
240	return cls
241}
242
243var xNewSocketListener func() uintptr
244
245// Creates a new #GSocketListener with no sockets to listen for.
246// New listeners can be added with e.g. g_socket_listener_add_address()
247// or g_socket_listener_add_inet_port().
248func NewSocketListener() *SocketListener {
249	var cls *SocketListener
250
251	cret := xNewSocketListener()
252
253	if cret == 0 {
254		return nil
255	}
256	cls = &SocketListener{}
257	cls.Ptr = cret
258	return cls
259}
260
261var xSocketListenerAccept func(uintptr, **gobject.Object, uintptr, **glib.Error) uintptr
262
263// Blocks waiting for a client to connect to any of the sockets added
264// to the listener. Returns a #GSocketConnection for the socket that was
265// accepted.
266//
267// If @source_object is not %NULL it will be filled out with the source
268// object specified when the corresponding socket or address was added
269// to the listener.
270//
271// If @cancellable is not %NULL, then the operation can be cancelled by
272// triggering the cancellable object from another thread. If the operation
273// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
274func (x *SocketListener) Accept(SourceObjectVar **gobject.Object, CancellableVar *Cancellable) (*SocketConnection, error) {
275	var cls *SocketConnection
276	var cerr *glib.Error
277
278	cret := xSocketListenerAccept(x.GoPointer(), SourceObjectVar, CancellableVar.GoPointer(), &cerr)
279
280	if cret == 0 {
281		return nil, cerr
282	}
283	cls = &SocketConnection{}
284	cls.Ptr = cret
285	if cerr == nil {
286		return cls, nil
287	}
288	return cls, cerr
289
290}
291
292var xSocketListenerAcceptAsync func(uintptr, uintptr, uintptr, uintptr)
293
294// This is the asynchronous version of g_socket_listener_accept().
295//
296// When the operation is finished @callback will be
297// called. You can then call g_socket_listener_accept_finish()
298// to get the result of the operation.
299func (x *SocketListener) AcceptAsync(CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
300
301	var CallbackVarRef uintptr
302	if CallbackVar != nil {
303		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
304		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
305			CallbackVarRef = cbRefPtr
306		} else {
307			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
308				cbFn := *CallbackVar
309				cbFn(arg0, arg1, arg2)
310			}
311			CallbackVarRef = purego.NewCallback(fcb)
312			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
313		}
314	}
315
316	xSocketListenerAcceptAsync(x.GoPointer(), CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
317
318}
319
320var xSocketListenerAcceptFinish func(uintptr, uintptr, **gobject.Object, **glib.Error) uintptr
321
322// Finishes an async accept operation. See g_socket_listener_accept_async()
323func (x *SocketListener) AcceptFinish(ResultVar AsyncResult, SourceObjectVar **gobject.Object) (*SocketConnection, error) {
324	var cls *SocketConnection
325	var cerr *glib.Error
326
327	cret := xSocketListenerAcceptFinish(x.GoPointer(), ResultVar.GoPointer(), SourceObjectVar, &cerr)
328
329	if cret == 0 {
330		return nil, cerr
331	}
332	cls = &SocketConnection{}
333	cls.Ptr = cret
334	if cerr == nil {
335		return cls, nil
336	}
337	return cls, cerr
338
339}
340
341var xSocketListenerAcceptSocket func(uintptr, **gobject.Object, uintptr, **glib.Error) uintptr
342
343// Blocks waiting for a client to connect to any of the sockets added
344// to the listener. Returns the #GSocket that was accepted.
345//
346// If you want to accept the high-level #GSocketConnection, not a #GSocket,
347// which is often the case, then you should use g_socket_listener_accept()
348// instead.
349//
350// If @source_object is not %NULL it will be filled out with the source
351// object specified when the corresponding socket or address was added
352// to the listener.
353//
354// If @cancellable is not %NULL, then the operation can be cancelled by
355// triggering the cancellable object from another thread. If the operation
356// was cancelled, the error %G_IO_ERROR_CANCELLED will be returned.
357func (x *SocketListener) AcceptSocket(SourceObjectVar **gobject.Object, CancellableVar *Cancellable) (*Socket, error) {
358	var cls *Socket
359	var cerr *glib.Error
360
361	cret := xSocketListenerAcceptSocket(x.GoPointer(), SourceObjectVar, CancellableVar.GoPointer(), &cerr)
362
363	if cret == 0 {
364		return nil, cerr
365	}
366	cls = &Socket{}
367	cls.Ptr = cret
368	if cerr == nil {
369		return cls, nil
370	}
371	return cls, cerr
372
373}
374
375var xSocketListenerAcceptSocketAsync func(uintptr, uintptr, uintptr, uintptr)
376
377// This is the asynchronous version of g_socket_listener_accept_socket().
378//
379// When the operation is finished @callback will be
380// called. You can then call g_socket_listener_accept_socket_finish()
381// to get the result of the operation.
382func (x *SocketListener) AcceptSocketAsync(CancellableVar *Cancellable, CallbackVar *AsyncReadyCallback, UserDataVar uintptr) {
383
384	var CallbackVarRef uintptr
385	if CallbackVar != nil {
386		CallbackVarPtr := uintptr(unsafe.Pointer(CallbackVar))
387		if cbRefPtr, ok := glib.GetCallback(CallbackVarPtr); ok {
388			CallbackVarRef = cbRefPtr
389		} else {
390			fcb := func(arg0 uintptr, arg1 uintptr, arg2 uintptr) {
391				cbFn := *CallbackVar
392				cbFn(arg0, arg1, arg2)
393			}
394			CallbackVarRef = purego.NewCallback(fcb)
395			glib.SaveCallbackWithClosure(CallbackVarPtr, CallbackVarRef, CallbackVar)
396		}
397	}
398
399	xSocketListenerAcceptSocketAsync(x.GoPointer(), CancellableVar.GoPointer(), CallbackVarRef, UserDataVar)
400
401}
402
403var xSocketListenerAcceptSocketFinish func(uintptr, uintptr, **gobject.Object, **glib.Error) uintptr
404
405// Finishes an async accept operation. See g_socket_listener_accept_socket_async()
406func (x *SocketListener) AcceptSocketFinish(ResultVar AsyncResult, SourceObjectVar **gobject.Object) (*Socket, error) {
407	var cls *Socket
408	var cerr *glib.Error
409
410	cret := xSocketListenerAcceptSocketFinish(x.GoPointer(), ResultVar.GoPointer(), SourceObjectVar, &cerr)
411
412	if cret == 0 {
413		return nil, cerr
414	}
415	cls = &Socket{}
416	cls.Ptr = cret
417	if cerr == nil {
418		return cls, nil
419	}
420	return cls, cerr
421
422}
423
424var xSocketListenerAddAddress func(uintptr, uintptr, SocketType, SocketProtocol, uintptr, **SocketAddress, **glib.Error) bool
425
426// Creates a socket of type @type and protocol @protocol, binds
427// it to @address and adds it to the set of sockets we're accepting
428// sockets from.
429//
430// Note that adding an IPv6 address, depending on the platform,
431// may or may not result in a listener that also accepts IPv4
432// connections.  For more deterministic behavior, see
433// g_socket_listener_add_inet_port().
434//
435// @source_object will be passed out in the various calls
436// to accept to identify this particular source, which is
437// useful if you're listening on multiple addresses and do
438// different things depending on what address is connected to.
439//
440// If successful and @effective_address is non-%NULL then it will
441// be set to the address that the binding actually occurred at.  This
442// is helpful for determining the port number that was used for when
443// requesting a binding to port 0 (ie: "any port").  This address, if
444// requested, belongs to the caller and must be freed.
445//
446// Call g_socket_listener_close() to stop listening on @address; this will not
447// be done automatically when you drop your final reference to @listener, as
448// references may be held internally.
449func (x *SocketListener) AddAddress(AddressVar *SocketAddress, TypeVar SocketType, ProtocolVar SocketProtocol, SourceObjectVar *gobject.Object, EffectiveAddressVar **SocketAddress) (bool, error) {
450	var cerr *glib.Error
451
452	cret := xSocketListenerAddAddress(x.GoPointer(), AddressVar.GoPointer(), TypeVar, ProtocolVar, SourceObjectVar.GoPointer(), EffectiveAddressVar, &cerr)
453	if cerr == nil {
454		return cret, nil
455	}
456	return cret, cerr
457
458}
459
460var xSocketListenerAddAnyInetPort func(uintptr, uintptr, **glib.Error) uint16
461
462// Listens for TCP connections on any available port number for both
463// IPv6 and IPv4 (if each is available).
464//
465// This is useful if you need to have a socket for incoming connections
466// but don't care about the specific port number.
467//
468// If possible, the [class@Gio.SocketListener] will listen on both IPv4 and
469// IPv6 (listening on the same port on both). If listening on one of the socket
470// families fails, the [class@Gio.SocketListener] will only listen on the other.
471// If listening on both fails, an error will be returned.
472//
473// If you need to distinguish whether listening on IPv4 or IPv6 or both was
474// successful, connect to [signal@Gio.SocketListener::event].
475//
476// @source_object will be passed out in the various calls
477// to accept to identify this particular source, which is
478// useful if you're listening on multiple addresses and do
479// different things depending on what address is connected to.
480func (x *SocketListener) AddAnyInetPort(SourceObjectVar *gobject.Object) (uint16, error) {
481	var cerr *glib.Error
482
483	cret := xSocketListenerAddAnyInetPort(x.GoPointer(), SourceObjectVar.GoPointer(), &cerr)
484	if cerr == nil {
485		return cret, nil
486	}
487	return cret, cerr
488
489}
490
491var xSocketListenerAddInetPort func(uintptr, uint16, uintptr, **glib.Error) bool
492
493// Helper function for g_socket_listener_add_address() that
494// creates a TCP/IP socket listening on IPv4 and IPv6 (if
495// supported) on the specified port on all interfaces.
496//
497// If possible, the [class@Gio.SocketListener] will listen on both IPv4 and
498// IPv6 (listening on the same port on both). If listening on one of the socket
499// families fails, the [class@Gio.SocketListener] will only listen on the other.
500// If listening on both fails, an error will be returned.
501//
502// If you need to distinguish whether listening on IPv4 or IPv6 or both was
503// successful, connect to [signal@Gio.SocketListener::event].
504//
505// @source_object will be passed out in the various calls
506// to accept to identify this particular source, which is
507// useful if you're listening on multiple addresses and do
508// different things depending on what address is connected to.
509//
510// Call g_socket_listener_close() to stop listening on @port; this will not
511// be done automatically when you drop your final reference to @listener, as
512// references may be held internally.
513func (x *SocketListener) AddInetPort(PortVar uint16, SourceObjectVar *gobject.Object) (bool, error) {
514	var cerr *glib.Error
515
516	cret := xSocketListenerAddInetPort(x.GoPointer(), PortVar, SourceObjectVar.GoPointer(), &cerr)
517	if cerr == nil {
518		return cret, nil
519	}
520	return cret, cerr
521
522}
523
524var xSocketListenerAddSocket func(uintptr, uintptr, uintptr, **glib.Error) bool
525
526// Adds @socket to the set of sockets that we try to accept
527// new clients from. The socket must be bound to a local
528// address and listened to.
529//
530// For parallel calls to [class@Gio.SocketListener] methods to work, the socket
531// must be in non-blocking mode. (See [property@Gio.Socket:blocking].)
532//
533// @source_object will be passed out in the various calls
534// to accept to identify this particular source, which is
535// useful if you're listening on multiple addresses and do
536// different things depending on what address is connected to.
537//
538// The @socket will not be automatically closed when the @listener is finalized
539// unless the listener held the final reference to the socket. Before GLib 2.42,
540// the @socket was automatically closed on finalization of the @listener, even
541// if references to it were held elsewhere.
542func (x *SocketListener) AddSocket(SocketVar *Socket, SourceObjectVar *gobject.Object) (bool, error) {
543	var cerr *glib.Error
544
545	cret := xSocketListenerAddSocket(x.GoPointer(), SocketVar.GoPointer(), SourceObjectVar.GoPointer(), &cerr)
546	if cerr == nil {
547		return cret, nil
548	}
549	return cret, cerr
550
551}
552
553var xSocketListenerClose func(uintptr)
554
555// Closes all the sockets in the listener.
556func (x *SocketListener) Close() {
557
558	xSocketListenerClose(x.GoPointer())
559
560}
561
562var xSocketListenerSetBacklog func(uintptr, int)
563
564// Sets the listen backlog on the sockets in the listener. This must be called
565// before adding any sockets, addresses or ports to the #GSocketListener (for
566// example, by calling g_socket_listener_add_inet_port()) to be effective.
567//
568// See g_socket_set_listen_backlog() for details
569func (x *SocketListener) SetBacklog(ListenBacklogVar int) {
570
571	xSocketListenerSetBacklog(x.GoPointer(), ListenBacklogVar)
572
573}
574
575func (c *SocketListener) GoPointer() uintptr {
576	if c == nil {
577		return 0
578	}
579	return c.Ptr
580}
581
582func (c *SocketListener) SetGoPointer(ptr uintptr) {
583	c.Ptr = ptr
584}
585
586// SetPropertyListenBacklog sets the "listen-backlog" property.
587// The number of outstanding connections in the listen queue.
588func (x *SocketListener) SetPropertyListenBacklog(value int) {
589	var v gobject.Value
590	v.Init(gobject.TypeIntVal)
591	v.SetInt(value)
592	x.SetProperty("listen-backlog", &v)
593}
594
595// GetPropertyListenBacklog gets the "listen-backlog" property.
596// The number of outstanding connections in the listen queue.
597func (x *SocketListener) GetPropertyListenBacklog() int {
598	var v gobject.Value
599	x.GetProperty("listen-backlog", &v)
600	return v.GetInt()
601}
602
603// Emitted when @listener's activity on @socket changes state.
604// Note that when @listener is used to listen on both IPv4 and
605// IPv6, a separate set of signals will be emitted for each, and
606// the order they happen in is undefined.
607func (x *SocketListener) ConnectEvent(cb *func(SocketListener, SocketListenerEvent, uintptr)) uint {
608	cbPtr := uintptr(unsafe.Pointer(cb))
609	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
610		handlerID := gobject.SignalConnect(x.GoPointer(), "event", cbRefPtr)
611		glib.SaveHandlerMapping(handlerID, cbPtr)
612		return handlerID
613	}
614
615	fcb := func(clsPtr uintptr, EventVarp SocketListenerEvent, SocketVarp uintptr) {
616		fa := SocketListener{}
617		fa.Ptr = clsPtr
618		cbFn := *cb
619
620		cbFn(fa, EventVarp, SocketVarp)
621
622	}
623	cbRefPtr := purego.NewCallback(fcb)
624	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
625	handlerID := gobject.SignalConnect(x.GoPointer(), "event", cbRefPtr)
626	glib.SaveHandlerMapping(handlerID, cbPtr)
627	return handlerID
628}
629
630func init() {
631	core.SetPackageName("GIO", "gio-2.0")
632	core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0"})
633	var libs []uintptr
634	for _, libPath := range core.GetPaths("GIO") {
635		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
636		if err != nil {
637			panic(err)
638		}
639		libs = append(libs, lib)
640	}
641
642	core.PuregoSafeRegister(&xSocketListenerGLibType, libs, "g_socket_listener_get_type")
643
644	core.PuregoSafeRegister(&xNewSocketListener, libs, "g_socket_listener_new")
645
646	core.PuregoSafeRegister(&xSocketListenerAccept, libs, "g_socket_listener_accept")
647	core.PuregoSafeRegister(&xSocketListenerAcceptAsync, libs, "g_socket_listener_accept_async")
648	core.PuregoSafeRegister(&xSocketListenerAcceptFinish, libs, "g_socket_listener_accept_finish")
649	core.PuregoSafeRegister(&xSocketListenerAcceptSocket, libs, "g_socket_listener_accept_socket")
650	core.PuregoSafeRegister(&xSocketListenerAcceptSocketAsync, libs, "g_socket_listener_accept_socket_async")
651	core.PuregoSafeRegister(&xSocketListenerAcceptSocketFinish, libs, "g_socket_listener_accept_socket_finish")
652	core.PuregoSafeRegister(&xSocketListenerAddAddress, libs, "g_socket_listener_add_address")
653	core.PuregoSafeRegister(&xSocketListenerAddAnyInetPort, libs, "g_socket_listener_add_any_inet_port")
654	core.PuregoSafeRegister(&xSocketListenerAddInetPort, libs, "g_socket_listener_add_inet_port")
655	core.PuregoSafeRegister(&xSocketListenerAddSocket, libs, "g_socket_listener_add_socket")
656	core.PuregoSafeRegister(&xSocketListenerClose, libs, "g_socket_listener_close")
657	core.PuregoSafeRegister(&xSocketListenerSetBacklog, libs, "g_socket_listener_set_backlog")
658
659}

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