v0.2.2 9100209

gdkdisplay.go RawHistoryFolder

1// Package gdk was automatically generated by github.com/bnema/puregotk DO NOT EDIT
2package gdk
3
4import (
5	"unsafe"
6
7	"github.com/ebitengine/purego"
8
9	"github.com/bnema/puregotk/pkg/core"
10	"github.com/bnema/puregotk/v4/gio"
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// A representation of a workstation.
17//
18// Their purpose are two-fold:
19//
20// - To manage and provide information about input devices (pointers, keyboards, etc)
21// - To manage and provide information about output devices (monitors, projectors, etc)
22//
23// Most of the input device handling has been factored out into separate
24// [class@Gdk.Seat] objects. Every display has a one or more seats, which
25// can be accessed with [method@Gdk.Display.get_default_seat] and
26// [method@Gdk.Display.list_seats].
27//
28// Output devices are represented by [class@Gdk.Monitor] objects, which can
29// be accessed with [method@Gdk.Display.get_monitor_at_surface] and similar APIs.
30type Display struct {
31	gobject.Object
32}
33
34var xDisplayGLibType func() types.GType
35
36func DisplayGLibType() types.GType {
37	return xDisplayGLibType()
38}
39
40func DisplayNewFromInternalPtr(ptr uintptr) *Display {
41	cls := &Display{}
42	cls.Ptr = ptr
43	return cls
44}
45
46var xDisplayBeep func(uintptr)
47
48// Emits a short beep on @display
49func (x *Display) Beep() {
50
51	xDisplayBeep(x.GoPointer())
52
53}
54
55var xDisplayClose func(uintptr)
56
57// Closes the connection to the windowing system for the given display.
58//
59// This cleans up associated resources.
60func (x *Display) Close() {
61
62	xDisplayClose(x.GoPointer())
63
64}
65
66var xDisplayCreateGlContext func(uintptr) uintptr
67
68// Creates a new `GdkGLContext` for the `GdkDisplay`.
69//
70// The context is disconnected from any particular surface or surface
71// and cannot be used to draw to any surface. It can only be used to
72// draw to non-surface framebuffers like textures.
73//
74// If the creation of the `GdkGLContext` failed, @error will be set.
75// Before using the returned `GdkGLContext`, you will need to
76// call [method@Gdk.GLContext.make_current] or [method@Gdk.GLContext.realize].
77func (x *Display) CreateGlContext() (*GLContext, error) {
78	var cls *GLContext
79	var cerr *glib.Error
80
81	cret := xDisplayCreateGlContext(x.GoPointer())
82
83	if cret == 0 {
84		return nil, cerr
85	}
86	cls = &GLContext{}
87	cls.Ptr = cret
88	if cerr == nil {
89		return cls, nil
90	}
91	return cls, cerr
92
93}
94
95var xDisplayDeviceIsGrabbed func(uintptr, uintptr) bool
96
97// Returns %TRUE if there is an ongoing grab on @device for @display.
98func (x *Display) DeviceIsGrabbed(DeviceVar *Device) bool {
99
100	cret := xDisplayDeviceIsGrabbed(x.GoPointer(), DeviceVar.GoPointer())
101	return cret
102}
103
104var xDisplayFlush func(uintptr)
105
106// Flushes any requests queued for the windowing system.
107//
108// This happens automatically when the main loop blocks waiting for new events,
109// but if your application is drawing without returning control to the main loop,
110// you may need to call this function explicitly. A common case where this function
111// needs to be called is when an application is executing drawing commands
112// from a thread other than the thread where the main loop is running.
113//
114// This is most useful for X11. On windowing systems where requests are
115// handled synchronously, this function will do nothing.
116func (x *Display) Flush() {
117
118	xDisplayFlush(x.GoPointer())
119
120}
121
122var xDisplayGetAppLaunchContext func(uintptr) uintptr
123
124// Returns a `GdkAppLaunchContext` suitable for launching
125// applications on the given display.
126func (x *Display) GetAppLaunchContext() *AppLaunchContext {
127	var cls *AppLaunchContext
128
129	cret := xDisplayGetAppLaunchContext(x.GoPointer())
130
131	if cret == 0 {
132		return nil
133	}
134	cls = &AppLaunchContext{}
135	cls.Ptr = cret
136	return cls
137}
138
139var xDisplayGetClipboard func(uintptr) uintptr
140
141// Gets the clipboard used for copy/paste operations.
142func (x *Display) GetClipboard() *Clipboard {
143	var cls *Clipboard
144
145	cret := xDisplayGetClipboard(x.GoPointer())
146
147	if cret == 0 {
148		return nil
149	}
150	gobject.IncreaseRef(cret)
151	cls = &Clipboard{}
152	cls.Ptr = cret
153	return cls
154}
155
156var xDisplayGetDefaultSeat func(uintptr) uintptr
157
158// Returns the default `GdkSeat` for this display.
159//
160// Note that a display may not have a seat. In this case,
161// this function will return %NULL.
162func (x *Display) GetDefaultSeat() *Seat {
163	var cls *Seat
164
165	cret := xDisplayGetDefaultSeat(x.GoPointer())
166
167	if cret == 0 {
168		return nil
169	}
170	gobject.IncreaseRef(cret)
171	cls = &Seat{}
172	cls.Ptr = cret
173	return cls
174}
175
176var xDisplayGetDmabufFormats func(uintptr) *DmabufFormats
177
178// Returns the dma-buf formats that are supported on this display.
179//
180// GTK may use OpenGL or Vulkan to support some formats.
181// Calling this function will then initialize them if they aren't yet.
182//
183// The formats returned by this function can be used for negotiating
184// buffer formats with producers such as v4l, pipewire or GStreamer.
185//
186// To learn more about dma-bufs, see [class@Gdk.DmabufTextureBuilder].
187//
188// This function is threadsafe. It can be called from any thread.
189func (x *Display) GetDmabufFormats() *DmabufFormats {
190
191	cret := xDisplayGetDmabufFormats(x.GoPointer())
192	return cret
193}
194
195var xDisplayGetMonitorAtSurface func(uintptr, uintptr) uintptr
196
197// Gets the monitor in which the largest area of @surface
198// resides.
199func (x *Display) GetMonitorAtSurface(SurfaceVar *Surface) *Monitor {
200	var cls *Monitor
201
202	cret := xDisplayGetMonitorAtSurface(x.GoPointer(), SurfaceVar.GoPointer())
203
204	if cret == 0 {
205		return nil
206	}
207	gobject.IncreaseRef(cret)
208	cls = &Monitor{}
209	cls.Ptr = cret
210	return cls
211}
212
213var xDisplayGetMonitors func(uintptr) uintptr
214
215// Gets the list of monitors associated with this display.
216//
217// Subsequent calls to this function will always return the
218// same list for the same display.
219//
220// You can listen to the GListModel::items-changed signal on
221// this list to monitor changes to the monitor of this display.
222func (x *Display) GetMonitors() *gio.ListModelBase {
223	var cls *gio.ListModelBase
224
225	cret := xDisplayGetMonitors(x.GoPointer())
226
227	if cret == 0 {
228		return nil
229	}
230	gobject.IncreaseRef(cret)
231	cls = &gio.ListModelBase{}
232	cls.Ptr = cret
233	return cls
234}
235
236var xDisplayGetName func(uintptr) string
237
238// Gets the name of the display.
239func (x *Display) GetName() string {
240
241	cret := xDisplayGetName(x.GoPointer())
242	return cret
243}
244
245var xDisplayGetPrimaryClipboard func(uintptr) uintptr
246
247// Gets the clipboard used for the primary selection.
248//
249// On backends where the primary clipboard is not supported natively,
250// GDK emulates this clipboard locally.
251func (x *Display) GetPrimaryClipboard() *Clipboard {
252	var cls *Clipboard
253
254	cret := xDisplayGetPrimaryClipboard(x.GoPointer())
255
256	if cret == 0 {
257		return nil
258	}
259	gobject.IncreaseRef(cret)
260	cls = &Clipboard{}
261	cls.Ptr = cret
262	return cls
263}
264
265var xDisplayGetSetting func(uintptr, string, *gobject.Value) bool
266
267// Retrieves a desktop-wide setting such as double-click time
268// for the @display.
269func (x *Display) GetSetting(NameVar string, ValueVar *gobject.Value) bool {
270
271	cret := xDisplayGetSetting(x.GoPointer(), NameVar, ValueVar)
272	return cret
273}
274
275var xDisplayGetStartupNotificationId func(uintptr) string
276
277// Gets the startup notification ID for a Wayland display, or %NULL
278// if no ID has been defined.
279func (x *Display) GetStartupNotificationId() string {
280
281	cret := xDisplayGetStartupNotificationId(x.GoPointer())
282	return cret
283}
284
285var xDisplayIsClosed func(uintptr) bool
286
287// Finds out if the display has been closed.
288func (x *Display) IsClosed() bool {
289
290	cret := xDisplayIsClosed(x.GoPointer())
291	return cret
292}
293
294var xDisplayIsComposited func(uintptr) bool
295
296// Returns whether surfaces can reasonably be expected to have
297// their alpha channel drawn correctly on the screen.
298//
299// Check [method@Gdk.Display.is_rgba] for whether the display
300// supports an alpha channel.
301//
302// On X11 this function returns whether a compositing manager is
303// compositing on @display.
304//
305// On modern displays, this value is always %TRUE.
306func (x *Display) IsComposited() bool {
307
308	cret := xDisplayIsComposited(x.GoPointer())
309	return cret
310}
311
312var xDisplayIsRgba func(uintptr) bool
313
314// Returns whether surfaces on this @display are created with an
315// alpha channel.
316//
317// Even if a %TRUE is returned, it is possible that the
318// surface’s alpha channel won’t be honored when displaying the
319// surface on the screen: in particular, for X an appropriate
320// windowing manager and compositing manager must be running to
321// provide appropriate display. Use [method@Gdk.Display.is_composited]
322// to check if that is the case.
323//
324// On modern displays, this value is always %TRUE.
325func (x *Display) IsRgba() bool {
326
327	cret := xDisplayIsRgba(x.GoPointer())
328	return cret
329}
330
331var xDisplayListSeats func(uintptr) *glib.List
332
333// Returns the list of seats known to @display.
334func (x *Display) ListSeats() *glib.List {
335
336	cret := xDisplayListSeats(x.GoPointer())
337	return cret
338}
339
340var xDisplayMapKeycode func(uintptr, uint, *uintptr, *[]uint, *int) bool
341
342// Returns the keyvals bound to @keycode.
343//
344// The Nth `GdkKeymapKey` in @keys is bound to the Nth keyval in @keyvals.
345//
346// When a keycode is pressed by the user, the keyval from
347// this list of entries is selected by considering the effective
348// keyboard group and level.
349//
350// Free the returned arrays with g_free().
351func (x *Display) MapKeycode(KeycodeVar uint, KeysVar *uintptr, KeyvalsVar *[]uint, NEntriesVar *int) bool {
352
353	cret := xDisplayMapKeycode(x.GoPointer(), KeycodeVar, KeysVar, KeyvalsVar, NEntriesVar)
354	return cret
355}
356
357var xDisplayMapKeyval func(uintptr, uint, *uintptr, *int) bool
358
359// Obtains a list of keycode/group/level combinations that will
360// generate @keyval.
361//
362// Groups and levels are two kinds of keyboard mode; in general, the level
363// determines whether the top or bottom symbol on a key is used, and the
364// group determines whether the left or right symbol is used.
365//
366// On US keyboards, the shift key changes the keyboard level, and there
367// are no groups. A group switch key might convert a keyboard between
368// Hebrew to English modes, for example.
369//
370// `GdkEventKey` contains a %group field that indicates the active
371// keyboard group. The level is computed from the modifier mask.
372//
373// The returned array should be freed with g_free().
374func (x *Display) MapKeyval(KeyvalVar uint, KeysVar *uintptr, NKeysVar *int) bool {
375
376	cret := xDisplayMapKeyval(x.GoPointer(), KeyvalVar, KeysVar, NKeysVar)
377	return cret
378}
379
380var xDisplayNotifyStartupComplete func(uintptr, string)
381
382// Indicates to the GUI environment that the application has
383// finished loading, using a given identifier.
384//
385// GTK will call this function automatically for [GtkWindow](../gtk4/class.Window.html)
386// with custom startup-notification identifier unless
387// [gtk_window_set_auto_startup_notification()](../gtk4/method.Window.set_auto_startup_notification.html)
388// is called to disable that feature.
389func (x *Display) NotifyStartupComplete(StartupIdVar string) {
390
391	xDisplayNotifyStartupComplete(x.GoPointer(), StartupIdVar)
392
393}
394
395var xDisplayPrepareGl func(uintptr) bool
396
397// Checks that OpenGL is available for @self and ensures that it is
398// properly initialized.
399// When this fails, an @error will be set describing the error and this
400// function returns %FALSE.
401//
402// Note that even if this function succeeds, creating a `GdkGLContext`
403// may still fail.
404//
405// This function is idempotent. Calling it multiple times will just
406// return the same value or error.
407//
408// You never need to call this function, GDK will call it automatically
409// as needed. But you can use it as a check when setting up code that
410// might make use of OpenGL.
411func (x *Display) PrepareGl() (bool, error) {
412	var cerr *glib.Error
413
414	cret := xDisplayPrepareGl(x.GoPointer())
415	if cerr == nil {
416		return cret, nil
417	}
418	return cret, cerr
419
420}
421
422var xDisplayPutEvent func(uintptr, uintptr)
423
424// Adds the given event to the event queue for @display.
425func (x *Display) PutEvent(EventVar *Event) {
426
427	xDisplayPutEvent(x.GoPointer(), EventVar.GoPointer())
428
429}
430
431var xDisplaySupportsInputShapes func(uintptr) bool
432
433// Returns %TRUE if the display supports input shapes.
434//
435// This means that [method@Gdk.Surface.set_input_region] can
436// be used to modify the input shape of surfaces on @display.
437//
438// On modern displays, this value is always %TRUE.
439func (x *Display) SupportsInputShapes() bool {
440
441	cret := xDisplaySupportsInputShapes(x.GoPointer())
442	return cret
443}
444
445var xDisplaySupportsShadowWidth func(uintptr) bool
446
447// Returns whether it's possible for a surface to draw outside of the window area.
448//
449// If %TRUE is returned the application decides if it wants to draw shadows.
450// If %FALSE is returned, the compositor decides if it wants to draw shadows.
451func (x *Display) SupportsShadowWidth() bool {
452
453	cret := xDisplaySupportsShadowWidth(x.GoPointer())
454	return cret
455}
456
457var xDisplaySync func(uintptr)
458
459// Flushes any requests queued for the windowing system and waits until all
460// requests have been handled.
461//
462// This is often used for making sure that the display is synchronized
463// with the current state of the program. Calling [method@Gdk.Display.sync]
464// before [method@GdkX11.Display.error_trap_pop] makes sure that any errors
465// generated from earlier requests are handled before the error trap is removed.
466//
467// This is most useful for X11. On windowing systems where requests are
468// handled synchronously, this function will do nothing.
469func (x *Display) Sync() {
470
471	xDisplaySync(x.GoPointer())
472
473}
474
475var xDisplayTranslateKey func(uintptr, uint, ModifierType, int, *uint, *int, *int, *ModifierType) bool
476
477// Translates the contents of a `GdkEventKey` into a keyval, effective group,
478// and level.
479//
480// Modifiers that affected the translation and are thus unavailable for
481// application use are returned in @consumed_modifiers.
482//
483// The @effective_group is the group that was actually used for the
484// translation; some keys such as Enter are not affected by the active
485// keyboard group. The @level is derived from @state.
486//
487// @consumed_modifiers gives modifiers that should be masked out
488// from @state when comparing this key press to a keyboard shortcut.
489// For instance, on a US keyboard, the `plus` symbol is shifted, so
490// when comparing a key press to a `<Control>plus` accelerator `<Shift>`
491// should be masked out.
492//
493// This function should rarely be needed, since `GdkEventKey` already
494// contains the translated keyval. It is exported for the benefit of
495// virtualized test environments.
496func (x *Display) TranslateKey(KeycodeVar uint, StateVar ModifierType, GroupVar int, KeyvalVar *uint, EffectiveGroupVar *int, LevelVar *int, ConsumedVar *ModifierType) bool {
497
498	cret := xDisplayTranslateKey(x.GoPointer(), KeycodeVar, StateVar, GroupVar, KeyvalVar, EffectiveGroupVar, LevelVar, ConsumedVar)
499	return cret
500}
501
502func (c *Display) GoPointer() uintptr {
503	if c == nil {
504		return 0
505	}
506	return c.Ptr
507}
508
509func (c *Display) SetGoPointer(ptr uintptr) {
510	c.Ptr = ptr
511}
512
513// GetPropertyComposited gets the "composited" property.
514// %TRUE if the display properly composites the alpha channel.
515func (x *Display) GetPropertyComposited() bool {
516	var v gobject.Value
517	x.GetProperty("composited", &v)
518	return v.GetBoolean()
519}
520
521// GetPropertyDmabufFormats gets the "dmabuf-formats" property.
522// The dma-buf formats that are supported on this display
523func (x *Display) GetPropertyDmabufFormats() uintptr {
524	var v gobject.Value
525	x.GetProperty("dmabuf-formats", &v)
526	return v.GetPointer()
527}
528
529// GetPropertyInputShapes gets the "input-shapes" property.
530// %TRUE if the display supports input shapes.
531func (x *Display) GetPropertyInputShapes() bool {
532	var v gobject.Value
533	x.GetProperty("input-shapes", &v)
534	return v.GetBoolean()
535}
536
537// GetPropertyRgba gets the "rgba" property.
538// %TRUE if the display supports an alpha channel.
539func (x *Display) GetPropertyRgba() bool {
540	var v gobject.Value
541	x.GetProperty("rgba", &v)
542	return v.GetBoolean()
543}
544
545// GetPropertyShadowWidth gets the "shadow-width" property.
546// %TRUE if the display supports extensible frames.
547func (x *Display) GetPropertyShadowWidth() bool {
548	var v gobject.Value
549	x.GetProperty("shadow-width", &v)
550	return v.GetBoolean()
551}
552
553// Emitted when the connection to the windowing system for @display is closed.
554func (x *Display) ConnectClosed(cb *func(Display, bool)) uint {
555	cbPtr := uintptr(unsafe.Pointer(cb))
556	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
557		handlerID := gobject.SignalConnect(x.GoPointer(), "closed", cbRefPtr)
558		glib.SaveHandlerMapping(handlerID, cbPtr)
559		return handlerID
560	}
561
562	fcb := func(clsPtr uintptr, IsErrorVarp bool) {
563		fa := Display{}
564		fa.Ptr = clsPtr
565		cbFn := *cb
566
567		cbFn(fa, IsErrorVarp)
568
569	}
570	cbRefPtr := purego.NewCallback(fcb)
571	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
572	handlerID := gobject.SignalConnect(x.GoPointer(), "closed", cbRefPtr)
573	glib.SaveHandlerMapping(handlerID, cbPtr)
574	return handlerID
575}
576
577// Emitted when the connection to the windowing system for @display is opened.
578func (x *Display) ConnectOpened(cb *func(Display)) uint {
579	cbPtr := uintptr(unsafe.Pointer(cb))
580	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
581		handlerID := gobject.SignalConnect(x.GoPointer(), "opened", cbRefPtr)
582		glib.SaveHandlerMapping(handlerID, cbPtr)
583		return handlerID
584	}
585
586	fcb := func(clsPtr uintptr) {
587		fa := Display{}
588		fa.Ptr = clsPtr
589		cbFn := *cb
590
591		cbFn(fa)
592
593	}
594	cbRefPtr := purego.NewCallback(fcb)
595	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
596	handlerID := gobject.SignalConnect(x.GoPointer(), "opened", cbRefPtr)
597	glib.SaveHandlerMapping(handlerID, cbPtr)
598	return handlerID
599}
600
601// Emitted whenever a new seat is made known to the windowing system.
602func (x *Display) ConnectSeatAdded(cb *func(Display, uintptr)) uint {
603	cbPtr := uintptr(unsafe.Pointer(cb))
604	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
605		handlerID := gobject.SignalConnect(x.GoPointer(), "seat-added", cbRefPtr)
606		glib.SaveHandlerMapping(handlerID, cbPtr)
607		return handlerID
608	}
609
610	fcb := func(clsPtr uintptr, SeatVarp uintptr) {
611		fa := Display{}
612		fa.Ptr = clsPtr
613		cbFn := *cb
614
615		cbFn(fa, SeatVarp)
616
617	}
618	cbRefPtr := purego.NewCallback(fcb)
619	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
620	handlerID := gobject.SignalConnect(x.GoPointer(), "seat-added", cbRefPtr)
621	glib.SaveHandlerMapping(handlerID, cbPtr)
622	return handlerID
623}
624
625// Emitted whenever a seat is removed by the windowing system.
626func (x *Display) ConnectSeatRemoved(cb *func(Display, uintptr)) uint {
627	cbPtr := uintptr(unsafe.Pointer(cb))
628	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
629		handlerID := gobject.SignalConnect(x.GoPointer(), "seat-removed", cbRefPtr)
630		glib.SaveHandlerMapping(handlerID, cbPtr)
631		return handlerID
632	}
633
634	fcb := func(clsPtr uintptr, SeatVarp uintptr) {
635		fa := Display{}
636		fa.Ptr = clsPtr
637		cbFn := *cb
638
639		cbFn(fa, SeatVarp)
640
641	}
642	cbRefPtr := purego.NewCallback(fcb)
643	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
644	handlerID := gobject.SignalConnect(x.GoPointer(), "seat-removed", cbRefPtr)
645	glib.SaveHandlerMapping(handlerID, cbPtr)
646	return handlerID
647}
648
649// Emitted whenever a setting changes its value.
650func (x *Display) ConnectSettingChanged(cb *func(Display, string)) uint {
651	cbPtr := uintptr(unsafe.Pointer(cb))
652	if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
653		handlerID := gobject.SignalConnect(x.GoPointer(), "setting-changed", cbRefPtr)
654		glib.SaveHandlerMapping(handlerID, cbPtr)
655		return handlerID
656	}
657
658	fcb := func(clsPtr uintptr, SettingVarp uintptr) {
659		fa := Display{}
660		fa.Ptr = clsPtr
661		cbFn := *cb
662
663		cbFn(fa, core.GoString(SettingVarp))
664
665	}
666	cbRefPtr := purego.NewCallback(fcb)
667	glib.SaveCallbackWithClosure(cbPtr, cbRefPtr, cb)
668	handlerID := gobject.SignalConnect(x.GoPointer(), "setting-changed", cbRefPtr)
669	glib.SaveHandlerMapping(handlerID, cbPtr)
670	return handlerID
671}
672
673var xDisplayGetDefault func() uintptr
674
675// Gets the default `GdkDisplay`.
676//
677// This is a convenience function for:
678//
679//	gdk_display_manager_get_default_display (gdk_display_manager_get ())
680func DisplayGetDefault() *Display {
681	var cls *Display
682
683	cret := xDisplayGetDefault()
684
685	if cret == 0 {
686		return nil
687	}
688	gobject.IncreaseRef(cret)
689	cls = &Display{}
690	cls.Ptr = cret
691	return cls
692}
693
694var xDisplayOpen func(uintptr) uintptr
695
696// Opens a display.
697//
698// If opening the display fails, `NULL` is returned.
699func DisplayOpen(DisplayNameVar *string) *Display {
700	var cls *Display
701
702	DisplayNameVarPtr := core.GStrdupNullable(DisplayNameVar)
703	defer core.GFreeNullable(DisplayNameVarPtr)
704
705	cret := xDisplayOpen(DisplayNameVarPtr)
706
707	if cret == 0 {
708		return nil
709	}
710	gobject.IncreaseRef(cret)
711	cls = &Display{}
712	cls.Ptr = cret
713	return cls
714}
715
716func init() {
717	core.SetPackageName("GDK", "gtk4")
718	core.SetSharedLibraries("GDK", []string{"libgtk-4.so.1"})
719	var libs []uintptr
720	for _, libPath := range core.GetPaths("GDK") {
721		lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL)
722		if err != nil {
723			panic(err)
724		}
725		libs = append(libs, lib)
726	}
727
728	core.PuregoSafeRegister(&xDisplayGLibType, libs, "gdk_display_get_type")
729
730	core.PuregoSafeRegister(&xDisplayBeep, libs, "gdk_display_beep")
731	core.PuregoSafeRegister(&xDisplayClose, libs, "gdk_display_close")
732	core.PuregoSafeRegister(&xDisplayCreateGlContext, libs, "gdk_display_create_gl_context")
733	core.PuregoSafeRegister(&xDisplayDeviceIsGrabbed, libs, "gdk_display_device_is_grabbed")
734	core.PuregoSafeRegister(&xDisplayFlush, libs, "gdk_display_flush")
735	core.PuregoSafeRegister(&xDisplayGetAppLaunchContext, libs, "gdk_display_get_app_launch_context")
736	core.PuregoSafeRegister(&xDisplayGetClipboard, libs, "gdk_display_get_clipboard")
737	core.PuregoSafeRegister(&xDisplayGetDefaultSeat, libs, "gdk_display_get_default_seat")
738	core.PuregoSafeRegister(&xDisplayGetDmabufFormats, libs, "gdk_display_get_dmabuf_formats")
739	core.PuregoSafeRegister(&xDisplayGetMonitorAtSurface, libs, "gdk_display_get_monitor_at_surface")
740	core.PuregoSafeRegister(&xDisplayGetMonitors, libs, "gdk_display_get_monitors")
741	core.PuregoSafeRegister(&xDisplayGetName, libs, "gdk_display_get_name")
742	core.PuregoSafeRegister(&xDisplayGetPrimaryClipboard, libs, "gdk_display_get_primary_clipboard")
743	core.PuregoSafeRegister(&xDisplayGetSetting, libs, "gdk_display_get_setting")
744	core.PuregoSafeRegister(&xDisplayGetStartupNotificationId, libs, "gdk_display_get_startup_notification_id")
745	core.PuregoSafeRegister(&xDisplayIsClosed, libs, "gdk_display_is_closed")
746	core.PuregoSafeRegister(&xDisplayIsComposited, libs, "gdk_display_is_composited")
747	core.PuregoSafeRegister(&xDisplayIsRgba, libs, "gdk_display_is_rgba")
748	core.PuregoSafeRegister(&xDisplayListSeats, libs, "gdk_display_list_seats")
749	core.PuregoSafeRegister(&xDisplayMapKeycode, libs, "gdk_display_map_keycode")
750	core.PuregoSafeRegister(&xDisplayMapKeyval, libs, "gdk_display_map_keyval")
751	core.PuregoSafeRegister(&xDisplayNotifyStartupComplete, libs, "gdk_display_notify_startup_complete")
752	core.PuregoSafeRegister(&xDisplayPrepareGl, libs, "gdk_display_prepare_gl")
753	core.PuregoSafeRegister(&xDisplayPutEvent, libs, "gdk_display_put_event")
754	core.PuregoSafeRegister(&xDisplaySupportsInputShapes, libs, "gdk_display_supports_input_shapes")
755	core.PuregoSafeRegister(&xDisplaySupportsShadowWidth, libs, "gdk_display_supports_shadow_width")
756	core.PuregoSafeRegister(&xDisplaySync, libs, "gdk_display_sync")
757	core.PuregoSafeRegister(&xDisplayTranslateKey, libs, "gdk_display_translate_key")
758
759	core.PuregoSafeRegister(&xDisplayGetDefault, libs, "gdk_display_get_default")
760	core.PuregoSafeRegister(&xDisplayOpen, libs, "gdk_display_open")
761
762}

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