detached dd4a135

build(gen): regenerate bindings with detailed signal support

Regenerated Go bindings now include WithDetail methods for signals
marked as detailed in GIR specs (e.g., Settings.ConnectChangedWithDetail).
commit
dd4a1351a68102da0b677f5dad04795cd5d7f255
author
brice · · 2025-12-16 13:52 UTC
parent
8b4a1dd
signature
unsigned
7 files · +183 -0
M v4/adw/adw-alert-dialog.go +23 -0
@@ -2,6 +2,7 @@
22 package adw
33
44 import (
5+ "fmt"
56 "structs"
67 "unsafe"
78
@@ -890,6 +891,28 @@ func (x *AlertDialog) ConnectResponse(cb *func(AlertDialog, string)) uint32 {
890891 return gobject.SignalConnect(x.GoPointer(), "response", cbRefPtr)
891892 }
892893
894+// ConnectResponseWithDetail connects to the "response" signal with a detail string.
895+// The detail is appended as "response::<detail>".
896+func (x *AlertDialog) ConnectResponseWithDetail(detail string, cb *func(AlertDialog, string)) uint32 {
897+ cbPtr := uintptr(unsafe.Pointer(cb))
898+ signalName := fmt.Sprintf("response::%s", detail)
899+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
900+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
901+ }
902+
903+ fcb := func(clsPtr uintptr, ResponseVarp string) {
904+ fa := AlertDialog{}
905+ fa.Ptr = clsPtr
906+ cbFn := *cb
907+
908+ cbFn(fa, ResponseVarp)
909+
910+ }
911+ cbRefPtr := purego.NewCallback(fcb)
912+ glib.SaveCallback(cbPtr, cbRefPtr)
913+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
914+}
915+
893916 // Requests the user's screen reader to announce the given message.
894917 //
895918 // This kind of notification is useful for messages that
@@ -2,6 +2,7 @@
2 package adw2 package adw
3 3
4 import (4 import (
5+ "fmt"
5 "structs"6 "structs"
6 "unsafe"7 "unsafe"
7 8
@@ -890,6 +891,28 @@ func (x *AlertDialog) ConnectResponse(cb *func(AlertDialog, string)) uint32 {
890 return gobject.SignalConnect(x.GoPointer(), "response", cbRefPtr)891 return gobject.SignalConnect(x.GoPointer(), "response", cbRefPtr)
891 }892 }
892 893
894+// ConnectResponseWithDetail connects to the "response" signal with a detail string.
895+// The detail is appended as "response::<detail>".
896+func (x *AlertDialog) ConnectResponseWithDetail(detail string, cb *func(AlertDialog, string)) uint32 {
897+ cbPtr := uintptr(unsafe.Pointer(cb))
898+ signalName := fmt.Sprintf("response::%s", detail)
899+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
900+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
901+ }
902+
903+ fcb := func(clsPtr uintptr, ResponseVarp string) {
904+ fa := AlertDialog{}
905+ fa.Ptr = clsPtr
906+ cbFn := *cb
907+
908+ cbFn(fa, ResponseVarp)
909+
910+ }
911+ cbRefPtr := purego.NewCallback(fcb)
912+ glib.SaveCallback(cbPtr, cbRefPtr)
913+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
914+}
915+
893 // Requests the user's screen reader to announce the given message.916 // Requests the user's screen reader to announce the given message.
894 //917 //
895 // This kind of notification is useful for messages that918 // This kind of notification is useful for messages that
M v4/adw/adw-message-dialog.go +23 -0
@@ -2,6 +2,7 @@
22 package adw
33
44 import (
5+ "fmt"
56 "structs"
67 "unsafe"
78
@@ -830,6 +831,28 @@ func (x *MessageDialog) ConnectResponse(cb *func(MessageDialog, string)) uint32
830831 return gobject.SignalConnect(x.GoPointer(), "response", cbRefPtr)
831832 }
832833
834+// ConnectResponseWithDetail connects to the "response" signal with a detail string.
835+// The detail is appended as "response::<detail>".
836+func (x *MessageDialog) ConnectResponseWithDetail(detail string, cb *func(MessageDialog, string)) uint32 {
837+ cbPtr := uintptr(unsafe.Pointer(cb))
838+ signalName := fmt.Sprintf("response::%s", detail)
839+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
840+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
841+ }
842+
843+ fcb := func(clsPtr uintptr, ResponseVarp string) {
844+ fa := MessageDialog{}
845+ fa.Ptr = clsPtr
846+ cbFn := *cb
847+
848+ cbFn(fa, ResponseVarp)
849+
850+ }
851+ cbRefPtr := purego.NewCallback(fcb)
852+ glib.SaveCallback(cbPtr, cbRefPtr)
853+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
854+}
855+
833856 // Requests the user's screen reader to announce the given message.
834857 //
835858 // This kind of notification is useful for messages that
@@ -2,6 +2,7 @@
2 package adw2 package adw
3 3
4 import (4 import (
5+ "fmt"
5 "structs"6 "structs"
6 "unsafe"7 "unsafe"
7 8
@@ -830,6 +831,28 @@ func (x *MessageDialog) ConnectResponse(cb *func(MessageDialog, string)) uint32
830 return gobject.SignalConnect(x.GoPointer(), "response", cbRefPtr)831 return gobject.SignalConnect(x.GoPointer(), "response", cbRefPtr)
831 }832 }
832 833
834+// ConnectResponseWithDetail connects to the "response" signal with a detail string.
835+// The detail is appended as "response::<detail>".
836+func (x *MessageDialog) ConnectResponseWithDetail(detail string, cb *func(MessageDialog, string)) uint32 {
837+ cbPtr := uintptr(unsafe.Pointer(cb))
838+ signalName := fmt.Sprintf("response::%s", detail)
839+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
840+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
841+ }
842+
843+ fcb := func(clsPtr uintptr, ResponseVarp string) {
844+ fa := MessageDialog{}
845+ fa.Ptr = clsPtr
846+ cbFn := *cb
847+
848+ cbFn(fa, ResponseVarp)
849+
850+ }
851+ cbRefPtr := purego.NewCallback(fcb)
852+ glib.SaveCallback(cbPtr, cbRefPtr)
853+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
854+}
855+
833 // Requests the user's screen reader to announce the given message.856 // Requests the user's screen reader to announce the given message.
834 //857 //
835 // This kind of notification is useful for messages that858 // This kind of notification is useful for messages that
M v4/gio/gdbusproxy.go +23 -0
@@ -2,6 +2,7 @@
22 package gio
33
44 import (
5+ "fmt"
56 "structs"
67 "unsafe"
78
@@ -849,6 +850,28 @@ func (x *DBusProxy) ConnectGSignal(cb *func(DBusProxy, string, string, uintptr))
849850 return gobject.SignalConnect(x.GoPointer(), "g-signal", cbRefPtr)
850851 }
851852
853+// ConnectGSignalWithDetail connects to the "g-signal" signal with a detail string.
854+// The detail is appended as "g-signal::<detail>".
855+func (x *DBusProxy) ConnectGSignalWithDetail(detail string, cb *func(DBusProxy, string, string, uintptr)) uint32 {
856+ cbPtr := uintptr(unsafe.Pointer(cb))
857+ signalName := fmt.Sprintf("g-signal::%s", detail)
858+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
859+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
860+ }
861+
862+ fcb := func(clsPtr uintptr, SenderNameVarp string, SignalNameVarp string, ParametersVarp uintptr) {
863+ fa := DBusProxy{}
864+ fa.Ptr = clsPtr
865+ cbFn := *cb
866+
867+ cbFn(fa, SenderNameVarp, SignalNameVarp, ParametersVarp)
868+
869+ }
870+ cbRefPtr := purego.NewCallback(fcb)
871+ glib.SaveCallback(cbPtr, cbRefPtr)
872+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
873+}
874+
852875 // Starts asynchronous initialization of the object implementing the
853876 // interface. This must be done before any real use of the object after
854877 // initial construction. If the object also implements #GInitable you can
@@ -2,6 +2,7 @@
2 package gio2 package gio
3 3
4 import (4 import (
5+ "fmt"
5 "structs"6 "structs"
6 "unsafe"7 "unsafe"
7 8
@@ -849,6 +850,28 @@ func (x *DBusProxy) ConnectGSignal(cb *func(DBusProxy, string, string, uintptr))
849 return gobject.SignalConnect(x.GoPointer(), "g-signal", cbRefPtr)850 return gobject.SignalConnect(x.GoPointer(), "g-signal", cbRefPtr)
850 }851 }
851 852
853+// ConnectGSignalWithDetail connects to the "g-signal" signal with a detail string.
854+// The detail is appended as "g-signal::<detail>".
855+func (x *DBusProxy) ConnectGSignalWithDetail(detail string, cb *func(DBusProxy, string, string, uintptr)) uint32 {
856+ cbPtr := uintptr(unsafe.Pointer(cb))
857+ signalName := fmt.Sprintf("g-signal::%s", detail)
858+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
859+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
860+ }
861+
862+ fcb := func(clsPtr uintptr, SenderNameVarp string, SignalNameVarp string, ParametersVarp uintptr) {
863+ fa := DBusProxy{}
864+ fa.Ptr = clsPtr
865+ cbFn := *cb
866+
867+ cbFn(fa, SenderNameVarp, SignalNameVarp, ParametersVarp)
868+
869+ }
870+ cbRefPtr := purego.NewCallback(fcb)
871+ glib.SaveCallback(cbPtr, cbRefPtr)
872+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
873+}
874+
852 // Starts asynchronous initialization of the object implementing the875 // Starts asynchronous initialization of the object implementing the
853 // interface. This must be done before any real use of the object after876 // interface. This must be done before any real use of the object after
854 // initial construction. If the object also implements #GInitable you can877 // initial construction. If the object also implements #GInitable you can
M v4/gio/gsettings.go +45 -0
@@ -2,6 +2,7 @@
22 package gio
33
44 import (
5+ "fmt"
56 "structs"
67 "unsafe"
78
@@ -1712,6 +1713,28 @@ func (x *Settings) ConnectChanged(cb *func(Settings, string)) uint32 {
17121713 return gobject.SignalConnect(x.GoPointer(), "changed", cbRefPtr)
17131714 }
17141715
1716+// ConnectChangedWithDetail connects to the "changed" signal with a detail string.
1717+// The detail is appended as "changed::<detail>".
1718+func (x *Settings) ConnectChangedWithDetail(detail string, cb *func(Settings, string)) uint32 {
1719+ cbPtr := uintptr(unsafe.Pointer(cb))
1720+ signalName := fmt.Sprintf("changed::%s", detail)
1721+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1722+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
1723+ }
1724+
1725+ fcb := func(clsPtr uintptr, KeyVarp string) {
1726+ fa := Settings{}
1727+ fa.Ptr = clsPtr
1728+ cbFn := *cb
1729+
1730+ cbFn(fa, KeyVarp)
1731+
1732+ }
1733+ cbRefPtr := purego.NewCallback(fcb)
1734+ glib.SaveCallback(cbPtr, cbRefPtr)
1735+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
1736+}
1737+
17151738 // Emitted once per writability change event that affects this settings object.
17161739 //
17171740 // You should connect
@@ -1777,6 +1800,28 @@ func (x *Settings) ConnectWritableChanged(cb *func(Settings, string)) uint32 {
17771800 return gobject.SignalConnect(x.GoPointer(), "writable-changed", cbRefPtr)
17781801 }
17791802
1803+// ConnectWritableChangedWithDetail connects to the "writable-changed" signal with a detail string.
1804+// The detail is appended as "writable-changed::<detail>".
1805+func (x *Settings) ConnectWritableChangedWithDetail(detail string, cb *func(Settings, string)) uint32 {
1806+ cbPtr := uintptr(unsafe.Pointer(cb))
1807+ signalName := fmt.Sprintf("writable-changed::%s", detail)
1808+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1809+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
1810+ }
1811+
1812+ fcb := func(clsPtr uintptr, KeyVarp string) {
1813+ fa := Settings{}
1814+ fa.Ptr = clsPtr
1815+ cbFn := *cb
1816+
1817+ cbFn(fa, KeyVarp)
1818+
1819+ }
1820+ cbRefPtr := purego.NewCallback(fcb)
1821+ glib.SaveCallback(cbPtr, cbRefPtr)
1822+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
1823+}
1824+
17801825 var xSettingsListRelocatableSchemas func() []string
17811826
17821827 // Deprecated.
@@ -2,6 +2,7 @@
2 package gio2 package gio
3 3
4 import (4 import (
5+ "fmt"
5 "structs"6 "structs"
6 "unsafe"7 "unsafe"
7 8
@@ -1712,6 +1713,28 @@ func (x *Settings) ConnectChanged(cb *func(Settings, string)) uint32 {
1712 return gobject.SignalConnect(x.GoPointer(), "changed", cbRefPtr)1713 return gobject.SignalConnect(x.GoPointer(), "changed", cbRefPtr)
1713 }1714 }
1714 1715
1716+// ConnectChangedWithDetail connects to the "changed" signal with a detail string.
1717+// The detail is appended as "changed::<detail>".
1718+func (x *Settings) ConnectChangedWithDetail(detail string, cb *func(Settings, string)) uint32 {
1719+ cbPtr := uintptr(unsafe.Pointer(cb))
1720+ signalName := fmt.Sprintf("changed::%s", detail)
1721+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1722+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
1723+ }
1724+
1725+ fcb := func(clsPtr uintptr, KeyVarp string) {
1726+ fa := Settings{}
1727+ fa.Ptr = clsPtr
1728+ cbFn := *cb
1729+
1730+ cbFn(fa, KeyVarp)
1731+
1732+ }
1733+ cbRefPtr := purego.NewCallback(fcb)
1734+ glib.SaveCallback(cbPtr, cbRefPtr)
1735+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
1736+}
1737+
1715 // Emitted once per writability change event that affects this settings object.1738 // Emitted once per writability change event that affects this settings object.
1716 //1739 //
1717 // You should connect1740 // You should connect
@@ -1777,6 +1800,28 @@ func (x *Settings) ConnectWritableChanged(cb *func(Settings, string)) uint32 {
1777 return gobject.SignalConnect(x.GoPointer(), "writable-changed", cbRefPtr)1800 return gobject.SignalConnect(x.GoPointer(), "writable-changed", cbRefPtr)
1778 }1801 }
1779 1802
1803+// ConnectWritableChangedWithDetail connects to the "writable-changed" signal with a detail string.
1804+// The detail is appended as "writable-changed::<detail>".
1805+func (x *Settings) ConnectWritableChangedWithDetail(detail string, cb *func(Settings, string)) uint32 {
1806+ cbPtr := uintptr(unsafe.Pointer(cb))
1807+ signalName := fmt.Sprintf("writable-changed::%s", detail)
1808+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
1809+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
1810+ }
1811+
1812+ fcb := func(clsPtr uintptr, KeyVarp string) {
1813+ fa := Settings{}
1814+ fa.Ptr = clsPtr
1815+ cbFn := *cb
1816+
1817+ cbFn(fa, KeyVarp)
1818+
1819+ }
1820+ cbRefPtr := purego.NewCallback(fcb)
1821+ glib.SaveCallback(cbPtr, cbRefPtr)
1822+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
1823+}
1824+
1780 var xSettingsListRelocatableSchemas func() []string1825 var xSettingsListRelocatableSchemas func() []string
1781 1826
1782 // Deprecated.1827 // Deprecated.
M v4/gobject/gobject.go +23 -0
@@ -2,6 +2,7 @@
22 package gobject
33
44 import (
5+ "fmt"
56 "structs"
67 "unsafe"
78
@@ -2364,6 +2365,28 @@ func (x *Object) ConnectNotify(cb *func(Object, uintptr)) uint32 {
23642365 return SignalConnect(x.GoPointer(), "notify", cbRefPtr)
23652366 }
23662367
2368+// ConnectNotifyWithDetail connects to the "notify" signal with a detail string.
2369+// The detail is appended as "notify::<detail>".
2370+func (x *Object) ConnectNotifyWithDetail(detail string, cb *func(Object, uintptr)) uint32 {
2371+ cbPtr := uintptr(unsafe.Pointer(cb))
2372+ signalName := fmt.Sprintf("notify::%s", detail)
2373+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
2374+ return SignalConnect(x.GoPointer(), signalName, cbRefPtr)
2375+ }
2376+
2377+ fcb := func(clsPtr uintptr, PspecVarp uintptr) {
2378+ fa := Object{}
2379+ fa.Ptr = clsPtr
2380+ cbFn := *cb
2381+
2382+ cbFn(fa, PspecVarp)
2383+
2384+ }
2385+ cbRefPtr := purego.NewCallback(fcb)
2386+ glib.SaveCallback(cbPtr, cbRefPtr)
2387+ return SignalConnect(x.GoPointer(), signalName, cbRefPtr)
2388+}
2389+
23672390 var xObjectCompatControl func(uint, uintptr) uint
23682391
23692392 func ObjectCompatControl(WhatVar uint, DataVar uintptr) uint {
@@ -2,6 +2,7 @@
2 package gobject2 package gobject
3 3
4 import (4 import (
5+ "fmt"
5 "structs"6 "structs"
6 "unsafe"7 "unsafe"
7 8
@@ -2364,6 +2365,28 @@ func (x *Object) ConnectNotify(cb *func(Object, uintptr)) uint32 {
2364 return SignalConnect(x.GoPointer(), "notify", cbRefPtr)2365 return SignalConnect(x.GoPointer(), "notify", cbRefPtr)
2365 }2366 }
2366 2367
2368+// ConnectNotifyWithDetail connects to the "notify" signal with a detail string.
2369+// The detail is appended as "notify::<detail>".
2370+func (x *Object) ConnectNotifyWithDetail(detail string, cb *func(Object, uintptr)) uint32 {
2371+ cbPtr := uintptr(unsafe.Pointer(cb))
2372+ signalName := fmt.Sprintf("notify::%s", detail)
2373+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
2374+ return SignalConnect(x.GoPointer(), signalName, cbRefPtr)
2375+ }
2376+
2377+ fcb := func(clsPtr uintptr, PspecVarp uintptr) {
2378+ fa := Object{}
2379+ fa.Ptr = clsPtr
2380+ cbFn := *cb
2381+
2382+ cbFn(fa, PspecVarp)
2383+
2384+ }
2385+ cbRefPtr := purego.NewCallback(fcb)
2386+ glib.SaveCallback(cbPtr, cbRefPtr)
2387+ return SignalConnect(x.GoPointer(), signalName, cbRefPtr)
2388+}
2389+
2367 var xObjectCompatControl func(uint, uintptr) uint2390 var xObjectCompatControl func(uint, uintptr) uint
2368 2391
2369 func ObjectCompatControl(WhatVar uint, DataVar uintptr) uint {2392 func ObjectCompatControl(WhatVar uint, DataVar uintptr) uint {
M v4/gtk/gtkappchooserbutton.go +23 -0
@@ -2,6 +2,7 @@
22 package gtk
33
44 import (
5+ "fmt"
56 "unsafe"
67
78 "github.com/jwijenbergh/purego"
@@ -352,6 +353,28 @@ func (x *AppChooserButton) ConnectCustomItemActivated(cb *func(AppChooserButton,
352353 return gobject.SignalConnect(x.GoPointer(), "custom-item-activated", cbRefPtr)
353354 }
354355
356+// ConnectCustomItemActivatedWithDetail connects to the "custom-item-activated" signal with a detail string.
357+// The detail is appended as "custom-item-activated::<detail>".
358+func (x *AppChooserButton) ConnectCustomItemActivatedWithDetail(detail string, cb *func(AppChooserButton, string)) uint32 {
359+ cbPtr := uintptr(unsafe.Pointer(cb))
360+ signalName := fmt.Sprintf("custom-item-activated::%s", detail)
361+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
362+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
363+ }
364+
365+ fcb := func(clsPtr uintptr, ItemNameVarp string) {
366+ fa := AppChooserButton{}
367+ fa.Ptr = clsPtr
368+ cbFn := *cb
369+
370+ cbFn(fa, ItemNameVarp)
371+
372+ }
373+ cbRefPtr := purego.NewCallback(fcb)
374+ glib.SaveCallback(cbPtr, cbRefPtr)
375+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
376+}
377+
355378 // Requests the user's screen reader to announce the given message.
356379 //
357380 // This kind of notification is useful for messages that
@@ -2,6 +2,7 @@
2 package gtk2 package gtk
3 3
4 import (4 import (
5+ "fmt"
5 "unsafe"6 "unsafe"
6 7
7 "github.com/jwijenbergh/purego"8 "github.com/jwijenbergh/purego"
@@ -352,6 +353,28 @@ func (x *AppChooserButton) ConnectCustomItemActivated(cb *func(AppChooserButton,
352 return gobject.SignalConnect(x.GoPointer(), "custom-item-activated", cbRefPtr)353 return gobject.SignalConnect(x.GoPointer(), "custom-item-activated", cbRefPtr)
353 }354 }
354 355
356+// ConnectCustomItemActivatedWithDetail connects to the "custom-item-activated" signal with a detail string.
357+// The detail is appended as "custom-item-activated::<detail>".
358+func (x *AppChooserButton) ConnectCustomItemActivatedWithDetail(detail string, cb *func(AppChooserButton, string)) uint32 {
359+ cbPtr := uintptr(unsafe.Pointer(cb))
360+ signalName := fmt.Sprintf("custom-item-activated::%s", detail)
361+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
362+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
363+ }
364+
365+ fcb := func(clsPtr uintptr, ItemNameVarp string) {
366+ fa := AppChooserButton{}
367+ fa.Ptr = clsPtr
368+ cbFn := *cb
369+
370+ cbFn(fa, ItemNameVarp)
371+
372+ }
373+ cbRefPtr := purego.NewCallback(fcb)
374+ glib.SaveCallback(cbPtr, cbRefPtr)
375+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
376+}
377+
355 // Requests the user's screen reader to announce the given message.378 // Requests the user's screen reader to announce the given message.
356 //379 //
357 // This kind of notification is useful for messages that380 // This kind of notification is useful for messages that
M v4/gtk/gtklevelbar.go +23 -0
@@ -2,6 +2,7 @@
22 package gtk
33
44 import (
5+ "fmt"
56 "unsafe"
67
78 "github.com/jwijenbergh/purego"
@@ -422,6 +423,28 @@ func (x *LevelBar) ConnectOffsetChanged(cb *func(LevelBar, string)) uint32 {
422423 return gobject.SignalConnect(x.GoPointer(), "offset-changed", cbRefPtr)
423424 }
424425
426+// ConnectOffsetChangedWithDetail connects to the "offset-changed" signal with a detail string.
427+// The detail is appended as "offset-changed::<detail>".
428+func (x *LevelBar) ConnectOffsetChangedWithDetail(detail string, cb *func(LevelBar, string)) uint32 {
429+ cbPtr := uintptr(unsafe.Pointer(cb))
430+ signalName := fmt.Sprintf("offset-changed::%s", detail)
431+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
432+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
433+ }
434+
435+ fcb := func(clsPtr uintptr, NameVarp string) {
436+ fa := LevelBar{}
437+ fa.Ptr = clsPtr
438+ cbFn := *cb
439+
440+ cbFn(fa, NameVarp)
441+
442+ }
443+ cbRefPtr := purego.NewCallback(fcb)
444+ glib.SaveCallback(cbPtr, cbRefPtr)
445+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
446+}
447+
425448 // Requests the user's screen reader to announce the given message.
426449 //
427450 // This kind of notification is useful for messages that
@@ -2,6 +2,7 @@
2 package gtk2 package gtk
3 3
4 import (4 import (
5+ "fmt"
5 "unsafe"6 "unsafe"
6 7
7 "github.com/jwijenbergh/purego"8 "github.com/jwijenbergh/purego"
@@ -422,6 +423,28 @@ func (x *LevelBar) ConnectOffsetChanged(cb *func(LevelBar, string)) uint32 {
422 return gobject.SignalConnect(x.GoPointer(), "offset-changed", cbRefPtr)423 return gobject.SignalConnect(x.GoPointer(), "offset-changed", cbRefPtr)
423 }424 }
424 425
426+// ConnectOffsetChangedWithDetail connects to the "offset-changed" signal with a detail string.
427+// The detail is appended as "offset-changed::<detail>".
428+func (x *LevelBar) ConnectOffsetChangedWithDetail(detail string, cb *func(LevelBar, string)) uint32 {
429+ cbPtr := uintptr(unsafe.Pointer(cb))
430+ signalName := fmt.Sprintf("offset-changed::%s", detail)
431+ if cbRefPtr, ok := glib.GetCallback(cbPtr); ok {
432+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
433+ }
434+
435+ fcb := func(clsPtr uintptr, NameVarp string) {
436+ fa := LevelBar{}
437+ fa.Ptr = clsPtr
438+ cbFn := *cb
439+
440+ cbFn(fa, NameVarp)
441+
442+ }
443+ cbRefPtr := purego.NewCallback(fcb)
444+ glib.SaveCallback(cbPtr, cbRefPtr)
445+ return gobject.SignalConnect(x.GoPointer(), signalName, cbRefPtr)
446+}
447+
425 // Requests the user's screen reader to announce the given message.448 // Requests the user's screen reader to announce the given message.
426 //449 //
427 // This kind of notification is useful for messages that450 // This kind of notification is useful for messages that

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