All: Use SignalConnectData instead of ObjectConnect
This allows us to disconnect signals as ObjectConnect does not return a handler id. Also adds a ConnectSignal helper that uses SignalConnectData instead of ObjectConnect
- commit
- 9d802131f039ee5712a97c2a00206ae1e8694a1f
- author
- jwijenbergh · · 2023-10-09 10:02 UTC
- committer
- jwijenbergh · · 2023-10-09 10:04 UTC
- parent
- 3f56692
- signature
- GPG Unverified
1A2298F6C34F96E5The key is unknown
146 files · +924 -908
M templates/go +2 -2
| @@ -147,7 +147,7 @@ func (c *{{.Name}}) SetGoPointer(ptr uintptr) { | |||
| 147 | 147 | {{range .Signals -}} | |
| 148 | 148 | ||
| 149 | 149 | {{.Doc}} | |
| 150 | - | func (x *{{$outer.Name}}) Connect{{.Name}}(cb func({{$outer.Name}} {{convc .Args.API.Types}}) {{.Ret.Value}}) { | |
| 150 | + | func (x *{{$outer.Name}}) Connect{{.Name}}(cb func({{$outer.Name}} {{convc .Args.API.Types}}) {{.Ret.Value}}) uint32 { | |
| 151 | 151 | fcb := func(clsPtr uintptr {{convc .Args.Pure.Full}}) {{.Ret.Raw}} { | |
| 152 | 152 | fa := {{$outer.Name}}{} | |
| 153 | 153 | fa.Ptr = clsPtr | |
| @@ -160,7 +160,7 @@ func (x *{{$outer.Name}}) Connect{{.Name}}(cb func({{$outer.Name}} {{convc .Args | |||
| 160 | 160 | cb(fa {{convc .Args.Pure.Call}}) | |
| 161 | 161 | {{end}} | |
| 162 | 162 | } | |
| 163 | - | {{if $NotGObject}}gobject.{{end}}ObjectConnect(x.GoPointer(), "signal::{{.CName}}", purego.NewCallback(fcb)) | |
| 163 | + | return {{if $NotGObject}}gobject.{{end}}SignalConnect(x.GoPointer(), "{{.CName}}", purego.NewCallback(fcb)) | |
| 164 | 164 | } | |
| 165 | 165 | {{end}} | |
| 166 | 166 | ||
M templates/gobject +10 -2
| @@ -30,14 +30,22 @@ func IncreaseRef(a uintptr) { | |||
| 30 | 30 | xObjectRefSink(a) | |
| 31 | 31 | } | |
| 32 | 32 | ||
| 33 | - | func ObjectConnect(a uintptr, b string, c ...interface{}) uintptr { | |
| 34 | - | return xObjectConnect(a, b, c...) | |
| 33 | + | func SignalConnect(a uintptr, b string, c uintptr) uint32 { | |
| 34 | + | return xSignalConnectData(a, b, c, 0, 0, 0) | |
| 35 | 35 | } | |
| 36 | 36 | ||
| 37 | 37 | func (o Object) Cast(v Ptr) { | |
| 38 | 38 | v.SetGoPointer(o.GoPointer()) | |
| 39 | 39 | } | |
| 40 | 40 | ||
| 41 | + | func (o Object) ConnectSignal(signal string, cb func()) uint32 { | |
| 42 | + | return SignalConnect(o.GoPointer(), signal, purego.NewCallback(cb)) | |
| 43 | + | } | |
| 44 | + | ||
| 45 | + | func (o Object) DisconnectSignal(handler uint32) { | |
| 46 | + | SignalHandlerDisconnect(&o, handler) | |
| 47 | + | } | |
| 48 | + | ||
| 41 | 49 | // NewCallback is an alias to purego.NewCallback | |
| 42 | 50 | func NewCallback(fn interface{}) uintptr { | |
| 43 | 51 | return purego.NewCallback(fn) | |
M v4/adw/adw-about-window.go +2 -2
| @@ -899,7 +899,7 @@ func (c *AboutWindow) SetGoPointer(ptr uintptr) { | |||
| 899 | 899 | // | |
| 900 | 900 | // Applications may connect to it to override the default behavior, which is | |
| 901 | 901 | // to call [func@Gtk.show_uri]. | |
| 902 | - | func (x *AboutWindow) ConnectActivateLink(cb func(AboutWindow, string) bool) { | |
| 902 | + | func (x *AboutWindow) ConnectActivateLink(cb func(AboutWindow, string) bool) uint32 { | |
| 903 | 903 | fcb := func(clsPtr uintptr, UriVarp string) bool { | |
| 904 | 904 | fa := AboutWindow{} | |
| 905 | 905 | fa.Ptr = clsPtr | |
| @@ -907,7 +907,7 @@ func (x *AboutWindow) ConnectActivateLink(cb func(AboutWindow, string) bool) { | |||
| 907 | 907 | return cb(fa, UriVarp) | |
| 908 | 908 | ||
| 909 | 909 | } | |
| 910 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate-link", purego.NewCallback(fcb)) | |
| 910 | + | return gobject.SignalConnect(x.GoPointer(), "activate-link", purego.NewCallback(fcb)) | |
| 911 | 911 | } | |
| 912 | 912 | ||
| 913 | 913 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/adw/adw-action-row.go +2 -2
| @@ -259,7 +259,7 @@ func (c *ActionRow) SetGoPointer(ptr uintptr) { | |||
| 259 | 259 | } | |
| 260 | 260 | ||
| 261 | 261 | // This signal is emitted after the row has been activated. | |
| 262 | - | func (x *ActionRow) ConnectActivated(cb func(ActionRow)) { | |
| 262 | + | func (x *ActionRow) ConnectActivated(cb func(ActionRow)) uint32 { | |
| 263 | 263 | fcb := func(clsPtr uintptr) { | |
| 264 | 264 | fa := ActionRow{} | |
| 265 | 265 | fa.Ptr = clsPtr | |
| @@ -267,7 +267,7 @@ func (x *ActionRow) ConnectActivated(cb func(ActionRow)) { | |||
| 267 | 267 | cb(fa) | |
| 268 | 268 | ||
| 269 | 269 | } | |
| 270 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activated", purego.NewCallback(fcb)) | |
| 270 | + | return gobject.SignalConnect(x.GoPointer(), "activated", purego.NewCallback(fcb)) | |
| 271 | 271 | } | |
| 272 | 272 | ||
| 273 | 273 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/adw/adw-animation.go +2 -2
| @@ -272,7 +272,7 @@ func (c *Animation) SetGoPointer(ptr uintptr) { | |||
| 272 | 272 | ||
| 273 | 273 | // This signal is emitted when the animation has been completed, either on its | |
| 274 | 274 | // own or via calling [method@Animation.skip]. | |
| 275 | - | func (x *Animation) ConnectDone(cb func(Animation)) { | |
| 275 | + | func (x *Animation) ConnectDone(cb func(Animation)) uint32 { | |
| 276 | 276 | fcb := func(clsPtr uintptr) { | |
| 277 | 277 | fa := Animation{} | |
| 278 | 278 | fa.Ptr = clsPtr | |
| @@ -280,7 +280,7 @@ func (x *Animation) ConnectDone(cb func(Animation)) { | |||
| 280 | 280 | cb(fa) | |
| 281 | 281 | ||
| 282 | 282 | } | |
| 283 | - | gobject.ObjectConnect(x.GoPointer(), "signal::done", purego.NewCallback(fcb)) | |
| 283 | + | return gobject.SignalConnect(x.GoPointer(), "done", purego.NewCallback(fcb)) | |
| 284 | 284 | } | |
| 285 | 285 | ||
| 286 | 286 | func init() { | |
M v4/adw/adw-banner.go +2 -2
| @@ -156,7 +156,7 @@ func (c *Banner) SetGoPointer(ptr uintptr) { | |||
| 156 | 156 | // This signal is emitted after the action button has been clicked. | |
| 157 | 157 | // | |
| 158 | 158 | // It can be used as an alternative to setting an action. | |
| 159 | - | func (x *Banner) ConnectButtonClicked(cb func(Banner)) { | |
| 159 | + | func (x *Banner) ConnectButtonClicked(cb func(Banner)) uint32 { | |
| 160 | 160 | fcb := func(clsPtr uintptr) { | |
| 161 | 161 | fa := Banner{} | |
| 162 | 162 | fa.Ptr = clsPtr | |
| @@ -164,7 +164,7 @@ func (x *Banner) ConnectButtonClicked(cb func(Banner)) { | |||
| 164 | 164 | cb(fa) | |
| 165 | 165 | ||
| 166 | 166 | } | |
| 167 | - | gobject.ObjectConnect(x.GoPointer(), "signal::button-clicked", purego.NewCallback(fcb)) | |
| 167 | + | return gobject.SignalConnect(x.GoPointer(), "button-clicked", purego.NewCallback(fcb)) | |
| 168 | 168 | } | |
| 169 | 169 | ||
| 170 | 170 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/adw/adw-carousel.go +2 -2
| @@ -314,7 +314,7 @@ func (c *Carousel) SetGoPointer(ptr uintptr) { | |||
| 314 | 314 | // It can be used to implement "infinite scrolling" by amending the pages | |
| 315 | 315 | // after every scroll. Note that an empty carousel is indicated by | |
| 316 | 316 | // `(int)index == -1`. | |
| 317 | - | func (x *Carousel) ConnectPageChanged(cb func(Carousel, uint)) { | |
| 317 | + | func (x *Carousel) ConnectPageChanged(cb func(Carousel, uint)) uint32 { | |
| 318 | 318 | fcb := func(clsPtr uintptr, IndexVarp uint) { | |
| 319 | 319 | fa := Carousel{} | |
| 320 | 320 | fa.Ptr = clsPtr | |
| @@ -322,7 +322,7 @@ func (x *Carousel) ConnectPageChanged(cb func(Carousel, uint)) { | |||
| 322 | 322 | cb(fa, IndexVarp) | |
| 323 | 323 | ||
| 324 | 324 | } | |
| 325 | - | gobject.ObjectConnect(x.GoPointer(), "signal::page-changed", purego.NewCallback(fcb)) | |
| 325 | + | return gobject.SignalConnect(x.GoPointer(), "page-changed", purego.NewCallback(fcb)) | |
| 326 | 326 | } | |
| 327 | 327 | ||
| 328 | 328 | // Gets the progress @self will snap back to after the gesture is canceled. | |
M v4/adw/adw-entry-row.go +4 -4
| @@ -253,7 +253,7 @@ func (c *EntryRow) SetGoPointer(ptr uintptr) { | |||
| 253 | 253 | // Emitted when the apply button is pressed. | |
| 254 | 254 | // | |
| 255 | 255 | // See [property@EntryRow:show-apply-button]. | |
| 256 | - | func (x *EntryRow) ConnectApply(cb func(EntryRow)) { | |
| 256 | + | func (x *EntryRow) ConnectApply(cb func(EntryRow)) uint32 { | |
| 257 | 257 | fcb := func(clsPtr uintptr) { | |
| 258 | 258 | fa := EntryRow{} | |
| 259 | 259 | fa.Ptr = clsPtr | |
| @@ -261,11 +261,11 @@ func (x *EntryRow) ConnectApply(cb func(EntryRow)) { | |||
| 261 | 261 | cb(fa) | |
| 262 | 262 | ||
| 263 | 263 | } | |
| 264 | - | gobject.ObjectConnect(x.GoPointer(), "signal::apply", purego.NewCallback(fcb)) | |
| 264 | + | return gobject.SignalConnect(x.GoPointer(), "apply", purego.NewCallback(fcb)) | |
| 265 | 265 | } | |
| 266 | 266 | ||
| 267 | 267 | // Emitted when the embedded entry is activated. | |
| 268 | - | func (x *EntryRow) ConnectEntryActivated(cb func(EntryRow)) { | |
| 268 | + | func (x *EntryRow) ConnectEntryActivated(cb func(EntryRow)) uint32 { | |
| 269 | 269 | fcb := func(clsPtr uintptr) { | |
| 270 | 270 | fa := EntryRow{} | |
| 271 | 271 | fa.Ptr = clsPtr | |
| @@ -273,7 +273,7 @@ func (x *EntryRow) ConnectEntryActivated(cb func(EntryRow)) { | |||
| 273 | 273 | cb(fa) | |
| 274 | 274 | ||
| 275 | 275 | } | |
| 276 | - | gobject.ObjectConnect(x.GoPointer(), "signal::entry-activated", purego.NewCallback(fcb)) | |
| 276 | + | return gobject.SignalConnect(x.GoPointer(), "entry-activated", purego.NewCallback(fcb)) | |
| 277 | 277 | } | |
| 278 | 278 | ||
| 279 | 279 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/adw/adw-message-dialog.go +2 -2
| @@ -621,7 +621,7 @@ func (c *MessageDialog) SetGoPointer(ptr uintptr) { | |||
| 621 | 621 | // if the dialog was closed by pressing <kbd>Escape</kbd> or with a system | |
| 622 | 622 | // action, @response will be set to the value of | |
| 623 | 623 | // [property@MessageDialog:close-response]. | |
| 624 | - | func (x *MessageDialog) ConnectResponse(cb func(MessageDialog, string)) { | |
| 624 | + | func (x *MessageDialog) ConnectResponse(cb func(MessageDialog, string)) uint32 { | |
| 625 | 625 | fcb := func(clsPtr uintptr, ResponseVarp string) { | |
| 626 | 626 | fa := MessageDialog{} | |
| 627 | 627 | fa.Ptr = clsPtr | |
| @@ -629,7 +629,7 @@ func (x *MessageDialog) ConnectResponse(cb func(MessageDialog, string)) { | |||
| 629 | 629 | cb(fa, ResponseVarp) | |
| 630 | 630 | ||
| 631 | 631 | } | |
| 632 | - | gobject.ObjectConnect(x.GoPointer(), "signal::response", purego.NewCallback(fcb)) | |
| 632 | + | return gobject.SignalConnect(x.GoPointer(), "response", purego.NewCallback(fcb)) | |
| 633 | 633 | } | |
| 634 | 634 | ||
| 635 | 635 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/adw/adw-split-button.go +4 -4
| @@ -313,7 +313,7 @@ func (c *SplitButton) SetGoPointer(ptr uintptr) { | |||
| 313 | 313 | // | |
| 314 | 314 | // This is an action signal. Applications should never connect to this signal, | |
| 315 | 315 | // but use the [signal@SplitButton::clicked] signal. | |
| 316 | - | func (x *SplitButton) ConnectActivate(cb func(SplitButton)) { | |
| 316 | + | func (x *SplitButton) ConnectActivate(cb func(SplitButton)) uint32 { | |
| 317 | 317 | fcb := func(clsPtr uintptr) { | |
| 318 | 318 | fa := SplitButton{} | |
| 319 | 319 | fa.Ptr = clsPtr | |
| @@ -321,11 +321,11 @@ func (x *SplitButton) ConnectActivate(cb func(SplitButton)) { | |||
| 321 | 321 | cb(fa) | |
| 322 | 322 | ||
| 323 | 323 | } | |
| 324 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 324 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 325 | 325 | } | |
| 326 | 326 | ||
| 327 | 327 | // Emitted when the button has been activated (pressed and released). | |
| 328 | - | func (x *SplitButton) ConnectClicked(cb func(SplitButton)) { | |
| 328 | + | func (x *SplitButton) ConnectClicked(cb func(SplitButton)) uint32 { | |
| 329 | 329 | fcb := func(clsPtr uintptr) { | |
| 330 | 330 | fa := SplitButton{} | |
| 331 | 331 | fa.Ptr = clsPtr | |
| @@ -333,7 +333,7 @@ func (x *SplitButton) ConnectClicked(cb func(SplitButton)) { | |||
| 333 | 333 | cb(fa) | |
| 334 | 334 | ||
| 335 | 335 | } | |
| 336 | - | gobject.ObjectConnect(x.GoPointer(), "signal::clicked", purego.NewCallback(fcb)) | |
| 336 | + | return gobject.SignalConnect(x.GoPointer(), "clicked", purego.NewCallback(fcb)) | |
| 337 | 337 | } | |
| 338 | 338 | ||
| 339 | 339 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/adw/adw-swipe-tracker.go +8 -8
| @@ -168,7 +168,7 @@ func (c *SwipeTracker) SetGoPointer(ptr uintptr) { | |||
| 168 | 168 | ||
| 169 | 169 | // This signal is emitted right before a swipe will be started, after the | |
| 170 | 170 | // drag threshold has been passed. | |
| 171 | - | func (x *SwipeTracker) ConnectBeginSwipe(cb func(SwipeTracker)) { | |
| 171 | + | func (x *SwipeTracker) ConnectBeginSwipe(cb func(SwipeTracker)) uint32 { | |
| 172 | 172 | fcb := func(clsPtr uintptr) { | |
| 173 | 173 | fa := SwipeTracker{} | |
| 174 | 174 | fa.Ptr = clsPtr | |
| @@ -176,7 +176,7 @@ func (x *SwipeTracker) ConnectBeginSwipe(cb func(SwipeTracker)) { | |||
| 176 | 176 | cb(fa) | |
| 177 | 177 | ||
| 178 | 178 | } | |
| 179 | - | gobject.ObjectConnect(x.GoPointer(), "signal::begin-swipe", purego.NewCallback(fcb)) | |
| 179 | + | return gobject.SignalConnect(x.GoPointer(), "begin-swipe", purego.NewCallback(fcb)) | |
| 180 | 180 | } | |
| 181 | 181 | ||
| 182 | 182 | // This signal is emitted as soon as the gesture has stopped. | |
| @@ -185,7 +185,7 @@ func (x *SwipeTracker) ConnectBeginSwipe(cb func(SwipeTracker)) { | |||
| 185 | 185 | // value to @to with an animation using @velocity as the initial velocity, | |
| 186 | 186 | // provided in pixels per second. [class@SpringAnimation] is usually a good | |
| 187 | 187 | // fit for this. | |
| 188 | - | func (x *SwipeTracker) ConnectEndSwipe(cb func(SwipeTracker, float64, float64)) { | |
| 188 | + | func (x *SwipeTracker) ConnectEndSwipe(cb func(SwipeTracker, float64, float64)) uint32 { | |
| 189 | 189 | fcb := func(clsPtr uintptr, VelocityVarp float64, ToVarp float64) { | |
| 190 | 190 | fa := SwipeTracker{} | |
| 191 | 191 | fa.Ptr = clsPtr | |
| @@ -193,14 +193,14 @@ func (x *SwipeTracker) ConnectEndSwipe(cb func(SwipeTracker, float64, float64)) | |||
| 193 | 193 | cb(fa, VelocityVarp, ToVarp) | |
| 194 | 194 | ||
| 195 | 195 | } | |
| 196 | - | gobject.ObjectConnect(x.GoPointer(), "signal::end-swipe", purego.NewCallback(fcb)) | |
| 196 | + | return gobject.SignalConnect(x.GoPointer(), "end-swipe", purego.NewCallback(fcb)) | |
| 197 | 197 | } | |
| 198 | 198 | ||
| 199 | 199 | // This signal is emitted when a possible swipe is detected. | |
| 200 | 200 | // | |
| 201 | 201 | // The @direction value can be used to restrict the swipe to a certain | |
| 202 | 202 | // direction. | |
| 203 | - | func (x *SwipeTracker) ConnectPrepare(cb func(SwipeTracker, NavigationDirection)) { | |
| 203 | + | func (x *SwipeTracker) ConnectPrepare(cb func(SwipeTracker, NavigationDirection)) uint32 { | |
| 204 | 204 | fcb := func(clsPtr uintptr, DirectionVarp NavigationDirection) { | |
| 205 | 205 | fa := SwipeTracker{} | |
| 206 | 206 | fa.Ptr = clsPtr | |
| @@ -208,11 +208,11 @@ func (x *SwipeTracker) ConnectPrepare(cb func(SwipeTracker, NavigationDirection) | |||
| 208 | 208 | cb(fa, DirectionVarp) | |
| 209 | 209 | ||
| 210 | 210 | } | |
| 211 | - | gobject.ObjectConnect(x.GoPointer(), "signal::prepare", purego.NewCallback(fcb)) | |
| 211 | + | return gobject.SignalConnect(x.GoPointer(), "prepare", purego.NewCallback(fcb)) | |
| 212 | 212 | } | |
| 213 | 213 | ||
| 214 | 214 | // This signal is emitted every time the progress value changes. | |
| 215 | - | func (x *SwipeTracker) ConnectUpdateSwipe(cb func(SwipeTracker, float64)) { | |
| 215 | + | func (x *SwipeTracker) ConnectUpdateSwipe(cb func(SwipeTracker, float64)) uint32 { | |
| 216 | 216 | fcb := func(clsPtr uintptr, ProgressVarp float64) { | |
| 217 | 217 | fa := SwipeTracker{} | |
| 218 | 218 | fa.Ptr = clsPtr | |
| @@ -220,7 +220,7 @@ func (x *SwipeTracker) ConnectUpdateSwipe(cb func(SwipeTracker, float64)) { | |||
| 220 | 220 | cb(fa, ProgressVarp) | |
| 221 | 221 | ||
| 222 | 222 | } | |
| 223 | - | gobject.ObjectConnect(x.GoPointer(), "signal::update-swipe", purego.NewCallback(fcb)) | |
| 223 | + | return gobject.SignalConnect(x.GoPointer(), "update-swipe", purego.NewCallback(fcb)) | |
| 224 | 224 | } | |
| 225 | 225 | ||
| 226 | 226 | // Retrieves the orientation of the @orientable. | |
M v4/adw/adw-tab-bar.go +4 -4
| @@ -280,7 +280,7 @@ func (c *TabBar) SetGoPointer(ptr uintptr) { | |||
| 280 | 280 | // [method@TabBar.setup_extra_drop_target]. | |
| 281 | 281 | // | |
| 282 | 282 | // See [signal@Gtk.DropTarget::drop]. | |
| 283 | - | func (x *TabBar) ConnectExtraDragDrop(cb func(TabBar, uintptr, uintptr) bool) { | |
| 283 | + | func (x *TabBar) ConnectExtraDragDrop(cb func(TabBar, uintptr, uintptr) bool) uint32 { | |
| 284 | 284 | fcb := func(clsPtr uintptr, PageVarp uintptr, ValueVarp uintptr) bool { | |
| 285 | 285 | fa := TabBar{} | |
| 286 | 286 | fa.Ptr = clsPtr | |
| @@ -288,7 +288,7 @@ func (x *TabBar) ConnectExtraDragDrop(cb func(TabBar, uintptr, uintptr) bool) { | |||
| 288 | 288 | return cb(fa, PageVarp, ValueVarp) | |
| 289 | 289 | ||
| 290 | 290 | } | |
| 291 | - | gobject.ObjectConnect(x.GoPointer(), "signal::extra-drag-drop", purego.NewCallback(fcb)) | |
| 291 | + | return gobject.SignalConnect(x.GoPointer(), "extra-drag-drop", purego.NewCallback(fcb)) | |
| 292 | 292 | } | |
| 293 | 293 | ||
| 294 | 294 | // This signal is emitted when the dropped content is preloaded. | |
| @@ -300,7 +300,7 @@ func (x *TabBar) ConnectExtraDragDrop(cb func(TabBar, uintptr, uintptr) bool) { | |||
| 300 | 300 | // [method@TabBar.setup_extra_drop_target]. | |
| 301 | 301 | // | |
| 302 | 302 | // See [property@Gtk.DropTarget:value]. | |
| 303 | - | func (x *TabBar) ConnectExtraDragValue(cb func(TabBar, uintptr, uintptr) gdk.DragAction) { | |
| 303 | + | func (x *TabBar) ConnectExtraDragValue(cb func(TabBar, uintptr, uintptr) gdk.DragAction) uint32 { | |
| 304 | 304 | fcb := func(clsPtr uintptr, PageVarp uintptr, ValueVarp uintptr) gdk.DragAction { | |
| 305 | 305 | fa := TabBar{} | |
| 306 | 306 | fa.Ptr = clsPtr | |
| @@ -308,7 +308,7 @@ func (x *TabBar) ConnectExtraDragValue(cb func(TabBar, uintptr, uintptr) gdk.Dra | |||
| 308 | 308 | return cb(fa, PageVarp, ValueVarp) | |
| 309 | 309 | ||
| 310 | 310 | } | |
| 311 | - | gobject.ObjectConnect(x.GoPointer(), "signal::extra-drag-value", purego.NewCallback(fcb)) | |
| 311 | + | return gobject.SignalConnect(x.GoPointer(), "extra-drag-value", purego.NewCallback(fcb)) | |
| 312 | 312 | } | |
| 313 | 313 | ||
| 314 | 314 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/adw/adw-tab-button.go +4 -4
| @@ -110,7 +110,7 @@ func (c *TabButton) SetGoPointer(ptr uintptr) { | |||
| 110 | 110 | // | |
| 111 | 111 | // This is an action signal. Applications should never connect to this signal, | |
| 112 | 112 | // but use the [signal@TabButton::clicked] signal. | |
| 113 | - | func (x *TabButton) ConnectActivate(cb func(TabButton)) { | |
| 113 | + | func (x *TabButton) ConnectActivate(cb func(TabButton)) uint32 { | |
| 114 | 114 | fcb := func(clsPtr uintptr) { | |
| 115 | 115 | fa := TabButton{} | |
| 116 | 116 | fa.Ptr = clsPtr | |
| @@ -118,11 +118,11 @@ func (x *TabButton) ConnectActivate(cb func(TabButton)) { | |||
| 118 | 118 | cb(fa) | |
| 119 | 119 | ||
| 120 | 120 | } | |
| 121 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 121 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 122 | 122 | } | |
| 123 | 123 | ||
| 124 | 124 | // Emitted when the button has been activated (pressed and released). | |
| 125 | - | func (x *TabButton) ConnectClicked(cb func(TabButton)) { | |
| 125 | + | func (x *TabButton) ConnectClicked(cb func(TabButton)) uint32 { | |
| 126 | 126 | fcb := func(clsPtr uintptr) { | |
| 127 | 127 | fa := TabButton{} | |
| 128 | 128 | fa.Ptr = clsPtr | |
| @@ -130,7 +130,7 @@ func (x *TabButton) ConnectClicked(cb func(TabButton)) { | |||
| 130 | 130 | cb(fa) | |
| 131 | 131 | ||
| 132 | 132 | } | |
| 133 | - | gobject.ObjectConnect(x.GoPointer(), "signal::clicked", purego.NewCallback(fcb)) | |
| 133 | + | return gobject.SignalConnect(x.GoPointer(), "clicked", purego.NewCallback(fcb)) | |
| 134 | 134 | } | |
| 135 | 135 | ||
| 136 | 136 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/adw/adw-tab-overview.go +6 -6
| @@ -373,7 +373,7 @@ func (c *TabOverview) SetGoPointer(ptr uintptr) { | |||
| 373 | 373 | // | |
| 374 | 374 | // The signal handler is expected to create a new page in the corresponding | |
| 375 | 375 | // [class@TabView] and return it. | |
| 376 | - | func (x *TabOverview) ConnectCreateTab(cb func(TabOverview) TabPage) { | |
| 376 | + | func (x *TabOverview) ConnectCreateTab(cb func(TabOverview) TabPage) uint32 { | |
| 377 | 377 | fcb := func(clsPtr uintptr) uintptr { | |
| 378 | 378 | fa := TabOverview{} | |
| 379 | 379 | fa.Ptr = clsPtr | |
| @@ -382,7 +382,7 @@ func (x *TabOverview) ConnectCreateTab(cb func(TabOverview) TabPage) { | |||
| 382 | 382 | return CreateTabCls.Ptr | |
| 383 | 383 | ||
| 384 | 384 | } | |
| 385 | - | gobject.ObjectConnect(x.GoPointer(), "signal::create-tab", purego.NewCallback(fcb)) | |
| 385 | + | return gobject.SignalConnect(x.GoPointer(), "create-tab", purego.NewCallback(fcb)) | |
| 386 | 386 | } | |
| 387 | 387 | ||
| 388 | 388 | // This signal is emitted when content is dropped onto a tab. | |
| @@ -391,7 +391,7 @@ func (x *TabOverview) ConnectCreateTab(cb func(TabOverview) TabPage) { | |||
| 391 | 391 | // [method@TabOverview.setup_extra_drop_target]. | |
| 392 | 392 | // | |
| 393 | 393 | // See [signal@Gtk.DropTarget::drop]. | |
| 394 | - | func (x *TabOverview) ConnectExtraDragDrop(cb func(TabOverview, uintptr, uintptr) bool) { | |
| 394 | + | func (x *TabOverview) ConnectExtraDragDrop(cb func(TabOverview, uintptr, uintptr) bool) uint32 { | |
| 395 | 395 | fcb := func(clsPtr uintptr, PageVarp uintptr, ValueVarp uintptr) bool { | |
| 396 | 396 | fa := TabOverview{} | |
| 397 | 397 | fa.Ptr = clsPtr | |
| @@ -399,7 +399,7 @@ func (x *TabOverview) ConnectExtraDragDrop(cb func(TabOverview, uintptr, uintptr | |||
| 399 | 399 | return cb(fa, PageVarp, ValueVarp) | |
| 400 | 400 | ||
| 401 | 401 | } | |
| 402 | - | gobject.ObjectConnect(x.GoPointer(), "signal::extra-drag-drop", purego.NewCallback(fcb)) | |
| 402 | + | return gobject.SignalConnect(x.GoPointer(), "extra-drag-drop", purego.NewCallback(fcb)) | |
| 403 | 403 | } | |
| 404 | 404 | ||
| 405 | 405 | // This signal is emitted when the dropped content is preloaded. | |
| @@ -411,7 +411,7 @@ func (x *TabOverview) ConnectExtraDragDrop(cb func(TabOverview, uintptr, uintptr | |||
| 411 | 411 | // [method@TabOverview.setup_extra_drop_target]. | |
| 412 | 412 | // | |
| 413 | 413 | // See [property@Gtk.DropTarget:value]. | |
| 414 | - | func (x *TabOverview) ConnectExtraDragValue(cb func(TabOverview, uintptr, uintptr) gdk.DragAction) { | |
| 414 | + | func (x *TabOverview) ConnectExtraDragValue(cb func(TabOverview, uintptr, uintptr) gdk.DragAction) uint32 { | |
| 415 | 415 | fcb := func(clsPtr uintptr, PageVarp uintptr, ValueVarp uintptr) gdk.DragAction { | |
| 416 | 416 | fa := TabOverview{} | |
| 417 | 417 | fa.Ptr = clsPtr | |
| @@ -419,7 +419,7 @@ func (x *TabOverview) ConnectExtraDragValue(cb func(TabOverview, uintptr, uintpt | |||
| 419 | 419 | return cb(fa, PageVarp, ValueVarp) | |
| 420 | 420 | ||
| 421 | 421 | } | |
| 422 | - | gobject.ObjectConnect(x.GoPointer(), "signal::extra-drag-value", purego.NewCallback(fcb)) | |
| 422 | + | return gobject.SignalConnect(x.GoPointer(), "extra-drag-value", purego.NewCallback(fcb)) | |
| 423 | 423 | } | |
| 424 | 424 | ||
| 425 | 425 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/adw/adw-tab-view.go +14 -14
| @@ -1290,7 +1290,7 @@ func (c *TabView) SetGoPointer(ptr uintptr) { | |||
| 1290 | 1290 | // | |
| 1291 | 1291 | // A typical reason to connect to this signal is to show a confirmation dialog | |
| 1292 | 1292 | // for closing a tab. | |
| 1293 | - | func (x *TabView) ConnectClosePage(cb func(TabView, uintptr) bool) { | |
| 1293 | + | func (x *TabView) ConnectClosePage(cb func(TabView, uintptr) bool) uint32 { | |
| 1294 | 1294 | fcb := func(clsPtr uintptr, PageVarp uintptr) bool { | |
| 1295 | 1295 | fa := TabView{} | |
| 1296 | 1296 | fa.Ptr = clsPtr | |
| @@ -1298,7 +1298,7 @@ func (x *TabView) ConnectClosePage(cb func(TabView, uintptr) bool) { | |||
| 1298 | 1298 | return cb(fa, PageVarp) | |
| 1299 | 1299 | ||
| 1300 | 1300 | } | |
| 1301 | - | gobject.ObjectConnect(x.GoPointer(), "signal::close-page", purego.NewCallback(fcb)) | |
| 1301 | + | return gobject.SignalConnect(x.GoPointer(), "close-page", purego.NewCallback(fcb)) | |
| 1302 | 1302 | } | |
| 1303 | 1303 | ||
| 1304 | 1304 | // Emitted when a tab should be transferred into a new window. | |
| @@ -1307,7 +1307,7 @@ func (x *TabView) ConnectClosePage(cb func(TabView, uintptr) bool) { | |||
| 1307 | 1307 | // | |
| 1308 | 1308 | // The signal handler is expected to create a new window, position it as | |
| 1309 | 1309 | // needed and return its `AdwTabView` that the page will be transferred into. | |
| 1310 | - | func (x *TabView) ConnectCreateWindow(cb func(TabView) TabView) { | |
| 1310 | + | func (x *TabView) ConnectCreateWindow(cb func(TabView) TabView) uint32 { | |
| 1311 | 1311 | fcb := func(clsPtr uintptr) uintptr { | |
| 1312 | 1312 | fa := TabView{} | |
| 1313 | 1313 | fa.Ptr = clsPtr | |
| @@ -1316,14 +1316,14 @@ func (x *TabView) ConnectCreateWindow(cb func(TabView) TabView) { | |||
| 1316 | 1316 | return CreateWindowCls.Ptr | |
| 1317 | 1317 | ||
| 1318 | 1318 | } | |
| 1319 | - | gobject.ObjectConnect(x.GoPointer(), "signal::create-window", purego.NewCallback(fcb)) | |
| 1319 | + | return gobject.SignalConnect(x.GoPointer(), "create-window", purego.NewCallback(fcb)) | |
| 1320 | 1320 | } | |
| 1321 | 1321 | ||
| 1322 | 1322 | // Emitted after the indicator icon on @page has been activated. | |
| 1323 | 1323 | // | |
| 1324 | 1324 | // See [property@TabPage:indicator-icon] and | |
| 1325 | 1325 | // [property@TabPage:indicator-activatable]. | |
| 1326 | - | func (x *TabView) ConnectIndicatorActivated(cb func(TabView, uintptr)) { | |
| 1326 | + | func (x *TabView) ConnectIndicatorActivated(cb func(TabView, uintptr)) uint32 { | |
| 1327 | 1327 | fcb := func(clsPtr uintptr, PageVarp uintptr) { | |
| 1328 | 1328 | fa := TabView{} | |
| 1329 | 1329 | fa.Ptr = clsPtr | |
| @@ -1331,14 +1331,14 @@ func (x *TabView) ConnectIndicatorActivated(cb func(TabView, uintptr)) { | |||
| 1331 | 1331 | cb(fa, PageVarp) | |
| 1332 | 1332 | ||
| 1333 | 1333 | } | |
| 1334 | - | gobject.ObjectConnect(x.GoPointer(), "signal::indicator-activated", purego.NewCallback(fcb)) | |
| 1334 | + | return gobject.SignalConnect(x.GoPointer(), "indicator-activated", purego.NewCallback(fcb)) | |
| 1335 | 1335 | } | |
| 1336 | 1336 | ||
| 1337 | 1337 | // Emitted when a page has been created or transferred to @self. | |
| 1338 | 1338 | // | |
| 1339 | 1339 | // A typical reason to connect to this signal would be to connect to page | |
| 1340 | 1340 | // signals for things such as updating window title. | |
| 1341 | - | func (x *TabView) ConnectPageAttached(cb func(TabView, uintptr, int)) { | |
| 1341 | + | func (x *TabView) ConnectPageAttached(cb func(TabView, uintptr, int)) uint32 { | |
| 1342 | 1342 | fcb := func(clsPtr uintptr, PageVarp uintptr, PositionVarp int) { | |
| 1343 | 1343 | fa := TabView{} | |
| 1344 | 1344 | fa.Ptr = clsPtr | |
| @@ -1346,7 +1346,7 @@ func (x *TabView) ConnectPageAttached(cb func(TabView, uintptr, int)) { | |||
| 1346 | 1346 | cb(fa, PageVarp, PositionVarp) | |
| 1347 | 1347 | ||
| 1348 | 1348 | } | |
| 1349 | - | gobject.ObjectConnect(x.GoPointer(), "signal::page-attached", purego.NewCallback(fcb)) | |
| 1349 | + | return gobject.SignalConnect(x.GoPointer(), "page-attached", purego.NewCallback(fcb)) | |
| 1350 | 1350 | } | |
| 1351 | 1351 | ||
| 1352 | 1352 | // Emitted when a page has been removed or transferred to another view. | |
| @@ -1358,7 +1358,7 @@ func (x *TabView) ConnectPageAttached(cb func(TabView, uintptr, int)) { | |||
| 1358 | 1358 | // this function as the child might merely be moved to another window; use | |
| 1359 | 1359 | // child dispose handler for that or do it in sync with your | |
| 1360 | 1360 | // [method@TabView.close_page_finish] calls. | |
| 1361 | - | func (x *TabView) ConnectPageDetached(cb func(TabView, uintptr, int)) { | |
| 1361 | + | func (x *TabView) ConnectPageDetached(cb func(TabView, uintptr, int)) uint32 { | |
| 1362 | 1362 | fcb := func(clsPtr uintptr, PageVarp uintptr, PositionVarp int) { | |
| 1363 | 1363 | fa := TabView{} | |
| 1364 | 1364 | fa.Ptr = clsPtr | |
| @@ -1366,11 +1366,11 @@ func (x *TabView) ConnectPageDetached(cb func(TabView, uintptr, int)) { | |||
| 1366 | 1366 | cb(fa, PageVarp, PositionVarp) | |
| 1367 | 1367 | ||
| 1368 | 1368 | } | |
| 1369 | - | gobject.ObjectConnect(x.GoPointer(), "signal::page-detached", purego.NewCallback(fcb)) | |
| 1369 | + | return gobject.SignalConnect(x.GoPointer(), "page-detached", purego.NewCallback(fcb)) | |
| 1370 | 1370 | } | |
| 1371 | 1371 | ||
| 1372 | 1372 | // Emitted after @page has been reordered to @position. | |
| 1373 | - | func (x *TabView) ConnectPageReordered(cb func(TabView, uintptr, int)) { | |
| 1373 | + | func (x *TabView) ConnectPageReordered(cb func(TabView, uintptr, int)) uint32 { | |
| 1374 | 1374 | fcb := func(clsPtr uintptr, PageVarp uintptr, PositionVarp int) { | |
| 1375 | 1375 | fa := TabView{} | |
| 1376 | 1376 | fa.Ptr = clsPtr | |
| @@ -1378,7 +1378,7 @@ func (x *TabView) ConnectPageReordered(cb func(TabView, uintptr, int)) { | |||
| 1378 | 1378 | cb(fa, PageVarp, PositionVarp) | |
| 1379 | 1379 | ||
| 1380 | 1380 | } | |
| 1381 | - | gobject.ObjectConnect(x.GoPointer(), "signal::page-reordered", purego.NewCallback(fcb)) | |
| 1381 | + | return gobject.SignalConnect(x.GoPointer(), "page-reordered", purego.NewCallback(fcb)) | |
| 1382 | 1382 | } | |
| 1383 | 1383 | ||
| 1384 | 1384 | // Emitted when a context menu is opened or closed for @page. | |
| @@ -1387,7 +1387,7 @@ func (x *TabView) ConnectPageReordered(cb func(TabView, uintptr, int)) { | |||
| 1387 | 1387 | // | |
| 1388 | 1388 | // It can be used to set up menu actions before showing the menu, for example | |
| 1389 | 1389 | // disable actions not applicable to @page. | |
| 1390 | - | func (x *TabView) ConnectSetupMenu(cb func(TabView, uintptr)) { | |
| 1390 | + | func (x *TabView) ConnectSetupMenu(cb func(TabView, uintptr)) uint32 { | |
| 1391 | 1391 | fcb := func(clsPtr uintptr, PageVarp uintptr) { | |
| 1392 | 1392 | fa := TabView{} | |
| 1393 | 1393 | fa.Ptr = clsPtr | |
| @@ -1395,7 +1395,7 @@ func (x *TabView) ConnectSetupMenu(cb func(TabView, uintptr)) { | |||
| 1395 | 1395 | cb(fa, PageVarp) | |
| 1396 | 1396 | ||
| 1397 | 1397 | } | |
| 1398 | - | gobject.ObjectConnect(x.GoPointer(), "signal::setup-menu", purego.NewCallback(fcb)) | |
| 1398 | + | return gobject.SignalConnect(x.GoPointer(), "setup-menu", purego.NewCallback(fcb)) | |
| 1399 | 1399 | } | |
| 1400 | 1400 | ||
| 1401 | 1401 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/adw/adw-toast.go +4 -4
| @@ -434,7 +434,7 @@ func (c *Toast) SetGoPointer(ptr uintptr) { | |||
| 434 | 434 | // Emitted after the button has been clicked. | |
| 435 | 435 | // | |
| 436 | 436 | // It can be used as an alternative to setting an action. | |
| 437 | - | func (x *Toast) ConnectButtonClicked(cb func(Toast)) { | |
| 437 | + | func (x *Toast) ConnectButtonClicked(cb func(Toast)) uint32 { | |
| 438 | 438 | fcb := func(clsPtr uintptr) { | |
| 439 | 439 | fa := Toast{} | |
| 440 | 440 | fa.Ptr = clsPtr | |
| @@ -442,11 +442,11 @@ func (x *Toast) ConnectButtonClicked(cb func(Toast)) { | |||
| 442 | 442 | cb(fa) | |
| 443 | 443 | ||
| 444 | 444 | } | |
| 445 | - | gobject.ObjectConnect(x.GoPointer(), "signal::button-clicked", purego.NewCallback(fcb)) | |
| 445 | + | return gobject.SignalConnect(x.GoPointer(), "button-clicked", purego.NewCallback(fcb)) | |
| 446 | 446 | } | |
| 447 | 447 | ||
| 448 | 448 | // Emitted when the toast has been dismissed. | |
| 449 | - | func (x *Toast) ConnectDismissed(cb func(Toast)) { | |
| 449 | + | func (x *Toast) ConnectDismissed(cb func(Toast)) uint32 { | |
| 450 | 450 | fcb := func(clsPtr uintptr) { | |
| 451 | 451 | fa := Toast{} | |
| 452 | 452 | fa.Ptr = clsPtr | |
| @@ -454,7 +454,7 @@ func (x *Toast) ConnectDismissed(cb func(Toast)) { | |||
| 454 | 454 | cb(fa) | |
| 455 | 455 | ||
| 456 | 456 | } | |
| 457 | - | gobject.ObjectConnect(x.GoPointer(), "signal::dismissed", purego.NewCallback(fcb)) | |
| 457 | + | return gobject.SignalConnect(x.GoPointer(), "dismissed", purego.NewCallback(fcb)) | |
| 458 | 458 | } | |
| 459 | 459 | ||
| 460 | 460 | func init() { | |
M v4/gdk/gdkclipboard.go +2 -2
| @@ -361,7 +361,7 @@ func (c *Clipboard) SetGoPointer(ptr uintptr) { | |||
| 361 | 361 | } | |
| 362 | 362 | ||
| 363 | 363 | // Emitted when the clipboard changes ownership. | |
| 364 | - | func (x *Clipboard) ConnectChanged(cb func(Clipboard)) { | |
| 364 | + | func (x *Clipboard) ConnectChanged(cb func(Clipboard)) uint32 { | |
| 365 | 365 | fcb := func(clsPtr uintptr) { | |
| 366 | 366 | fa := Clipboard{} | |
| 367 | 367 | fa.Ptr = clsPtr | |
| @@ -369,7 +369,7 @@ func (x *Clipboard) ConnectChanged(cb func(Clipboard)) { | |||
| 369 | 369 | cb(fa) | |
| 370 | 370 | ||
| 371 | 371 | } | |
| 372 | - | gobject.ObjectConnect(x.GoPointer(), "signal::changed", purego.NewCallback(fcb)) | |
| 372 | + | return gobject.SignalConnect(x.GoPointer(), "changed", purego.NewCallback(fcb)) | |
| 373 | 373 | } | |
| 374 | 374 | ||
| 375 | 375 | func init() { | |
M v4/gdk/gdkcontentprovider.go +2 -2
| @@ -217,7 +217,7 @@ func (c *ContentProvider) SetGoPointer(ptr uintptr) { | |||
| 217 | 217 | } | |
| 218 | 218 | ||
| 219 | 219 | // Emitted whenever the content provided by this provider has changed. | |
| 220 | - | func (x *ContentProvider) ConnectContentChanged(cb func(ContentProvider)) { | |
| 220 | + | func (x *ContentProvider) ConnectContentChanged(cb func(ContentProvider)) uint32 { | |
| 221 | 221 | fcb := func(clsPtr uintptr) { | |
| 222 | 222 | fa := ContentProvider{} | |
| 223 | 223 | fa.Ptr = clsPtr | |
| @@ -225,7 +225,7 @@ func (x *ContentProvider) ConnectContentChanged(cb func(ContentProvider)) { | |||
| 225 | 225 | cb(fa) | |
| 226 | 226 | ||
| 227 | 227 | } | |
| 228 | - | gobject.ObjectConnect(x.GoPointer(), "signal::content-changed", purego.NewCallback(fcb)) | |
| 228 | + | return gobject.SignalConnect(x.GoPointer(), "content-changed", purego.NewCallback(fcb)) | |
| 229 | 229 | } | |
| 230 | 230 | ||
| 231 | 231 | func init() { | |
M v4/gdk/gdkdevice.go +4 -4
| @@ -321,7 +321,7 @@ func (c *Device) SetGoPointer(ptr uintptr) { | |||
| 321 | 321 | // example, user switches from the USB mouse to a tablet); in | |
| 322 | 322 | // that case the logical device will change to reflect the axes | |
| 323 | 323 | // and keys on the new physical device. | |
| 324 | - | func (x *Device) ConnectChanged(cb func(Device)) { | |
| 324 | + | func (x *Device) ConnectChanged(cb func(Device)) uint32 { | |
| 325 | 325 | fcb := func(clsPtr uintptr) { | |
| 326 | 326 | fa := Device{} | |
| 327 | 327 | fa.Ptr = clsPtr | |
| @@ -329,11 +329,11 @@ func (x *Device) ConnectChanged(cb func(Device)) { | |||
| 329 | 329 | cb(fa) | |
| 330 | 330 | ||
| 331 | 331 | } | |
| 332 | - | gobject.ObjectConnect(x.GoPointer(), "signal::changed", purego.NewCallback(fcb)) | |
| 332 | + | return gobject.SignalConnect(x.GoPointer(), "changed", purego.NewCallback(fcb)) | |
| 333 | 333 | } | |
| 334 | 334 | ||
| 335 | 335 | // Emitted on pen/eraser devices whenever tools enter or leave proximity. | |
| 336 | - | func (x *Device) ConnectToolChanged(cb func(Device, uintptr)) { | |
| 336 | + | func (x *Device) ConnectToolChanged(cb func(Device, uintptr)) uint32 { | |
| 337 | 337 | fcb := func(clsPtr uintptr, ToolVarp uintptr) { | |
| 338 | 338 | fa := Device{} | |
| 339 | 339 | fa.Ptr = clsPtr | |
| @@ -341,7 +341,7 @@ func (x *Device) ConnectToolChanged(cb func(Device, uintptr)) { | |||
| 341 | 341 | cb(fa, ToolVarp) | |
| 342 | 342 | ||
| 343 | 343 | } | |
| 344 | - | gobject.ObjectConnect(x.GoPointer(), "signal::tool-changed", purego.NewCallback(fcb)) | |
| 344 | + | return gobject.SignalConnect(x.GoPointer(), "tool-changed", purego.NewCallback(fcb)) | |
| 345 | 345 | } | |
| 346 | 346 | ||
| 347 | 347 | func init() { | |
M v4/gdk/gdkdisplay.go +10 -10
| @@ -474,7 +474,7 @@ func (c *Display) SetGoPointer(ptr uintptr) { | |||
| 474 | 474 | } | |
| 475 | 475 | ||
| 476 | 476 | // Emitted when the connection to the windowing system for @display is closed. | |
| 477 | - | func (x *Display) ConnectClosed(cb func(Display, bool)) { | |
| 477 | + | func (x *Display) ConnectClosed(cb func(Display, bool)) uint32 { | |
| 478 | 478 | fcb := func(clsPtr uintptr, IsErrorVarp bool) { | |
| 479 | 479 | fa := Display{} | |
| 480 | 480 | fa.Ptr = clsPtr | |
| @@ -482,11 +482,11 @@ func (x *Display) ConnectClosed(cb func(Display, bool)) { | |||
| 482 | 482 | cb(fa, IsErrorVarp) | |
| 483 | 483 | ||
| 484 | 484 | } | |
| 485 | - | gobject.ObjectConnect(x.GoPointer(), "signal::closed", purego.NewCallback(fcb)) | |
| 485 | + | return gobject.SignalConnect(x.GoPointer(), "closed", purego.NewCallback(fcb)) | |
| 486 | 486 | } | |
| 487 | 487 | ||
| 488 | 488 | // Emitted when the connection to the windowing system for @display is opened. | |
| 489 | - | func (x *Display) ConnectOpened(cb func(Display)) { | |
| 489 | + | func (x *Display) ConnectOpened(cb func(Display)) uint32 { | |
| 490 | 490 | fcb := func(clsPtr uintptr) { | |
| 491 | 491 | fa := Display{} | |
| 492 | 492 | fa.Ptr = clsPtr | |
| @@ -494,11 +494,11 @@ func (x *Display) ConnectOpened(cb func(Display)) { | |||
| 494 | 494 | cb(fa) | |
| 495 | 495 | ||
| 496 | 496 | } | |
| 497 | - | gobject.ObjectConnect(x.GoPointer(), "signal::opened", purego.NewCallback(fcb)) | |
| 497 | + | return gobject.SignalConnect(x.GoPointer(), "opened", purego.NewCallback(fcb)) | |
| 498 | 498 | } | |
| 499 | 499 | ||
| 500 | 500 | // Emitted whenever a new seat is made known to the windowing system. | |
| 501 | - | func (x *Display) ConnectSeatAdded(cb func(Display, uintptr)) { | |
| 501 | + | func (x *Display) ConnectSeatAdded(cb func(Display, uintptr)) uint32 { | |
| 502 | 502 | fcb := func(clsPtr uintptr, SeatVarp uintptr) { | |
| 503 | 503 | fa := Display{} | |
| 504 | 504 | fa.Ptr = clsPtr | |
| @@ -506,11 +506,11 @@ func (x *Display) ConnectSeatAdded(cb func(Display, uintptr)) { | |||
| 506 | 506 | cb(fa, SeatVarp) | |
| 507 | 507 | ||
| 508 | 508 | } | |
| 509 | - | gobject.ObjectConnect(x.GoPointer(), "signal::seat-added", purego.NewCallback(fcb)) | |
| 509 | + | return gobject.SignalConnect(x.GoPointer(), "seat-added", purego.NewCallback(fcb)) | |
| 510 | 510 | } | |
| 511 | 511 | ||
| 512 | 512 | // Emitted whenever a seat is removed by the windowing system. | |
| 513 | - | func (x *Display) ConnectSeatRemoved(cb func(Display, uintptr)) { | |
| 513 | + | func (x *Display) ConnectSeatRemoved(cb func(Display, uintptr)) uint32 { | |
| 514 | 514 | fcb := func(clsPtr uintptr, SeatVarp uintptr) { | |
| 515 | 515 | fa := Display{} | |
| 516 | 516 | fa.Ptr = clsPtr | |
| @@ -518,11 +518,11 @@ func (x *Display) ConnectSeatRemoved(cb func(Display, uintptr)) { | |||
| 518 | 518 | cb(fa, SeatVarp) | |
| 519 | 519 | ||
| 520 | 520 | } | |
| 521 | - | gobject.ObjectConnect(x.GoPointer(), "signal::seat-removed", purego.NewCallback(fcb)) | |
| 521 | + | return gobject.SignalConnect(x.GoPointer(), "seat-removed", purego.NewCallback(fcb)) | |
| 522 | 522 | } | |
| 523 | 523 | ||
| 524 | 524 | // Emitted whenever a setting changes its value. | |
| 525 | - | func (x *Display) ConnectSettingChanged(cb func(Display, string)) { | |
| 525 | + | func (x *Display) ConnectSettingChanged(cb func(Display, string)) uint32 { | |
| 526 | 526 | fcb := func(clsPtr uintptr, SettingVarp string) { | |
| 527 | 527 | fa := Display{} | |
| 528 | 528 | fa.Ptr = clsPtr | |
| @@ -530,7 +530,7 @@ func (x *Display) ConnectSettingChanged(cb func(Display, string)) { | |||
| 530 | 530 | cb(fa, SettingVarp) | |
| 531 | 531 | ||
| 532 | 532 | } | |
| 533 | - | gobject.ObjectConnect(x.GoPointer(), "signal::setting-changed", purego.NewCallback(fcb)) | |
| 533 | + | return gobject.SignalConnect(x.GoPointer(), "setting-changed", purego.NewCallback(fcb)) | |
| 534 | 534 | } | |
| 535 | 535 | ||
| 536 | 536 | func init() { | |
M v4/gdk/gdkdisplaymanager.go +2 -2
| @@ -168,7 +168,7 @@ func (c *DisplayManager) SetGoPointer(ptr uintptr) { | |||
| 168 | 168 | } | |
| 169 | 169 | ||
| 170 | 170 | // Emitted when a display is opened. | |
| 171 | - | func (x *DisplayManager) ConnectDisplayOpened(cb func(DisplayManager, uintptr)) { | |
| 171 | + | func (x *DisplayManager) ConnectDisplayOpened(cb func(DisplayManager, uintptr)) uint32 { | |
| 172 | 172 | fcb := func(clsPtr uintptr, DisplayVarp uintptr) { | |
| 173 | 173 | fa := DisplayManager{} | |
| 174 | 174 | fa.Ptr = clsPtr | |
| @@ -176,7 +176,7 @@ func (x *DisplayManager) ConnectDisplayOpened(cb func(DisplayManager, uintptr)) | |||
| 176 | 176 | cb(fa, DisplayVarp) | |
| 177 | 177 | ||
| 178 | 178 | } | |
| 179 | - | gobject.ObjectConnect(x.GoPointer(), "signal::display-opened", purego.NewCallback(fcb)) | |
| 179 | + | return gobject.SignalConnect(x.GoPointer(), "display-opened", purego.NewCallback(fcb)) | |
| 180 | 180 | } | |
| 181 | 181 | ||
| 182 | 182 | func init() { | |
M v4/gdk/gdkdrag.go +6 -6
| @@ -211,7 +211,7 @@ func (c *Drag) SetGoPointer(ptr uintptr) { | |||
| 211 | 211 | } | |
| 212 | 212 | ||
| 213 | 213 | // Emitted when the drag operation is cancelled. | |
| 214 | - | func (x *Drag) ConnectCancel(cb func(Drag, DragCancelReason)) { | |
| 214 | + | func (x *Drag) ConnectCancel(cb func(Drag, DragCancelReason)) uint32 { | |
| 215 | 215 | fcb := func(clsPtr uintptr, ReasonVarp DragCancelReason) { | |
| 216 | 216 | fa := Drag{} | |
| 217 | 217 | fa.Ptr = clsPtr | |
| @@ -219,13 +219,13 @@ func (x *Drag) ConnectCancel(cb func(Drag, DragCancelReason)) { | |||
| 219 | 219 | cb(fa, ReasonVarp) | |
| 220 | 220 | ||
| 221 | 221 | } | |
| 222 | - | gobject.ObjectConnect(x.GoPointer(), "signal::cancel", purego.NewCallback(fcb)) | |
| 222 | + | return gobject.SignalConnect(x.GoPointer(), "cancel", purego.NewCallback(fcb)) | |
| 223 | 223 | } | |
| 224 | 224 | ||
| 225 | 225 | // Emitted when the destination side has finished reading all data. | |
| 226 | 226 | // | |
| 227 | 227 | // The drag object can now free all miscellaneous data. | |
| 228 | - | func (x *Drag) ConnectDndFinished(cb func(Drag)) { | |
| 228 | + | func (x *Drag) ConnectDndFinished(cb func(Drag)) uint32 { | |
| 229 | 229 | fcb := func(clsPtr uintptr) { | |
| 230 | 230 | fa := Drag{} | |
| 231 | 231 | fa.Ptr = clsPtr | |
| @@ -233,11 +233,11 @@ func (x *Drag) ConnectDndFinished(cb func(Drag)) { | |||
| 233 | 233 | cb(fa) | |
| 234 | 234 | ||
| 235 | 235 | } | |
| 236 | - | gobject.ObjectConnect(x.GoPointer(), "signal::dnd-finished", purego.NewCallback(fcb)) | |
| 236 | + | return gobject.SignalConnect(x.GoPointer(), "dnd-finished", purego.NewCallback(fcb)) | |
| 237 | 237 | } | |
| 238 | 238 | ||
| 239 | 239 | // Emitted when the drop operation is performed on an accepting client. | |
| 240 | - | func (x *Drag) ConnectDropPerformed(cb func(Drag)) { | |
| 240 | + | func (x *Drag) ConnectDropPerformed(cb func(Drag)) uint32 { | |
| 241 | 241 | fcb := func(clsPtr uintptr) { | |
| 242 | 242 | fa := Drag{} | |
| 243 | 243 | fa.Ptr = clsPtr | |
| @@ -245,7 +245,7 @@ func (x *Drag) ConnectDropPerformed(cb func(Drag)) { | |||
| 245 | 245 | cb(fa) | |
| 246 | 246 | ||
| 247 | 247 | } | |
| 248 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drop-performed", purego.NewCallback(fcb)) | |
| 248 | + | return gobject.SignalConnect(x.GoPointer(), "drop-performed", purego.NewCallback(fcb)) | |
| 249 | 249 | } | |
| 250 | 250 | ||
| 251 | 251 | func init() { | |
M v4/gdk/gdkframeclock.go +14 -14
| @@ -226,7 +226,7 @@ func (c *FrameClock) SetGoPointer(ptr uintptr) { | |||
| 226 | 226 | // This signal ends processing of the frame. | |
| 227 | 227 | // | |
| 228 | 228 | // Applications should generally not handle this signal. | |
| 229 | - | func (x *FrameClock) ConnectAfterPaint(cb func(FrameClock)) { | |
| 229 | + | func (x *FrameClock) ConnectAfterPaint(cb func(FrameClock)) uint32 { | |
| 230 | 230 | fcb := func(clsPtr uintptr) { | |
| 231 | 231 | fa := FrameClock{} | |
| 232 | 232 | fa.Ptr = clsPtr | |
| @@ -234,13 +234,13 @@ func (x *FrameClock) ConnectAfterPaint(cb func(FrameClock)) { | |||
| 234 | 234 | cb(fa) | |
| 235 | 235 | ||
| 236 | 236 | } | |
| 237 | - | gobject.ObjectConnect(x.GoPointer(), "signal::after-paint", purego.NewCallback(fcb)) | |
| 237 | + | return gobject.SignalConnect(x.GoPointer(), "after-paint", purego.NewCallback(fcb)) | |
| 238 | 238 | } | |
| 239 | 239 | ||
| 240 | 240 | // Begins processing of the frame. | |
| 241 | 241 | // | |
| 242 | 242 | // Applications should generally not handle this signal. | |
| 243 | - | func (x *FrameClock) ConnectBeforePaint(cb func(FrameClock)) { | |
| 243 | + | func (x *FrameClock) ConnectBeforePaint(cb func(FrameClock)) uint32 { | |
| 244 | 244 | fcb := func(clsPtr uintptr) { | |
| 245 | 245 | fa := FrameClock{} | |
| 246 | 246 | fa.Ptr = clsPtr | |
| @@ -248,14 +248,14 @@ func (x *FrameClock) ConnectBeforePaint(cb func(FrameClock)) { | |||
| 248 | 248 | cb(fa) | |
| 249 | 249 | ||
| 250 | 250 | } | |
| 251 | - | gobject.ObjectConnect(x.GoPointer(), "signal::before-paint", purego.NewCallback(fcb)) | |
| 251 | + | return gobject.SignalConnect(x.GoPointer(), "before-paint", purego.NewCallback(fcb)) | |
| 252 | 252 | } | |
| 253 | 253 | ||
| 254 | 254 | // Used to flush pending motion events that are being batched up and | |
| 255 | 255 | // compressed together. | |
| 256 | 256 | // | |
| 257 | 257 | // Applications should not handle this signal. | |
| 258 | - | func (x *FrameClock) ConnectFlushEvents(cb func(FrameClock)) { | |
| 258 | + | func (x *FrameClock) ConnectFlushEvents(cb func(FrameClock)) uint32 { | |
| 259 | 259 | fcb := func(clsPtr uintptr) { | |
| 260 | 260 | fa := FrameClock{} | |
| 261 | 261 | fa.Ptr = clsPtr | |
| @@ -263,7 +263,7 @@ func (x *FrameClock) ConnectFlushEvents(cb func(FrameClock)) { | |||
| 263 | 263 | cb(fa) | |
| 264 | 264 | ||
| 265 | 265 | } | |
| 266 | - | gobject.ObjectConnect(x.GoPointer(), "signal::flush-events", purego.NewCallback(fcb)) | |
| 266 | + | return gobject.SignalConnect(x.GoPointer(), "flush-events", purego.NewCallback(fcb)) | |
| 267 | 267 | } | |
| 268 | 268 | ||
| 269 | 269 | // Emitted as the second step of toolkit and application processing | |
| @@ -271,7 +271,7 @@ func (x *FrameClock) ConnectFlushEvents(cb func(FrameClock)) { | |||
| 271 | 271 | // | |
| 272 | 272 | // Any work to update sizes and positions of application elements | |
| 273 | 273 | // should be performed. GTK normally handles this internally. | |
| 274 | - | func (x *FrameClock) ConnectLayout(cb func(FrameClock)) { | |
| 274 | + | func (x *FrameClock) ConnectLayout(cb func(FrameClock)) uint32 { | |
| 275 | 275 | fcb := func(clsPtr uintptr) { | |
| 276 | 276 | fa := FrameClock{} | |
| 277 | 277 | fa.Ptr = clsPtr | |
| @@ -279,7 +279,7 @@ func (x *FrameClock) ConnectLayout(cb func(FrameClock)) { | |||
| 279 | 279 | cb(fa) | |
| 280 | 280 | ||
| 281 | 281 | } | |
| 282 | - | gobject.ObjectConnect(x.GoPointer(), "signal::layout", purego.NewCallback(fcb)) | |
| 282 | + | return gobject.SignalConnect(x.GoPointer(), "layout", purego.NewCallback(fcb)) | |
| 283 | 283 | } | |
| 284 | 284 | ||
| 285 | 285 | // Emitted as the third step of toolkit and application processing | |
| @@ -288,7 +288,7 @@ func (x *FrameClock) ConnectLayout(cb func(FrameClock)) { | |||
| 288 | 288 | // The frame is repainted. GDK normally handles this internally and | |
| 289 | 289 | // emits [signal@Gdk.Surface::render] signals which are turned into | |
| 290 | 290 | // [signal@Gtk.Widget::snapshot] signals by GTK. | |
| 291 | - | func (x *FrameClock) ConnectPaint(cb func(FrameClock)) { | |
| 291 | + | func (x *FrameClock) ConnectPaint(cb func(FrameClock)) uint32 { | |
| 292 | 292 | fcb := func(clsPtr uintptr) { | |
| 293 | 293 | fa := FrameClock{} | |
| 294 | 294 | fa.Ptr = clsPtr | |
| @@ -296,14 +296,14 @@ func (x *FrameClock) ConnectPaint(cb func(FrameClock)) { | |||
| 296 | 296 | cb(fa) | |
| 297 | 297 | ||
| 298 | 298 | } | |
| 299 | - | gobject.ObjectConnect(x.GoPointer(), "signal::paint", purego.NewCallback(fcb)) | |
| 299 | + | return gobject.SignalConnect(x.GoPointer(), "paint", purego.NewCallback(fcb)) | |
| 300 | 300 | } | |
| 301 | 301 | ||
| 302 | 302 | // Emitted after processing of the frame is finished. | |
| 303 | 303 | // | |
| 304 | 304 | // This signal is handled internally by GTK to resume normal | |
| 305 | 305 | // event processing. Applications should not handle this signal. | |
| 306 | - | func (x *FrameClock) ConnectResumeEvents(cb func(FrameClock)) { | |
| 306 | + | func (x *FrameClock) ConnectResumeEvents(cb func(FrameClock)) uint32 { | |
| 307 | 307 | fcb := func(clsPtr uintptr) { | |
| 308 | 308 | fa := FrameClock{} | |
| 309 | 309 | fa.Ptr = clsPtr | |
| @@ -311,7 +311,7 @@ func (x *FrameClock) ConnectResumeEvents(cb func(FrameClock)) { | |||
| 311 | 311 | cb(fa) | |
| 312 | 312 | ||
| 313 | 313 | } | |
| 314 | - | gobject.ObjectConnect(x.GoPointer(), "signal::resume-events", purego.NewCallback(fcb)) | |
| 314 | + | return gobject.SignalConnect(x.GoPointer(), "resume-events", purego.NewCallback(fcb)) | |
| 315 | 315 | } | |
| 316 | 316 | ||
| 317 | 317 | // Emitted as the first step of toolkit and application processing | |
| @@ -320,7 +320,7 @@ func (x *FrameClock) ConnectResumeEvents(cb func(FrameClock)) { | |||
| 320 | 320 | // Animations should be updated using [method@Gdk.FrameClock.get_frame_time]. | |
| 321 | 321 | // Applications can connect directly to this signal, or use | |
| 322 | 322 | // [method@Gtk.Widget.add_tick_callback] as a more convenient interface. | |
| 323 | - | func (x *FrameClock) ConnectUpdate(cb func(FrameClock)) { | |
| 323 | + | func (x *FrameClock) ConnectUpdate(cb func(FrameClock)) uint32 { | |
| 324 | 324 | fcb := func(clsPtr uintptr) { | |
| 325 | 325 | fa := FrameClock{} | |
| 326 | 326 | fa.Ptr = clsPtr | |
| @@ -328,7 +328,7 @@ func (x *FrameClock) ConnectUpdate(cb func(FrameClock)) { | |||
| 328 | 328 | cb(fa) | |
| 329 | 329 | ||
| 330 | 330 | } | |
| 331 | - | gobject.ObjectConnect(x.GoPointer(), "signal::update", purego.NewCallback(fcb)) | |
| 331 | + | return gobject.SignalConnect(x.GoPointer(), "update", purego.NewCallback(fcb)) | |
| 332 | 332 | } | |
| 333 | 333 | ||
| 334 | 334 | func init() { | |
M v4/gdk/gdkmonitor.go +2 -2
| @@ -189,7 +189,7 @@ func (c *Monitor) SetGoPointer(ptr uintptr) { | |||
| 189 | 189 | } | |
| 190 | 190 | ||
| 191 | 191 | // Emitted when the output represented by @monitor gets disconnected. | |
| 192 | - | func (x *Monitor) ConnectInvalidate(cb func(Monitor)) { | |
| 192 | + | func (x *Monitor) ConnectInvalidate(cb func(Monitor)) uint32 { | |
| 193 | 193 | fcb := func(clsPtr uintptr) { | |
| 194 | 194 | fa := Monitor{} | |
| 195 | 195 | fa.Ptr = clsPtr | |
| @@ -197,7 +197,7 @@ func (x *Monitor) ConnectInvalidate(cb func(Monitor)) { | |||
| 197 | 197 | cb(fa) | |
| 198 | 198 | ||
| 199 | 199 | } | |
| 200 | - | gobject.ObjectConnect(x.GoPointer(), "signal::invalidate", purego.NewCallback(fcb)) | |
| 200 | + | return gobject.SignalConnect(x.GoPointer(), "invalidate", purego.NewCallback(fcb)) | |
| 201 | 201 | } | |
| 202 | 202 | ||
| 203 | 203 | func init() { | |
M v4/gdk/gdkseat.go +8 -8
| @@ -130,7 +130,7 @@ func (c *Seat) SetGoPointer(ptr uintptr) { | |||
| 130 | 130 | } | |
| 131 | 131 | ||
| 132 | 132 | // Emitted when a new input device is related to this seat. | |
| 133 | - | func (x *Seat) ConnectDeviceAdded(cb func(Seat, uintptr)) { | |
| 133 | + | func (x *Seat) ConnectDeviceAdded(cb func(Seat, uintptr)) uint32 { | |
| 134 | 134 | fcb := func(clsPtr uintptr, DeviceVarp uintptr) { | |
| 135 | 135 | fa := Seat{} | |
| 136 | 136 | fa.Ptr = clsPtr | |
| @@ -138,11 +138,11 @@ func (x *Seat) ConnectDeviceAdded(cb func(Seat, uintptr)) { | |||
| 138 | 138 | cb(fa, DeviceVarp) | |
| 139 | 139 | ||
| 140 | 140 | } | |
| 141 | - | gobject.ObjectConnect(x.GoPointer(), "signal::device-added", purego.NewCallback(fcb)) | |
| 141 | + | return gobject.SignalConnect(x.GoPointer(), "device-added", purego.NewCallback(fcb)) | |
| 142 | 142 | } | |
| 143 | 143 | ||
| 144 | 144 | // Emitted when an input device is removed (e.g. unplugged). | |
| 145 | - | func (x *Seat) ConnectDeviceRemoved(cb func(Seat, uintptr)) { | |
| 145 | + | func (x *Seat) ConnectDeviceRemoved(cb func(Seat, uintptr)) uint32 { | |
| 146 | 146 | fcb := func(clsPtr uintptr, DeviceVarp uintptr) { | |
| 147 | 147 | fa := Seat{} | |
| 148 | 148 | fa.Ptr = clsPtr | |
| @@ -150,7 +150,7 @@ func (x *Seat) ConnectDeviceRemoved(cb func(Seat, uintptr)) { | |||
| 150 | 150 | cb(fa, DeviceVarp) | |
| 151 | 151 | ||
| 152 | 152 | } | |
| 153 | - | gobject.ObjectConnect(x.GoPointer(), "signal::device-removed", purego.NewCallback(fcb)) | |
| 153 | + | return gobject.SignalConnect(x.GoPointer(), "device-removed", purego.NewCallback(fcb)) | |
| 154 | 154 | } | |
| 155 | 155 | ||
| 156 | 156 | // Emitted whenever a new tool is made known to the seat. | |
| @@ -160,7 +160,7 @@ func (x *Seat) ConnectDeviceRemoved(cb func(Seat, uintptr)) { | |||
| 160 | 160 | // [signal@Gdk.Device::tool-changed] signal accordingly. | |
| 161 | 161 | // | |
| 162 | 162 | // A same tool may be used by several devices. | |
| 163 | - | func (x *Seat) ConnectToolAdded(cb func(Seat, uintptr)) { | |
| 163 | + | func (x *Seat) ConnectToolAdded(cb func(Seat, uintptr)) uint32 { | |
| 164 | 164 | fcb := func(clsPtr uintptr, ToolVarp uintptr) { | |
| 165 | 165 | fa := Seat{} | |
| 166 | 166 | fa.Ptr = clsPtr | |
| @@ -168,11 +168,11 @@ func (x *Seat) ConnectToolAdded(cb func(Seat, uintptr)) { | |||
| 168 | 168 | cb(fa, ToolVarp) | |
| 169 | 169 | ||
| 170 | 170 | } | |
| 171 | - | gobject.ObjectConnect(x.GoPointer(), "signal::tool-added", purego.NewCallback(fcb)) | |
| 171 | + | return gobject.SignalConnect(x.GoPointer(), "tool-added", purego.NewCallback(fcb)) | |
| 172 | 172 | } | |
| 173 | 173 | ||
| 174 | 174 | // Emitted whenever a tool is no longer known to this @seat. | |
| 175 | - | func (x *Seat) ConnectToolRemoved(cb func(Seat, uintptr)) { | |
| 175 | + | func (x *Seat) ConnectToolRemoved(cb func(Seat, uintptr)) uint32 { | |
| 176 | 176 | fcb := func(clsPtr uintptr, ToolVarp uintptr) { | |
| 177 | 177 | fa := Seat{} | |
| 178 | 178 | fa.Ptr = clsPtr | |
| @@ -180,7 +180,7 @@ func (x *Seat) ConnectToolRemoved(cb func(Seat, uintptr)) { | |||
| 180 | 180 | cb(fa, ToolVarp) | |
| 181 | 181 | ||
| 182 | 182 | } | |
| 183 | - | gobject.ObjectConnect(x.GoPointer(), "signal::tool-removed", purego.NewCallback(fcb)) | |
| 183 | + | return gobject.SignalConnect(x.GoPointer(), "tool-removed", purego.NewCallback(fcb)) | |
| 184 | 184 | } | |
| 185 | 185 | ||
| 186 | 186 | func init() { | |
M v4/gdk/gdksurface.go +10 -10
| @@ -477,7 +477,7 @@ func (c *Surface) SetGoPointer(ptr uintptr) { | |||
| 477 | 477 | } | |
| 478 | 478 | ||
| 479 | 479 | // Emitted when @surface starts being present on the monitor. | |
| 480 | - | func (x *Surface) ConnectEnterMonitor(cb func(Surface, uintptr)) { | |
| 480 | + | func (x *Surface) ConnectEnterMonitor(cb func(Surface, uintptr)) uint32 { | |
| 481 | 481 | fcb := func(clsPtr uintptr, MonitorVarp uintptr) { | |
| 482 | 482 | fa := Surface{} | |
| 483 | 483 | fa.Ptr = clsPtr | |
| @@ -485,11 +485,11 @@ func (x *Surface) ConnectEnterMonitor(cb func(Surface, uintptr)) { | |||
| 485 | 485 | cb(fa, MonitorVarp) | |
| 486 | 486 | ||
| 487 | 487 | } | |
| 488 | - | gobject.ObjectConnect(x.GoPointer(), "signal::enter-monitor", purego.NewCallback(fcb)) | |
| 488 | + | return gobject.SignalConnect(x.GoPointer(), "enter-monitor", purego.NewCallback(fcb)) | |
| 489 | 489 | } | |
| 490 | 490 | ||
| 491 | 491 | // Emitted when GDK receives an input event for @surface. | |
| 492 | - | func (x *Surface) ConnectEvent(cb func(Surface, *Event) bool) { | |
| 492 | + | func (x *Surface) ConnectEvent(cb func(Surface, *Event) bool) uint32 { | |
| 493 | 493 | fcb := func(clsPtr uintptr, EventVarp uintptr) bool { | |
| 494 | 494 | fa := Surface{} | |
| 495 | 495 | fa.Ptr = clsPtr | |
| @@ -497,7 +497,7 @@ func (x *Surface) ConnectEvent(cb func(Surface, *Event) bool) { | |||
| 497 | 497 | return cb(fa, EventNewFromInternalPtr(EventVarp)) | |
| 498 | 498 | ||
| 499 | 499 | } | |
| 500 | - | gobject.ObjectConnect(x.GoPointer(), "signal::event", purego.NewCallback(fcb)) | |
| 500 | + | return gobject.SignalConnect(x.GoPointer(), "event", purego.NewCallback(fcb)) | |
| 501 | 501 | } | |
| 502 | 502 | ||
| 503 | 503 | // Emitted when the size of @surface is changed, or when relayout should | |
| @@ -505,7 +505,7 @@ func (x *Surface) ConnectEvent(cb func(Surface, *Event) bool) { | |||
| 505 | 505 | // | |
| 506 | 506 | // Surface size is reported in ”application pixels”, not | |
| 507 | 507 | // ”device pixels” (see gdk_surface_get_scale_factor()). | |
| 508 | - | func (x *Surface) ConnectLayout(cb func(Surface, int, int)) { | |
| 508 | + | func (x *Surface) ConnectLayout(cb func(Surface, int, int)) uint32 { | |
| 509 | 509 | fcb := func(clsPtr uintptr, WidthVarp int, HeightVarp int) { | |
| 510 | 510 | fa := Surface{} | |
| 511 | 511 | fa.Ptr = clsPtr | |
| @@ -513,11 +513,11 @@ func (x *Surface) ConnectLayout(cb func(Surface, int, int)) { | |||
| 513 | 513 | cb(fa, WidthVarp, HeightVarp) | |
| 514 | 514 | ||
| 515 | 515 | } | |
| 516 | - | gobject.ObjectConnect(x.GoPointer(), "signal::layout", purego.NewCallback(fcb)) | |
| 516 | + | return gobject.SignalConnect(x.GoPointer(), "layout", purego.NewCallback(fcb)) | |
| 517 | 517 | } | |
| 518 | 518 | ||
| 519 | 519 | // Emitted when @surface stops being present on the monitor. | |
| 520 | - | func (x *Surface) ConnectLeaveMonitor(cb func(Surface, uintptr)) { | |
| 520 | + | func (x *Surface) ConnectLeaveMonitor(cb func(Surface, uintptr)) uint32 { | |
| 521 | 521 | fcb := func(clsPtr uintptr, MonitorVarp uintptr) { | |
| 522 | 522 | fa := Surface{} | |
| 523 | 523 | fa.Ptr = clsPtr | |
| @@ -525,11 +525,11 @@ func (x *Surface) ConnectLeaveMonitor(cb func(Surface, uintptr)) { | |||
| 525 | 525 | cb(fa, MonitorVarp) | |
| 526 | 526 | ||
| 527 | 527 | } | |
| 528 | - | gobject.ObjectConnect(x.GoPointer(), "signal::leave-monitor", purego.NewCallback(fcb)) | |
| 528 | + | return gobject.SignalConnect(x.GoPointer(), "leave-monitor", purego.NewCallback(fcb)) | |
| 529 | 529 | } | |
| 530 | 530 | ||
| 531 | 531 | // Emitted when part of the surface needs to be redrawn. | |
| 532 | - | func (x *Surface) ConnectRender(cb func(Surface, uintptr) bool) { | |
| 532 | + | func (x *Surface) ConnectRender(cb func(Surface, uintptr) bool) uint32 { | |
| 533 | 533 | fcb := func(clsPtr uintptr, RegionVarp uintptr) bool { | |
| 534 | 534 | fa := Surface{} | |
| 535 | 535 | fa.Ptr = clsPtr | |
| @@ -537,7 +537,7 @@ func (x *Surface) ConnectRender(cb func(Surface, uintptr) bool) { | |||
| 537 | 537 | return cb(fa, RegionVarp) | |
| 538 | 538 | ||
| 539 | 539 | } | |
| 540 | - | gobject.ObjectConnect(x.GoPointer(), "signal::render", purego.NewCallback(fcb)) | |
| 540 | + | return gobject.SignalConnect(x.GoPointer(), "render", purego.NewCallback(fcb)) | |
| 541 | 541 | } | |
| 542 | 542 | ||
| 543 | 543 | func init() { | |
M v4/gdk/gdkvulkancontext.go +2 -2
| @@ -39,7 +39,7 @@ func (c *VulkanContext) SetGoPointer(ptr uintptr) { | |||
| 39 | 39 | // | |
| 40 | 40 | // Usually this means that the swapchain had to be recreated, | |
| 41 | 41 | // for example in response to a change of the surface size. | |
| 42 | - | func (x *VulkanContext) ConnectImagesUpdated(cb func(VulkanContext)) { | |
| 42 | + | func (x *VulkanContext) ConnectImagesUpdated(cb func(VulkanContext)) uint32 { | |
| 43 | 43 | fcb := func(clsPtr uintptr) { | |
| 44 | 44 | fa := VulkanContext{} | |
| 45 | 45 | fa.Ptr = clsPtr | |
| @@ -47,7 +47,7 @@ func (x *VulkanContext) ConnectImagesUpdated(cb func(VulkanContext)) { | |||
| 47 | 47 | cb(fa) | |
| 48 | 48 | ||
| 49 | 49 | } | |
| 50 | - | gobject.ObjectConnect(x.GoPointer(), "signal::images-updated", purego.NewCallback(fcb)) | |
| 50 | + | return gobject.SignalConnect(x.GoPointer(), "images-updated", purego.NewCallback(fcb)) | |
| 51 | 51 | } | |
| 52 | 52 | ||
| 53 | 53 | // Initializes the object implementing the interface. | |
M v4/gdkpixbuf/gdk-pixbuf-loader.go +8 -8
| @@ -303,7 +303,7 @@ func (c *PixbufLoader) SetGoPointer(ptr uintptr) { | |||
| 303 | 303 | // After this signal is emitted, applications can call | |
| 304 | 304 | // gdk_pixbuf_loader_get_pixbuf() to fetch the partially-loaded | |
| 305 | 305 | // pixbuf. | |
| 306 | - | func (x *PixbufLoader) ConnectAreaPrepared(cb func(PixbufLoader)) { | |
| 306 | + | func (x *PixbufLoader) ConnectAreaPrepared(cb func(PixbufLoader)) uint32 { | |
| 307 | 307 | fcb := func(clsPtr uintptr) { | |
| 308 | 308 | fa := PixbufLoader{} | |
| 309 | 309 | fa.Ptr = clsPtr | |
| @@ -311,7 +311,7 @@ func (x *PixbufLoader) ConnectAreaPrepared(cb func(PixbufLoader)) { | |||
| 311 | 311 | cb(fa) | |
| 312 | 312 | ||
| 313 | 313 | } | |
| 314 | - | gobject.ObjectConnect(x.GoPointer(), "signal::area-prepared", purego.NewCallback(fcb)) | |
| 314 | + | return gobject.SignalConnect(x.GoPointer(), "area-prepared", purego.NewCallback(fcb)) | |
| 315 | 315 | } | |
| 316 | 316 | ||
| 317 | 317 | // This signal is emitted when a significant area of the image being | |
| @@ -322,7 +322,7 @@ func (x *PixbufLoader) ConnectAreaPrepared(cb func(PixbufLoader)) { | |||
| 322 | 322 | // | |
| 323 | 323 | // Applications can use this signal to know when to repaint | |
| 324 | 324 | // areas of an image that is being loaded. | |
| 325 | - | func (x *PixbufLoader) ConnectAreaUpdated(cb func(PixbufLoader, int, int, int, int)) { | |
| 325 | + | func (x *PixbufLoader) ConnectAreaUpdated(cb func(PixbufLoader, int, int, int, int)) uint32 { | |
| 326 | 326 | fcb := func(clsPtr uintptr, XVarp int, YVarp int, WidthVarp int, HeightVarp int) { | |
| 327 | 327 | fa := PixbufLoader{} | |
| 328 | 328 | fa.Ptr = clsPtr | |
| @@ -330,7 +330,7 @@ func (x *PixbufLoader) ConnectAreaUpdated(cb func(PixbufLoader, int, int, int, i | |||
| 330 | 330 | cb(fa, XVarp, YVarp, WidthVarp, HeightVarp) | |
| 331 | 331 | ||
| 332 | 332 | } | |
| 333 | - | gobject.ObjectConnect(x.GoPointer(), "signal::area-updated", purego.NewCallback(fcb)) | |
| 333 | + | return gobject.SignalConnect(x.GoPointer(), "area-updated", purego.NewCallback(fcb)) | |
| 334 | 334 | } | |
| 335 | 335 | ||
| 336 | 336 | // This signal is emitted when gdk_pixbuf_loader_close() is called. | |
| @@ -338,7 +338,7 @@ func (x *PixbufLoader) ConnectAreaUpdated(cb func(PixbufLoader, int, int, int, i | |||
| 338 | 338 | // It can be used by different parts of an application to receive | |
| 339 | 339 | // notification when an image loader is closed by the code that | |
| 340 | 340 | // drives it. | |
| 341 | - | func (x *PixbufLoader) ConnectClosed(cb func(PixbufLoader)) { | |
| 341 | + | func (x *PixbufLoader) ConnectClosed(cb func(PixbufLoader)) uint32 { | |
| 342 | 342 | fcb := func(clsPtr uintptr) { | |
| 343 | 343 | fa := PixbufLoader{} | |
| 344 | 344 | fa.Ptr = clsPtr | |
| @@ -346,7 +346,7 @@ func (x *PixbufLoader) ConnectClosed(cb func(PixbufLoader)) { | |||
| 346 | 346 | cb(fa) | |
| 347 | 347 | ||
| 348 | 348 | } | |
| 349 | - | gobject.ObjectConnect(x.GoPointer(), "signal::closed", purego.NewCallback(fcb)) | |
| 349 | + | return gobject.SignalConnect(x.GoPointer(), "closed", purego.NewCallback(fcb)) | |
| 350 | 350 | } | |
| 351 | 351 | ||
| 352 | 352 | // This signal is emitted when the pixbuf loader has been fed the | |
| @@ -356,7 +356,7 @@ func (x *PixbufLoader) ConnectClosed(cb func(PixbufLoader)) { | |||
| 356 | 356 | // Applications can call gdk_pixbuf_loader_set_size() in response | |
| 357 | 357 | // to this signal to set the desired size to which the image | |
| 358 | 358 | // should be scaled. | |
| 359 | - | func (x *PixbufLoader) ConnectSizePrepared(cb func(PixbufLoader, int, int)) { | |
| 359 | + | func (x *PixbufLoader) ConnectSizePrepared(cb func(PixbufLoader, int, int)) uint32 { | |
| 360 | 360 | fcb := func(clsPtr uintptr, WidthVarp int, HeightVarp int) { | |
| 361 | 361 | fa := PixbufLoader{} | |
| 362 | 362 | fa.Ptr = clsPtr | |
| @@ -364,7 +364,7 @@ func (x *PixbufLoader) ConnectSizePrepared(cb func(PixbufLoader, int, int)) { | |||
| 364 | 364 | cb(fa, WidthVarp, HeightVarp) | |
| 365 | 365 | ||
| 366 | 366 | } | |
| 367 | - | gobject.ObjectConnect(x.GoPointer(), "signal::size-prepared", purego.NewCallback(fcb)) | |
| 367 | + | return gobject.SignalConnect(x.GoPointer(), "size-prepared", purego.NewCallback(fcb)) | |
| 368 | 368 | } | |
| 369 | 369 | ||
| 370 | 370 | func init() { | |
M v4/gio/gappinfo.go +6 -6
| @@ -722,7 +722,7 @@ func (c *AppLaunchContext) SetGoPointer(ptr uintptr) { | |||
| 722 | 722 | // The #GAppLaunchContext::launch-failed signal is emitted when a #GAppInfo launch | |
| 723 | 723 | // fails. The startup notification id is provided, so that the launcher | |
| 724 | 724 | // can cancel the startup notification. | |
| 725 | - | func (x *AppLaunchContext) ConnectLaunchFailed(cb func(AppLaunchContext, string)) { | |
| 725 | + | func (x *AppLaunchContext) ConnectLaunchFailed(cb func(AppLaunchContext, string)) uint32 { | |
| 726 | 726 | fcb := func(clsPtr uintptr, StartupNotifyIdVarp string) { | |
| 727 | 727 | fa := AppLaunchContext{} | |
| 728 | 728 | fa.Ptr = clsPtr | |
| @@ -730,7 +730,7 @@ func (x *AppLaunchContext) ConnectLaunchFailed(cb func(AppLaunchContext, string) | |||
| 730 | 730 | cb(fa, StartupNotifyIdVarp) | |
| 731 | 731 | ||
| 732 | 732 | } | |
| 733 | - | gobject.ObjectConnect(x.GoPointer(), "signal::launch-failed", purego.NewCallback(fcb)) | |
| 733 | + | return gobject.SignalConnect(x.GoPointer(), "launch-failed", purego.NewCallback(fcb)) | |
| 734 | 734 | } | |
| 735 | 735 | ||
| 736 | 736 | // The #GAppLaunchContext::launch-started signal is emitted when a #GAppInfo is | |
| @@ -747,7 +747,7 @@ func (x *AppLaunchContext) ConnectLaunchFailed(cb func(AppLaunchContext, string) | |||
| 747 | 747 | // | |
| 748 | 748 | // It is guaranteed that this signal is followed by either a #GAppLaunchContext::launched or | |
| 749 | 749 | // #GAppLaunchContext::launch-failed signal. | |
| 750 | - | func (x *AppLaunchContext) ConnectLaunchStarted(cb func(AppLaunchContext, uintptr, uintptr)) { | |
| 750 | + | func (x *AppLaunchContext) ConnectLaunchStarted(cb func(AppLaunchContext, uintptr, uintptr)) uint32 { | |
| 751 | 751 | fcb := func(clsPtr uintptr, InfoVarp uintptr, PlatformDataVarp uintptr) { | |
| 752 | 752 | fa := AppLaunchContext{} | |
| 753 | 753 | fa.Ptr = clsPtr | |
| @@ -755,7 +755,7 @@ func (x *AppLaunchContext) ConnectLaunchStarted(cb func(AppLaunchContext, uintpt | |||
| 755 | 755 | cb(fa, InfoVarp, PlatformDataVarp) | |
| 756 | 756 | ||
| 757 | 757 | } | |
| 758 | - | gobject.ObjectConnect(x.GoPointer(), "signal::launch-started", purego.NewCallback(fcb)) | |
| 758 | + | return gobject.SignalConnect(x.GoPointer(), "launch-started", purego.NewCallback(fcb)) | |
| 759 | 759 | } | |
| 760 | 760 | ||
| 761 | 761 | // The #GAppLaunchContext::launched signal is emitted when a #GAppInfo is successfully | |
| @@ -767,7 +767,7 @@ func (x *AppLaunchContext) ConnectLaunchStarted(cb func(AppLaunchContext, uintpt | |||
| 767 | 767 | // Since 2.72 the `pid` may be 0 if the process id wasn't known (for | |
| 768 | 768 | // example if the process was launched via D-Bus). The `pid` may not be | |
| 769 | 769 | // set at all in subsequent releases. | |
| 770 | - | func (x *AppLaunchContext) ConnectLaunched(cb func(AppLaunchContext, uintptr, uintptr)) { | |
| 770 | + | func (x *AppLaunchContext) ConnectLaunched(cb func(AppLaunchContext, uintptr, uintptr)) uint32 { | |
| 771 | 771 | fcb := func(clsPtr uintptr, InfoVarp uintptr, PlatformDataVarp uintptr) { | |
| 772 | 772 | fa := AppLaunchContext{} | |
| 773 | 773 | fa.Ptr = clsPtr | |
| @@ -775,7 +775,7 @@ func (x *AppLaunchContext) ConnectLaunched(cb func(AppLaunchContext, uintptr, ui | |||
| 775 | 775 | cb(fa, InfoVarp, PlatformDataVarp) | |
| 776 | 776 | ||
| 777 | 777 | } | |
| 778 | - | gobject.ObjectConnect(x.GoPointer(), "signal::launched", purego.NewCallback(fcb)) | |
| 778 | + | return gobject.SignalConnect(x.GoPointer(), "launched", purego.NewCallback(fcb)) | |
| 779 | 779 | } | |
| 780 | 780 | ||
| 781 | 781 | func init() { | |
M v4/gio/gapplication.go +14 -14
| @@ -897,7 +897,7 @@ func (c *Application) SetGoPointer(ptr uintptr) { | |||
| 897 | 897 | ||
| 898 | 898 | // The ::activate signal is emitted on the primary instance when an | |
| 899 | 899 | // activation occurs. See g_application_activate(). | |
| 900 | - | func (x *Application) ConnectActivate(cb func(Application)) { | |
| 900 | + | func (x *Application) ConnectActivate(cb func(Application)) uint32 { | |
| 901 | 901 | fcb := func(clsPtr uintptr) { | |
| 902 | 902 | fa := Application{} | |
| 903 | 903 | fa.Ptr = clsPtr | |
| @@ -905,13 +905,13 @@ func (x *Application) ConnectActivate(cb func(Application)) { | |||
| 905 | 905 | cb(fa) | |
| 906 | 906 | ||
| 907 | 907 | } | |
| 908 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 908 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 909 | 909 | } | |
| 910 | 910 | ||
| 911 | 911 | // The ::command-line signal is emitted on the primary instance when | |
| 912 | 912 | // a commandline is not handled locally. See g_application_run() and | |
| 913 | 913 | // the #GApplicationCommandLine documentation for more information. | |
| 914 | - | func (x *Application) ConnectCommandLine(cb func(Application, uintptr) int) { | |
| 914 | + | func (x *Application) ConnectCommandLine(cb func(Application, uintptr) int) uint32 { | |
| 915 | 915 | fcb := func(clsPtr uintptr, CommandLineVarp uintptr) int { | |
| 916 | 916 | fa := Application{} | |
| 917 | 917 | fa.Ptr = clsPtr | |
| @@ -919,7 +919,7 @@ func (x *Application) ConnectCommandLine(cb func(Application, uintptr) int) { | |||
| 919 | 919 | return cb(fa, CommandLineVarp) | |
| 920 | 920 | ||
| 921 | 921 | } | |
| 922 | - | gobject.ObjectConnect(x.GoPointer(), "signal::command-line", purego.NewCallback(fcb)) | |
| 922 | + | return gobject.SignalConnect(x.GoPointer(), "command-line", purego.NewCallback(fcb)) | |
| 923 | 923 | } | |
| 924 | 924 | ||
| 925 | 925 | // The ::handle-local-options signal is emitted on the local instance | |
| @@ -963,7 +963,7 @@ func (x *Application) ConnectCommandLine(cb func(Application, uintptr) int) { | |||
| 963 | 963 | // You can override local_command_line() if you need more powerful | |
| 964 | 964 | // capabilities than what is provided here, but this should not | |
| 965 | 965 | // normally be required. | |
| 966 | - | func (x *Application) ConnectHandleLocalOptions(cb func(Application, uintptr) int) { | |
| 966 | + | func (x *Application) ConnectHandleLocalOptions(cb func(Application, uintptr) int) uint32 { | |
| 967 | 967 | fcb := func(clsPtr uintptr, OptionsVarp uintptr) int { | |
| 968 | 968 | fa := Application{} | |
| 969 | 969 | fa.Ptr = clsPtr | |
| @@ -971,7 +971,7 @@ func (x *Application) ConnectHandleLocalOptions(cb func(Application, uintptr) in | |||
| 971 | 971 | return cb(fa, OptionsVarp) | |
| 972 | 972 | ||
| 973 | 973 | } | |
| 974 | - | gobject.ObjectConnect(x.GoPointer(), "signal::handle-local-options", purego.NewCallback(fcb)) | |
| 974 | + | return gobject.SignalConnect(x.GoPointer(), "handle-local-options", purego.NewCallback(fcb)) | |
| 975 | 975 | } | |
| 976 | 976 | ||
| 977 | 977 | // The ::name-lost signal is emitted only on the registered primary instance | |
| @@ -979,7 +979,7 @@ func (x *Application) ConnectHandleLocalOptions(cb func(Application, uintptr) in | |||
| 979 | 979 | // is using the %G_APPLICATION_ALLOW_REPLACEMENT flag. | |
| 980 | 980 | // | |
| 981 | 981 | // The default handler for this signal calls g_application_quit(). | |
| 982 | - | func (x *Application) ConnectNameLost(cb func(Application) bool) { | |
| 982 | + | func (x *Application) ConnectNameLost(cb func(Application) bool) uint32 { | |
| 983 | 983 | fcb := func(clsPtr uintptr) bool { | |
| 984 | 984 | fa := Application{} | |
| 985 | 985 | fa.Ptr = clsPtr | |
| @@ -987,12 +987,12 @@ func (x *Application) ConnectNameLost(cb func(Application) bool) { | |||
| 987 | 987 | return cb(fa) | |
| 988 | 988 | ||
| 989 | 989 | } | |
| 990 | - | gobject.ObjectConnect(x.GoPointer(), "signal::name-lost", purego.NewCallback(fcb)) | |
| 990 | + | return gobject.SignalConnect(x.GoPointer(), "name-lost", purego.NewCallback(fcb)) | |
| 991 | 991 | } | |
| 992 | 992 | ||
| 993 | 993 | // The ::open signal is emitted on the primary instance when there are | |
| 994 | 994 | // files to open. See g_application_open() for more information. | |
| 995 | - | func (x *Application) ConnectOpen(cb func(Application, uintptr, int, string)) { | |
| 995 | + | func (x *Application) ConnectOpen(cb func(Application, uintptr, int, string)) uint32 { | |
| 996 | 996 | fcb := func(clsPtr uintptr, FilesVarp uintptr, NFilesVarp int, HintVarp string) { | |
| 997 | 997 | fa := Application{} | |
| 998 | 998 | fa.Ptr = clsPtr | |
| @@ -1000,12 +1000,12 @@ func (x *Application) ConnectOpen(cb func(Application, uintptr, int, string)) { | |||
| 1000 | 1000 | cb(fa, FilesVarp, NFilesVarp, HintVarp) | |
| 1001 | 1001 | ||
| 1002 | 1002 | } | |
| 1003 | - | gobject.ObjectConnect(x.GoPointer(), "signal::open", purego.NewCallback(fcb)) | |
| 1003 | + | return gobject.SignalConnect(x.GoPointer(), "open", purego.NewCallback(fcb)) | |
| 1004 | 1004 | } | |
| 1005 | 1005 | ||
| 1006 | 1006 | // The ::shutdown signal is emitted only on the registered primary instance | |
| 1007 | 1007 | // immediately after the main loop terminates. | |
| 1008 | - | func (x *Application) ConnectShutdown(cb func(Application)) { | |
| 1008 | + | func (x *Application) ConnectShutdown(cb func(Application)) uint32 { | |
| 1009 | 1009 | fcb := func(clsPtr uintptr) { | |
| 1010 | 1010 | fa := Application{} | |
| 1011 | 1011 | fa.Ptr = clsPtr | |
| @@ -1013,12 +1013,12 @@ func (x *Application) ConnectShutdown(cb func(Application)) { | |||
| 1013 | 1013 | cb(fa) | |
| 1014 | 1014 | ||
| 1015 | 1015 | } | |
| 1016 | - | gobject.ObjectConnect(x.GoPointer(), "signal::shutdown", purego.NewCallback(fcb)) | |
| 1016 | + | return gobject.SignalConnect(x.GoPointer(), "shutdown", purego.NewCallback(fcb)) | |
| 1017 | 1017 | } | |
| 1018 | 1018 | ||
| 1019 | 1019 | // The ::startup signal is emitted on the primary instance immediately | |
| 1020 | 1020 | // after registration. See g_application_register(). | |
| 1021 | - | func (x *Application) ConnectStartup(cb func(Application)) { | |
| 1021 | + | func (x *Application) ConnectStartup(cb func(Application)) uint32 { | |
| 1022 | 1022 | fcb := func(clsPtr uintptr) { | |
| 1023 | 1023 | fa := Application{} | |
| 1024 | 1024 | fa.Ptr = clsPtr | |
| @@ -1026,7 +1026,7 @@ func (x *Application) ConnectStartup(cb func(Application)) { | |||
| 1026 | 1026 | cb(fa) | |
| 1027 | 1027 | ||
| 1028 | 1028 | } | |
| 1029 | - | gobject.ObjectConnect(x.GoPointer(), "signal::startup", purego.NewCallback(fcb)) | |
| 1029 | + | return gobject.SignalConnect(x.GoPointer(), "startup", purego.NewCallback(fcb)) | |
| 1030 | 1030 | } | |
| 1031 | 1031 | ||
| 1032 | 1032 | // Emits the #GActionGroup::action-added signal on @action_group. | |
M v4/gio/gcancellable.go +2 -2
| @@ -334,7 +334,7 @@ func (c *Cancellable) SetGoPointer(ptr uintptr) { | |||
| 334 | 334 | // Note that the cancelled signal is emitted in the thread that | |
| 335 | 335 | // the user cancelled from, which may be the main thread. So, the | |
| 336 | 336 | // cancellable signal should not do something that can block. | |
| 337 | - | func (x *Cancellable) ConnectCancelled(cb func(Cancellable)) { | |
| 337 | + | func (x *Cancellable) ConnectCancelled(cb func(Cancellable)) uint32 { | |
| 338 | 338 | fcb := func(clsPtr uintptr) { | |
| 339 | 339 | fa := Cancellable{} | |
| 340 | 340 | fa.Ptr = clsPtr | |
| @@ -342,7 +342,7 @@ func (x *Cancellable) ConnectCancelled(cb func(Cancellable)) { | |||
| 342 | 342 | cb(fa) | |
| 343 | 343 | ||
| 344 | 344 | } | |
| 345 | - | gobject.ObjectConnect(x.GoPointer(), "signal::cancelled", purego.NewCallback(fcb)) | |
| 345 | + | return gobject.SignalConnect(x.GoPointer(), "cancelled", purego.NewCallback(fcb)) | |
| 346 | 346 | } | |
| 347 | 347 | ||
| 348 | 348 | func init() { | |
M v4/gio/gdbusinterfaceskeleton.go +2 -2
| @@ -225,7 +225,7 @@ func (c *DBusInterfaceSkeleton) SetGoPointer(ptr uintptr) { | |||
| 225 | 225 | // flags set, no dedicated thread is ever used and the call will be | |
| 226 | 226 | // handled in the same thread as the object that @interface belongs | |
| 227 | 227 | // to was exported in. | |
| 228 | - | func (x *DBusInterfaceSkeleton) ConnectGAuthorizeMethod(cb func(DBusInterfaceSkeleton, uintptr) bool) { | |
| 228 | + | func (x *DBusInterfaceSkeleton) ConnectGAuthorizeMethod(cb func(DBusInterfaceSkeleton, uintptr) bool) uint32 { | |
| 229 | 229 | fcb := func(clsPtr uintptr, InvocationVarp uintptr) bool { | |
| 230 | 230 | fa := DBusInterfaceSkeleton{} | |
| 231 | 231 | fa.Ptr = clsPtr | |
| @@ -233,7 +233,7 @@ func (x *DBusInterfaceSkeleton) ConnectGAuthorizeMethod(cb func(DBusInterfaceSke | |||
| 233 | 233 | return cb(fa, InvocationVarp) | |
| 234 | 234 | ||
| 235 | 235 | } | |
| 236 | - | gobject.ObjectConnect(x.GoPointer(), "signal::g-authorize-method", purego.NewCallback(fcb)) | |
| 236 | + | return gobject.SignalConnect(x.GoPointer(), "g-authorize-method", purego.NewCallback(fcb)) | |
| 237 | 237 | } | |
| 238 | 238 | ||
| 239 | 239 | // Gets the #GDBusObject that @interface_ belongs to, if any. | |
M v4/gio/gdbusobjectmanagerclient.go +4 -4
| @@ -263,7 +263,7 @@ func (c *DBusObjectManagerClient) SetGoPointer(ptr uintptr) { | |||
| 263 | 263 | // This signal is emitted in the | |
| 264 | 264 | // [thread-default main context][g-main-context-push-thread-default] | |
| 265 | 265 | // that @manager was constructed in. | |
| 266 | - | func (x *DBusObjectManagerClient) ConnectInterfaceProxyPropertiesChanged(cb func(DBusObjectManagerClient, uintptr, uintptr, uintptr, uintptr)) { | |
| 266 | + | func (x *DBusObjectManagerClient) ConnectInterfaceProxyPropertiesChanged(cb func(DBusObjectManagerClient, uintptr, uintptr, uintptr, uintptr)) uint32 { | |
| 267 | 267 | fcb := func(clsPtr uintptr, ObjectProxyVarp uintptr, InterfaceProxyVarp uintptr, ChangedPropertiesVarp uintptr, InvalidatedPropertiesVarp uintptr) { | |
| 268 | 268 | fa := DBusObjectManagerClient{} | |
| 269 | 269 | fa.Ptr = clsPtr | |
| @@ -271,7 +271,7 @@ func (x *DBusObjectManagerClient) ConnectInterfaceProxyPropertiesChanged(cb func | |||
| 271 | 271 | cb(fa, ObjectProxyVarp, InterfaceProxyVarp, ChangedPropertiesVarp, InvalidatedPropertiesVarp) | |
| 272 | 272 | ||
| 273 | 273 | } | |
| 274 | - | gobject.ObjectConnect(x.GoPointer(), "signal::interface-proxy-properties-changed", purego.NewCallback(fcb)) | |
| 274 | + | return gobject.SignalConnect(x.GoPointer(), "interface-proxy-properties-changed", purego.NewCallback(fcb)) | |
| 275 | 275 | } | |
| 276 | 276 | ||
| 277 | 277 | // Emitted when a D-Bus signal is received on @interface_proxy. | |
| @@ -282,7 +282,7 @@ func (x *DBusObjectManagerClient) ConnectInterfaceProxyPropertiesChanged(cb func | |||
| 282 | 282 | // This signal is emitted in the | |
| 283 | 283 | // [thread-default main context][g-main-context-push-thread-default] | |
| 284 | 284 | // that @manager was constructed in. | |
| 285 | - | func (x *DBusObjectManagerClient) ConnectInterfaceProxySignal(cb func(DBusObjectManagerClient, uintptr, uintptr, string, string, uintptr)) { | |
| 285 | + | func (x *DBusObjectManagerClient) ConnectInterfaceProxySignal(cb func(DBusObjectManagerClient, uintptr, uintptr, string, string, uintptr)) uint32 { | |
| 286 | 286 | fcb := func(clsPtr uintptr, ObjectProxyVarp uintptr, InterfaceProxyVarp uintptr, SenderNameVarp string, SignalNameVarp string, ParametersVarp uintptr) { | |
| 287 | 287 | fa := DBusObjectManagerClient{} | |
| 288 | 288 | fa.Ptr = clsPtr | |
| @@ -290,7 +290,7 @@ func (x *DBusObjectManagerClient) ConnectInterfaceProxySignal(cb func(DBusObject | |||
| 290 | 290 | cb(fa, ObjectProxyVarp, InterfaceProxyVarp, SenderNameVarp, SignalNameVarp, ParametersVarp) | |
| 291 | 291 | ||
| 292 | 292 | } | |
| 293 | - | gobject.ObjectConnect(x.GoPointer(), "signal::interface-proxy-signal", purego.NewCallback(fcb)) | |
| 293 | + | return gobject.SignalConnect(x.GoPointer(), "interface-proxy-signal", purego.NewCallback(fcb)) | |
| 294 | 294 | } | |
| 295 | 295 | ||
| 296 | 296 | // Starts asynchronous initialization of the object implementing the | |
M v4/gio/gdbusobjectskeleton.go +2 -2
| @@ -121,7 +121,7 @@ func (c *DBusObjectSkeleton) SetGoPointer(ptr uintptr) { | |||
| 121 | 121 | // except that it is for the enclosing object. | |
| 122 | 122 | // | |
| 123 | 123 | // The default class handler just returns %TRUE. | |
| 124 | - | func (x *DBusObjectSkeleton) ConnectAuthorizeMethod(cb func(DBusObjectSkeleton, uintptr, uintptr) bool) { | |
| 124 | + | func (x *DBusObjectSkeleton) ConnectAuthorizeMethod(cb func(DBusObjectSkeleton, uintptr, uintptr) bool) uint32 { | |
| 125 | 125 | fcb := func(clsPtr uintptr, InterfaceVarp uintptr, InvocationVarp uintptr) bool { | |
| 126 | 126 | fa := DBusObjectSkeleton{} | |
| 127 | 127 | fa.Ptr = clsPtr | |
| @@ -129,7 +129,7 @@ func (x *DBusObjectSkeleton) ConnectAuthorizeMethod(cb func(DBusObjectSkeleton, | |||
| 129 | 129 | return cb(fa, InterfaceVarp, InvocationVarp) | |
| 130 | 130 | ||
| 131 | 131 | } | |
| 132 | - | gobject.ObjectConnect(x.GoPointer(), "signal::authorize-method", purego.NewCallback(fcb)) | |
| 132 | + | return gobject.SignalConnect(x.GoPointer(), "authorize-method", purego.NewCallback(fcb)) | |
| 133 | 133 | } | |
| 134 | 134 | ||
| 135 | 135 | // Gets the D-Bus interface with name @interface_name associated with | |
M v4/gio/gdbusproxy.go +4 -4
| @@ -538,7 +538,7 @@ func (c *DBusProxy) SetGoPointer(ptr uintptr) { | |||
| 538 | 538 | // This signal corresponds to the | |
| 539 | 539 | // `PropertiesChanged` D-Bus signal on the | |
| 540 | 540 | // `org.freedesktop.DBus.Properties` interface. | |
| 541 | - | func (x *DBusProxy) ConnectGPropertiesChanged(cb func(DBusProxy, uintptr, uintptr)) { | |
| 541 | + | func (x *DBusProxy) ConnectGPropertiesChanged(cb func(DBusProxy, uintptr, uintptr)) uint32 { | |
| 542 | 542 | fcb := func(clsPtr uintptr, ChangedPropertiesVarp uintptr, InvalidatedPropertiesVarp uintptr) { | |
| 543 | 543 | fa := DBusProxy{} | |
| 544 | 544 | fa.Ptr = clsPtr | |
| @@ -546,7 +546,7 @@ func (x *DBusProxy) ConnectGPropertiesChanged(cb func(DBusProxy, uintptr, uintpt | |||
| 546 | 546 | cb(fa, ChangedPropertiesVarp, InvalidatedPropertiesVarp) | |
| 547 | 547 | ||
| 548 | 548 | } | |
| 549 | - | gobject.ObjectConnect(x.GoPointer(), "signal::g-properties-changed", purego.NewCallback(fcb)) | |
| 549 | + | return gobject.SignalConnect(x.GoPointer(), "g-properties-changed", purego.NewCallback(fcb)) | |
| 550 | 550 | } | |
| 551 | 551 | ||
| 552 | 552 | // Emitted when a signal from the remote object and interface that @proxy is for, has been received. | |
| @@ -554,7 +554,7 @@ func (x *DBusProxy) ConnectGPropertiesChanged(cb func(DBusProxy, uintptr, uintpt | |||
| 554 | 554 | // Since 2.72 this signal supports detailed connections. You can connect to | |
| 555 | 555 | // the detailed signal `g-signal::x` in order to receive callbacks only when | |
| 556 | 556 | // signal `x` is received from the remote object. | |
| 557 | - | func (x *DBusProxy) ConnectGSignal(cb func(DBusProxy, string, string, uintptr)) { | |
| 557 | + | func (x *DBusProxy) ConnectGSignal(cb func(DBusProxy, string, string, uintptr)) uint32 { | |
| 558 | 558 | fcb := func(clsPtr uintptr, SenderNameVarp string, SignalNameVarp string, ParametersVarp uintptr) { | |
| 559 | 559 | fa := DBusProxy{} | |
| 560 | 560 | fa.Ptr = clsPtr | |
| @@ -562,7 +562,7 @@ func (x *DBusProxy) ConnectGSignal(cb func(DBusProxy, string, string, uintptr)) | |||
| 562 | 562 | cb(fa, SenderNameVarp, SignalNameVarp, ParametersVarp) | |
| 563 | 563 | ||
| 564 | 564 | } | |
| 565 | - | gobject.ObjectConnect(x.GoPointer(), "signal::g-signal", purego.NewCallback(fcb)) | |
| 565 | + | return gobject.SignalConnect(x.GoPointer(), "g-signal", purego.NewCallback(fcb)) | |
| 566 | 566 | } | |
| 567 | 567 | ||
| 568 | 568 | // Starts asynchronous initialization of the object implementing the | |
M v4/gio/gdebugcontrollerdbus.go +2 -2
| @@ -213,7 +213,7 @@ func (c *DebugControllerDBus) SetGoPointer(ptr uintptr) { | |||
| 213 | 213 | // Signal handlers must not modify @invocation, or cause it to return a value. | |
| 214 | 214 | // | |
| 215 | 215 | // The default class handler just returns %TRUE. | |
| 216 | - | func (x *DebugControllerDBus) ConnectAuthorize(cb func(DebugControllerDBus, uintptr) bool) { | |
| 216 | + | func (x *DebugControllerDBus) ConnectAuthorize(cb func(DebugControllerDBus, uintptr) bool) uint32 { | |
| 217 | 217 | fcb := func(clsPtr uintptr, InvocationVarp uintptr) bool { | |
| 218 | 218 | fa := DebugControllerDBus{} | |
| 219 | 219 | fa.Ptr = clsPtr | |
| @@ -221,7 +221,7 @@ func (x *DebugControllerDBus) ConnectAuthorize(cb func(DebugControllerDBus, uint | |||
| 221 | 221 | return cb(fa, InvocationVarp) | |
| 222 | 222 | ||
| 223 | 223 | } | |
| 224 | - | gobject.ObjectConnect(x.GoPointer(), "signal::authorize", purego.NewCallback(fcb)) | |
| 224 | + | return gobject.SignalConnect(x.GoPointer(), "authorize", purego.NewCallback(fcb)) | |
| 225 | 225 | } | |
| 226 | 226 | ||
| 227 | 227 | // Get the value of #GDebugController:debug-enabled. | |
M v4/gio/gfilemonitor.go +2 -2
| @@ -117,7 +117,7 @@ func (c *FileMonitor) SetGoPointer(ptr uintptr) { | |||
| 117 | 117 | // old path, and @other_file will be set to a #GFile containing the new path. | |
| 118 | 118 | // | |
| 119 | 119 | // In all the other cases, @other_file will be set to #NULL. | |
| 120 | - | func (x *FileMonitor) ConnectChanged(cb func(FileMonitor, uintptr, uintptr, FileMonitorEvent)) { | |
| 120 | + | func (x *FileMonitor) ConnectChanged(cb func(FileMonitor, uintptr, uintptr, FileMonitorEvent)) uint32 { | |
| 121 | 121 | fcb := func(clsPtr uintptr, FileVarp uintptr, OtherFileVarp uintptr, EventTypeVarp FileMonitorEvent) { | |
| 122 | 122 | fa := FileMonitor{} | |
| 123 | 123 | fa.Ptr = clsPtr | |
| @@ -125,7 +125,7 @@ func (x *FileMonitor) ConnectChanged(cb func(FileMonitor, uintptr, uintptr, File | |||
| 125 | 125 | cb(fa, FileVarp, OtherFileVarp, EventTypeVarp) | |
| 126 | 126 | ||
| 127 | 127 | } | |
| 128 | - | gobject.ObjectConnect(x.GoPointer(), "signal::changed", purego.NewCallback(fcb)) | |
| 128 | + | return gobject.SignalConnect(x.GoPointer(), "changed", purego.NewCallback(fcb)) | |
| 129 | 129 | } | |
| 130 | 130 | ||
| 131 | 131 | func init() { | |
M v4/gio/gfilenamecompleter.go +2 -2
| @@ -77,7 +77,7 @@ func (c *FilenameCompleter) SetGoPointer(ptr uintptr) { | |||
| 77 | 77 | } | |
| 78 | 78 | ||
| 79 | 79 | // Emitted when the file name completion information comes available. | |
| 80 | - | func (x *FilenameCompleter) ConnectGotCompletionData(cb func(FilenameCompleter)) { | |
| 80 | + | func (x *FilenameCompleter) ConnectGotCompletionData(cb func(FilenameCompleter)) uint32 { | |
| 81 | 81 | fcb := func(clsPtr uintptr) { | |
| 82 | 82 | fa := FilenameCompleter{} | |
| 83 | 83 | fa.Ptr = clsPtr | |
| @@ -85,7 +85,7 @@ func (x *FilenameCompleter) ConnectGotCompletionData(cb func(FilenameCompleter)) | |||
| 85 | 85 | cb(fa) | |
| 86 | 86 | ||
| 87 | 87 | } | |
| 88 | - | gobject.ObjectConnect(x.GoPointer(), "signal::got-completion-data", purego.NewCallback(fcb)) | |
| 88 | + | return gobject.SignalConnect(x.GoPointer(), "got-completion-data", purego.NewCallback(fcb)) | |
| 89 | 89 | } | |
| 90 | 90 | ||
| 91 | 91 | func init() { | |
M v4/gio/gio-2.0.go +14 -14
| @@ -90,7 +90,7 @@ func (c *AppInfoMonitor) SetGoPointer(ptr uintptr) { | |||
| 90 | 90 | ||
| 91 | 91 | // Signal emitted when the app info database for changes (ie: newly installed | |
| 92 | 92 | // or removed applications). | |
| 93 | - | func (x *AppInfoMonitor) ConnectChanged(cb func(AppInfoMonitor)) { | |
| 93 | + | func (x *AppInfoMonitor) ConnectChanged(cb func(AppInfoMonitor)) uint32 { | |
| 94 | 94 | fcb := func(clsPtr uintptr) { | |
| 95 | 95 | fa := AppInfoMonitor{} | |
| 96 | 96 | fa.Ptr = clsPtr | |
| @@ -98,7 +98,7 @@ func (x *AppInfoMonitor) ConnectChanged(cb func(AppInfoMonitor)) { | |||
| 98 | 98 | cb(fa) | |
| 99 | 99 | ||
| 100 | 100 | } | |
| 101 | - | gobject.ObjectConnect(x.GoPointer(), "signal::changed", purego.NewCallback(fcb)) | |
| 101 | + | return gobject.SignalConnect(x.GoPointer(), "changed", purego.NewCallback(fcb)) | |
| 102 | 102 | } | |
| 103 | 103 | ||
| 104 | 104 | // #GBytesIcon specifies an image held in memory in a common format (usually | |
| @@ -640,7 +640,7 @@ func (c *DBusAuthObserver) SetGoPointer(ptr uintptr) { | |||
| 640 | 640 | } | |
| 641 | 641 | ||
| 642 | 642 | // Emitted to check if @mechanism is allowed to be used. | |
| 643 | - | func (x *DBusAuthObserver) ConnectAllowMechanism(cb func(DBusAuthObserver, string) bool) { | |
| 643 | + | func (x *DBusAuthObserver) ConnectAllowMechanism(cb func(DBusAuthObserver, string) bool) uint32 { | |
| 644 | 644 | fcb := func(clsPtr uintptr, MechanismVarp string) bool { | |
| 645 | 645 | fa := DBusAuthObserver{} | |
| 646 | 646 | fa.Ptr = clsPtr | |
| @@ -648,12 +648,12 @@ func (x *DBusAuthObserver) ConnectAllowMechanism(cb func(DBusAuthObserver, strin | |||
| 648 | 648 | return cb(fa, MechanismVarp) | |
| 649 | 649 | ||
| 650 | 650 | } | |
| 651 | - | gobject.ObjectConnect(x.GoPointer(), "signal::allow-mechanism", purego.NewCallback(fcb)) | |
| 651 | + | return gobject.SignalConnect(x.GoPointer(), "allow-mechanism", purego.NewCallback(fcb)) | |
| 652 | 652 | } | |
| 653 | 653 | ||
| 654 | 654 | // Emitted to check if a peer that is successfully authenticated | |
| 655 | 655 | // is authorized. | |
| 656 | - | func (x *DBusAuthObserver) ConnectAuthorizeAuthenticatedPeer(cb func(DBusAuthObserver, uintptr, uintptr) bool) { | |
| 656 | + | func (x *DBusAuthObserver) ConnectAuthorizeAuthenticatedPeer(cb func(DBusAuthObserver, uintptr, uintptr) bool) uint32 { | |
| 657 | 657 | fcb := func(clsPtr uintptr, StreamVarp uintptr, CredentialsVarp uintptr) bool { | |
| 658 | 658 | fa := DBusAuthObserver{} | |
| 659 | 659 | fa.Ptr = clsPtr | |
| @@ -661,7 +661,7 @@ func (x *DBusAuthObserver) ConnectAuthorizeAuthenticatedPeer(cb func(DBusAuthObs | |||
| 661 | 661 | return cb(fa, StreamVarp, CredentialsVarp) | |
| 662 | 662 | ||
| 663 | 663 | } | |
| 664 | - | gobject.ObjectConnect(x.GoPointer(), "signal::authorize-authenticated-peer", purego.NewCallback(fcb)) | |
| 664 | + | return gobject.SignalConnect(x.GoPointer(), "authorize-authenticated-peer", purego.NewCallback(fcb)) | |
| 665 | 665 | } | |
| 666 | 666 | ||
| 667 | 667 | // The #GDBusConnection type is used for D-Bus connections to remote | |
| @@ -1828,7 +1828,7 @@ func (c *DBusConnection) SetGoPointer(ptr uintptr) { | |||
| 1828 | 1828 | // Upon receiving this signal, you should give up your reference to | |
| 1829 | 1829 | // @connection. You are guaranteed that this signal is emitted only | |
| 1830 | 1830 | // once. | |
| 1831 | - | func (x *DBusConnection) ConnectClosed(cb func(DBusConnection, bool, uintptr)) { | |
| 1831 | + | func (x *DBusConnection) ConnectClosed(cb func(DBusConnection, bool, uintptr)) uint32 { | |
| 1832 | 1832 | fcb := func(clsPtr uintptr, RemotePeerVanishedVarp bool, ErrorVarp uintptr) { | |
| 1833 | 1833 | fa := DBusConnection{} | |
| 1834 | 1834 | fa.Ptr = clsPtr | |
| @@ -1836,7 +1836,7 @@ func (x *DBusConnection) ConnectClosed(cb func(DBusConnection, bool, uintptr)) { | |||
| 1836 | 1836 | cb(fa, RemotePeerVanishedVarp, ErrorVarp) | |
| 1837 | 1837 | ||
| 1838 | 1838 | } | |
| 1839 | - | gobject.ObjectConnect(x.GoPointer(), "signal::closed", purego.NewCallback(fcb)) | |
| 1839 | + | return gobject.SignalConnect(x.GoPointer(), "closed", purego.NewCallback(fcb)) | |
| 1840 | 1840 | } | |
| 1841 | 1841 | ||
| 1842 | 1842 | // Starts asynchronous initialization of the object implementing the | |
| @@ -3082,7 +3082,7 @@ func (c *DBusServer) SetGoPointer(ptr uintptr) { | |||
| 3082 | 3082 | // before incoming messages on @connection are processed. This means | |
| 3083 | 3083 | // that it's suitable to call g_dbus_connection_register_object() or | |
| 3084 | 3084 | // similar from the signal handler. | |
| 3085 | - | func (x *DBusServer) ConnectNewConnection(cb func(DBusServer, uintptr) bool) { | |
| 3085 | + | func (x *DBusServer) ConnectNewConnection(cb func(DBusServer, uintptr) bool) uint32 { | |
| 3086 | 3086 | fcb := func(clsPtr uintptr, ConnectionVarp uintptr) bool { | |
| 3087 | 3087 | fa := DBusServer{} | |
| 3088 | 3088 | fa.Ptr = clsPtr | |
| @@ -3090,7 +3090,7 @@ func (x *DBusServer) ConnectNewConnection(cb func(DBusServer, uintptr) bool) { | |||
| 3090 | 3090 | return cb(fa, ConnectionVarp) | |
| 3091 | 3091 | ||
| 3092 | 3092 | } | |
| 3093 | - | gobject.ObjectConnect(x.GoPointer(), "signal::new-connection", purego.NewCallback(fcb)) | |
| 3093 | + | return gobject.SignalConnect(x.GoPointer(), "new-connection", purego.NewCallback(fcb)) | |
| 3094 | 3094 | } | |
| 3095 | 3095 | ||
| 3096 | 3096 | // Initializes the object implementing the interface. | |
| @@ -4377,7 +4377,7 @@ func (c *SimpleAction) SetGoPointer(ptr uintptr) { | |||
| 4377 | 4377 | // type, the default is to forward them directly to | |
| 4378 | 4378 | // #GSimpleAction::change-state. This should allow almost all users | |
| 4379 | 4379 | // of #GSimpleAction to connect only one handler or the other. | |
| 4380 | - | func (x *SimpleAction) ConnectActivate(cb func(SimpleAction, uintptr)) { | |
| 4380 | + | func (x *SimpleAction) ConnectActivate(cb func(SimpleAction, uintptr)) uint32 { | |
| 4381 | 4381 | fcb := func(clsPtr uintptr, ParameterVarp uintptr) { | |
| 4382 | 4382 | fa := SimpleAction{} | |
| 4383 | 4383 | fa.Ptr = clsPtr | |
| @@ -4385,7 +4385,7 @@ func (x *SimpleAction) ConnectActivate(cb func(SimpleAction, uintptr)) { | |||
| 4385 | 4385 | cb(fa, ParameterVarp) | |
| 4386 | 4386 | ||
| 4387 | 4387 | } | |
| 4388 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 4388 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 4389 | 4389 | } | |
| 4390 | 4390 | ||
| 4391 | 4391 | // Indicates that the action just received a request to change its | |
| @@ -4424,7 +4424,7 @@ func (x *SimpleAction) ConnectActivate(cb func(SimpleAction, uintptr)) { | |||
| 4424 | 4424 | // | |
| 4425 | 4425 | // The handler need not set the state to the requested value. | |
| 4426 | 4426 | // It could set it to any value at all, or take some other action. | |
| 4427 | - | func (x *SimpleAction) ConnectChangeState(cb func(SimpleAction, uintptr)) { | |
| 4427 | + | func (x *SimpleAction) ConnectChangeState(cb func(SimpleAction, uintptr)) uint32 { | |
| 4428 | 4428 | fcb := func(clsPtr uintptr, ValueVarp uintptr) { | |
| 4429 | 4429 | fa := SimpleAction{} | |
| 4430 | 4430 | fa.Ptr = clsPtr | |
| @@ -4432,7 +4432,7 @@ func (x *SimpleAction) ConnectChangeState(cb func(SimpleAction, uintptr)) { | |||
| 4432 | 4432 | cb(fa, ValueVarp) | |
| 4433 | 4433 | ||
| 4434 | 4434 | } | |
| 4435 | - | gobject.ObjectConnect(x.GoPointer(), "signal::change-state", purego.NewCallback(fcb)) | |
| 4435 | + | return gobject.SignalConnect(x.GoPointer(), "change-state", purego.NewCallback(fcb)) | |
| 4436 | 4436 | } | |
| 4437 | 4437 | ||
| 4438 | 4438 | // Activates the action. | |
M v4/gio/gmenumodel.go +2 -2
| @@ -495,7 +495,7 @@ func (c *MenuModel) SetGoPointer(ptr uintptr) { | |||
| 495 | 495 | // Signal handlers may query the model (particularly the added items) | |
| 496 | 496 | // and expect to see the results of the modification that is being | |
| 497 | 497 | // reported. The signal is emitted after the modification. | |
| 498 | - | func (x *MenuModel) ConnectItemsChanged(cb func(MenuModel, int, int, int)) { | |
| 498 | + | func (x *MenuModel) ConnectItemsChanged(cb func(MenuModel, int, int, int)) uint32 { | |
| 499 | 499 | fcb := func(clsPtr uintptr, PositionVarp int, RemovedVarp int, AddedVarp int) { | |
| 500 | 500 | fa := MenuModel{} | |
| 501 | 501 | fa.Ptr = clsPtr | |
| @@ -503,7 +503,7 @@ func (x *MenuModel) ConnectItemsChanged(cb func(MenuModel, int, int, int)) { | |||
| 503 | 503 | cb(fa, PositionVarp, RemovedVarp, AddedVarp) | |
| 504 | 504 | ||
| 505 | 505 | } | |
| 506 | - | gobject.ObjectConnect(x.GoPointer(), "signal::items-changed", purego.NewCallback(fcb)) | |
| 506 | + | return gobject.SignalConnect(x.GoPointer(), "items-changed", purego.NewCallback(fcb)) | |
| 507 | 507 | } | |
| 508 | 508 | ||
| 509 | 509 | func init() { | |
M v4/gio/gmountoperation.go +12 -12
| @@ -248,7 +248,7 @@ func (c *MountOperation) SetGoPointer(ptr uintptr) { | |||
| 248 | 248 | // | |
| 249 | 249 | // Implementations of GMountOperation should handle this signal | |
| 250 | 250 | // by dismissing open password dialogs. | |
| 251 | - | func (x *MountOperation) ConnectAborted(cb func(MountOperation)) { | |
| 251 | + | func (x *MountOperation) ConnectAborted(cb func(MountOperation)) uint32 { | |
| 252 | 252 | fcb := func(clsPtr uintptr) { | |
| 253 | 253 | fa := MountOperation{} | |
| 254 | 254 | fa.Ptr = clsPtr | |
| @@ -256,7 +256,7 @@ func (x *MountOperation) ConnectAborted(cb func(MountOperation)) { | |||
| 256 | 256 | cb(fa) | |
| 257 | 257 | ||
| 258 | 258 | } | |
| 259 | - | gobject.ObjectConnect(x.GoPointer(), "signal::aborted", purego.NewCallback(fcb)) | |
| 259 | + | return gobject.SignalConnect(x.GoPointer(), "aborted", purego.NewCallback(fcb)) | |
| 260 | 260 | } | |
| 261 | 261 | ||
| 262 | 262 | // Emitted when a mount operation asks the user for a password. | |
| @@ -264,7 +264,7 @@ func (x *MountOperation) ConnectAborted(cb func(MountOperation)) { | |||
| 264 | 264 | // If the message contains a line break, the first line should be | |
| 265 | 265 | // presented as a heading. For example, it may be used as the | |
| 266 | 266 | // primary text in a #GtkMessageDialog. | |
| 267 | - | func (x *MountOperation) ConnectAskPassword(cb func(MountOperation, string, string, string, AskPasswordFlags)) { | |
| 267 | + | func (x *MountOperation) ConnectAskPassword(cb func(MountOperation, string, string, string, AskPasswordFlags)) uint32 { | |
| 268 | 268 | fcb := func(clsPtr uintptr, MessageVarp string, DefaultUserVarp string, DefaultDomainVarp string, FlagsVarp AskPasswordFlags) { | |
| 269 | 269 | fa := MountOperation{} | |
| 270 | 270 | fa.Ptr = clsPtr | |
| @@ -272,7 +272,7 @@ func (x *MountOperation) ConnectAskPassword(cb func(MountOperation, string, stri | |||
| 272 | 272 | cb(fa, MessageVarp, DefaultUserVarp, DefaultDomainVarp, FlagsVarp) | |
| 273 | 273 | ||
| 274 | 274 | } | |
| 275 | - | gobject.ObjectConnect(x.GoPointer(), "signal::ask-password", purego.NewCallback(fcb)) | |
| 275 | + | return gobject.SignalConnect(x.GoPointer(), "ask-password", purego.NewCallback(fcb)) | |
| 276 | 276 | } | |
| 277 | 277 | ||
| 278 | 278 | // Emitted when asking the user a question and gives a list of | |
| @@ -281,7 +281,7 @@ func (x *MountOperation) ConnectAskPassword(cb func(MountOperation, string, stri | |||
| 281 | 281 | // If the message contains a line break, the first line should be | |
| 282 | 282 | // presented as a heading. For example, it may be used as the | |
| 283 | 283 | // primary text in a #GtkMessageDialog. | |
| 284 | - | func (x *MountOperation) ConnectAskQuestion(cb func(MountOperation, string, uintptr)) { | |
| 284 | + | func (x *MountOperation) ConnectAskQuestion(cb func(MountOperation, string, uintptr)) uint32 { | |
| 285 | 285 | fcb := func(clsPtr uintptr, MessageVarp string, ChoicesVarp uintptr) { | |
| 286 | 286 | fa := MountOperation{} | |
| 287 | 287 | fa.Ptr = clsPtr | |
| @@ -289,11 +289,11 @@ func (x *MountOperation) ConnectAskQuestion(cb func(MountOperation, string, uint | |||
| 289 | 289 | cb(fa, MessageVarp, ChoicesVarp) | |
| 290 | 290 | ||
| 291 | 291 | } | |
| 292 | - | gobject.ObjectConnect(x.GoPointer(), "signal::ask-question", purego.NewCallback(fcb)) | |
| 292 | + | return gobject.SignalConnect(x.GoPointer(), "ask-question", purego.NewCallback(fcb)) | |
| 293 | 293 | } | |
| 294 | 294 | ||
| 295 | 295 | // Emitted when the user has replied to the mount operation. | |
| 296 | - | func (x *MountOperation) ConnectReply(cb func(MountOperation, MountOperationResult)) { | |
| 296 | + | func (x *MountOperation) ConnectReply(cb func(MountOperation, MountOperationResult)) uint32 { | |
| 297 | 297 | fcb := func(clsPtr uintptr, ResultVarp MountOperationResult) { | |
| 298 | 298 | fa := MountOperation{} | |
| 299 | 299 | fa.Ptr = clsPtr | |
| @@ -301,7 +301,7 @@ func (x *MountOperation) ConnectReply(cb func(MountOperation, MountOperationResu | |||
| 301 | 301 | cb(fa, ResultVarp) | |
| 302 | 302 | ||
| 303 | 303 | } | |
| 304 | - | gobject.ObjectConnect(x.GoPointer(), "signal::reply", purego.NewCallback(fcb)) | |
| 304 | + | return gobject.SignalConnect(x.GoPointer(), "reply", purego.NewCallback(fcb)) | |
| 305 | 305 | } | |
| 306 | 306 | ||
| 307 | 307 | // Emitted when one or more processes are blocking an operation | |
| @@ -316,7 +316,7 @@ func (x *MountOperation) ConnectReply(cb func(MountOperation, MountOperationResu | |||
| 316 | 316 | // If the message contains a line break, the first line should be | |
| 317 | 317 | // presented as a heading. For example, it may be used as the | |
| 318 | 318 | // primary text in a #GtkMessageDialog. | |
| 319 | - | func (x *MountOperation) ConnectShowProcesses(cb func(MountOperation, string, uintptr, uintptr)) { | |
| 319 | + | func (x *MountOperation) ConnectShowProcesses(cb func(MountOperation, string, uintptr, uintptr)) uint32 { | |
| 320 | 320 | fcb := func(clsPtr uintptr, MessageVarp string, ProcessesVarp uintptr, ChoicesVarp uintptr) { | |
| 321 | 321 | fa := MountOperation{} | |
| 322 | 322 | fa.Ptr = clsPtr | |
| @@ -324,7 +324,7 @@ func (x *MountOperation) ConnectShowProcesses(cb func(MountOperation, string, ui | |||
| 324 | 324 | cb(fa, MessageVarp, ProcessesVarp, ChoicesVarp) | |
| 325 | 325 | ||
| 326 | 326 | } | |
| 327 | - | gobject.ObjectConnect(x.GoPointer(), "signal::show-processes", purego.NewCallback(fcb)) | |
| 327 | + | return gobject.SignalConnect(x.GoPointer(), "show-processes", purego.NewCallback(fcb)) | |
| 328 | 328 | } | |
| 329 | 329 | ||
| 330 | 330 | // Emitted when an unmount operation has been busy for more than some time | |
| @@ -343,7 +343,7 @@ func (x *MountOperation) ConnectShowProcesses(cb func(MountOperation, string, ui | |||
| 343 | 343 | // If the message contains a line break, the first line should be | |
| 344 | 344 | // presented as a heading. For example, it may be used as the | |
| 345 | 345 | // primary text in a #GtkMessageDialog. | |
| 346 | - | func (x *MountOperation) ConnectShowUnmountProgress(cb func(MountOperation, string, int64, int64)) { | |
| 346 | + | func (x *MountOperation) ConnectShowUnmountProgress(cb func(MountOperation, string, int64, int64)) uint32 { | |
| 347 | 347 | fcb := func(clsPtr uintptr, MessageVarp string, TimeLeftVarp int64, BytesLeftVarp int64) { | |
| 348 | 348 | fa := MountOperation{} | |
| 349 | 349 | fa.Ptr = clsPtr | |
| @@ -351,7 +351,7 @@ func (x *MountOperation) ConnectShowUnmountProgress(cb func(MountOperation, stri | |||
| 351 | 351 | cb(fa, MessageVarp, TimeLeftVarp, BytesLeftVarp) | |
| 352 | 352 | ||
| 353 | 353 | } | |
| 354 | - | gobject.ObjectConnect(x.GoPointer(), "signal::show-unmount-progress", purego.NewCallback(fcb)) | |
| 354 | + | return gobject.SignalConnect(x.GoPointer(), "show-unmount-progress", purego.NewCallback(fcb)) | |
| 355 | 355 | } | |
| 356 | 356 | ||
| 357 | 357 | func init() { | |
M v4/gio/gresolver.go +2 -2
| @@ -361,7 +361,7 @@ func (c *Resolver) SetGoPointer(ptr uintptr) { | |||
| 361 | 361 | ||
| 362 | 362 | // Emitted when the resolver notices that the system resolver | |
| 363 | 363 | // configuration has changed. | |
| 364 | - | func (x *Resolver) ConnectReload(cb func(Resolver)) { | |
| 364 | + | func (x *Resolver) ConnectReload(cb func(Resolver)) uint32 { | |
| 365 | 365 | fcb := func(clsPtr uintptr) { | |
| 366 | 366 | fa := Resolver{} | |
| 367 | 367 | fa.Ptr = clsPtr | |
| @@ -369,7 +369,7 @@ func (x *Resolver) ConnectReload(cb func(Resolver)) { | |||
| 369 | 369 | cb(fa) | |
| 370 | 370 | ||
| 371 | 371 | } | |
| 372 | - | gobject.ObjectConnect(x.GoPointer(), "signal::reload", purego.NewCallback(fcb)) | |
| 372 | + | return gobject.SignalConnect(x.GoPointer(), "reload", purego.NewCallback(fcb)) | |
| 373 | 373 | } | |
| 374 | 374 | ||
| 375 | 375 | func init() { | |
M v4/gio/gsettings.go +8 -8
| @@ -1230,7 +1230,7 @@ func (c *Settings) SetGoPointer(ptr uintptr) { | |||
| 1230 | 1230 | // The default handler for this signal invokes the "changed" signal | |
| 1231 | 1231 | // for each affected key. If any other connected handler returns | |
| 1232 | 1232 | // %TRUE then this default functionality will be suppressed. | |
| 1233 | - | func (x *Settings) ConnectChangeEvent(cb func(Settings, uintptr, int) bool) { | |
| 1233 | + | func (x *Settings) ConnectChangeEvent(cb func(Settings, uintptr, int) bool) uint32 { | |
| 1234 | 1234 | fcb := func(clsPtr uintptr, KeysVarp uintptr, NKeysVarp int) bool { | |
| 1235 | 1235 | fa := Settings{} | |
| 1236 | 1236 | fa.Ptr = clsPtr | |
| @@ -1238,7 +1238,7 @@ func (x *Settings) ConnectChangeEvent(cb func(Settings, uintptr, int) bool) { | |||
| 1238 | 1238 | return cb(fa, KeysVarp, NKeysVarp) | |
| 1239 | 1239 | ||
| 1240 | 1240 | } | |
| 1241 | - | gobject.ObjectConnect(x.GoPointer(), "signal::change-event", purego.NewCallback(fcb)) | |
| 1241 | + | return gobject.SignalConnect(x.GoPointer(), "change-event", purego.NewCallback(fcb)) | |
| 1242 | 1242 | } | |
| 1243 | 1243 | ||
| 1244 | 1244 | // The "changed" signal is emitted when a key has potentially changed. | |
| @@ -1251,7 +1251,7 @@ func (x *Settings) ConnectChangeEvent(cb func(Settings, uintptr, int) bool) { | |||
| 1251 | 1251 | // | |
| 1252 | 1252 | // Note that @settings only emits this signal if you have read @key at | |
| 1253 | 1253 | // least once while a signal handler was already connected for @key. | |
| 1254 | - | func (x *Settings) ConnectChanged(cb func(Settings, string)) { | |
| 1254 | + | func (x *Settings) ConnectChanged(cb func(Settings, string)) uint32 { | |
| 1255 | 1255 | fcb := func(clsPtr uintptr, KeyVarp string) { | |
| 1256 | 1256 | fa := Settings{} | |
| 1257 | 1257 | fa.Ptr = clsPtr | |
| @@ -1259,7 +1259,7 @@ func (x *Settings) ConnectChanged(cb func(Settings, string)) { | |||
| 1259 | 1259 | cb(fa, KeyVarp) | |
| 1260 | 1260 | ||
| 1261 | 1261 | } | |
| 1262 | - | gobject.ObjectConnect(x.GoPointer(), "signal::changed", purego.NewCallback(fcb)) | |
| 1262 | + | return gobject.SignalConnect(x.GoPointer(), "changed", purego.NewCallback(fcb)) | |
| 1263 | 1263 | } | |
| 1264 | 1264 | ||
| 1265 | 1265 | // The "writable-change-event" signal is emitted once per writability | |
| @@ -1280,7 +1280,7 @@ func (x *Settings) ConnectChanged(cb func(Settings, string)) { | |||
| 1280 | 1280 | // example, a new mandatory setting is introduced). If any other | |
| 1281 | 1281 | // connected handler returns %TRUE then this default functionality | |
| 1282 | 1282 | // will be suppressed. | |
| 1283 | - | func (x *Settings) ConnectWritableChangeEvent(cb func(Settings, uint) bool) { | |
| 1283 | + | func (x *Settings) ConnectWritableChangeEvent(cb func(Settings, uint) bool) uint32 { | |
| 1284 | 1284 | fcb := func(clsPtr uintptr, KeyVarp uint) bool { | |
| 1285 | 1285 | fa := Settings{} | |
| 1286 | 1286 | fa.Ptr = clsPtr | |
| @@ -1288,7 +1288,7 @@ func (x *Settings) ConnectWritableChangeEvent(cb func(Settings, uint) bool) { | |||
| 1288 | 1288 | return cb(fa, KeyVarp) | |
| 1289 | 1289 | ||
| 1290 | 1290 | } | |
| 1291 | - | gobject.ObjectConnect(x.GoPointer(), "signal::writable-change-event", purego.NewCallback(fcb)) | |
| 1291 | + | return gobject.SignalConnect(x.GoPointer(), "writable-change-event", purego.NewCallback(fcb)) | |
| 1292 | 1292 | } | |
| 1293 | 1293 | ||
| 1294 | 1294 | // The "writable-changed" signal is emitted when the writability of a | |
| @@ -1298,7 +1298,7 @@ func (x *Settings) ConnectWritableChangeEvent(cb func(Settings, uint) bool) { | |||
| 1298 | 1298 | // This signal supports detailed connections. You can connect to the | |
| 1299 | 1299 | // detailed signal "writable-changed::x" in order to only receive | |
| 1300 | 1300 | // callbacks when the writability of "x" changes. | |
| 1301 | - | func (x *Settings) ConnectWritableChanged(cb func(Settings, string)) { | |
| 1301 | + | func (x *Settings) ConnectWritableChanged(cb func(Settings, string)) uint32 { | |
| 1302 | 1302 | fcb := func(clsPtr uintptr, KeyVarp string) { | |
| 1303 | 1303 | fa := Settings{} | |
| 1304 | 1304 | fa.Ptr = clsPtr | |
| @@ -1306,7 +1306,7 @@ func (x *Settings) ConnectWritableChanged(cb func(Settings, string)) { | |||
| 1306 | 1306 | cb(fa, KeyVarp) | |
| 1307 | 1307 | ||
| 1308 | 1308 | } | |
| 1309 | - | gobject.ObjectConnect(x.GoPointer(), "signal::writable-changed", purego.NewCallback(fcb)) | |
| 1309 | + | return gobject.SignalConnect(x.GoPointer(), "writable-changed", purego.NewCallback(fcb)) | |
| 1310 | 1310 | } | |
| 1311 | 1311 | ||
| 1312 | 1312 | func init() { | |
M v4/gio/gsocketclient.go +2 -2
| @@ -700,7 +700,7 @@ func (c *SocketClient) SetGoPointer(ptr uintptr) { | |||
| 700 | 700 | // | |
| 701 | 701 | // Note that there may be additional #GSocketClientEvent values in | |
| 702 | 702 | // the future; unrecognized @event values should be ignored. | |
| 703 | - | func (x *SocketClient) ConnectEvent(cb func(SocketClient, SocketClientEvent, uintptr, uintptr)) { | |
| 703 | + | func (x *SocketClient) ConnectEvent(cb func(SocketClient, SocketClientEvent, uintptr, uintptr)) uint32 { | |
| 704 | 704 | fcb := func(clsPtr uintptr, EventVarp SocketClientEvent, ConnectableVarp uintptr, ConnectionVarp uintptr) { | |
| 705 | 705 | fa := SocketClient{} | |
| 706 | 706 | fa.Ptr = clsPtr | |
| @@ -708,7 +708,7 @@ func (x *SocketClient) ConnectEvent(cb func(SocketClient, SocketClientEvent, uin | |||
| 708 | 708 | cb(fa, EventVarp, ConnectableVarp, ConnectionVarp) | |
| 709 | 709 | ||
| 710 | 710 | } | |
| 711 | - | gobject.ObjectConnect(x.GoPointer(), "signal::event", purego.NewCallback(fcb)) | |
| 711 | + | return gobject.SignalConnect(x.GoPointer(), "event", purego.NewCallback(fcb)) | |
| 712 | 712 | } | |
| 713 | 713 | ||
| 714 | 714 | func init() { | |
M v4/gio/gsocketlistener.go +2 -2
| @@ -335,7 +335,7 @@ func (c *SocketListener) SetGoPointer(ptr uintptr) { | |||
| 335 | 335 | // Note that when @listener is used to listen on both IPv4 and | |
| 336 | 336 | // IPv6, a separate set of signals will be emitted for each, and | |
| 337 | 337 | // the order they happen in is undefined. | |
| 338 | - | func (x *SocketListener) ConnectEvent(cb func(SocketListener, SocketListenerEvent, uintptr)) { | |
| 338 | + | func (x *SocketListener) ConnectEvent(cb func(SocketListener, SocketListenerEvent, uintptr)) uint32 { | |
| 339 | 339 | fcb := func(clsPtr uintptr, EventVarp SocketListenerEvent, SocketVarp uintptr) { | |
| 340 | 340 | fa := SocketListener{} | |
| 341 | 341 | fa.Ptr = clsPtr | |
| @@ -343,7 +343,7 @@ func (x *SocketListener) ConnectEvent(cb func(SocketListener, SocketListenerEven | |||
| 343 | 343 | cb(fa, EventVarp, SocketVarp) | |
| 344 | 344 | ||
| 345 | 345 | } | |
| 346 | - | gobject.ObjectConnect(x.GoPointer(), "signal::event", purego.NewCallback(fcb)) | |
| 346 | + | return gobject.SignalConnect(x.GoPointer(), "event", purego.NewCallback(fcb)) | |
| 347 | 347 | } | |
| 348 | 348 | ||
| 349 | 349 | func init() { | |
M v4/gio/gsocketservice.go +2 -2
| @@ -138,7 +138,7 @@ func (c *SocketService) SetGoPointer(ptr uintptr) { | |||
| 138 | 138 | // | |
| 139 | 139 | // @connection will be unreffed once the signal handler returns, | |
| 140 | 140 | // so you need to ref it yourself if you are planning to use it. | |
| 141 | - | func (x *SocketService) ConnectIncoming(cb func(SocketService, uintptr, uintptr) bool) { | |
| 141 | + | func (x *SocketService) ConnectIncoming(cb func(SocketService, uintptr, uintptr) bool) uint32 { | |
| 142 | 142 | fcb := func(clsPtr uintptr, ConnectionVarp uintptr, SourceObjectVarp uintptr) bool { | |
| 143 | 143 | fa := SocketService{} | |
| 144 | 144 | fa.Ptr = clsPtr | |
| @@ -146,7 +146,7 @@ func (x *SocketService) ConnectIncoming(cb func(SocketService, uintptr, uintptr) | |||
| 146 | 146 | return cb(fa, ConnectionVarp, SourceObjectVarp) | |
| 147 | 147 | ||
| 148 | 148 | } | |
| 149 | - | gobject.ObjectConnect(x.GoPointer(), "signal::incoming", purego.NewCallback(fcb)) | |
| 149 | + | return gobject.SignalConnect(x.GoPointer(), "incoming", purego.NewCallback(fcb)) | |
| 150 | 150 | } | |
| 151 | 151 | ||
| 152 | 152 | func init() { | |
M v4/gio/gthreadedsocketservice.go +2 -2
| @@ -68,7 +68,7 @@ func (c *ThreadedSocketService) SetGoPointer(ptr uintptr) { | |||
| 68 | 68 | // incoming connection. This thread is dedicated to handling | |
| 69 | 69 | // @connection and may perform blocking IO. The signal handler need | |
| 70 | 70 | // not return until the connection is closed. | |
| 71 | - | func (x *ThreadedSocketService) ConnectRun(cb func(ThreadedSocketService, uintptr, uintptr) bool) { | |
| 71 | + | func (x *ThreadedSocketService) ConnectRun(cb func(ThreadedSocketService, uintptr, uintptr) bool) uint32 { | |
| 72 | 72 | fcb := func(clsPtr uintptr, ConnectionVarp uintptr, SourceObjectVarp uintptr) bool { | |
| 73 | 73 | fa := ThreadedSocketService{} | |
| 74 | 74 | fa.Ptr = clsPtr | |
| @@ -76,7 +76,7 @@ func (x *ThreadedSocketService) ConnectRun(cb func(ThreadedSocketService, uintpt | |||
| 76 | 76 | return cb(fa, ConnectionVarp, SourceObjectVarp) | |
| 77 | 77 | ||
| 78 | 78 | } | |
| 79 | - | gobject.ObjectConnect(x.GoPointer(), "signal::run", purego.NewCallback(fcb)) | |
| 79 | + | return gobject.SignalConnect(x.GoPointer(), "run", purego.NewCallback(fcb)) | |
| 80 | 80 | } | |
| 81 | 81 | ||
| 82 | 82 | func init() { | |
M v4/gio/gtlsconnection.go +2 -2
| @@ -489,7 +489,7 @@ func (c *TlsConnection) SetGoPointer(ptr uintptr) { | |||
| 489 | 489 | // If you are doing I/O in another thread, you do not | |
| 490 | 490 | // need to worry about this, and can simply block in the signal | |
| 491 | 491 | // handler until the UI thread returns an answer. | |
| 492 | - | func (x *TlsConnection) ConnectAcceptCertificate(cb func(TlsConnection, uintptr, TlsCertificateFlags) bool) { | |
| 492 | + | func (x *TlsConnection) ConnectAcceptCertificate(cb func(TlsConnection, uintptr, TlsCertificateFlags) bool) uint32 { | |
| 493 | 493 | fcb := func(clsPtr uintptr, PeerCertVarp uintptr, ErrorsVarp TlsCertificateFlags) bool { | |
| 494 | 494 | fa := TlsConnection{} | |
| 495 | 495 | fa.Ptr = clsPtr | |
| @@ -497,7 +497,7 @@ func (x *TlsConnection) ConnectAcceptCertificate(cb func(TlsConnection, uintptr, | |||
| 497 | 497 | return cb(fa, PeerCertVarp, ErrorsVarp) | |
| 498 | 498 | ||
| 499 | 499 | } | |
| 500 | - | gobject.ObjectConnect(x.GoPointer(), "signal::accept-certificate", purego.NewCallback(fcb)) | |
| 500 | + | return gobject.SignalConnect(x.GoPointer(), "accept-certificate", purego.NewCallback(fcb)) | |
| 501 | 501 | } | |
| 502 | 502 | ||
| 503 | 503 | func init() { | |
M v4/gio/gunixmounts.go +4 -4
| @@ -370,7 +370,7 @@ func (c *UnixMountMonitor) SetGoPointer(ptr uintptr) { | |||
| 370 | 370 | } | |
| 371 | 371 | ||
| 372 | 372 | // Emitted when the unix mount points have changed. | |
| 373 | - | func (x *UnixMountMonitor) ConnectMountpointsChanged(cb func(UnixMountMonitor)) { | |
| 373 | + | func (x *UnixMountMonitor) ConnectMountpointsChanged(cb func(UnixMountMonitor)) uint32 { | |
| 374 | 374 | fcb := func(clsPtr uintptr) { | |
| 375 | 375 | fa := UnixMountMonitor{} | |
| 376 | 376 | fa.Ptr = clsPtr | |
| @@ -378,11 +378,11 @@ func (x *UnixMountMonitor) ConnectMountpointsChanged(cb func(UnixMountMonitor)) | |||
| 378 | 378 | cb(fa) | |
| 379 | 379 | ||
| 380 | 380 | } | |
| 381 | - | gobject.ObjectConnect(x.GoPointer(), "signal::mountpoints-changed", purego.NewCallback(fcb)) | |
| 381 | + | return gobject.SignalConnect(x.GoPointer(), "mountpoints-changed", purego.NewCallback(fcb)) | |
| 382 | 382 | } | |
| 383 | 383 | ||
| 384 | 384 | // Emitted when the unix mounts have changed. | |
| 385 | - | func (x *UnixMountMonitor) ConnectMountsChanged(cb func(UnixMountMonitor)) { | |
| 385 | + | func (x *UnixMountMonitor) ConnectMountsChanged(cb func(UnixMountMonitor)) uint32 { | |
| 386 | 386 | fcb := func(clsPtr uintptr) { | |
| 387 | 387 | fa := UnixMountMonitor{} | |
| 388 | 388 | fa.Ptr = clsPtr | |
| @@ -390,7 +390,7 @@ func (x *UnixMountMonitor) ConnectMountsChanged(cb func(UnixMountMonitor)) { | |||
| 390 | 390 | cb(fa) | |
| 391 | 391 | ||
| 392 | 392 | } | |
| 393 | - | gobject.ObjectConnect(x.GoPointer(), "signal::mounts-changed", purego.NewCallback(fcb)) | |
| 393 | + | return gobject.SignalConnect(x.GoPointer(), "mounts-changed", purego.NewCallback(fcb)) | |
| 394 | 394 | } | |
| 395 | 395 | ||
| 396 | 396 | func init() { | |
M v4/gio/gvolumemonitor.go +24 -24
| @@ -110,7 +110,7 @@ func (c *VolumeMonitor) SetGoPointer(ptr uintptr) { | |||
| 110 | 110 | } | |
| 111 | 111 | ||
| 112 | 112 | // Emitted when a drive changes. | |
| 113 | - | func (x *VolumeMonitor) ConnectDriveChanged(cb func(VolumeMonitor, uintptr)) { | |
| 113 | + | func (x *VolumeMonitor) ConnectDriveChanged(cb func(VolumeMonitor, uintptr)) uint32 { | |
| 114 | 114 | fcb := func(clsPtr uintptr, DriveVarp uintptr) { | |
| 115 | 115 | fa := VolumeMonitor{} | |
| 116 | 116 | fa.Ptr = clsPtr | |
| @@ -118,11 +118,11 @@ func (x *VolumeMonitor) ConnectDriveChanged(cb func(VolumeMonitor, uintptr)) { | |||
| 118 | 118 | cb(fa, DriveVarp) | |
| 119 | 119 | ||
| 120 | 120 | } | |
| 121 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drive-changed", purego.NewCallback(fcb)) | |
| 121 | + | return gobject.SignalConnect(x.GoPointer(), "drive-changed", purego.NewCallback(fcb)) | |
| 122 | 122 | } | |
| 123 | 123 | ||
| 124 | 124 | // Emitted when a drive is connected to the system. | |
| 125 | - | func (x *VolumeMonitor) ConnectDriveConnected(cb func(VolumeMonitor, uintptr)) { | |
| 125 | + | func (x *VolumeMonitor) ConnectDriveConnected(cb func(VolumeMonitor, uintptr)) uint32 { | |
| 126 | 126 | fcb := func(clsPtr uintptr, DriveVarp uintptr) { | |
| 127 | 127 | fa := VolumeMonitor{} | |
| 128 | 128 | fa.Ptr = clsPtr | |
| @@ -130,11 +130,11 @@ func (x *VolumeMonitor) ConnectDriveConnected(cb func(VolumeMonitor, uintptr)) { | |||
| 130 | 130 | cb(fa, DriveVarp) | |
| 131 | 131 | ||
| 132 | 132 | } | |
| 133 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drive-connected", purego.NewCallback(fcb)) | |
| 133 | + | return gobject.SignalConnect(x.GoPointer(), "drive-connected", purego.NewCallback(fcb)) | |
| 134 | 134 | } | |
| 135 | 135 | ||
| 136 | 136 | // Emitted when a drive is disconnected from the system. | |
| 137 | - | func (x *VolumeMonitor) ConnectDriveDisconnected(cb func(VolumeMonitor, uintptr)) { | |
| 137 | + | func (x *VolumeMonitor) ConnectDriveDisconnected(cb func(VolumeMonitor, uintptr)) uint32 { | |
| 138 | 138 | fcb := func(clsPtr uintptr, DriveVarp uintptr) { | |
| 139 | 139 | fa := VolumeMonitor{} | |
| 140 | 140 | fa.Ptr = clsPtr | |
| @@ -142,11 +142,11 @@ func (x *VolumeMonitor) ConnectDriveDisconnected(cb func(VolumeMonitor, uintptr) | |||
| 142 | 142 | cb(fa, DriveVarp) | |
| 143 | 143 | ||
| 144 | 144 | } | |
| 145 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drive-disconnected", purego.NewCallback(fcb)) | |
| 145 | + | return gobject.SignalConnect(x.GoPointer(), "drive-disconnected", purego.NewCallback(fcb)) | |
| 146 | 146 | } | |
| 147 | 147 | ||
| 148 | 148 | // Emitted when the eject button is pressed on @drive. | |
| 149 | - | func (x *VolumeMonitor) ConnectDriveEjectButton(cb func(VolumeMonitor, uintptr)) { | |
| 149 | + | func (x *VolumeMonitor) ConnectDriveEjectButton(cb func(VolumeMonitor, uintptr)) uint32 { | |
| 150 | 150 | fcb := func(clsPtr uintptr, DriveVarp uintptr) { | |
| 151 | 151 | fa := VolumeMonitor{} | |
| 152 | 152 | fa.Ptr = clsPtr | |
| @@ -154,11 +154,11 @@ func (x *VolumeMonitor) ConnectDriveEjectButton(cb func(VolumeMonitor, uintptr)) | |||
| 154 | 154 | cb(fa, DriveVarp) | |
| 155 | 155 | ||
| 156 | 156 | } | |
| 157 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drive-eject-button", purego.NewCallback(fcb)) | |
| 157 | + | return gobject.SignalConnect(x.GoPointer(), "drive-eject-button", purego.NewCallback(fcb)) | |
| 158 | 158 | } | |
| 159 | 159 | ||
| 160 | 160 | // Emitted when the stop button is pressed on @drive. | |
| 161 | - | func (x *VolumeMonitor) ConnectDriveStopButton(cb func(VolumeMonitor, uintptr)) { | |
| 161 | + | func (x *VolumeMonitor) ConnectDriveStopButton(cb func(VolumeMonitor, uintptr)) uint32 { | |
| 162 | 162 | fcb := func(clsPtr uintptr, DriveVarp uintptr) { | |
| 163 | 163 | fa := VolumeMonitor{} | |
| 164 | 164 | fa.Ptr = clsPtr | |
| @@ -166,11 +166,11 @@ func (x *VolumeMonitor) ConnectDriveStopButton(cb func(VolumeMonitor, uintptr)) | |||
| 166 | 166 | cb(fa, DriveVarp) | |
| 167 | 167 | ||
| 168 | 168 | } | |
| 169 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drive-stop-button", purego.NewCallback(fcb)) | |
| 169 | + | return gobject.SignalConnect(x.GoPointer(), "drive-stop-button", purego.NewCallback(fcb)) | |
| 170 | 170 | } | |
| 171 | 171 | ||
| 172 | 172 | // Emitted when a mount is added. | |
| 173 | - | func (x *VolumeMonitor) ConnectMountAdded(cb func(VolumeMonitor, uintptr)) { | |
| 173 | + | func (x *VolumeMonitor) ConnectMountAdded(cb func(VolumeMonitor, uintptr)) uint32 { | |
| 174 | 174 | fcb := func(clsPtr uintptr, MountVarp uintptr) { | |
| 175 | 175 | fa := VolumeMonitor{} | |
| 176 | 176 | fa.Ptr = clsPtr | |
| @@ -178,11 +178,11 @@ func (x *VolumeMonitor) ConnectMountAdded(cb func(VolumeMonitor, uintptr)) { | |||
| 178 | 178 | cb(fa, MountVarp) | |
| 179 | 179 | ||
| 180 | 180 | } | |
| 181 | - | gobject.ObjectConnect(x.GoPointer(), "signal::mount-added", purego.NewCallback(fcb)) | |
| 181 | + | return gobject.SignalConnect(x.GoPointer(), "mount-added", purego.NewCallback(fcb)) | |
| 182 | 182 | } | |
| 183 | 183 | ||
| 184 | 184 | // Emitted when a mount changes. | |
| 185 | - | func (x *VolumeMonitor) ConnectMountChanged(cb func(VolumeMonitor, uintptr)) { | |
| 185 | + | func (x *VolumeMonitor) ConnectMountChanged(cb func(VolumeMonitor, uintptr)) uint32 { | |
| 186 | 186 | fcb := func(clsPtr uintptr, MountVarp uintptr) { | |
| 187 | 187 | fa := VolumeMonitor{} | |
| 188 | 188 | fa.Ptr = clsPtr | |
| @@ -190,14 +190,14 @@ func (x *VolumeMonitor) ConnectMountChanged(cb func(VolumeMonitor, uintptr)) { | |||
| 190 | 190 | cb(fa, MountVarp) | |
| 191 | 191 | ||
| 192 | 192 | } | |
| 193 | - | gobject.ObjectConnect(x.GoPointer(), "signal::mount-changed", purego.NewCallback(fcb)) | |
| 193 | + | return gobject.SignalConnect(x.GoPointer(), "mount-changed", purego.NewCallback(fcb)) | |
| 194 | 194 | } | |
| 195 | 195 | ||
| 196 | 196 | // May be emitted when a mount is about to be removed. | |
| 197 | 197 | // | |
| 198 | 198 | // This signal depends on the backend and is only emitted if | |
| 199 | 199 | // GIO was used to unmount. | |
| 200 | - | func (x *VolumeMonitor) ConnectMountPreUnmount(cb func(VolumeMonitor, uintptr)) { | |
| 200 | + | func (x *VolumeMonitor) ConnectMountPreUnmount(cb func(VolumeMonitor, uintptr)) uint32 { | |
| 201 | 201 | fcb := func(clsPtr uintptr, MountVarp uintptr) { | |
| 202 | 202 | fa := VolumeMonitor{} | |
| 203 | 203 | fa.Ptr = clsPtr | |
| @@ -205,11 +205,11 @@ func (x *VolumeMonitor) ConnectMountPreUnmount(cb func(VolumeMonitor, uintptr)) | |||
| 205 | 205 | cb(fa, MountVarp) | |
| 206 | 206 | ||
| 207 | 207 | } | |
| 208 | - | gobject.ObjectConnect(x.GoPointer(), "signal::mount-pre-unmount", purego.NewCallback(fcb)) | |
| 208 | + | return gobject.SignalConnect(x.GoPointer(), "mount-pre-unmount", purego.NewCallback(fcb)) | |
| 209 | 209 | } | |
| 210 | 210 | ||
| 211 | 211 | // Emitted when a mount is removed. | |
| 212 | - | func (x *VolumeMonitor) ConnectMountRemoved(cb func(VolumeMonitor, uintptr)) { | |
| 212 | + | func (x *VolumeMonitor) ConnectMountRemoved(cb func(VolumeMonitor, uintptr)) uint32 { | |
| 213 | 213 | fcb := func(clsPtr uintptr, MountVarp uintptr) { | |
| 214 | 214 | fa := VolumeMonitor{} | |
| 215 | 215 | fa.Ptr = clsPtr | |
| @@ -217,11 +217,11 @@ func (x *VolumeMonitor) ConnectMountRemoved(cb func(VolumeMonitor, uintptr)) { | |||
| 217 | 217 | cb(fa, MountVarp) | |
| 218 | 218 | ||
| 219 | 219 | } | |
| 220 | - | gobject.ObjectConnect(x.GoPointer(), "signal::mount-removed", purego.NewCallback(fcb)) | |
| 220 | + | return gobject.SignalConnect(x.GoPointer(), "mount-removed", purego.NewCallback(fcb)) | |
| 221 | 221 | } | |
| 222 | 222 | ||
| 223 | 223 | // Emitted when a mountable volume is added to the system. | |
| 224 | - | func (x *VolumeMonitor) ConnectVolumeAdded(cb func(VolumeMonitor, uintptr)) { | |
| 224 | + | func (x *VolumeMonitor) ConnectVolumeAdded(cb func(VolumeMonitor, uintptr)) uint32 { | |
| 225 | 225 | fcb := func(clsPtr uintptr, VolumeVarp uintptr) { | |
| 226 | 226 | fa := VolumeMonitor{} | |
| 227 | 227 | fa.Ptr = clsPtr | |
| @@ -229,11 +229,11 @@ func (x *VolumeMonitor) ConnectVolumeAdded(cb func(VolumeMonitor, uintptr)) { | |||
| 229 | 229 | cb(fa, VolumeVarp) | |
| 230 | 230 | ||
| 231 | 231 | } | |
| 232 | - | gobject.ObjectConnect(x.GoPointer(), "signal::volume-added", purego.NewCallback(fcb)) | |
| 232 | + | return gobject.SignalConnect(x.GoPointer(), "volume-added", purego.NewCallback(fcb)) | |
| 233 | 233 | } | |
| 234 | 234 | ||
| 235 | 235 | // Emitted when mountable volume is changed. | |
| 236 | - | func (x *VolumeMonitor) ConnectVolumeChanged(cb func(VolumeMonitor, uintptr)) { | |
| 236 | + | func (x *VolumeMonitor) ConnectVolumeChanged(cb func(VolumeMonitor, uintptr)) uint32 { | |
| 237 | 237 | fcb := func(clsPtr uintptr, VolumeVarp uintptr) { | |
| 238 | 238 | fa := VolumeMonitor{} | |
| 239 | 239 | fa.Ptr = clsPtr | |
| @@ -241,11 +241,11 @@ func (x *VolumeMonitor) ConnectVolumeChanged(cb func(VolumeMonitor, uintptr)) { | |||
| 241 | 241 | cb(fa, VolumeVarp) | |
| 242 | 242 | ||
| 243 | 243 | } | |
| 244 | - | gobject.ObjectConnect(x.GoPointer(), "signal::volume-changed", purego.NewCallback(fcb)) | |
| 244 | + | return gobject.SignalConnect(x.GoPointer(), "volume-changed", purego.NewCallback(fcb)) | |
| 245 | 245 | } | |
| 246 | 246 | ||
| 247 | 247 | // Emitted when a mountable volume is removed from the system. | |
| 248 | - | func (x *VolumeMonitor) ConnectVolumeRemoved(cb func(VolumeMonitor, uintptr)) { | |
| 248 | + | func (x *VolumeMonitor) ConnectVolumeRemoved(cb func(VolumeMonitor, uintptr)) uint32 { | |
| 249 | 249 | fcb := func(clsPtr uintptr, VolumeVarp uintptr) { | |
| 250 | 250 | fa := VolumeMonitor{} | |
| 251 | 251 | fa.Ptr = clsPtr | |
| @@ -253,7 +253,7 @@ func (x *VolumeMonitor) ConnectVolumeRemoved(cb func(VolumeMonitor, uintptr)) { | |||
| 253 | 253 | cb(fa, VolumeVarp) | |
| 254 | 254 | ||
| 255 | 255 | } | |
| 256 | - | gobject.ObjectConnect(x.GoPointer(), "signal::volume-removed", purego.NewCallback(fcb)) | |
| 256 | + | return gobject.SignalConnect(x.GoPointer(), "volume-removed", purego.NewCallback(fcb)) | |
| 257 | 257 | } | |
| 258 | 258 | ||
| 259 | 259 | func init() { | |
M v4/gobject/gobject-2.0.go +4 -4
| @@ -654,7 +654,7 @@ func (c *SignalGroup) SetGoPointer(ptr uintptr) { | |||
| 654 | 654 | // other than %NULL. It is similar to #GObject::notify on `target` except it | |
| 655 | 655 | // will not emit when #GSignalGroup:target is %NULL and also allows for | |
| 656 | 656 | // receiving the #GObject without a data-race. | |
| 657 | - | func (x *SignalGroup) ConnectBind(cb func(SignalGroup, uintptr)) { | |
| 657 | + | func (x *SignalGroup) ConnectBind(cb func(SignalGroup, uintptr)) uint32 { | |
| 658 | 658 | fcb := func(clsPtr uintptr, InstanceVarp uintptr) { | |
| 659 | 659 | fa := SignalGroup{} | |
| 660 | 660 | fa.Ptr = clsPtr | |
| @@ -662,7 +662,7 @@ func (x *SignalGroup) ConnectBind(cb func(SignalGroup, uintptr)) { | |||
| 662 | 662 | cb(fa, InstanceVarp) | |
| 663 | 663 | ||
| 664 | 664 | } | |
| 665 | - | ObjectConnect(x.GoPointer(), "signal::bind", purego.NewCallback(fcb)) | |
| 665 | + | return SignalConnect(x.GoPointer(), "bind", purego.NewCallback(fcb)) | |
| 666 | 666 | } | |
| 667 | 667 | ||
| 668 | 668 | // This signal is emitted when the target instance of @self is set to a | |
| @@ -670,7 +670,7 @@ func (x *SignalGroup) ConnectBind(cb func(SignalGroup, uintptr)) { | |||
| 670 | 670 | // | |
| 671 | 671 | // This signal will only be emitted if the previous target of @self is | |
| 672 | 672 | // non-%NULL. | |
| 673 | - | func (x *SignalGroup) ConnectUnbind(cb func(SignalGroup)) { | |
| 673 | + | func (x *SignalGroup) ConnectUnbind(cb func(SignalGroup)) uint32 { | |
| 674 | 674 | fcb := func(clsPtr uintptr) { | |
| 675 | 675 | fa := SignalGroup{} | |
| 676 | 676 | fa.Ptr = clsPtr | |
| @@ -678,7 +678,7 @@ func (x *SignalGroup) ConnectUnbind(cb func(SignalGroup)) { | |||
| 678 | 678 | cb(fa) | |
| 679 | 679 | ||
| 680 | 680 | } | |
| 681 | - | ObjectConnect(x.GoPointer(), "signal::unbind", purego.NewCallback(fcb)) | |
| 681 | + | return SignalConnect(x.GoPointer(), "unbind", purego.NewCallback(fcb)) | |
| 682 | 682 | } | |
| 683 | 683 | ||
| 684 | 684 | func init() { | |
M v4/gobject/gobject.go +2 -2
| @@ -1255,7 +1255,7 @@ func (c *Object) SetGoPointer(ptr uintptr) { | |||
| 1255 | 1255 | // It is important to note that you must use | |
| 1256 | 1256 | // [canonical parameter names][canonical-parameter-names] as | |
| 1257 | 1257 | // detail strings for the notify signal. | |
| 1258 | - | func (x *Object) ConnectNotify(cb func(Object, uintptr)) { | |
| 1258 | + | func (x *Object) ConnectNotify(cb func(Object, uintptr)) uint32 { | |
| 1259 | 1259 | fcb := func(clsPtr uintptr, PspecVarp uintptr) { | |
| 1260 | 1260 | fa := Object{} | |
| 1261 | 1261 | fa.Ptr = clsPtr | |
| @@ -1263,7 +1263,7 @@ func (x *Object) ConnectNotify(cb func(Object, uintptr)) { | |||
| 1263 | 1263 | cb(fa, PspecVarp) | |
| 1264 | 1264 | ||
| 1265 | 1265 | } | |
| 1266 | - | ObjectConnect(x.GoPointer(), "signal::notify", purego.NewCallback(fcb)) | |
| 1266 | + | return SignalConnect(x.GoPointer(), "notify", purego.NewCallback(fcb)) | |
| 1267 | 1267 | } | |
| 1268 | 1268 | ||
| 1269 | 1269 | func init() { | |
M v4/gobject/more.go +10 -2
| @@ -30,14 +30,22 @@ func IncreaseRef(a uintptr) { | |||
| 30 | 30 | xObjectRefSink(a) | |
| 31 | 31 | } | |
| 32 | 32 | ||
| 33 | - | func ObjectConnect(a uintptr, b string, c ...interface{}) uintptr { | |
| 34 | - | return xObjectConnect(a, b, c...) | |
| 33 | + | func SignalConnect(a uintptr, b string, c uintptr) uint32 { | |
| 34 | + | return xSignalConnectData(a, b, c, 0, 0, 0) | |
| 35 | 35 | } | |
| 36 | 36 | ||
| 37 | 37 | func (o Object) Cast(v Ptr) { | |
| 38 | 38 | v.SetGoPointer(o.GoPointer()) | |
| 39 | 39 | } | |
| 40 | 40 | ||
| 41 | + | func (o Object) ConnectSignal(signal string, cb func()) uint32 { | |
| 42 | + | return SignalConnect(o.GoPointer(), signal, purego.NewCallback(cb)) | |
| 43 | + | } | |
| 44 | + | ||
| 45 | + | func (o Object) DisconnectSignal(handler uint32) { | |
| 46 | + | SignalHandlerDisconnect(&o, handler) | |
| 47 | + | } | |
| 48 | + | ||
| 41 | 49 | // NewCallback is an alias to purego.NewCallback | |
| 42 | 50 | func NewCallback(fn interface{}) uintptr { | |
| 43 | 51 | return purego.NewCallback(fn) | |
M v4/gtk/gtkaboutdialog.go +2 -2
| @@ -508,7 +508,7 @@ func (c *AboutDialog) SetGoPointer(ptr uintptr) { | |||
| 508 | 508 | // | |
| 509 | 509 | // Applications may connect to it to override the default behaviour, | |
| 510 | 510 | // which is to call [func@Gtk.show_uri]. | |
| 511 | - | func (x *AboutDialog) ConnectActivateLink(cb func(AboutDialog, string) bool) { | |
| 511 | + | func (x *AboutDialog) ConnectActivateLink(cb func(AboutDialog, string) bool) uint32 { | |
| 512 | 512 | fcb := func(clsPtr uintptr, UriVarp string) bool { | |
| 513 | 513 | fa := AboutDialog{} | |
| 514 | 514 | fa.Ptr = clsPtr | |
| @@ -516,7 +516,7 @@ func (x *AboutDialog) ConnectActivateLink(cb func(AboutDialog, string) bool) { | |||
| 516 | 516 | return cb(fa, UriVarp) | |
| 517 | 517 | ||
| 518 | 518 | } | |
| 519 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate-link", purego.NewCallback(fcb)) | |
| 519 | + | return gobject.SignalConnect(x.GoPointer(), "activate-link", purego.NewCallback(fcb)) | |
| 520 | 520 | } | |
| 521 | 521 | ||
| 522 | 522 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkadjustment.go +4 -4
| @@ -250,7 +250,7 @@ func (c *Adjustment) SetGoPointer(ptr uintptr) { | |||
| 250 | 250 | // | |
| 251 | 251 | // Note that the [property@Gtk.Adjustment:value] property is | |
| 252 | 252 | // covered by the [signal@Gtk.Adjustment::value-changed] signal. | |
| 253 | - | func (x *Adjustment) ConnectChanged(cb func(Adjustment)) { | |
| 253 | + | func (x *Adjustment) ConnectChanged(cb func(Adjustment)) uint32 { | |
| 254 | 254 | fcb := func(clsPtr uintptr) { | |
| 255 | 255 | fa := Adjustment{} | |
| 256 | 256 | fa.Ptr = clsPtr | |
| @@ -258,11 +258,11 @@ func (x *Adjustment) ConnectChanged(cb func(Adjustment)) { | |||
| 258 | 258 | cb(fa) | |
| 259 | 259 | ||
| 260 | 260 | } | |
| 261 | - | gobject.ObjectConnect(x.GoPointer(), "signal::changed", purego.NewCallback(fcb)) | |
| 261 | + | return gobject.SignalConnect(x.GoPointer(), "changed", purego.NewCallback(fcb)) | |
| 262 | 262 | } | |
| 263 | 263 | ||
| 264 | 264 | // Emitted when the value has been changed. | |
| 265 | - | func (x *Adjustment) ConnectValueChanged(cb func(Adjustment)) { | |
| 265 | + | func (x *Adjustment) ConnectValueChanged(cb func(Adjustment)) uint32 { | |
| 266 | 266 | fcb := func(clsPtr uintptr) { | |
| 267 | 267 | fa := Adjustment{} | |
| 268 | 268 | fa.Ptr = clsPtr | |
| @@ -270,7 +270,7 @@ func (x *Adjustment) ConnectValueChanged(cb func(Adjustment)) { | |||
| 270 | 270 | cb(fa) | |
| 271 | 271 | ||
| 272 | 272 | } | |
| 273 | - | gobject.ObjectConnect(x.GoPointer(), "signal::value-changed", purego.NewCallback(fcb)) | |
| 273 | + | return gobject.SignalConnect(x.GoPointer(), "value-changed", purego.NewCallback(fcb)) | |
| 274 | 274 | } | |
| 275 | 275 | ||
| 276 | 276 | func init() { | |
M v4/gtk/gtkappchooserbutton.go +6 -6
| @@ -194,7 +194,7 @@ func (c *AppChooserButton) SetGoPointer(ptr uintptr) { | |||
| 194 | 194 | // | |
| 195 | 195 | // The `::activate` signal on `GtkAppChooserButton` is an action signal and | |
| 196 | 196 | // emitting it causes the button to pop up its dialog. | |
| 197 | - | func (x *AppChooserButton) ConnectActivate(cb func(AppChooserButton)) { | |
| 197 | + | func (x *AppChooserButton) ConnectActivate(cb func(AppChooserButton)) uint32 { | |
| 198 | 198 | fcb := func(clsPtr uintptr) { | |
| 199 | 199 | fa := AppChooserButton{} | |
| 200 | 200 | fa.Ptr = clsPtr | |
| @@ -202,11 +202,11 @@ func (x *AppChooserButton) ConnectActivate(cb func(AppChooserButton)) { | |||
| 202 | 202 | cb(fa) | |
| 203 | 203 | ||
| 204 | 204 | } | |
| 205 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 205 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 206 | 206 | } | |
| 207 | 207 | ||
| 208 | 208 | // Emitted when the active application changes. | |
| 209 | - | func (x *AppChooserButton) ConnectChanged(cb func(AppChooserButton)) { | |
| 209 | + | func (x *AppChooserButton) ConnectChanged(cb func(AppChooserButton)) uint32 { | |
| 210 | 210 | fcb := func(clsPtr uintptr) { | |
| 211 | 211 | fa := AppChooserButton{} | |
| 212 | 212 | fa.Ptr = clsPtr | |
| @@ -214,14 +214,14 @@ func (x *AppChooserButton) ConnectChanged(cb func(AppChooserButton)) { | |||
| 214 | 214 | cb(fa) | |
| 215 | 215 | ||
| 216 | 216 | } | |
| 217 | - | gobject.ObjectConnect(x.GoPointer(), "signal::changed", purego.NewCallback(fcb)) | |
| 217 | + | return gobject.SignalConnect(x.GoPointer(), "changed", purego.NewCallback(fcb)) | |
| 218 | 218 | } | |
| 219 | 219 | ||
| 220 | 220 | // Emitted when a custom item is activated. | |
| 221 | 221 | // | |
| 222 | 222 | // Use [method@Gtk.AppChooserButton.append_custom_item], | |
| 223 | 223 | // to add custom items. | |
| 224 | - | func (x *AppChooserButton) ConnectCustomItemActivated(cb func(AppChooserButton, string)) { | |
| 224 | + | func (x *AppChooserButton) ConnectCustomItemActivated(cb func(AppChooserButton, string)) uint32 { | |
| 225 | 225 | fcb := func(clsPtr uintptr, ItemNameVarp string) { | |
| 226 | 226 | fa := AppChooserButton{} | |
| 227 | 227 | fa.Ptr = clsPtr | |
| @@ -229,7 +229,7 @@ func (x *AppChooserButton) ConnectCustomItemActivated(cb func(AppChooserButton, | |||
| 229 | 229 | cb(fa, ItemNameVarp) | |
| 230 | 230 | ||
| 231 | 231 | } | |
| 232 | - | gobject.ObjectConnect(x.GoPointer(), "signal::custom-item-activated", purego.NewCallback(fcb)) | |
| 232 | + | return gobject.SignalConnect(x.GoPointer(), "custom-item-activated", purego.NewCallback(fcb)) | |
| 233 | 233 | } | |
| 234 | 234 | ||
| 235 | 235 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkappchooserwidget.go +4 -4
| @@ -192,7 +192,7 @@ func (c *AppChooserWidget) SetGoPointer(ptr uintptr) { | |||
| 192 | 192 | // This usually happens when the user double clicks an item, or an item | |
| 193 | 193 | // is selected and the user presses one of the keys Space, Shift+Space, | |
| 194 | 194 | // Return or Enter. | |
| 195 | - | func (x *AppChooserWidget) ConnectApplicationActivated(cb func(AppChooserWidget, uintptr)) { | |
| 195 | + | func (x *AppChooserWidget) ConnectApplicationActivated(cb func(AppChooserWidget, uintptr)) uint32 { | |
| 196 | 196 | fcb := func(clsPtr uintptr, ApplicationVarp uintptr) { | |
| 197 | 197 | fa := AppChooserWidget{} | |
| 198 | 198 | fa.Ptr = clsPtr | |
| @@ -200,11 +200,11 @@ func (x *AppChooserWidget) ConnectApplicationActivated(cb func(AppChooserWidget, | |||
| 200 | 200 | cb(fa, ApplicationVarp) | |
| 201 | 201 | ||
| 202 | 202 | } | |
| 203 | - | gobject.ObjectConnect(x.GoPointer(), "signal::application-activated", purego.NewCallback(fcb)) | |
| 203 | + | return gobject.SignalConnect(x.GoPointer(), "application-activated", purego.NewCallback(fcb)) | |
| 204 | 204 | } | |
| 205 | 205 | ||
| 206 | 206 | // Emitted when an application item is selected from the widget's list. | |
| 207 | - | func (x *AppChooserWidget) ConnectApplicationSelected(cb func(AppChooserWidget, uintptr)) { | |
| 207 | + | func (x *AppChooserWidget) ConnectApplicationSelected(cb func(AppChooserWidget, uintptr)) uint32 { | |
| 208 | 208 | fcb := func(clsPtr uintptr, ApplicationVarp uintptr) { | |
| 209 | 209 | fa := AppChooserWidget{} | |
| 210 | 210 | fa.Ptr = clsPtr | |
| @@ -212,7 +212,7 @@ func (x *AppChooserWidget) ConnectApplicationSelected(cb func(AppChooserWidget, | |||
| 212 | 212 | cb(fa, ApplicationVarp) | |
| 213 | 213 | ||
| 214 | 214 | } | |
| 215 | - | gobject.ObjectConnect(x.GoPointer(), "signal::application-selected", purego.NewCallback(fcb)) | |
| 215 | + | return gobject.SignalConnect(x.GoPointer(), "application-selected", purego.NewCallback(fcb)) | |
| 216 | 216 | } | |
| 217 | 217 | ||
| 218 | 218 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkapplication.go +6 -6
| @@ -426,7 +426,7 @@ func (c *Application) SetGoPointer(ptr uintptr) { | |||
| 426 | 426 | // is `TRUE`. Applications can connect to this signal and call | |
| 427 | 427 | // [method@Gtk.Application.inhibit] with `GTK_APPLICATION_INHIBIT_LOGOUT` | |
| 428 | 428 | // to delay the end of the session until state has been saved. | |
| 429 | - | func (x *Application) ConnectQueryEnd(cb func(Application)) { | |
| 429 | + | func (x *Application) ConnectQueryEnd(cb func(Application)) uint32 { | |
| 430 | 430 | fcb := func(clsPtr uintptr) { | |
| 431 | 431 | fa := Application{} | |
| 432 | 432 | fa.Ptr = clsPtr | |
| @@ -434,12 +434,12 @@ func (x *Application) ConnectQueryEnd(cb func(Application)) { | |||
| 434 | 434 | cb(fa) | |
| 435 | 435 | ||
| 436 | 436 | } | |
| 437 | - | gobject.ObjectConnect(x.GoPointer(), "signal::query-end", purego.NewCallback(fcb)) | |
| 437 | + | return gobject.SignalConnect(x.GoPointer(), "query-end", purego.NewCallback(fcb)) | |
| 438 | 438 | } | |
| 439 | 439 | ||
| 440 | 440 | // Emitted when a [class@Gtk.Window] is added to `application` through | |
| 441 | 441 | // [method@Gtk.Application.add_window]. | |
| 442 | - | func (x *Application) ConnectWindowAdded(cb func(Application, uintptr)) { | |
| 442 | + | func (x *Application) ConnectWindowAdded(cb func(Application, uintptr)) uint32 { | |
| 443 | 443 | fcb := func(clsPtr uintptr, WindowVarp uintptr) { | |
| 444 | 444 | fa := Application{} | |
| 445 | 445 | fa.Ptr = clsPtr | |
| @@ -447,14 +447,14 @@ func (x *Application) ConnectWindowAdded(cb func(Application, uintptr)) { | |||
| 447 | 447 | cb(fa, WindowVarp) | |
| 448 | 448 | ||
| 449 | 449 | } | |
| 450 | - | gobject.ObjectConnect(x.GoPointer(), "signal::window-added", purego.NewCallback(fcb)) | |
| 450 | + | return gobject.SignalConnect(x.GoPointer(), "window-added", purego.NewCallback(fcb)) | |
| 451 | 451 | } | |
| 452 | 452 | ||
| 453 | 453 | // Emitted when a [class@Gtk.Window] is removed from `application`. | |
| 454 | 454 | // | |
| 455 | 455 | // This can happen as a side-effect of the window being destroyed | |
| 456 | 456 | // or explicitly through [method@Gtk.Application.remove_window]. | |
| 457 | - | func (x *Application) ConnectWindowRemoved(cb func(Application, uintptr)) { | |
| 457 | + | func (x *Application) ConnectWindowRemoved(cb func(Application, uintptr)) uint32 { | |
| 458 | 458 | fcb := func(clsPtr uintptr, WindowVarp uintptr) { | |
| 459 | 459 | fa := Application{} | |
| 460 | 460 | fa.Ptr = clsPtr | |
| @@ -462,7 +462,7 @@ func (x *Application) ConnectWindowRemoved(cb func(Application, uintptr)) { | |||
| 462 | 462 | cb(fa, WindowVarp) | |
| 463 | 463 | ||
| 464 | 464 | } | |
| 465 | - | gobject.ObjectConnect(x.GoPointer(), "signal::window-removed", purego.NewCallback(fcb)) | |
| 465 | + | return gobject.SignalConnect(x.GoPointer(), "window-removed", purego.NewCallback(fcb)) | |
| 466 | 466 | } | |
| 467 | 467 | ||
| 468 | 468 | // Emits the #GActionGroup::action-added signal on @action_group. | |
M v4/gtk/gtkassistant.go +10 -10
| @@ -415,7 +415,7 @@ func (c *Assistant) SetGoPointer(ptr uintptr) { | |||
| 415 | 415 | // %GTK_ASSISTANT_PAGE_PROGRESS after the confirmation page and handle | |
| 416 | 416 | // this operation within the [signal@Gtk.Assistant::prepare] signal of | |
| 417 | 417 | // the progress page. | |
| 418 | - | func (x *Assistant) ConnectApply(cb func(Assistant)) { | |
| 418 | + | func (x *Assistant) ConnectApply(cb func(Assistant)) uint32 { | |
| 419 | 419 | fcb := func(clsPtr uintptr) { | |
| 420 | 420 | fa := Assistant{} | |
| 421 | 421 | fa.Ptr = clsPtr | |
| @@ -423,11 +423,11 @@ func (x *Assistant) ConnectApply(cb func(Assistant)) { | |||
| 423 | 423 | cb(fa) | |
| 424 | 424 | ||
| 425 | 425 | } | |
| 426 | - | gobject.ObjectConnect(x.GoPointer(), "signal::apply", purego.NewCallback(fcb)) | |
| 426 | + | return gobject.SignalConnect(x.GoPointer(), "apply", purego.NewCallback(fcb)) | |
| 427 | 427 | } | |
| 428 | 428 | ||
| 429 | 429 | // Emitted when then the cancel button is clicked. | |
| 430 | - | func (x *Assistant) ConnectCancel(cb func(Assistant)) { | |
| 430 | + | func (x *Assistant) ConnectCancel(cb func(Assistant)) uint32 { | |
| 431 | 431 | fcb := func(clsPtr uintptr) { | |
| 432 | 432 | fa := Assistant{} | |
| 433 | 433 | fa.Ptr = clsPtr | |
| @@ -435,13 +435,13 @@ func (x *Assistant) ConnectCancel(cb func(Assistant)) { | |||
| 435 | 435 | cb(fa) | |
| 436 | 436 | ||
| 437 | 437 | } | |
| 438 | - | gobject.ObjectConnect(x.GoPointer(), "signal::cancel", purego.NewCallback(fcb)) | |
| 438 | + | return gobject.SignalConnect(x.GoPointer(), "cancel", purego.NewCallback(fcb)) | |
| 439 | 439 | } | |
| 440 | 440 | ||
| 441 | 441 | // Emitted either when the close button of a summary page is clicked, | |
| 442 | 442 | // or when the apply button in the last page in the flow (of type | |
| 443 | 443 | // %GTK_ASSISTANT_PAGE_CONFIRM) is clicked. | |
| 444 | - | func (x *Assistant) ConnectClose(cb func(Assistant)) { | |
| 444 | + | func (x *Assistant) ConnectClose(cb func(Assistant)) uint32 { | |
| 445 | 445 | fcb := func(clsPtr uintptr) { | |
| 446 | 446 | fa := Assistant{} | |
| 447 | 447 | fa.Ptr = clsPtr | |
| @@ -449,11 +449,11 @@ func (x *Assistant) ConnectClose(cb func(Assistant)) { | |||
| 449 | 449 | cb(fa) | |
| 450 | 450 | ||
| 451 | 451 | } | |
| 452 | - | gobject.ObjectConnect(x.GoPointer(), "signal::close", purego.NewCallback(fcb)) | |
| 452 | + | return gobject.SignalConnect(x.GoPointer(), "close", purego.NewCallback(fcb)) | |
| 453 | 453 | } | |
| 454 | 454 | ||
| 455 | 455 | // The action signal for the Escape binding. | |
| 456 | - | func (x *Assistant) ConnectEscape(cb func(Assistant)) { | |
| 456 | + | func (x *Assistant) ConnectEscape(cb func(Assistant)) uint32 { | |
| 457 | 457 | fcb := func(clsPtr uintptr) { | |
| 458 | 458 | fa := Assistant{} | |
| 459 | 459 | fa.Ptr = clsPtr | |
| @@ -461,7 +461,7 @@ func (x *Assistant) ConnectEscape(cb func(Assistant)) { | |||
| 461 | 461 | cb(fa) | |
| 462 | 462 | ||
| 463 | 463 | } | |
| 464 | - | gobject.ObjectConnect(x.GoPointer(), "signal::escape", purego.NewCallback(fcb)) | |
| 464 | + | return gobject.SignalConnect(x.GoPointer(), "escape", purego.NewCallback(fcb)) | |
| 465 | 465 | } | |
| 466 | 466 | ||
| 467 | 467 | // Emitted when a new page is set as the assistant's current page, | |
| @@ -469,7 +469,7 @@ func (x *Assistant) ConnectEscape(cb func(Assistant)) { | |||
| 469 | 469 | // | |
| 470 | 470 | // A handler for this signal can do any preparations which are | |
| 471 | 471 | // necessary before showing @page. | |
| 472 | - | func (x *Assistant) ConnectPrepare(cb func(Assistant, uintptr)) { | |
| 472 | + | func (x *Assistant) ConnectPrepare(cb func(Assistant, uintptr)) uint32 { | |
| 473 | 473 | fcb := func(clsPtr uintptr, PageVarp uintptr) { | |
| 474 | 474 | fa := Assistant{} | |
| 475 | 475 | fa.Ptr = clsPtr | |
| @@ -477,7 +477,7 @@ func (x *Assistant) ConnectPrepare(cb func(Assistant, uintptr)) { | |||
| 477 | 477 | cb(fa, PageVarp) | |
| 478 | 478 | ||
| 479 | 479 | } | |
| 480 | - | gobject.ObjectConnect(x.GoPointer(), "signal::prepare", purego.NewCallback(fcb)) | |
| 480 | + | return gobject.SignalConnect(x.GoPointer(), "prepare", purego.NewCallback(fcb)) | |
| 481 | 481 | } | |
| 482 | 482 | ||
| 483 | 483 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkatcontext.go +2 -2
| @@ -83,7 +83,7 @@ func (c *ATContext) SetGoPointer(ptr uintptr) { | |||
| 83 | 83 | ||
| 84 | 84 | // Emitted when the attributes of the accessible for the | |
| 85 | 85 | // `GtkATContext` instance change. | |
| 86 | - | func (x *ATContext) ConnectStateChange(cb func(ATContext)) { | |
| 86 | + | func (x *ATContext) ConnectStateChange(cb func(ATContext)) uint32 { | |
| 87 | 87 | fcb := func(clsPtr uintptr) { | |
| 88 | 88 | fa := ATContext{} | |
| 89 | 89 | fa.Ptr = clsPtr | |
| @@ -91,7 +91,7 @@ func (x *ATContext) ConnectStateChange(cb func(ATContext)) { | |||
| 91 | 91 | cb(fa) | |
| 92 | 92 | ||
| 93 | 93 | } | |
| 94 | - | gobject.ObjectConnect(x.GoPointer(), "signal::state-change", purego.NewCallback(fcb)) | |
| 94 | + | return gobject.SignalConnect(x.GoPointer(), "state-change", purego.NewCallback(fcb)) | |
| 95 | 95 | } | |
| 96 | 96 | ||
| 97 | 97 | func init() { | |
M v4/gtk/gtkbutton.go +4 -4
| @@ -272,7 +272,7 @@ func (c *Button) SetGoPointer(ptr uintptr) { | |||
| 272 | 272 | // | |
| 273 | 273 | // This is an action signal. Applications should never connect | |
| 274 | 274 | // to this signal, but use the [signal@Gtk.Button::clicked] signal. | |
| 275 | - | func (x *Button) ConnectActivate(cb func(Button)) { | |
| 275 | + | func (x *Button) ConnectActivate(cb func(Button)) uint32 { | |
| 276 | 276 | fcb := func(clsPtr uintptr) { | |
| 277 | 277 | fa := Button{} | |
| 278 | 278 | fa.Ptr = clsPtr | |
| @@ -280,11 +280,11 @@ func (x *Button) ConnectActivate(cb func(Button)) { | |||
| 280 | 280 | cb(fa) | |
| 281 | 281 | ||
| 282 | 282 | } | |
| 283 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 283 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 284 | 284 | } | |
| 285 | 285 | ||
| 286 | 286 | // Emitted when the button has been activated (pressed and released). | |
| 287 | - | func (x *Button) ConnectClicked(cb func(Button)) { | |
| 287 | + | func (x *Button) ConnectClicked(cb func(Button)) uint32 { | |
| 288 | 288 | fcb := func(clsPtr uintptr) { | |
| 289 | 289 | fa := Button{} | |
| 290 | 290 | fa.Ptr = clsPtr | |
| @@ -292,7 +292,7 @@ func (x *Button) ConnectClicked(cb func(Button)) { | |||
| 292 | 292 | cb(fa) | |
| 293 | 293 | ||
| 294 | 294 | } | |
| 295 | - | gobject.ObjectConnect(x.GoPointer(), "signal::clicked", purego.NewCallback(fcb)) | |
| 295 | + | return gobject.SignalConnect(x.GoPointer(), "clicked", purego.NewCallback(fcb)) | |
| 296 | 296 | } | |
| 297 | 297 | ||
| 298 | 298 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkcalendar.go +10 -10
| @@ -220,7 +220,7 @@ func (c *Calendar) SetGoPointer(ptr uintptr) { | |||
| 220 | 220 | } | |
| 221 | 221 | ||
| 222 | 222 | // Emitted when the user selects a day. | |
| 223 | - | func (x *Calendar) ConnectDaySelected(cb func(Calendar)) { | |
| 223 | + | func (x *Calendar) ConnectDaySelected(cb func(Calendar)) uint32 { | |
| 224 | 224 | fcb := func(clsPtr uintptr) { | |
| 225 | 225 | fa := Calendar{} | |
| 226 | 226 | fa.Ptr = clsPtr | |
| @@ -228,11 +228,11 @@ func (x *Calendar) ConnectDaySelected(cb func(Calendar)) { | |||
| 228 | 228 | cb(fa) | |
| 229 | 229 | ||
| 230 | 230 | } | |
| 231 | - | gobject.ObjectConnect(x.GoPointer(), "signal::day-selected", purego.NewCallback(fcb)) | |
| 231 | + | return gobject.SignalConnect(x.GoPointer(), "day-selected", purego.NewCallback(fcb)) | |
| 232 | 232 | } | |
| 233 | 233 | ||
| 234 | 234 | // Emitted when the user switched to the next month. | |
| 235 | - | func (x *Calendar) ConnectNextMonth(cb func(Calendar)) { | |
| 235 | + | func (x *Calendar) ConnectNextMonth(cb func(Calendar)) uint32 { | |
| 236 | 236 | fcb := func(clsPtr uintptr) { | |
| 237 | 237 | fa := Calendar{} | |
| 238 | 238 | fa.Ptr = clsPtr | |
| @@ -240,11 +240,11 @@ func (x *Calendar) ConnectNextMonth(cb func(Calendar)) { | |||
| 240 | 240 | cb(fa) | |
| 241 | 241 | ||
| 242 | 242 | } | |
| 243 | - | gobject.ObjectConnect(x.GoPointer(), "signal::next-month", purego.NewCallback(fcb)) | |
| 243 | + | return gobject.SignalConnect(x.GoPointer(), "next-month", purego.NewCallback(fcb)) | |
| 244 | 244 | } | |
| 245 | 245 | ||
| 246 | 246 | // Emitted when user switched to the next year. | |
| 247 | - | func (x *Calendar) ConnectNextYear(cb func(Calendar)) { | |
| 247 | + | func (x *Calendar) ConnectNextYear(cb func(Calendar)) uint32 { | |
| 248 | 248 | fcb := func(clsPtr uintptr) { | |
| 249 | 249 | fa := Calendar{} | |
| 250 | 250 | fa.Ptr = clsPtr | |
| @@ -252,11 +252,11 @@ func (x *Calendar) ConnectNextYear(cb func(Calendar)) { | |||
| 252 | 252 | cb(fa) | |
| 253 | 253 | ||
| 254 | 254 | } | |
| 255 | - | gobject.ObjectConnect(x.GoPointer(), "signal::next-year", purego.NewCallback(fcb)) | |
| 255 | + | return gobject.SignalConnect(x.GoPointer(), "next-year", purego.NewCallback(fcb)) | |
| 256 | 256 | } | |
| 257 | 257 | ||
| 258 | 258 | // Emitted when the user switched to the previous month. | |
| 259 | - | func (x *Calendar) ConnectPrevMonth(cb func(Calendar)) { | |
| 259 | + | func (x *Calendar) ConnectPrevMonth(cb func(Calendar)) uint32 { | |
| 260 | 260 | fcb := func(clsPtr uintptr) { | |
| 261 | 261 | fa := Calendar{} | |
| 262 | 262 | fa.Ptr = clsPtr | |
| @@ -264,11 +264,11 @@ func (x *Calendar) ConnectPrevMonth(cb func(Calendar)) { | |||
| 264 | 264 | cb(fa) | |
| 265 | 265 | ||
| 266 | 266 | } | |
| 267 | - | gobject.ObjectConnect(x.GoPointer(), "signal::prev-month", purego.NewCallback(fcb)) | |
| 267 | + | return gobject.SignalConnect(x.GoPointer(), "prev-month", purego.NewCallback(fcb)) | |
| 268 | 268 | } | |
| 269 | 269 | ||
| 270 | 270 | // Emitted when user switched to the previous year. | |
| 271 | - | func (x *Calendar) ConnectPrevYear(cb func(Calendar)) { | |
| 271 | + | func (x *Calendar) ConnectPrevYear(cb func(Calendar)) uint32 { | |
| 272 | 272 | fcb := func(clsPtr uintptr) { | |
| 273 | 273 | fa := Calendar{} | |
| 274 | 274 | fa.Ptr = clsPtr | |
| @@ -276,7 +276,7 @@ func (x *Calendar) ConnectPrevYear(cb func(Calendar)) { | |||
| 276 | 276 | cb(fa) | |
| 277 | 277 | ||
| 278 | 278 | } | |
| 279 | - | gobject.ObjectConnect(x.GoPointer(), "signal::prev-year", purego.NewCallback(fcb)) | |
| 279 | + | return gobject.SignalConnect(x.GoPointer(), "prev-year", purego.NewCallback(fcb)) | |
| 280 | 280 | } | |
| 281 | 281 | ||
| 282 | 282 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkcellarea.go +8 -8
| @@ -931,7 +931,7 @@ func (c *CellArea) SetGoPointer(ptr uintptr) { | |||
| 931 | 931 | ||
| 932 | 932 | // Indicates that editing has started on @renderer and that @editable | |
| 933 | 933 | // should be added to the owning cell-layouting widget at @cell_area. | |
| 934 | - | func (x *CellArea) ConnectAddEditable(cb func(CellArea, uintptr, uintptr, uintptr, string)) { | |
| 934 | + | func (x *CellArea) ConnectAddEditable(cb func(CellArea, uintptr, uintptr, uintptr, string)) uint32 { | |
| 935 | 935 | fcb := func(clsPtr uintptr, RendererVarp uintptr, EditableVarp uintptr, CellAreaVarp uintptr, PathVarp string) { | |
| 936 | 936 | fa := CellArea{} | |
| 937 | 937 | fa.Ptr = clsPtr | |
| @@ -939,11 +939,11 @@ func (x *CellArea) ConnectAddEditable(cb func(CellArea, uintptr, uintptr, uintpt | |||
| 939 | 939 | cb(fa, RendererVarp, EditableVarp, CellAreaVarp, PathVarp) | |
| 940 | 940 | ||
| 941 | 941 | } | |
| 942 | - | gobject.ObjectConnect(x.GoPointer(), "signal::add-editable", purego.NewCallback(fcb)) | |
| 942 | + | return gobject.SignalConnect(x.GoPointer(), "add-editable", purego.NewCallback(fcb)) | |
| 943 | 943 | } | |
| 944 | 944 | ||
| 945 | 945 | // This signal is emitted whenever applying attributes to @area from @model | |
| 946 | - | func (x *CellArea) ConnectApplyAttributes(cb func(CellArea, uintptr, uintptr, bool, bool)) { | |
| 946 | + | func (x *CellArea) ConnectApplyAttributes(cb func(CellArea, uintptr, uintptr, bool, bool)) uint32 { | |
| 947 | 947 | fcb := func(clsPtr uintptr, ModelVarp uintptr, IterVarp uintptr, IsExpanderVarp bool, IsExpandedVarp bool) { | |
| 948 | 948 | fa := CellArea{} | |
| 949 | 949 | fa.Ptr = clsPtr | |
| @@ -951,7 +951,7 @@ func (x *CellArea) ConnectApplyAttributes(cb func(CellArea, uintptr, uintptr, bo | |||
| 951 | 951 | cb(fa, ModelVarp, IterVarp, IsExpanderVarp, IsExpandedVarp) | |
| 952 | 952 | ||
| 953 | 953 | } | |
| 954 | - | gobject.ObjectConnect(x.GoPointer(), "signal::apply-attributes", purego.NewCallback(fcb)) | |
| 954 | + | return gobject.SignalConnect(x.GoPointer(), "apply-attributes", purego.NewCallback(fcb)) | |
| 955 | 955 | } | |
| 956 | 956 | ||
| 957 | 957 | // Indicates that focus changed on this @area. This signal | |
| @@ -962,7 +962,7 @@ func (x *CellArea) ConnectApplyAttributes(cb func(CellArea, uintptr, uintptr, bo | |||
| 962 | 962 | // currently focused renderer did not change, this is | |
| 963 | 963 | // because focus may change to the same renderer in the | |
| 964 | 964 | // same cell area for a different row of data. | |
| 965 | - | func (x *CellArea) ConnectFocusChanged(cb func(CellArea, uintptr, string)) { | |
| 965 | + | func (x *CellArea) ConnectFocusChanged(cb func(CellArea, uintptr, string)) uint32 { | |
| 966 | 966 | fcb := func(clsPtr uintptr, RendererVarp uintptr, PathVarp string) { | |
| 967 | 967 | fa := CellArea{} | |
| 968 | 968 | fa.Ptr = clsPtr | |
| @@ -970,12 +970,12 @@ func (x *CellArea) ConnectFocusChanged(cb func(CellArea, uintptr, string)) { | |||
| 970 | 970 | cb(fa, RendererVarp, PathVarp) | |
| 971 | 971 | ||
| 972 | 972 | } | |
| 973 | - | gobject.ObjectConnect(x.GoPointer(), "signal::focus-changed", purego.NewCallback(fcb)) | |
| 973 | + | return gobject.SignalConnect(x.GoPointer(), "focus-changed", purego.NewCallback(fcb)) | |
| 974 | 974 | } | |
| 975 | 975 | ||
| 976 | 976 | // Indicates that editing finished on @renderer and that @editable | |
| 977 | 977 | // should be removed from the owning cell-layouting widget. | |
| 978 | - | func (x *CellArea) ConnectRemoveEditable(cb func(CellArea, uintptr, uintptr)) { | |
| 978 | + | func (x *CellArea) ConnectRemoveEditable(cb func(CellArea, uintptr, uintptr)) uint32 { | |
| 979 | 979 | fcb := func(clsPtr uintptr, RendererVarp uintptr, EditableVarp uintptr) { | |
| 980 | 980 | fa := CellArea{} | |
| 981 | 981 | fa.Ptr = clsPtr | |
| @@ -983,7 +983,7 @@ func (x *CellArea) ConnectRemoveEditable(cb func(CellArea, uintptr, uintptr)) { | |||
| 983 | 983 | cb(fa, RendererVarp, EditableVarp) | |
| 984 | 984 | ||
| 985 | 985 | } | |
| 986 | - | gobject.ObjectConnect(x.GoPointer(), "signal::remove-editable", purego.NewCallback(fcb)) | |
| 986 | + | return gobject.SignalConnect(x.GoPointer(), "remove-editable", purego.NewCallback(fcb)) | |
| 987 | 987 | } | |
| 988 | 988 | ||
| 989 | 989 | // Gets the ID of the @buildable object. | |
M v4/gtk/gtkcellrenderer.go +4 -4
| @@ -391,7 +391,7 @@ func (c *CellRenderer) SetGoPointer(ptr uintptr) { | |||
| 391 | 391 | // editing when the user presses Escape. | |
| 392 | 392 | // | |
| 393 | 393 | // See also: gtk_cell_renderer_stop_editing(). | |
| 394 | - | func (x *CellRenderer) ConnectEditingCanceled(cb func(CellRenderer)) { | |
| 394 | + | func (x *CellRenderer) ConnectEditingCanceled(cb func(CellRenderer)) uint32 { | |
| 395 | 395 | fcb := func(clsPtr uintptr) { | |
| 396 | 396 | fa := CellRenderer{} | |
| 397 | 397 | fa.Ptr = clsPtr | |
| @@ -399,7 +399,7 @@ func (x *CellRenderer) ConnectEditingCanceled(cb func(CellRenderer)) { | |||
| 399 | 399 | cb(fa) | |
| 400 | 400 | ||
| 401 | 401 | } | |
| 402 | - | gobject.ObjectConnect(x.GoPointer(), "signal::editing-canceled", purego.NewCallback(fcb)) | |
| 402 | + | return gobject.SignalConnect(x.GoPointer(), "editing-canceled", purego.NewCallback(fcb)) | |
| 403 | 403 | } | |
| 404 | 404 | ||
| 405 | 405 | // This signal gets emitted when a cell starts to be edited. | |
| @@ -434,7 +434,7 @@ func (x *CellRenderer) ConnectEditingCanceled(cb func(CellRenderer)) { | |||
| 434 | 434 | // } | |
| 435 | 435 | // | |
| 436 | 436 | // ]| | |
| 437 | - | func (x *CellRenderer) ConnectEditingStarted(cb func(CellRenderer, uintptr, string)) { | |
| 437 | + | func (x *CellRenderer) ConnectEditingStarted(cb func(CellRenderer, uintptr, string)) uint32 { | |
| 438 | 438 | fcb := func(clsPtr uintptr, EditableVarp uintptr, PathVarp string) { | |
| 439 | 439 | fa := CellRenderer{} | |
| 440 | 440 | fa.Ptr = clsPtr | |
| @@ -442,7 +442,7 @@ func (x *CellRenderer) ConnectEditingStarted(cb func(CellRenderer, uintptr, stri | |||
| 442 | 442 | cb(fa, EditableVarp, PathVarp) | |
| 443 | 443 | ||
| 444 | 444 | } | |
| 445 | - | gobject.ObjectConnect(x.GoPointer(), "signal::editing-started", purego.NewCallback(fcb)) | |
| 445 | + | return gobject.SignalConnect(x.GoPointer(), "editing-started", purego.NewCallback(fcb)) | |
| 446 | 446 | } | |
| 447 | 447 | ||
| 448 | 448 | func init() { | |
M v4/gtk/gtkcellrendereraccel.go +4 -4
| @@ -60,7 +60,7 @@ func (c *CellRendererAccel) SetGoPointer(ptr uintptr) { | |||
| 60 | 60 | } | |
| 61 | 61 | ||
| 62 | 62 | // Gets emitted when the user has removed the accelerator. | |
| 63 | - | func (x *CellRendererAccel) ConnectAccelCleared(cb func(CellRendererAccel, string)) { | |
| 63 | + | func (x *CellRendererAccel) ConnectAccelCleared(cb func(CellRendererAccel, string)) uint32 { | |
| 64 | 64 | fcb := func(clsPtr uintptr, PathStringVarp string) { | |
| 65 | 65 | fa := CellRendererAccel{} | |
| 66 | 66 | fa.Ptr = clsPtr | |
| @@ -68,11 +68,11 @@ func (x *CellRendererAccel) ConnectAccelCleared(cb func(CellRendererAccel, strin | |||
| 68 | 68 | cb(fa, PathStringVarp) | |
| 69 | 69 | ||
| 70 | 70 | } | |
| 71 | - | gobject.ObjectConnect(x.GoPointer(), "signal::accel-cleared", purego.NewCallback(fcb)) | |
| 71 | + | return gobject.SignalConnect(x.GoPointer(), "accel-cleared", purego.NewCallback(fcb)) | |
| 72 | 72 | } | |
| 73 | 73 | ||
| 74 | 74 | // Gets emitted when the user has selected a new accelerator. | |
| 75 | - | func (x *CellRendererAccel) ConnectAccelEdited(cb func(CellRendererAccel, string, uint, gdk.ModifierType, uint)) { | |
| 75 | + | func (x *CellRendererAccel) ConnectAccelEdited(cb func(CellRendererAccel, string, uint, gdk.ModifierType, uint)) uint32 { | |
| 76 | 76 | fcb := func(clsPtr uintptr, PathStringVarp string, AccelKeyVarp uint, AccelModsVarp gdk.ModifierType, HardwareKeycodeVarp uint) { | |
| 77 | 77 | fa := CellRendererAccel{} | |
| 78 | 78 | fa.Ptr = clsPtr | |
| @@ -80,7 +80,7 @@ func (x *CellRendererAccel) ConnectAccelEdited(cb func(CellRendererAccel, string | |||
| 80 | 80 | cb(fa, PathStringVarp, AccelKeyVarp, AccelModsVarp, HardwareKeycodeVarp) | |
| 81 | 81 | ||
| 82 | 82 | } | |
| 83 | - | gobject.ObjectConnect(x.GoPointer(), "signal::accel-edited", purego.NewCallback(fcb)) | |
| 83 | + | return gobject.SignalConnect(x.GoPointer(), "accel-edited", purego.NewCallback(fcb)) | |
| 84 | 84 | } | |
| 85 | 85 | ||
| 86 | 86 | func init() { | |
M v4/gtk/gtkcellrenderercombo.go +2 -2
| @@ -71,7 +71,7 @@ func (c *CellRendererCombo) SetGoPointer(ptr uintptr) { | |||
| 71 | 71 | // the tree view will immediately cease the editing operating. This | |
| 72 | 72 | // means that you most probably want to refrain from changing the model | |
| 73 | 73 | // until the combo cell renderer emits the edited or editing_canceled signal. | |
| 74 | - | func (x *CellRendererCombo) ConnectChanged(cb func(CellRendererCombo, string, uintptr)) { | |
| 74 | + | func (x *CellRendererCombo) ConnectChanged(cb func(CellRendererCombo, string, uintptr)) uint32 { | |
| 75 | 75 | fcb := func(clsPtr uintptr, PathStringVarp string, NewIterVarp uintptr) { | |
| 76 | 76 | fa := CellRendererCombo{} | |
| 77 | 77 | fa.Ptr = clsPtr | |
| @@ -79,7 +79,7 @@ func (x *CellRendererCombo) ConnectChanged(cb func(CellRendererCombo, string, ui | |||
| 79 | 79 | cb(fa, PathStringVarp, NewIterVarp) | |
| 80 | 80 | ||
| 81 | 81 | } | |
| 82 | - | gobject.ObjectConnect(x.GoPointer(), "signal::changed", purego.NewCallback(fcb)) | |
| 82 | + | return gobject.SignalConnect(x.GoPointer(), "changed", purego.NewCallback(fcb)) | |
| 83 | 83 | } | |
| 84 | 84 | ||
| 85 | 85 | func init() { | |
M v4/gtk/gtkcellrenderertext.go +2 -2
| @@ -81,7 +81,7 @@ func (c *CellRendererText) SetGoPointer(ptr uintptr) { | |||
| 81 | 81 | // | |
| 82 | 82 | // It is the responsibility of the application to update the model | |
| 83 | 83 | // and store @new_text at the position indicated by @path. | |
| 84 | - | func (x *CellRendererText) ConnectEdited(cb func(CellRendererText, string, string)) { | |
| 84 | + | func (x *CellRendererText) ConnectEdited(cb func(CellRendererText, string, string)) uint32 { | |
| 85 | 85 | fcb := func(clsPtr uintptr, PathVarp string, NewTextVarp string) { | |
| 86 | 86 | fa := CellRendererText{} | |
| 87 | 87 | fa.Ptr = clsPtr | |
| @@ -89,7 +89,7 @@ func (x *CellRendererText) ConnectEdited(cb func(CellRendererText, string, strin | |||
| 89 | 89 | cb(fa, PathVarp, NewTextVarp) | |
| 90 | 90 | ||
| 91 | 91 | } | |
| 92 | - | gobject.ObjectConnect(x.GoPointer(), "signal::edited", purego.NewCallback(fcb)) | |
| 92 | + | return gobject.SignalConnect(x.GoPointer(), "edited", purego.NewCallback(fcb)) | |
| 93 | 93 | } | |
| 94 | 94 | ||
| 95 | 95 | func init() { | |
M v4/gtk/gtkcellrenderertoggle.go +2 -2
| @@ -121,7 +121,7 @@ func (c *CellRendererToggle) SetGoPointer(ptr uintptr) { | |||
| 121 | 121 | // It is the responsibility of the application to update the model | |
| 122 | 122 | // with the correct value to store at @path. Often this is simply the | |
| 123 | 123 | // opposite of the value currently stored at @path. | |
| 124 | - | func (x *CellRendererToggle) ConnectToggled(cb func(CellRendererToggle, string)) { | |
| 124 | + | func (x *CellRendererToggle) ConnectToggled(cb func(CellRendererToggle, string)) uint32 { | |
| 125 | 125 | fcb := func(clsPtr uintptr, PathVarp string) { | |
| 126 | 126 | fa := CellRendererToggle{} | |
| 127 | 127 | fa.Ptr = clsPtr | |
| @@ -129,7 +129,7 @@ func (x *CellRendererToggle) ConnectToggled(cb func(CellRendererToggle, string)) | |||
| 129 | 129 | cb(fa, PathVarp) | |
| 130 | 130 | ||
| 131 | 131 | } | |
| 132 | - | gobject.ObjectConnect(x.GoPointer(), "signal::toggled", purego.NewCallback(fcb)) | |
| 132 | + | return gobject.SignalConnect(x.GoPointer(), "toggled", purego.NewCallback(fcb)) | |
| 133 | 133 | } | |
| 134 | 134 | ||
| 135 | 135 | func init() { | |
M v4/gtk/gtkcheckbutton.go +4 -4
| @@ -280,7 +280,7 @@ func (c *CheckButton) SetGoPointer(ptr uintptr) { | |||
| 280 | 280 | // | |
| 281 | 281 | // Applications should never connect to this signal, but use the | |
| 282 | 282 | // [signal@Gtk.CheckButton::toggled] signal. | |
| 283 | - | func (x *CheckButton) ConnectActivate(cb func(CheckButton)) { | |
| 283 | + | func (x *CheckButton) ConnectActivate(cb func(CheckButton)) uint32 { | |
| 284 | 284 | fcb := func(clsPtr uintptr) { | |
| 285 | 285 | fa := CheckButton{} | |
| 286 | 286 | fa.Ptr = clsPtr | |
| @@ -288,12 +288,12 @@ func (x *CheckButton) ConnectActivate(cb func(CheckButton)) { | |||
| 288 | 288 | cb(fa) | |
| 289 | 289 | ||
| 290 | 290 | } | |
| 291 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 291 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 292 | 292 | } | |
| 293 | 293 | ||
| 294 | 294 | // Emitted when the buttons's [property@Gtk.CheckButton:active] | |
| 295 | 295 | // property changes. | |
| 296 | - | func (x *CheckButton) ConnectToggled(cb func(CheckButton)) { | |
| 296 | + | func (x *CheckButton) ConnectToggled(cb func(CheckButton)) uint32 { | |
| 297 | 297 | fcb := func(clsPtr uintptr) { | |
| 298 | 298 | fa := CheckButton{} | |
| 299 | 299 | fa.Ptr = clsPtr | |
| @@ -301,7 +301,7 @@ func (x *CheckButton) ConnectToggled(cb func(CheckButton)) { | |||
| 301 | 301 | cb(fa) | |
| 302 | 302 | ||
| 303 | 303 | } | |
| 304 | - | gobject.ObjectConnect(x.GoPointer(), "signal::toggled", purego.NewCallback(fcb)) | |
| 304 | + | return gobject.SignalConnect(x.GoPointer(), "toggled", purego.NewCallback(fcb)) | |
| 305 | 305 | } | |
| 306 | 306 | ||
| 307 | 307 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkcolorbutton.go +4 -4
| @@ -126,7 +126,7 @@ func (c *ColorButton) SetGoPointer(ptr uintptr) { | |||
| 126 | 126 | // | |
| 127 | 127 | // The `::activate` signal on `GtkMenuButton` is an action signal and | |
| 128 | 128 | // emitting it causes the button to pop up its dialog. | |
| 129 | - | func (x *ColorButton) ConnectActivate(cb func(ColorButton)) { | |
| 129 | + | func (x *ColorButton) ConnectActivate(cb func(ColorButton)) uint32 { | |
| 130 | 130 | fcb := func(clsPtr uintptr) { | |
| 131 | 131 | fa := ColorButton{} | |
| 132 | 132 | fa.Ptr = clsPtr | |
| @@ -134,7 +134,7 @@ func (x *ColorButton) ConnectActivate(cb func(ColorButton)) { | |||
| 134 | 134 | cb(fa) | |
| 135 | 135 | ||
| 136 | 136 | } | |
| 137 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 137 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 138 | 138 | } | |
| 139 | 139 | ||
| 140 | 140 | // Emitted when the user selects a color. | |
| @@ -145,7 +145,7 @@ func (x *ColorButton) ConnectActivate(cb func(ColorButton)) { | |||
| 145 | 145 | // Note that this signal is only emitted when the user changes the color. | |
| 146 | 146 | // If you need to react to programmatic color changes as well, use | |
| 147 | 147 | // the notify::rgba signal. | |
| 148 | - | func (x *ColorButton) ConnectColorSet(cb func(ColorButton)) { | |
| 148 | + | func (x *ColorButton) ConnectColorSet(cb func(ColorButton)) uint32 { | |
| 149 | 149 | fcb := func(clsPtr uintptr) { | |
| 150 | 150 | fa := ColorButton{} | |
| 151 | 151 | fa.Ptr = clsPtr | |
| @@ -153,7 +153,7 @@ func (x *ColorButton) ConnectColorSet(cb func(ColorButton)) { | |||
| 153 | 153 | cb(fa) | |
| 154 | 154 | ||
| 155 | 155 | } | |
| 156 | - | gobject.ObjectConnect(x.GoPointer(), "signal::color-set", purego.NewCallback(fcb)) | |
| 156 | + | return gobject.SignalConnect(x.GoPointer(), "color-set", purego.NewCallback(fcb)) | |
| 157 | 157 | } | |
| 158 | 158 | ||
| 159 | 159 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkcolumnview.go +2 -2
| @@ -349,7 +349,7 @@ func (c *ColumnView) SetGoPointer(ptr uintptr) { | |||
| 349 | 349 | // This allows for a convenient way to handle activation in a columnview. | |
| 350 | 350 | // See [method@Gtk.ListItem.set_activatable] for details on how to use this | |
| 351 | 351 | // signal. | |
| 352 | - | func (x *ColumnView) ConnectActivate(cb func(ColumnView, uint)) { | |
| 352 | + | func (x *ColumnView) ConnectActivate(cb func(ColumnView, uint)) uint32 { | |
| 353 | 353 | fcb := func(clsPtr uintptr, PositionVarp uint) { | |
| 354 | 354 | fa := ColumnView{} | |
| 355 | 355 | fa.Ptr = clsPtr | |
| @@ -357,7 +357,7 @@ func (x *ColumnView) ConnectActivate(cb func(ColumnView, uint)) { | |||
| 357 | 357 | cb(fa, PositionVarp) | |
| 358 | 358 | ||
| 359 | 359 | } | |
| 360 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 360 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 361 | 361 | } | |
| 362 | 362 | ||
| 363 | 363 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkcombobox.go +12 -12
| @@ -477,7 +477,7 @@ func (c *ComboBox) SetGoPointer(ptr uintptr) { | |||
| 477 | 477 | // | |
| 478 | 478 | // The `::activate` signal on `GtkComboBox` is an action signal and | |
| 479 | 479 | // emitting it causes the combo box to pop up its dropdown. | |
| 480 | - | func (x *ComboBox) ConnectActivate(cb func(ComboBox)) { | |
| 480 | + | func (x *ComboBox) ConnectActivate(cb func(ComboBox)) uint32 { | |
| 481 | 481 | fcb := func(clsPtr uintptr) { | |
| 482 | 482 | fa := ComboBox{} | |
| 483 | 483 | fa.Ptr = clsPtr | |
| @@ -485,7 +485,7 @@ func (x *ComboBox) ConnectActivate(cb func(ComboBox)) { | |||
| 485 | 485 | cb(fa) | |
| 486 | 486 | ||
| 487 | 487 | } | |
| 488 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 488 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 489 | 489 | } | |
| 490 | 490 | ||
| 491 | 491 | // Emitted when the active item is changed. | |
| @@ -493,7 +493,7 @@ func (x *ComboBox) ConnectActivate(cb func(ComboBox)) { | |||
| 493 | 493 | // The can be due to the user selecting a different item from the list, | |
| 494 | 494 | // or due to a call to [method@Gtk.ComboBox.set_active_iter]. It will | |
| 495 | 495 | // also be emitted while typing into the entry of a combo box with an entry. | |
| 496 | - | func (x *ComboBox) ConnectChanged(cb func(ComboBox)) { | |
| 496 | + | func (x *ComboBox) ConnectChanged(cb func(ComboBox)) uint32 { | |
| 497 | 497 | fcb := func(clsPtr uintptr) { | |
| 498 | 498 | fa := ComboBox{} | |
| 499 | 499 | fa.Ptr = clsPtr | |
| @@ -501,7 +501,7 @@ func (x *ComboBox) ConnectChanged(cb func(ComboBox)) { | |||
| 501 | 501 | cb(fa) | |
| 502 | 502 | ||
| 503 | 503 | } | |
| 504 | - | gobject.ObjectConnect(x.GoPointer(), "signal::changed", purego.NewCallback(fcb)) | |
| 504 | + | return gobject.SignalConnect(x.GoPointer(), "changed", purego.NewCallback(fcb)) | |
| 505 | 505 | } | |
| 506 | 506 | ||
| 507 | 507 | // Emitted to allow changing how the text in a combo box's entry is displayed. | |
| @@ -538,7 +538,7 @@ func (x *ComboBox) ConnectChanged(cb func(ComboBox)) { | |||
| 538 | 538 | // } | |
| 539 | 539 | // | |
| 540 | 540 | // ``` | |
| 541 | - | func (x *ComboBox) ConnectFormatEntryText(cb func(ComboBox, string) string) { | |
| 541 | + | func (x *ComboBox) ConnectFormatEntryText(cb func(ComboBox, string) string) uint32 { | |
| 542 | 542 | fcb := func(clsPtr uintptr, PathVarp string) string { | |
| 543 | 543 | fa := ComboBox{} | |
| 544 | 544 | fa.Ptr = clsPtr | |
| @@ -546,13 +546,13 @@ func (x *ComboBox) ConnectFormatEntryText(cb func(ComboBox, string) string) { | |||
| 546 | 546 | return cb(fa, PathVarp) | |
| 547 | 547 | ||
| 548 | 548 | } | |
| 549 | - | gobject.ObjectConnect(x.GoPointer(), "signal::format-entry-text", purego.NewCallback(fcb)) | |
| 549 | + | return gobject.SignalConnect(x.GoPointer(), "format-entry-text", purego.NewCallback(fcb)) | |
| 550 | 550 | } | |
| 551 | 551 | ||
| 552 | 552 | // Emitted to move the active selection. | |
| 553 | 553 | // | |
| 554 | 554 | // This is an [keybinding signal](class.SignalAction.html). | |
| 555 | - | func (x *ComboBox) ConnectMoveActive(cb func(ComboBox, ScrollType)) { | |
| 555 | + | func (x *ComboBox) ConnectMoveActive(cb func(ComboBox, ScrollType)) uint32 { | |
| 556 | 556 | fcb := func(clsPtr uintptr, ScrollTypeVarp ScrollType) { | |
| 557 | 557 | fa := ComboBox{} | |
| 558 | 558 | fa.Ptr = clsPtr | |
| @@ -560,7 +560,7 @@ func (x *ComboBox) ConnectMoveActive(cb func(ComboBox, ScrollType)) { | |||
| 560 | 560 | cb(fa, ScrollTypeVarp) | |
| 561 | 561 | ||
| 562 | 562 | } | |
| 563 | - | gobject.ObjectConnect(x.GoPointer(), "signal::move-active", purego.NewCallback(fcb)) | |
| 563 | + | return gobject.SignalConnect(x.GoPointer(), "move-active", purego.NewCallback(fcb)) | |
| 564 | 564 | } | |
| 565 | 565 | ||
| 566 | 566 | // Emitted to popdown the combo box list. | |
| @@ -568,7 +568,7 @@ func (x *ComboBox) ConnectMoveActive(cb func(ComboBox, ScrollType)) { | |||
| 568 | 568 | // This is an [keybinding signal](class.SignalAction.html). | |
| 569 | 569 | // | |
| 570 | 570 | // The default bindings for this signal are Alt+Up and Escape. | |
| 571 | - | func (x *ComboBox) ConnectPopdown(cb func(ComboBox) bool) { | |
| 571 | + | func (x *ComboBox) ConnectPopdown(cb func(ComboBox) bool) uint32 { | |
| 572 | 572 | fcb := func(clsPtr uintptr) bool { | |
| 573 | 573 | fa := ComboBox{} | |
| 574 | 574 | fa.Ptr = clsPtr | |
| @@ -576,7 +576,7 @@ func (x *ComboBox) ConnectPopdown(cb func(ComboBox) bool) { | |||
| 576 | 576 | return cb(fa) | |
| 577 | 577 | ||
| 578 | 578 | } | |
| 579 | - | gobject.ObjectConnect(x.GoPointer(), "signal::popdown", purego.NewCallback(fcb)) | |
| 579 | + | return gobject.SignalConnect(x.GoPointer(), "popdown", purego.NewCallback(fcb)) | |
| 580 | 580 | } | |
| 581 | 581 | ||
| 582 | 582 | // Emitted to popup the combo box list. | |
| @@ -584,7 +584,7 @@ func (x *ComboBox) ConnectPopdown(cb func(ComboBox) bool) { | |||
| 584 | 584 | // This is an [keybinding signal](class.SignalAction.html). | |
| 585 | 585 | // | |
| 586 | 586 | // The default binding for this signal is Alt+Down. | |
| 587 | - | func (x *ComboBox) ConnectPopup(cb func(ComboBox)) { | |
| 587 | + | func (x *ComboBox) ConnectPopup(cb func(ComboBox)) uint32 { | |
| 588 | 588 | fcb := func(clsPtr uintptr) { | |
| 589 | 589 | fa := ComboBox{} | |
| 590 | 590 | fa.Ptr = clsPtr | |
| @@ -592,7 +592,7 @@ func (x *ComboBox) ConnectPopup(cb func(ComboBox)) { | |||
| 592 | 592 | cb(fa) | |
| 593 | 593 | ||
| 594 | 594 | } | |
| 595 | - | gobject.ObjectConnect(x.GoPointer(), "signal::popup", purego.NewCallback(fcb)) | |
| 595 | + | return gobject.SignalConnect(x.GoPointer(), "popup", purego.NewCallback(fcb)) | |
| 596 | 596 | } | |
| 597 | 597 | ||
| 598 | 598 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkcssprovider.go +2 -2
| @@ -163,7 +163,7 @@ func (c *CssProvider) SetGoPointer(ptr uintptr) { | |||
| 163 | 163 | // Note that this signal may be emitted at any time as the css provider | |
| 164 | 164 | // may opt to defer parsing parts or all of the input to a later time | |
| 165 | 165 | // than when a loading function was called. | |
| 166 | - | func (x *CssProvider) ConnectParsingError(cb func(CssProvider, uintptr, uintptr)) { | |
| 166 | + | func (x *CssProvider) ConnectParsingError(cb func(CssProvider, uintptr, uintptr)) uint32 { | |
| 167 | 167 | fcb := func(clsPtr uintptr, SectionVarp uintptr, ErrorVarp uintptr) { | |
| 168 | 168 | fa := CssProvider{} | |
| 169 | 169 | fa.Ptr = clsPtr | |
| @@ -171,7 +171,7 @@ func (x *CssProvider) ConnectParsingError(cb func(CssProvider, uintptr, uintptr) | |||
| 171 | 171 | cb(fa, SectionVarp, ErrorVarp) | |
| 172 | 172 | ||
| 173 | 173 | } | |
| 174 | - | gobject.ObjectConnect(x.GoPointer(), "signal::parsing-error", purego.NewCallback(fcb)) | |
| 174 | + | return gobject.SignalConnect(x.GoPointer(), "parsing-error", purego.NewCallback(fcb)) | |
| 175 | 175 | } | |
| 176 | 176 | ||
| 177 | 177 | func init() { | |
M v4/gtk/gtkdialog.go +4 -4
| @@ -434,7 +434,7 @@ func (c *Dialog) SetGoPointer(ptr uintptr) { | |||
| 434 | 434 | // This is a [keybinding signal](class.SignalAction.html). | |
| 435 | 435 | // | |
| 436 | 436 | // The default binding for this signal is the Escape key. | |
| 437 | - | func (x *Dialog) ConnectClose(cb func(Dialog)) { | |
| 437 | + | func (x *Dialog) ConnectClose(cb func(Dialog)) uint32 { | |
| 438 | 438 | fcb := func(clsPtr uintptr) { | |
| 439 | 439 | fa := Dialog{} | |
| 440 | 440 | fa.Ptr = clsPtr | |
| @@ -442,7 +442,7 @@ func (x *Dialog) ConnectClose(cb func(Dialog)) { | |||
| 442 | 442 | cb(fa) | |
| 443 | 443 | ||
| 444 | 444 | } | |
| 445 | - | gobject.ObjectConnect(x.GoPointer(), "signal::close", purego.NewCallback(fcb)) | |
| 445 | + | return gobject.SignalConnect(x.GoPointer(), "close", purego.NewCallback(fcb)) | |
| 446 | 446 | } | |
| 447 | 447 | ||
| 448 | 448 | // Emitted when an action widget is clicked. | |
| @@ -451,7 +451,7 @@ func (x *Dialog) ConnectClose(cb func(Dialog)) { | |||
| 451 | 451 | // delete event, and when [method@Gtk.Dialog.response] is called. | |
| 452 | 452 | // On a delete event, the response ID is %GTK_RESPONSE_DELETE_EVENT. | |
| 453 | 453 | // Otherwise, it depends on which action widget was clicked. | |
| 454 | - | func (x *Dialog) ConnectResponse(cb func(Dialog, int)) { | |
| 454 | + | func (x *Dialog) ConnectResponse(cb func(Dialog, int)) uint32 { | |
| 455 | 455 | fcb := func(clsPtr uintptr, ResponseIdVarp int) { | |
| 456 | 456 | fa := Dialog{} | |
| 457 | 457 | fa.Ptr = clsPtr | |
| @@ -459,7 +459,7 @@ func (x *Dialog) ConnectResponse(cb func(Dialog, int)) { | |||
| 459 | 459 | cb(fa, ResponseIdVarp) | |
| 460 | 460 | ||
| 461 | 461 | } | |
| 462 | - | gobject.ObjectConnect(x.GoPointer(), "signal::response", purego.NewCallback(fcb)) | |
| 462 | + | return gobject.SignalConnect(x.GoPointer(), "response", purego.NewCallback(fcb)) | |
| 463 | 463 | } | |
| 464 | 464 | ||
| 465 | 465 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkdragsource.go +8 -8
| @@ -238,7 +238,7 @@ func (c *DragSource) SetGoPointer(ptr uintptr) { | |||
| 238 | 238 | // | |
| 239 | 239 | // It can be used to e.g. set a custom drag icon with | |
| 240 | 240 | // [method@Gtk.DragSource.set_icon]. | |
| 241 | - | func (x *DragSource) ConnectDragBegin(cb func(DragSource, uintptr)) { | |
| 241 | + | func (x *DragSource) ConnectDragBegin(cb func(DragSource, uintptr)) uint32 { | |
| 242 | 242 | fcb := func(clsPtr uintptr, DragVarp uintptr) { | |
| 243 | 243 | fa := DragSource{} | |
| 244 | 244 | fa.Ptr = clsPtr | |
| @@ -246,7 +246,7 @@ func (x *DragSource) ConnectDragBegin(cb func(DragSource, uintptr)) { | |||
| 246 | 246 | cb(fa, DragVarp) | |
| 247 | 247 | ||
| 248 | 248 | } | |
| 249 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drag-begin", purego.NewCallback(fcb)) | |
| 249 | + | return gobject.SignalConnect(x.GoPointer(), "drag-begin", purego.NewCallback(fcb)) | |
| 250 | 250 | } | |
| 251 | 251 | ||
| 252 | 252 | // Emitted on the drag source when a drag has failed. | |
| @@ -254,7 +254,7 @@ func (x *DragSource) ConnectDragBegin(cb func(DragSource, uintptr)) { | |||
| 254 | 254 | // The signal handler may handle a failed drag operation based on | |
| 255 | 255 | // the type of error. It should return %TRUE if the failure has been handled | |
| 256 | 256 | // and the default "drag operation failed" animation should not be shown. | |
| 257 | - | func (x *DragSource) ConnectDragCancel(cb func(DragSource, uintptr, gdk.DragCancelReason) bool) { | |
| 257 | + | func (x *DragSource) ConnectDragCancel(cb func(DragSource, uintptr, gdk.DragCancelReason) bool) uint32 { | |
| 258 | 258 | fcb := func(clsPtr uintptr, DragVarp uintptr, ReasonVarp gdk.DragCancelReason) bool { | |
| 259 | 259 | fa := DragSource{} | |
| 260 | 260 | fa.Ptr = clsPtr | |
| @@ -262,7 +262,7 @@ func (x *DragSource) ConnectDragCancel(cb func(DragSource, uintptr, gdk.DragCanc | |||
| 262 | 262 | return cb(fa, DragVarp, ReasonVarp) | |
| 263 | 263 | ||
| 264 | 264 | } | |
| 265 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drag-cancel", purego.NewCallback(fcb)) | |
| 265 | + | return gobject.SignalConnect(x.GoPointer(), "drag-cancel", purego.NewCallback(fcb)) | |
| 266 | 266 | } | |
| 267 | 267 | ||
| 268 | 268 | // Emitted on the drag source when a drag is finished. | |
| @@ -270,7 +270,7 @@ func (x *DragSource) ConnectDragCancel(cb func(DragSource, uintptr, gdk.DragCanc | |||
| 270 | 270 | // A typical reason to connect to this signal is to undo | |
| 271 | 271 | // things done in [signal@Gtk.DragSource::prepare] or | |
| 272 | 272 | // [signal@Gtk.DragSource::drag-begin] handlers. | |
| 273 | - | func (x *DragSource) ConnectDragEnd(cb func(DragSource, uintptr, bool)) { | |
| 273 | + | func (x *DragSource) ConnectDragEnd(cb func(DragSource, uintptr, bool)) uint32 { | |
| 274 | 274 | fcb := func(clsPtr uintptr, DragVarp uintptr, DeleteDataVarp bool) { | |
| 275 | 275 | fa := DragSource{} | |
| 276 | 276 | fa.Ptr = clsPtr | |
| @@ -278,7 +278,7 @@ func (x *DragSource) ConnectDragEnd(cb func(DragSource, uintptr, bool)) { | |||
| 278 | 278 | cb(fa, DragVarp, DeleteDataVarp) | |
| 279 | 279 | ||
| 280 | 280 | } | |
| 281 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drag-end", purego.NewCallback(fcb)) | |
| 281 | + | return gobject.SignalConnect(x.GoPointer(), "drag-end", purego.NewCallback(fcb)) | |
| 282 | 282 | } | |
| 283 | 283 | ||
| 284 | 284 | // Emitted when a drag is about to be initiated. | |
| @@ -287,7 +287,7 @@ func (x *DragSource) ConnectDragEnd(cb func(DragSource, uintptr, bool)) { | |||
| 287 | 287 | // to start. The default handler for this signal returns the value of | |
| 288 | 288 | // the [property@Gtk.DragSource:content] property, so if you set up that | |
| 289 | 289 | // property ahead of time, you don't need to connect to this signal. | |
| 290 | - | func (x *DragSource) ConnectPrepare(cb func(DragSource, float64, float64) gdk.ContentProvider) { | |
| 290 | + | func (x *DragSource) ConnectPrepare(cb func(DragSource, float64, float64) gdk.ContentProvider) uint32 { | |
| 291 | 291 | fcb := func(clsPtr uintptr, XVarp float64, YVarp float64) uintptr { | |
| 292 | 292 | fa := DragSource{} | |
| 293 | 293 | fa.Ptr = clsPtr | |
| @@ -296,7 +296,7 @@ func (x *DragSource) ConnectPrepare(cb func(DragSource, float64, float64) gdk.Co | |||
| 296 | 296 | return PrepareCls.Ptr | |
| 297 | 297 | ||
| 298 | 298 | } | |
| 299 | - | gobject.ObjectConnect(x.GoPointer(), "signal::prepare", purego.NewCallback(fcb)) | |
| 299 | + | return gobject.SignalConnect(x.GoPointer(), "prepare", purego.NewCallback(fcb)) | |
| 300 | 300 | } | |
| 301 | 301 | ||
| 302 | 302 | func init() { | |
M v4/gtk/gtkdrawingarea.go +2 -2
| @@ -218,7 +218,7 @@ func (c *DrawingArea) SetGoPointer(ptr uintptr) { | |||
| 218 | 218 | // | |
| 219 | 219 | // This is useful in order to keep state up to date with the widget size, | |
| 220 | 220 | // like for instance a backing surface. | |
| 221 | - | func (x *DrawingArea) ConnectResize(cb func(DrawingArea, int, int)) { | |
| 221 | + | func (x *DrawingArea) ConnectResize(cb func(DrawingArea, int, int)) uint32 { | |
| 222 | 222 | fcb := func(clsPtr uintptr, WidthVarp int, HeightVarp int) { | |
| 223 | 223 | fa := DrawingArea{} | |
| 224 | 224 | fa.Ptr = clsPtr | |
| @@ -226,7 +226,7 @@ func (x *DrawingArea) ConnectResize(cb func(DrawingArea, int, int)) { | |||
| 226 | 226 | cb(fa, WidthVarp, HeightVarp) | |
| 227 | 227 | ||
| 228 | 228 | } | |
| 229 | - | gobject.ObjectConnect(x.GoPointer(), "signal::resize", purego.NewCallback(fcb)) | |
| 229 | + | return gobject.SignalConnect(x.GoPointer(), "resize", purego.NewCallback(fcb)) | |
| 230 | 230 | } | |
| 231 | 231 | ||
| 232 | 232 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkdropcontrollermotion.go +6 -6
| @@ -93,7 +93,7 @@ func (c *DropControllerMotion) SetGoPointer(ptr uintptr) { | |||
| 93 | 93 | } | |
| 94 | 94 | ||
| 95 | 95 | // Signals that the pointer has entered the widget. | |
| 96 | - | func (x *DropControllerMotion) ConnectEnter(cb func(DropControllerMotion, float64, float64)) { | |
| 96 | + | func (x *DropControllerMotion) ConnectEnter(cb func(DropControllerMotion, float64, float64)) uint32 { | |
| 97 | 97 | fcb := func(clsPtr uintptr, XVarp float64, YVarp float64) { | |
| 98 | 98 | fa := DropControllerMotion{} | |
| 99 | 99 | fa.Ptr = clsPtr | |
| @@ -101,11 +101,11 @@ func (x *DropControllerMotion) ConnectEnter(cb func(DropControllerMotion, float6 | |||
| 101 | 101 | cb(fa, XVarp, YVarp) | |
| 102 | 102 | ||
| 103 | 103 | } | |
| 104 | - | gobject.ObjectConnect(x.GoPointer(), "signal::enter", purego.NewCallback(fcb)) | |
| 104 | + | return gobject.SignalConnect(x.GoPointer(), "enter", purego.NewCallback(fcb)) | |
| 105 | 105 | } | |
| 106 | 106 | ||
| 107 | 107 | // Signals that the pointer has left the widget. | |
| 108 | - | func (x *DropControllerMotion) ConnectLeave(cb func(DropControllerMotion)) { | |
| 108 | + | func (x *DropControllerMotion) ConnectLeave(cb func(DropControllerMotion)) uint32 { | |
| 109 | 109 | fcb := func(clsPtr uintptr) { | |
| 110 | 110 | fa := DropControllerMotion{} | |
| 111 | 111 | fa.Ptr = clsPtr | |
| @@ -113,11 +113,11 @@ func (x *DropControllerMotion) ConnectLeave(cb func(DropControllerMotion)) { | |||
| 113 | 113 | cb(fa) | |
| 114 | 114 | ||
| 115 | 115 | } | |
| 116 | - | gobject.ObjectConnect(x.GoPointer(), "signal::leave", purego.NewCallback(fcb)) | |
| 116 | + | return gobject.SignalConnect(x.GoPointer(), "leave", purego.NewCallback(fcb)) | |
| 117 | 117 | } | |
| 118 | 118 | ||
| 119 | 119 | // Emitted when the pointer moves inside the widget. | |
| 120 | - | func (x *DropControllerMotion) ConnectMotion(cb func(DropControllerMotion, float64, float64)) { | |
| 120 | + | func (x *DropControllerMotion) ConnectMotion(cb func(DropControllerMotion, float64, float64)) uint32 { | |
| 121 | 121 | fcb := func(clsPtr uintptr, XVarp float64, YVarp float64) { | |
| 122 | 122 | fa := DropControllerMotion{} | |
| 123 | 123 | fa.Ptr = clsPtr | |
| @@ -125,7 +125,7 @@ func (x *DropControllerMotion) ConnectMotion(cb func(DropControllerMotion, float | |||
| 125 | 125 | cb(fa, XVarp, YVarp) | |
| 126 | 126 | ||
| 127 | 127 | } | |
| 128 | - | gobject.ObjectConnect(x.GoPointer(), "signal::motion", purego.NewCallback(fcb)) | |
| 128 | + | return gobject.SignalConnect(x.GoPointer(), "motion", purego.NewCallback(fcb)) | |
| 129 | 129 | } | |
| 130 | 130 | ||
| 131 | 131 | func init() { | |
M v4/gtk/gtkdropdown.go +2 -2
| @@ -304,7 +304,7 @@ func (c *DropDown) SetGoPointer(ptr uintptr) { | |||
| 304 | 304 | // | |
| 305 | 305 | // The `::activate` signal on `GtkDropDown` is an action signal and | |
| 306 | 306 | // emitting it causes the drop down to pop up its dropdown. | |
| 307 | - | func (x *DropDown) ConnectActivate(cb func(DropDown)) { | |
| 307 | + | func (x *DropDown) ConnectActivate(cb func(DropDown)) uint32 { | |
| 308 | 308 | fcb := func(clsPtr uintptr) { | |
| 309 | 309 | fa := DropDown{} | |
| 310 | 310 | fa.Ptr = clsPtr | |
| @@ -312,7 +312,7 @@ func (x *DropDown) ConnectActivate(cb func(DropDown)) { | |||
| 312 | 312 | cb(fa) | |
| 313 | 313 | ||
| 314 | 314 | } | |
| 315 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 315 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 316 | 316 | } | |
| 317 | 317 | ||
| 318 | 318 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkdroptarget.go +10 -10
| @@ -270,7 +270,7 @@ func (c *DropTarget) SetGoPointer(ptr uintptr) { | |||
| 270 | 270 | // [property@Gtk.DropTarget:preload] property should be set and the value | |
| 271 | 271 | // should be inspected via the ::notify:value signal, calling | |
| 272 | 272 | // [method@Gtk.DropTarget.reject] if required. | |
| 273 | - | func (x *DropTarget) ConnectAccept(cb func(DropTarget, uintptr) bool) { | |
| 273 | + | func (x *DropTarget) ConnectAccept(cb func(DropTarget, uintptr) bool) uint32 { | |
| 274 | 274 | fcb := func(clsPtr uintptr, DropVarp uintptr) bool { | |
| 275 | 275 | fa := DropTarget{} | |
| 276 | 276 | fa.Ptr = clsPtr | |
| @@ -278,7 +278,7 @@ func (x *DropTarget) ConnectAccept(cb func(DropTarget, uintptr) bool) { | |||
| 278 | 278 | return cb(fa, DropVarp) | |
| 279 | 279 | ||
| 280 | 280 | } | |
| 281 | - | gobject.ObjectConnect(x.GoPointer(), "signal::accept", purego.NewCallback(fcb)) | |
| 281 | + | return gobject.SignalConnect(x.GoPointer(), "accept", purego.NewCallback(fcb)) | |
| 282 | 282 | } | |
| 283 | 283 | ||
| 284 | 284 | // Emitted on the drop site when the user drops the data onto the widget. | |
| @@ -290,7 +290,7 @@ func (x *DropTarget) ConnectAccept(cb func(DropTarget, uintptr) bool) { | |||
| 290 | 290 | // Otherwise, the handler returns %TRUE. In this case, this handler will | |
| 291 | 291 | // accept the drop. The handler is responsible for using the given @value | |
| 292 | 292 | // and performing the drop operation. | |
| 293 | - | func (x *DropTarget) ConnectDrop(cb func(DropTarget, uintptr, float64, float64) bool) { | |
| 293 | + | func (x *DropTarget) ConnectDrop(cb func(DropTarget, uintptr, float64, float64) bool) uint32 { | |
| 294 | 294 | fcb := func(clsPtr uintptr, ValueVarp uintptr, XVarp float64, YVarp float64) bool { | |
| 295 | 295 | fa := DropTarget{} | |
| 296 | 296 | fa.Ptr = clsPtr | |
| @@ -298,13 +298,13 @@ func (x *DropTarget) ConnectDrop(cb func(DropTarget, uintptr, float64, float64) | |||
| 298 | 298 | return cb(fa, ValueVarp, XVarp, YVarp) | |
| 299 | 299 | ||
| 300 | 300 | } | |
| 301 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drop", purego.NewCallback(fcb)) | |
| 301 | + | return gobject.SignalConnect(x.GoPointer(), "drop", purego.NewCallback(fcb)) | |
| 302 | 302 | } | |
| 303 | 303 | ||
| 304 | 304 | // Emitted on the drop site when the pointer enters the widget. | |
| 305 | 305 | // | |
| 306 | 306 | // It can be used to set up custom highlighting. | |
| 307 | - | func (x *DropTarget) ConnectEnter(cb func(DropTarget, float64, float64) gdk.DragAction) { | |
| 307 | + | func (x *DropTarget) ConnectEnter(cb func(DropTarget, float64, float64) gdk.DragAction) uint32 { | |
| 308 | 308 | fcb := func(clsPtr uintptr, XVarp float64, YVarp float64) gdk.DragAction { | |
| 309 | 309 | fa := DropTarget{} | |
| 310 | 310 | fa.Ptr = clsPtr | |
| @@ -312,14 +312,14 @@ func (x *DropTarget) ConnectEnter(cb func(DropTarget, float64, float64) gdk.Drag | |||
| 312 | 312 | return cb(fa, XVarp, YVarp) | |
| 313 | 313 | ||
| 314 | 314 | } | |
| 315 | - | gobject.ObjectConnect(x.GoPointer(), "signal::enter", purego.NewCallback(fcb)) | |
| 315 | + | return gobject.SignalConnect(x.GoPointer(), "enter", purego.NewCallback(fcb)) | |
| 316 | 316 | } | |
| 317 | 317 | ||
| 318 | 318 | // Emitted on the drop site when the pointer leaves the widget. | |
| 319 | 319 | // | |
| 320 | 320 | // Its main purpose it to undo things done in | |
| 321 | 321 | // [signal@Gtk.DropTarget::enter]. | |
| 322 | - | func (x *DropTarget) ConnectLeave(cb func(DropTarget)) { | |
| 322 | + | func (x *DropTarget) ConnectLeave(cb func(DropTarget)) uint32 { | |
| 323 | 323 | fcb := func(clsPtr uintptr) { | |
| 324 | 324 | fa := DropTarget{} | |
| 325 | 325 | fa.Ptr = clsPtr | |
| @@ -327,11 +327,11 @@ func (x *DropTarget) ConnectLeave(cb func(DropTarget)) { | |||
| 327 | 327 | cb(fa) | |
| 328 | 328 | ||
| 329 | 329 | } | |
| 330 | - | gobject.ObjectConnect(x.GoPointer(), "signal::leave", purego.NewCallback(fcb)) | |
| 330 | + | return gobject.SignalConnect(x.GoPointer(), "leave", purego.NewCallback(fcb)) | |
| 331 | 331 | } | |
| 332 | 332 | ||
| 333 | 333 | // Emitted while the pointer is moving over the drop target. | |
| 334 | - | func (x *DropTarget) ConnectMotion(cb func(DropTarget, float64, float64) gdk.DragAction) { | |
| 334 | + | func (x *DropTarget) ConnectMotion(cb func(DropTarget, float64, float64) gdk.DragAction) uint32 { | |
| 335 | 335 | fcb := func(clsPtr uintptr, XVarp float64, YVarp float64) gdk.DragAction { | |
| 336 | 336 | fa := DropTarget{} | |
| 337 | 337 | fa.Ptr = clsPtr | |
| @@ -339,7 +339,7 @@ func (x *DropTarget) ConnectMotion(cb func(DropTarget, float64, float64) gdk.Dra | |||
| 339 | 339 | return cb(fa, XVarp, YVarp) | |
| 340 | 340 | ||
| 341 | 341 | } | |
| 342 | - | gobject.ObjectConnect(x.GoPointer(), "signal::motion", purego.NewCallback(fcb)) | |
| 342 | + | return gobject.SignalConnect(x.GoPointer(), "motion", purego.NewCallback(fcb)) | |
| 343 | 343 | } | |
| 344 | 344 | ||
| 345 | 345 | func init() { | |
M v4/gtk/gtkdroptargetasync.go +10 -10
| @@ -145,7 +145,7 @@ func (c *DropTargetAsync) SetGoPointer(ptr uintptr) { | |||
| 145 | 145 | // further processing, such as inspecting the data, this function should | |
| 146 | 146 | // return %TRUE and proceed as is @drop was accepted and if it decides to | |
| 147 | 147 | // reject the drop later, it should call [method@Gtk.DropTargetAsync.reject_drop]. | |
| 148 | - | func (x *DropTargetAsync) ConnectAccept(cb func(DropTargetAsync, uintptr) bool) { | |
| 148 | + | func (x *DropTargetAsync) ConnectAccept(cb func(DropTargetAsync, uintptr) bool) uint32 { | |
| 149 | 149 | fcb := func(clsPtr uintptr, DropVarp uintptr) bool { | |
| 150 | 150 | fa := DropTargetAsync{} | |
| 151 | 151 | fa.Ptr = clsPtr | |
| @@ -153,13 +153,13 @@ func (x *DropTargetAsync) ConnectAccept(cb func(DropTargetAsync, uintptr) bool) | |||
| 153 | 153 | return cb(fa, DropVarp) | |
| 154 | 154 | ||
| 155 | 155 | } | |
| 156 | - | gobject.ObjectConnect(x.GoPointer(), "signal::accept", purego.NewCallback(fcb)) | |
| 156 | + | return gobject.SignalConnect(x.GoPointer(), "accept", purego.NewCallback(fcb)) | |
| 157 | 157 | } | |
| 158 | 158 | ||
| 159 | 159 | // Emitted on the drop site when the pointer enters the widget. | |
| 160 | 160 | // | |
| 161 | 161 | // It can be used to set up custom highlighting. | |
| 162 | - | func (x *DropTargetAsync) ConnectDragEnter(cb func(DropTargetAsync, uintptr, float64, float64) gdk.DragAction) { | |
| 162 | + | func (x *DropTargetAsync) ConnectDragEnter(cb func(DropTargetAsync, uintptr, float64, float64) gdk.DragAction) uint32 { | |
| 163 | 163 | fcb := func(clsPtr uintptr, DropVarp uintptr, XVarp float64, YVarp float64) gdk.DragAction { | |
| 164 | 164 | fa := DropTargetAsync{} | |
| 165 | 165 | fa.Ptr = clsPtr | |
| @@ -167,14 +167,14 @@ func (x *DropTargetAsync) ConnectDragEnter(cb func(DropTargetAsync, uintptr, flo | |||
| 167 | 167 | return cb(fa, DropVarp, XVarp, YVarp) | |
| 168 | 168 | ||
| 169 | 169 | } | |
| 170 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drag-enter", purego.NewCallback(fcb)) | |
| 170 | + | return gobject.SignalConnect(x.GoPointer(), "drag-enter", purego.NewCallback(fcb)) | |
| 171 | 171 | } | |
| 172 | 172 | ||
| 173 | 173 | // Emitted on the drop site when the pointer leaves the widget. | |
| 174 | 174 | // | |
| 175 | 175 | // Its main purpose it to undo things done in | |
| 176 | 176 | // `GtkDropTargetAsync`::drag-enter. | |
| 177 | - | func (x *DropTargetAsync) ConnectDragLeave(cb func(DropTargetAsync, uintptr)) { | |
| 177 | + | func (x *DropTargetAsync) ConnectDragLeave(cb func(DropTargetAsync, uintptr)) uint32 { | |
| 178 | 178 | fcb := func(clsPtr uintptr, DropVarp uintptr) { | |
| 179 | 179 | fa := DropTargetAsync{} | |
| 180 | 180 | fa.Ptr = clsPtr | |
| @@ -182,11 +182,11 @@ func (x *DropTargetAsync) ConnectDragLeave(cb func(DropTargetAsync, uintptr)) { | |||
| 182 | 182 | cb(fa, DropVarp) | |
| 183 | 183 | ||
| 184 | 184 | } | |
| 185 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drag-leave", purego.NewCallback(fcb)) | |
| 185 | + | return gobject.SignalConnect(x.GoPointer(), "drag-leave", purego.NewCallback(fcb)) | |
| 186 | 186 | } | |
| 187 | 187 | ||
| 188 | 188 | // Emitted while the pointer is moving over the drop target. | |
| 189 | - | func (x *DropTargetAsync) ConnectDragMotion(cb func(DropTargetAsync, uintptr, float64, float64) gdk.DragAction) { | |
| 189 | + | func (x *DropTargetAsync) ConnectDragMotion(cb func(DropTargetAsync, uintptr, float64, float64) gdk.DragAction) uint32 { | |
| 190 | 190 | fcb := func(clsPtr uintptr, DropVarp uintptr, XVarp float64, YVarp float64) gdk.DragAction { | |
| 191 | 191 | fa := DropTargetAsync{} | |
| 192 | 192 | fa.Ptr = clsPtr | |
| @@ -194,7 +194,7 @@ func (x *DropTargetAsync) ConnectDragMotion(cb func(DropTargetAsync, uintptr, fl | |||
| 194 | 194 | return cb(fa, DropVarp, XVarp, YVarp) | |
| 195 | 195 | ||
| 196 | 196 | } | |
| 197 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drag-motion", purego.NewCallback(fcb)) | |
| 197 | + | return gobject.SignalConnect(x.GoPointer(), "drag-motion", purego.NewCallback(fcb)) | |
| 198 | 198 | } | |
| 199 | 199 | ||
| 200 | 200 | // Emitted on the drop site when the user drops the data onto the widget. | |
| @@ -211,7 +211,7 @@ func (x *DropTargetAsync) ConnectDragMotion(cb func(DropTargetAsync, uintptr, fl | |||
| 211 | 211 | // To receive the data, use one of the read functions provided by | |
| 212 | 212 | // [class@Gdk.Drop] such as [method@Gdk.Drop.read_async] or | |
| 213 | 213 | // [method@Gdk.Drop.read_value_async]. | |
| 214 | - | func (x *DropTargetAsync) ConnectDrop(cb func(DropTargetAsync, uintptr, float64, float64) bool) { | |
| 214 | + | func (x *DropTargetAsync) ConnectDrop(cb func(DropTargetAsync, uintptr, float64, float64) bool) uint32 { | |
| 215 | 215 | fcb := func(clsPtr uintptr, DropVarp uintptr, XVarp float64, YVarp float64) bool { | |
| 216 | 216 | fa := DropTargetAsync{} | |
| 217 | 217 | fa.Ptr = clsPtr | |
| @@ -219,7 +219,7 @@ func (x *DropTargetAsync) ConnectDrop(cb func(DropTargetAsync, uintptr, float64, | |||
| 219 | 219 | return cb(fa, DropVarp, XVarp, YVarp) | |
| 220 | 220 | ||
| 221 | 221 | } | |
| 222 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drop", purego.NewCallback(fcb)) | |
| 222 | + | return gobject.SignalConnect(x.GoPointer(), "drop", purego.NewCallback(fcb)) | |
| 223 | 223 | } | |
| 224 | 224 | ||
| 225 | 225 | func init() { | |
M v4/gtk/gtkemojichooser.go +2 -2
| @@ -78,7 +78,7 @@ func (c *EmojiChooser) SetGoPointer(ptr uintptr) { | |||
| 78 | 78 | } | |
| 79 | 79 | ||
| 80 | 80 | // Emitted when the user selects an Emoji. | |
| 81 | - | func (x *EmojiChooser) ConnectEmojiPicked(cb func(EmojiChooser, string)) { | |
| 81 | + | func (x *EmojiChooser) ConnectEmojiPicked(cb func(EmojiChooser, string)) uint32 { | |
| 82 | 82 | fcb := func(clsPtr uintptr, TextVarp string) { | |
| 83 | 83 | fa := EmojiChooser{} | |
| 84 | 84 | fa.Ptr = clsPtr | |
| @@ -86,7 +86,7 @@ func (x *EmojiChooser) ConnectEmojiPicked(cb func(EmojiChooser, string)) { | |||
| 86 | 86 | cb(fa, TextVarp) | |
| 87 | 87 | ||
| 88 | 88 | } | |
| 89 | - | gobject.ObjectConnect(x.GoPointer(), "signal::emoji-picked", purego.NewCallback(fcb)) | |
| 89 | + | return gobject.SignalConnect(x.GoPointer(), "emoji-picked", purego.NewCallback(fcb)) | |
| 90 | 90 | } | |
| 91 | 91 | ||
| 92 | 92 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkentry.go +6 -6
| @@ -910,7 +910,7 @@ func (c *Entry) SetGoPointer(ptr uintptr) { | |||
| 910 | 910 | // Emitted when the entry is activated. | |
| 911 | 911 | // | |
| 912 | 912 | // The keybindings for this signal are all forms of the Enter key. | |
| 913 | - | func (x *Entry) ConnectActivate(cb func(Entry)) { | |
| 913 | + | func (x *Entry) ConnectActivate(cb func(Entry)) uint32 { | |
| 914 | 914 | fcb := func(clsPtr uintptr) { | |
| 915 | 915 | fa := Entry{} | |
| 916 | 916 | fa.Ptr = clsPtr | |
| @@ -918,11 +918,11 @@ func (x *Entry) ConnectActivate(cb func(Entry)) { | |||
| 918 | 918 | cb(fa) | |
| 919 | 919 | ||
| 920 | 920 | } | |
| 921 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 921 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 922 | 922 | } | |
| 923 | 923 | ||
| 924 | 924 | // Emitted when an activatable icon is clicked. | |
| 925 | - | func (x *Entry) ConnectIconPress(cb func(Entry, EntryIconPosition)) { | |
| 925 | + | func (x *Entry) ConnectIconPress(cb func(Entry, EntryIconPosition)) uint32 { | |
| 926 | 926 | fcb := func(clsPtr uintptr, IconPosVarp EntryIconPosition) { | |
| 927 | 927 | fa := Entry{} | |
| 928 | 928 | fa.Ptr = clsPtr | |
| @@ -930,12 +930,12 @@ func (x *Entry) ConnectIconPress(cb func(Entry, EntryIconPosition)) { | |||
| 930 | 930 | cb(fa, IconPosVarp) | |
| 931 | 931 | ||
| 932 | 932 | } | |
| 933 | - | gobject.ObjectConnect(x.GoPointer(), "signal::icon-press", purego.NewCallback(fcb)) | |
| 933 | + | return gobject.SignalConnect(x.GoPointer(), "icon-press", purego.NewCallback(fcb)) | |
| 934 | 934 | } | |
| 935 | 935 | ||
| 936 | 936 | // Emitted on the button release from a mouse click | |
| 937 | 937 | // over an activatable icon. | |
| 938 | - | func (x *Entry) ConnectIconRelease(cb func(Entry, EntryIconPosition)) { | |
| 938 | + | func (x *Entry) ConnectIconRelease(cb func(Entry, EntryIconPosition)) uint32 { | |
| 939 | 939 | fcb := func(clsPtr uintptr, IconPosVarp EntryIconPosition) { | |
| 940 | 940 | fa := Entry{} | |
| 941 | 941 | fa.Ptr = clsPtr | |
| @@ -943,7 +943,7 @@ func (x *Entry) ConnectIconRelease(cb func(Entry, EntryIconPosition)) { | |||
| 943 | 943 | cb(fa, IconPosVarp) | |
| 944 | 944 | ||
| 945 | 945 | } | |
| 946 | - | gobject.ObjectConnect(x.GoPointer(), "signal::icon-release", purego.NewCallback(fcb)) | |
| 946 | + | return gobject.SignalConnect(x.GoPointer(), "icon-release", purego.NewCallback(fcb)) | |
| 947 | 947 | } | |
| 948 | 948 | ||
| 949 | 949 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkentrybuffer.go +4 -4
| @@ -183,7 +183,7 @@ func (c *EntryBuffer) SetGoPointer(ptr uintptr) { | |||
| 183 | 183 | // | |
| 184 | 184 | // If you want access to the text after the text has been modified, | |
| 185 | 185 | // use %G_CONNECT_AFTER. | |
| 186 | - | func (x *EntryBuffer) ConnectDeletedText(cb func(EntryBuffer, uint, uint)) { | |
| 186 | + | func (x *EntryBuffer) ConnectDeletedText(cb func(EntryBuffer, uint, uint)) uint32 { | |
| 187 | 187 | fcb := func(clsPtr uintptr, PositionVarp uint, NCharsVarp uint) { | |
| 188 | 188 | fa := EntryBuffer{} | |
| 189 | 189 | fa.Ptr = clsPtr | |
| @@ -191,11 +191,11 @@ func (x *EntryBuffer) ConnectDeletedText(cb func(EntryBuffer, uint, uint)) { | |||
| 191 | 191 | cb(fa, PositionVarp, NCharsVarp) | |
| 192 | 192 | ||
| 193 | 193 | } | |
| 194 | - | gobject.ObjectConnect(x.GoPointer(), "signal::deleted-text", purego.NewCallback(fcb)) | |
| 194 | + | return gobject.SignalConnect(x.GoPointer(), "deleted-text", purego.NewCallback(fcb)) | |
| 195 | 195 | } | |
| 196 | 196 | ||
| 197 | 197 | // This signal is emitted after text is inserted into the buffer. | |
| 198 | - | func (x *EntryBuffer) ConnectInsertedText(cb func(EntryBuffer, uint, string, uint)) { | |
| 198 | + | func (x *EntryBuffer) ConnectInsertedText(cb func(EntryBuffer, uint, string, uint)) uint32 { | |
| 199 | 199 | fcb := func(clsPtr uintptr, PositionVarp uint, CharsVarp string, NCharsVarp uint) { | |
| 200 | 200 | fa := EntryBuffer{} | |
| 201 | 201 | fa.Ptr = clsPtr | |
| @@ -203,7 +203,7 @@ func (x *EntryBuffer) ConnectInsertedText(cb func(EntryBuffer, uint, string, uin | |||
| 203 | 203 | cb(fa, PositionVarp, CharsVarp, NCharsVarp) | |
| 204 | 204 | ||
| 205 | 205 | } | |
| 206 | - | gobject.ObjectConnect(x.GoPointer(), "signal::inserted-text", purego.NewCallback(fcb)) | |
| 206 | + | return gobject.SignalConnect(x.GoPointer(), "inserted-text", purego.NewCallback(fcb)) | |
| 207 | 207 | } | |
| 208 | 208 | ||
| 209 | 209 | func init() { | |
M v4/gtk/gtkentrycompletion.go +8 -8
| @@ -374,7 +374,7 @@ func (c *EntryCompletion) SetGoPointer(ptr uintptr) { | |||
| 374 | 374 | // | |
| 375 | 375 | // Note that @model is the model that was passed to | |
| 376 | 376 | // [method@Gtk.EntryCompletion.set_model]. | |
| 377 | - | func (x *EntryCompletion) ConnectCursorOnMatch(cb func(EntryCompletion, uintptr, uintptr) bool) { | |
| 377 | + | func (x *EntryCompletion) ConnectCursorOnMatch(cb func(EntryCompletion, uintptr, uintptr) bool) uint32 { | |
| 378 | 378 | fcb := func(clsPtr uintptr, ModelVarp uintptr, IterVarp uintptr) bool { | |
| 379 | 379 | fa := EntryCompletion{} | |
| 380 | 380 | fa.Ptr = clsPtr | |
| @@ -382,7 +382,7 @@ func (x *EntryCompletion) ConnectCursorOnMatch(cb func(EntryCompletion, uintptr, | |||
| 382 | 382 | return cb(fa, ModelVarp, IterVarp) | |
| 383 | 383 | ||
| 384 | 384 | } | |
| 385 | - | gobject.ObjectConnect(x.GoPointer(), "signal::cursor-on-match", purego.NewCallback(fcb)) | |
| 385 | + | return gobject.SignalConnect(x.GoPointer(), "cursor-on-match", purego.NewCallback(fcb)) | |
| 386 | 386 | } | |
| 387 | 387 | ||
| 388 | 388 | // Emitted when the inline autocompletion is triggered. | |
| @@ -394,7 +394,7 @@ func (x *EntryCompletion) ConnectCursorOnMatch(cb func(EntryCompletion, uintptr, | |||
| 394 | 394 | // smaller part of the @prefix into the entry - e.g. the entry used in | |
| 395 | 395 | // the `GtkFileChooser` inserts only the part of the prefix up to the | |
| 396 | 396 | // next '/'. | |
| 397 | - | func (x *EntryCompletion) ConnectInsertPrefix(cb func(EntryCompletion, string) bool) { | |
| 397 | + | func (x *EntryCompletion) ConnectInsertPrefix(cb func(EntryCompletion, string) bool) uint32 { | |
| 398 | 398 | fcb := func(clsPtr uintptr, PrefixVarp string) bool { | |
| 399 | 399 | fa := EntryCompletion{} | |
| 400 | 400 | fa.Ptr = clsPtr | |
| @@ -402,7 +402,7 @@ func (x *EntryCompletion) ConnectInsertPrefix(cb func(EntryCompletion, string) b | |||
| 402 | 402 | return cb(fa, PrefixVarp) | |
| 403 | 403 | ||
| 404 | 404 | } | |
| 405 | - | gobject.ObjectConnect(x.GoPointer(), "signal::insert-prefix", purego.NewCallback(fcb)) | |
| 405 | + | return gobject.SignalConnect(x.GoPointer(), "insert-prefix", purego.NewCallback(fcb)) | |
| 406 | 406 | } | |
| 407 | 407 | ||
| 408 | 408 | // Emitted when a match from the list is selected. | |
| @@ -413,7 +413,7 @@ func (x *EntryCompletion) ConnectInsertPrefix(cb func(EntryCompletion, string) b | |||
| 413 | 413 | // | |
| 414 | 414 | // Note that @model is the model that was passed to | |
| 415 | 415 | // [method@Gtk.EntryCompletion.set_model]. | |
| 416 | - | func (x *EntryCompletion) ConnectMatchSelected(cb func(EntryCompletion, uintptr, uintptr) bool) { | |
| 416 | + | func (x *EntryCompletion) ConnectMatchSelected(cb func(EntryCompletion, uintptr, uintptr) bool) uint32 { | |
| 417 | 417 | fcb := func(clsPtr uintptr, ModelVarp uintptr, IterVarp uintptr) bool { | |
| 418 | 418 | fa := EntryCompletion{} | |
| 419 | 419 | fa.Ptr = clsPtr | |
| @@ -421,14 +421,14 @@ func (x *EntryCompletion) ConnectMatchSelected(cb func(EntryCompletion, uintptr, | |||
| 421 | 421 | return cb(fa, ModelVarp, IterVarp) | |
| 422 | 422 | ||
| 423 | 423 | } | |
| 424 | - | gobject.ObjectConnect(x.GoPointer(), "signal::match-selected", purego.NewCallback(fcb)) | |
| 424 | + | return gobject.SignalConnect(x.GoPointer(), "match-selected", purego.NewCallback(fcb)) | |
| 425 | 425 | } | |
| 426 | 426 | ||
| 427 | 427 | // Emitted when the filter model has zero | |
| 428 | 428 | // number of rows in completion_complete method. | |
| 429 | 429 | // | |
| 430 | 430 | // In other words when `GtkEntryCompletion` is out of suggestions. | |
| 431 | - | func (x *EntryCompletion) ConnectNoMatches(cb func(EntryCompletion)) { | |
| 431 | + | func (x *EntryCompletion) ConnectNoMatches(cb func(EntryCompletion)) uint32 { | |
| 432 | 432 | fcb := func(clsPtr uintptr) { | |
| 433 | 433 | fa := EntryCompletion{} | |
| 434 | 434 | fa.Ptr = clsPtr | |
| @@ -436,7 +436,7 @@ func (x *EntryCompletion) ConnectNoMatches(cb func(EntryCompletion)) { | |||
| 436 | 436 | cb(fa) | |
| 437 | 437 | ||
| 438 | 438 | } | |
| 439 | - | gobject.ObjectConnect(x.GoPointer(), "signal::no-matches", purego.NewCallback(fcb)) | |
| 439 | + | return gobject.SignalConnect(x.GoPointer(), "no-matches", purego.NewCallback(fcb)) | |
| 440 | 440 | } | |
| 441 | 441 | ||
| 442 | 442 | // Gets the ID of the @buildable object. | |
M v4/gtk/gtkeventcontrollerfocus.go +4 -4
| @@ -81,7 +81,7 @@ func (c *EventControllerFocus) SetGoPointer(ptr uintptr) { | |||
| 81 | 81 | // in these cases, you can monitor the | |
| 82 | 82 | // [property@Gtk.EventControllerFocus:is-focus] | |
| 83 | 83 | // property for changes. | |
| 84 | - | func (x *EventControllerFocus) ConnectEnter(cb func(EventControllerFocus)) { | |
| 84 | + | func (x *EventControllerFocus) ConnectEnter(cb func(EventControllerFocus)) uint32 { | |
| 85 | 85 | fcb := func(clsPtr uintptr) { | |
| 86 | 86 | fa := EventControllerFocus{} | |
| 87 | 87 | fa.Ptr = clsPtr | |
| @@ -89,7 +89,7 @@ func (x *EventControllerFocus) ConnectEnter(cb func(EventControllerFocus)) { | |||
| 89 | 89 | cb(fa) | |
| 90 | 90 | ||
| 91 | 91 | } | |
| 92 | - | gobject.ObjectConnect(x.GoPointer(), "signal::enter", purego.NewCallback(fcb)) | |
| 92 | + | return gobject.SignalConnect(x.GoPointer(), "enter", purego.NewCallback(fcb)) | |
| 93 | 93 | } | |
| 94 | 94 | ||
| 95 | 95 | // Emitted whenever the focus leaves the widget hierarchy | |
| @@ -101,7 +101,7 @@ func (x *EventControllerFocus) ConnectEnter(cb func(EventControllerFocus)) { | |||
| 101 | 101 | // to a descendent). If you are interested in these cases, you | |
| 102 | 102 | // can monitor the [property@Gtk.EventControllerFocus:is-focus] | |
| 103 | 103 | // property for changes. | |
| 104 | - | func (x *EventControllerFocus) ConnectLeave(cb func(EventControllerFocus)) { | |
| 104 | + | func (x *EventControllerFocus) ConnectLeave(cb func(EventControllerFocus)) uint32 { | |
| 105 | 105 | fcb := func(clsPtr uintptr) { | |
| 106 | 106 | fa := EventControllerFocus{} | |
| 107 | 107 | fa.Ptr = clsPtr | |
| @@ -109,7 +109,7 @@ func (x *EventControllerFocus) ConnectLeave(cb func(EventControllerFocus)) { | |||
| 109 | 109 | cb(fa) | |
| 110 | 110 | ||
| 111 | 111 | } | |
| 112 | - | gobject.ObjectConnect(x.GoPointer(), "signal::leave", purego.NewCallback(fcb)) | |
| 112 | + | return gobject.SignalConnect(x.GoPointer(), "leave", purego.NewCallback(fcb)) | |
| 113 | 113 | } | |
| 114 | 114 | ||
| 115 | 115 | func init() { | |
M v4/gtk/gtkeventcontrollerkey.go +8 -8
| @@ -103,7 +103,7 @@ func (c *EventControllerKey) SetGoPointer(ptr uintptr) { | |||
| 103 | 103 | // | |
| 104 | 104 | // See [method@Gtk.EventControllerKey.set_im_context] and | |
| 105 | 105 | // [method@Gtk.IMContext.filter_keypress]. | |
| 106 | - | func (x *EventControllerKey) ConnectImUpdate(cb func(EventControllerKey)) { | |
| 106 | + | func (x *EventControllerKey) ConnectImUpdate(cb func(EventControllerKey)) uint32 { | |
| 107 | 107 | fcb := func(clsPtr uintptr) { | |
| 108 | 108 | fa := EventControllerKey{} | |
| 109 | 109 | fa.Ptr = clsPtr | |
| @@ -111,11 +111,11 @@ func (x *EventControllerKey) ConnectImUpdate(cb func(EventControllerKey)) { | |||
| 111 | 111 | cb(fa) | |
| 112 | 112 | ||
| 113 | 113 | } | |
| 114 | - | gobject.ObjectConnect(x.GoPointer(), "signal::im-update", purego.NewCallback(fcb)) | |
| 114 | + | return gobject.SignalConnect(x.GoPointer(), "im-update", purego.NewCallback(fcb)) | |
| 115 | 115 | } | |
| 116 | 116 | ||
| 117 | 117 | // Emitted whenever a key is pressed. | |
| 118 | - | func (x *EventControllerKey) ConnectKeyPressed(cb func(EventControllerKey, uint, uint, gdk.ModifierType) bool) { | |
| 118 | + | func (x *EventControllerKey) ConnectKeyPressed(cb func(EventControllerKey, uint, uint, gdk.ModifierType) bool) uint32 { | |
| 119 | 119 | fcb := func(clsPtr uintptr, KeyvalVarp uint, KeycodeVarp uint, StateVarp gdk.ModifierType) bool { | |
| 120 | 120 | fa := EventControllerKey{} | |
| 121 | 121 | fa.Ptr = clsPtr | |
| @@ -123,11 +123,11 @@ func (x *EventControllerKey) ConnectKeyPressed(cb func(EventControllerKey, uint, | |||
| 123 | 123 | return cb(fa, KeyvalVarp, KeycodeVarp, StateVarp) | |
| 124 | 124 | ||
| 125 | 125 | } | |
| 126 | - | gobject.ObjectConnect(x.GoPointer(), "signal::key-pressed", purego.NewCallback(fcb)) | |
| 126 | + | return gobject.SignalConnect(x.GoPointer(), "key-pressed", purego.NewCallback(fcb)) | |
| 127 | 127 | } | |
| 128 | 128 | ||
| 129 | 129 | // Emitted whenever a key is released. | |
| 130 | - | func (x *EventControllerKey) ConnectKeyReleased(cb func(EventControllerKey, uint, uint, gdk.ModifierType)) { | |
| 130 | + | func (x *EventControllerKey) ConnectKeyReleased(cb func(EventControllerKey, uint, uint, gdk.ModifierType)) uint32 { | |
| 131 | 131 | fcb := func(clsPtr uintptr, KeyvalVarp uint, KeycodeVarp uint, StateVarp gdk.ModifierType) { | |
| 132 | 132 | fa := EventControllerKey{} | |
| 133 | 133 | fa.Ptr = clsPtr | |
| @@ -135,11 +135,11 @@ func (x *EventControllerKey) ConnectKeyReleased(cb func(EventControllerKey, uint | |||
| 135 | 135 | cb(fa, KeyvalVarp, KeycodeVarp, StateVarp) | |
| 136 | 136 | ||
| 137 | 137 | } | |
| 138 | - | gobject.ObjectConnect(x.GoPointer(), "signal::key-released", purego.NewCallback(fcb)) | |
| 138 | + | return gobject.SignalConnect(x.GoPointer(), "key-released", purego.NewCallback(fcb)) | |
| 139 | 139 | } | |
| 140 | 140 | ||
| 141 | 141 | // Emitted whenever the state of modifier keys and pointer buttons change. | |
| 142 | - | func (x *EventControllerKey) ConnectModifiers(cb func(EventControllerKey, gdk.ModifierType) bool) { | |
| 142 | + | func (x *EventControllerKey) ConnectModifiers(cb func(EventControllerKey, gdk.ModifierType) bool) uint32 { | |
| 143 | 143 | fcb := func(clsPtr uintptr, KeyvalVarp gdk.ModifierType) bool { | |
| 144 | 144 | fa := EventControllerKey{} | |
| 145 | 145 | fa.Ptr = clsPtr | |
| @@ -147,7 +147,7 @@ func (x *EventControllerKey) ConnectModifiers(cb func(EventControllerKey, gdk.Mo | |||
| 147 | 147 | return cb(fa, KeyvalVarp) | |
| 148 | 148 | ||
| 149 | 149 | } | |
| 150 | - | gobject.ObjectConnect(x.GoPointer(), "signal::modifiers", purego.NewCallback(fcb)) | |
| 150 | + | return gobject.SignalConnect(x.GoPointer(), "modifiers", purego.NewCallback(fcb)) | |
| 151 | 151 | } | |
| 152 | 152 | ||
| 153 | 153 | func init() { | |
M v4/gtk/gtkeventcontrollerlegacy.go +2 -2
| @@ -50,7 +50,7 @@ func (c *EventControllerLegacy) SetGoPointer(ptr uintptr) { | |||
| 50 | 50 | } | |
| 51 | 51 | ||
| 52 | 52 | // Emitted for each GDK event delivered to @controller. | |
| 53 | - | func (x *EventControllerLegacy) ConnectEvent(cb func(EventControllerLegacy, uintptr) bool) { | |
| 53 | + | func (x *EventControllerLegacy) ConnectEvent(cb func(EventControllerLegacy, uintptr) bool) uint32 { | |
| 54 | 54 | fcb := func(clsPtr uintptr, EventVarp uintptr) bool { | |
| 55 | 55 | fa := EventControllerLegacy{} | |
| 56 | 56 | fa.Ptr = clsPtr | |
| @@ -58,7 +58,7 @@ func (x *EventControllerLegacy) ConnectEvent(cb func(EventControllerLegacy, uint | |||
| 58 | 58 | return cb(fa, EventVarp) | |
| 59 | 59 | ||
| 60 | 60 | } | |
| 61 | - | gobject.ObjectConnect(x.GoPointer(), "signal::event", purego.NewCallback(fcb)) | |
| 61 | + | return gobject.SignalConnect(x.GoPointer(), "event", purego.NewCallback(fcb)) | |
| 62 | 62 | } | |
| 63 | 63 | ||
| 64 | 64 | func init() { | |
M v4/gtk/gtkeventcontrollermotion.go +6 -6
| @@ -72,7 +72,7 @@ func (c *EventControllerMotion) SetGoPointer(ptr uintptr) { | |||
| 72 | 72 | } | |
| 73 | 73 | ||
| 74 | 74 | // Signals that the pointer has entered the widget. | |
| 75 | - | func (x *EventControllerMotion) ConnectEnter(cb func(EventControllerMotion, float64, float64)) { | |
| 75 | + | func (x *EventControllerMotion) ConnectEnter(cb func(EventControllerMotion, float64, float64)) uint32 { | |
| 76 | 76 | fcb := func(clsPtr uintptr, XVarp float64, YVarp float64) { | |
| 77 | 77 | fa := EventControllerMotion{} | |
| 78 | 78 | fa.Ptr = clsPtr | |
| @@ -80,11 +80,11 @@ func (x *EventControllerMotion) ConnectEnter(cb func(EventControllerMotion, floa | |||
| 80 | 80 | cb(fa, XVarp, YVarp) | |
| 81 | 81 | ||
| 82 | 82 | } | |
| 83 | - | gobject.ObjectConnect(x.GoPointer(), "signal::enter", purego.NewCallback(fcb)) | |
| 83 | + | return gobject.SignalConnect(x.GoPointer(), "enter", purego.NewCallback(fcb)) | |
| 84 | 84 | } | |
| 85 | 85 | ||
| 86 | 86 | // Signals that the pointer has left the widget. | |
| 87 | - | func (x *EventControllerMotion) ConnectLeave(cb func(EventControllerMotion)) { | |
| 87 | + | func (x *EventControllerMotion) ConnectLeave(cb func(EventControllerMotion)) uint32 { | |
| 88 | 88 | fcb := func(clsPtr uintptr) { | |
| 89 | 89 | fa := EventControllerMotion{} | |
| 90 | 90 | fa.Ptr = clsPtr | |
| @@ -92,11 +92,11 @@ func (x *EventControllerMotion) ConnectLeave(cb func(EventControllerMotion)) { | |||
| 92 | 92 | cb(fa) | |
| 93 | 93 | ||
| 94 | 94 | } | |
| 95 | - | gobject.ObjectConnect(x.GoPointer(), "signal::leave", purego.NewCallback(fcb)) | |
| 95 | + | return gobject.SignalConnect(x.GoPointer(), "leave", purego.NewCallback(fcb)) | |
| 96 | 96 | } | |
| 97 | 97 | ||
| 98 | 98 | // Emitted when the pointer moves inside the widget. | |
| 99 | - | func (x *EventControllerMotion) ConnectMotion(cb func(EventControllerMotion, float64, float64)) { | |
| 99 | + | func (x *EventControllerMotion) ConnectMotion(cb func(EventControllerMotion, float64, float64)) uint32 { | |
| 100 | 100 | fcb := func(clsPtr uintptr, XVarp float64, YVarp float64) { | |
| 101 | 101 | fa := EventControllerMotion{} | |
| 102 | 102 | fa.Ptr = clsPtr | |
| @@ -104,7 +104,7 @@ func (x *EventControllerMotion) ConnectMotion(cb func(EventControllerMotion, flo | |||
| 104 | 104 | cb(fa, XVarp, YVarp) | |
| 105 | 105 | ||
| 106 | 106 | } | |
| 107 | - | gobject.ObjectConnect(x.GoPointer(), "signal::motion", purego.NewCallback(fcb)) | |
| 107 | + | return gobject.SignalConnect(x.GoPointer(), "motion", purego.NewCallback(fcb)) | |
| 108 | 108 | } | |
| 109 | 109 | ||
| 110 | 110 | func init() { | |
M v4/gtk/gtkeventcontrollerscroll.go +8 -8
| @@ -135,7 +135,7 @@ func (c *EventControllerScroll) SetGoPointer(ptr uintptr) { | |||
| 135 | 135 | // @vel_x and @vel_y express the initial velocity that was | |
| 136 | 136 | // imprinted by the scroll events. @vel_x and @vel_y are expressed in | |
| 137 | 137 | // pixels/ms. | |
| 138 | - | func (x *EventControllerScroll) ConnectDecelerate(cb func(EventControllerScroll, float64, float64)) { | |
| 138 | + | func (x *EventControllerScroll) ConnectDecelerate(cb func(EventControllerScroll, float64, float64)) uint32 { | |
| 139 | 139 | fcb := func(clsPtr uintptr, VelXVarp float64, VelYVarp float64) { | |
| 140 | 140 | fa := EventControllerScroll{} | |
| 141 | 141 | fa.Ptr = clsPtr | |
| @@ -143,7 +143,7 @@ func (x *EventControllerScroll) ConnectDecelerate(cb func(EventControllerScroll, | |||
| 143 | 143 | cb(fa, VelXVarp, VelYVarp) | |
| 144 | 144 | ||
| 145 | 145 | } | |
| 146 | - | gobject.ObjectConnect(x.GoPointer(), "signal::decelerate", purego.NewCallback(fcb)) | |
| 146 | + | return gobject.SignalConnect(x.GoPointer(), "decelerate", purego.NewCallback(fcb)) | |
| 147 | 147 | } | |
| 148 | 148 | ||
| 149 | 149 | // Signals that the widget should scroll by the | |
| @@ -151,7 +151,7 @@ func (x *EventControllerScroll) ConnectDecelerate(cb func(EventControllerScroll, | |||
| 151 | 151 | // | |
| 152 | 152 | // For the representation unit of the deltas, see | |
| 153 | 153 | // [method@Gtk.EventControllerScroll.get_unit]. | |
| 154 | - | func (x *EventControllerScroll) ConnectScroll(cb func(EventControllerScroll, float64, float64) bool) { | |
| 154 | + | func (x *EventControllerScroll) ConnectScroll(cb func(EventControllerScroll, float64, float64) bool) uint32 { | |
| 155 | 155 | fcb := func(clsPtr uintptr, DxVarp float64, DyVarp float64) bool { | |
| 156 | 156 | fa := EventControllerScroll{} | |
| 157 | 157 | fa.Ptr = clsPtr | |
| @@ -159,13 +159,13 @@ func (x *EventControllerScroll) ConnectScroll(cb func(EventControllerScroll, flo | |||
| 159 | 159 | return cb(fa, DxVarp, DyVarp) | |
| 160 | 160 | ||
| 161 | 161 | } | |
| 162 | - | gobject.ObjectConnect(x.GoPointer(), "signal::scroll", purego.NewCallback(fcb)) | |
| 162 | + | return gobject.SignalConnect(x.GoPointer(), "scroll", purego.NewCallback(fcb)) | |
| 163 | 163 | } | |
| 164 | 164 | ||
| 165 | 165 | // Signals that a new scrolling operation has begun. | |
| 166 | 166 | // | |
| 167 | 167 | // It will only be emitted on devices capable of it. | |
| 168 | - | func (x *EventControllerScroll) ConnectScrollBegin(cb func(EventControllerScroll)) { | |
| 168 | + | func (x *EventControllerScroll) ConnectScrollBegin(cb func(EventControllerScroll)) uint32 { | |
| 169 | 169 | fcb := func(clsPtr uintptr) { | |
| 170 | 170 | fa := EventControllerScroll{} | |
| 171 | 171 | fa.Ptr = clsPtr | |
| @@ -173,13 +173,13 @@ func (x *EventControllerScroll) ConnectScrollBegin(cb func(EventControllerScroll | |||
| 173 | 173 | cb(fa) | |
| 174 | 174 | ||
| 175 | 175 | } | |
| 176 | - | gobject.ObjectConnect(x.GoPointer(), "signal::scroll-begin", purego.NewCallback(fcb)) | |
| 176 | + | return gobject.SignalConnect(x.GoPointer(), "scroll-begin", purego.NewCallback(fcb)) | |
| 177 | 177 | } | |
| 178 | 178 | ||
| 179 | 179 | // Signals that a scrolling operation has finished. | |
| 180 | 180 | // | |
| 181 | 181 | // It will only be emitted on devices capable of it. | |
| 182 | - | func (x *EventControllerScroll) ConnectScrollEnd(cb func(EventControllerScroll)) { | |
| 182 | + | func (x *EventControllerScroll) ConnectScrollEnd(cb func(EventControllerScroll)) uint32 { | |
| 183 | 183 | fcb := func(clsPtr uintptr) { | |
| 184 | 184 | fa := EventControllerScroll{} | |
| 185 | 185 | fa.Ptr = clsPtr | |
| @@ -187,7 +187,7 @@ func (x *EventControllerScroll) ConnectScrollEnd(cb func(EventControllerScroll)) | |||
| 187 | 187 | cb(fa) | |
| 188 | 188 | ||
| 189 | 189 | } | |
| 190 | - | gobject.ObjectConnect(x.GoPointer(), "signal::scroll-end", purego.NewCallback(fcb)) | |
| 190 | + | return gobject.SignalConnect(x.GoPointer(), "scroll-end", purego.NewCallback(fcb)) | |
| 191 | 191 | } | |
| 192 | 192 | ||
| 193 | 193 | func init() { | |
M v4/gtk/gtkexpander.go +2 -2
| @@ -326,7 +326,7 @@ func (c *Expander) SetGoPointer(ptr uintptr) { | |||
| 326 | 326 | } | |
| 327 | 327 | ||
| 328 | 328 | // Activates the `GtkExpander`. | |
| 329 | - | func (x *Expander) ConnectActivate(cb func(Expander)) { | |
| 329 | + | func (x *Expander) ConnectActivate(cb func(Expander)) uint32 { | |
| 330 | 330 | fcb := func(clsPtr uintptr) { | |
| 331 | 331 | fa := Expander{} | |
| 332 | 332 | fa.Ptr = clsPtr | |
| @@ -334,7 +334,7 @@ func (x *Expander) ConnectActivate(cb func(Expander)) { | |||
| 334 | 334 | cb(fa) | |
| 335 | 335 | ||
| 336 | 336 | } | |
| 337 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 337 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 338 | 338 | } | |
| 339 | 339 | ||
| 340 | 340 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkfilechooserwidget.go +24 -24
| @@ -65,7 +65,7 @@ func (c *FileChooserWidget) SetGoPointer(ptr uintptr) { | |||
| 65 | 65 | // folder in the file list. | |
| 66 | 66 | // | |
| 67 | 67 | // The default binding for this signal is <kbd>Alt</kbd>-<kbd>D</kbd>. | |
| 68 | - | func (x *FileChooserWidget) ConnectDesktopFolder(cb func(FileChooserWidget)) { | |
| 68 | + | func (x *FileChooserWidget) ConnectDesktopFolder(cb func(FileChooserWidget)) uint32 { | |
| 69 | 69 | fcb := func(clsPtr uintptr) { | |
| 70 | 70 | fa := FileChooserWidget{} | |
| 71 | 71 | fa.Ptr = clsPtr | |
| @@ -73,7 +73,7 @@ func (x *FileChooserWidget) ConnectDesktopFolder(cb func(FileChooserWidget)) { | |||
| 73 | 73 | cb(fa) | |
| 74 | 74 | ||
| 75 | 75 | } | |
| 76 | - | gobject.ObjectConnect(x.GoPointer(), "signal::desktop-folder", purego.NewCallback(fcb)) | |
| 76 | + | return gobject.SignalConnect(x.GoPointer(), "desktop-folder", purego.NewCallback(fcb)) | |
| 77 | 77 | } | |
| 78 | 78 | ||
| 79 | 79 | // Emitted when the user asks for it. | |
| @@ -88,7 +88,7 @@ func (x *FileChooserWidget) ConnectDesktopFolder(cb func(FileChooserWidget)) { | |||
| 88 | 88 | // switch to the "baz" subfolder. | |
| 89 | 89 | // | |
| 90 | 90 | // The default binding for this signal is <kbd>Alt</kbd>-<kbd>Down</kbd>. | |
| 91 | - | func (x *FileChooserWidget) ConnectDownFolder(cb func(FileChooserWidget)) { | |
| 91 | + | func (x *FileChooserWidget) ConnectDownFolder(cb func(FileChooserWidget)) uint32 { | |
| 92 | 92 | fcb := func(clsPtr uintptr) { | |
| 93 | 93 | fa := FileChooserWidget{} | |
| 94 | 94 | fa.Ptr = clsPtr | |
| @@ -96,7 +96,7 @@ func (x *FileChooserWidget) ConnectDownFolder(cb func(FileChooserWidget)) { | |||
| 96 | 96 | cb(fa) | |
| 97 | 97 | ||
| 98 | 98 | } | |
| 99 | - | gobject.ObjectConnect(x.GoPointer(), "signal::down-folder", purego.NewCallback(fcb)) | |
| 99 | + | return gobject.SignalConnect(x.GoPointer(), "down-folder", purego.NewCallback(fcb)) | |
| 100 | 100 | } | |
| 101 | 101 | ||
| 102 | 102 | // Emitted when the user asks for it. | |
| @@ -107,7 +107,7 @@ func (x *FileChooserWidget) ConnectDownFolder(cb func(FileChooserWidget)) { | |||
| 107 | 107 | // folder in the file list. | |
| 108 | 108 | // | |
| 109 | 109 | // The default binding for this signal is <kbd>Alt</kbd>-<kbd>Home</kbd>. | |
| 110 | - | func (x *FileChooserWidget) ConnectHomeFolder(cb func(FileChooserWidget)) { | |
| 110 | + | func (x *FileChooserWidget) ConnectHomeFolder(cb func(FileChooserWidget)) uint32 { | |
| 111 | 111 | fcb := func(clsPtr uintptr) { | |
| 112 | 112 | fa := FileChooserWidget{} | |
| 113 | 113 | fa.Ptr = clsPtr | |
| @@ -115,7 +115,7 @@ func (x *FileChooserWidget) ConnectHomeFolder(cb func(FileChooserWidget)) { | |||
| 115 | 115 | cb(fa) | |
| 116 | 116 | ||
| 117 | 117 | } | |
| 118 | - | gobject.ObjectConnect(x.GoPointer(), "signal::home-folder", purego.NewCallback(fcb)) | |
| 118 | + | return gobject.SignalConnect(x.GoPointer(), "home-folder", purego.NewCallback(fcb)) | |
| 119 | 119 | } | |
| 120 | 120 | ||
| 121 | 121 | // Emitted when the user asks for it. | |
| @@ -131,7 +131,7 @@ func (x *FileChooserWidget) ConnectHomeFolder(cb func(FileChooserWidget)) { | |||
| 131 | 131 | // type `/` and immediately type a path name. On Unix systems, this is | |
| 132 | 132 | // bound to <kbd>~</kbd> (tilde) with a @path string of "~" itself for | |
| 133 | 133 | // access to home directories. | |
| 134 | - | func (x *FileChooserWidget) ConnectLocationPopup(cb func(FileChooserWidget, string)) { | |
| 134 | + | func (x *FileChooserWidget) ConnectLocationPopup(cb func(FileChooserWidget, string)) uint32 { | |
| 135 | 135 | fcb := func(clsPtr uintptr, PathVarp string) { | |
| 136 | 136 | fa := FileChooserWidget{} | |
| 137 | 137 | fa.Ptr = clsPtr | |
| @@ -139,7 +139,7 @@ func (x *FileChooserWidget) ConnectLocationPopup(cb func(FileChooserWidget, stri | |||
| 139 | 139 | cb(fa, PathVarp) | |
| 140 | 140 | ||
| 141 | 141 | } | |
| 142 | - | gobject.ObjectConnect(x.GoPointer(), "signal::location-popup", purego.NewCallback(fcb)) | |
| 142 | + | return gobject.SignalConnect(x.GoPointer(), "location-popup", purego.NewCallback(fcb)) | |
| 143 | 143 | } | |
| 144 | 144 | ||
| 145 | 145 | // Emitted when the user asks for it. | |
| @@ -150,7 +150,7 @@ func (x *FileChooserWidget) ConnectLocationPopup(cb func(FileChooserWidget, stri | |||
| 150 | 150 | // when the user pastes into a `GtkFileChooserWidget`. | |
| 151 | 151 | // | |
| 152 | 152 | // The default binding for this signal is <kbd>Control</kbd>-<kbd>V</kbd>. | |
| 153 | - | func (x *FileChooserWidget) ConnectLocationPopupOnPaste(cb func(FileChooserWidget)) { | |
| 153 | + | func (x *FileChooserWidget) ConnectLocationPopupOnPaste(cb func(FileChooserWidget)) uint32 { | |
| 154 | 154 | fcb := func(clsPtr uintptr) { | |
| 155 | 155 | fa := FileChooserWidget{} | |
| 156 | 156 | fa.Ptr = clsPtr | |
| @@ -158,7 +158,7 @@ func (x *FileChooserWidget) ConnectLocationPopupOnPaste(cb func(FileChooserWidge | |||
| 158 | 158 | cb(fa) | |
| 159 | 159 | ||
| 160 | 160 | } | |
| 161 | - | gobject.ObjectConnect(x.GoPointer(), "signal::location-popup-on-paste", purego.NewCallback(fcb)) | |
| 161 | + | return gobject.SignalConnect(x.GoPointer(), "location-popup-on-paste", purego.NewCallback(fcb)) | |
| 162 | 162 | } | |
| 163 | 163 | ||
| 164 | 164 | // Emitted when the user asks for it. | |
| @@ -170,7 +170,7 @@ func (x *FileChooserWidget) ConnectLocationPopupOnPaste(cb func(FileChooserWidge | |||
| 170 | 170 | // he wishes to select. | |
| 171 | 171 | // | |
| 172 | 172 | // The default binding for this signal is <kbd>Control</kbd>-<kbd>L</kbd>. | |
| 173 | - | func (x *FileChooserWidget) ConnectLocationTogglePopup(cb func(FileChooserWidget)) { | |
| 173 | + | func (x *FileChooserWidget) ConnectLocationTogglePopup(cb func(FileChooserWidget)) uint32 { | |
| 174 | 174 | fcb := func(clsPtr uintptr) { | |
| 175 | 175 | fa := FileChooserWidget{} | |
| 176 | 176 | fa.Ptr = clsPtr | |
| @@ -178,7 +178,7 @@ func (x *FileChooserWidget) ConnectLocationTogglePopup(cb func(FileChooserWidget | |||
| 178 | 178 | cb(fa) | |
| 179 | 179 | ||
| 180 | 180 | } | |
| 181 | - | gobject.ObjectConnect(x.GoPointer(), "signal::location-toggle-popup", purego.NewCallback(fcb)) | |
| 181 | + | return gobject.SignalConnect(x.GoPointer(), "location-toggle-popup", purego.NewCallback(fcb)) | |
| 182 | 182 | } | |
| 183 | 183 | ||
| 184 | 184 | // Emitted when the user asks for it. | |
| @@ -188,7 +188,7 @@ func (x *FileChooserWidget) ConnectLocationTogglePopup(cb func(FileChooserWidget | |||
| 188 | 188 | // This is used to move the focus to the places sidebar. | |
| 189 | 189 | // | |
| 190 | 190 | // The default binding for this signal is <kbd>Alt</kbd>-<kbd>P</kbd>. | |
| 191 | - | func (x *FileChooserWidget) ConnectPlacesShortcut(cb func(FileChooserWidget)) { | |
| 191 | + | func (x *FileChooserWidget) ConnectPlacesShortcut(cb func(FileChooserWidget)) uint32 { | |
| 192 | 192 | fcb := func(clsPtr uintptr) { | |
| 193 | 193 | fa := FileChooserWidget{} | |
| 194 | 194 | fa.Ptr = clsPtr | |
| @@ -196,7 +196,7 @@ func (x *FileChooserWidget) ConnectPlacesShortcut(cb func(FileChooserWidget)) { | |||
| 196 | 196 | cb(fa) | |
| 197 | 197 | ||
| 198 | 198 | } | |
| 199 | - | gobject.ObjectConnect(x.GoPointer(), "signal::places-shortcut", purego.NewCallback(fcb)) | |
| 199 | + | return gobject.SignalConnect(x.GoPointer(), "places-shortcut", purego.NewCallback(fcb)) | |
| 200 | 200 | } | |
| 201 | 201 | ||
| 202 | 202 | // Emitted when the user asks for it. | |
| @@ -213,7 +213,7 @@ func (x *FileChooserWidget) ConnectPlacesShortcut(cb func(FileChooserWidget)) { | |||
| 213 | 213 | // Note that in the default binding, that <kbd>Alt</kbd>-<kbd>1</kbd> is | |
| 214 | 214 | // actually defined to switch to the bookmark at index 0, and so on | |
| 215 | 215 | // successively. | |
| 216 | - | func (x *FileChooserWidget) ConnectQuickBookmark(cb func(FileChooserWidget, int)) { | |
| 216 | + | func (x *FileChooserWidget) ConnectQuickBookmark(cb func(FileChooserWidget, int)) uint32 { | |
| 217 | 217 | fcb := func(clsPtr uintptr, BookmarkIndexVarp int) { | |
| 218 | 218 | fa := FileChooserWidget{} | |
| 219 | 219 | fa.Ptr = clsPtr | |
| @@ -221,7 +221,7 @@ func (x *FileChooserWidget) ConnectQuickBookmark(cb func(FileChooserWidget, int) | |||
| 221 | 221 | cb(fa, BookmarkIndexVarp) | |
| 222 | 222 | ||
| 223 | 223 | } | |
| 224 | - | gobject.ObjectConnect(x.GoPointer(), "signal::quick-bookmark", purego.NewCallback(fcb)) | |
| 224 | + | return gobject.SignalConnect(x.GoPointer(), "quick-bookmark", purego.NewCallback(fcb)) | |
| 225 | 225 | } | |
| 226 | 226 | ||
| 227 | 227 | // Emitted when the user asks for it. | |
| @@ -231,7 +231,7 @@ func (x *FileChooserWidget) ConnectQuickBookmark(cb func(FileChooserWidget, int) | |||
| 231 | 231 | // This is used to make the file chooser show the Recent location. | |
| 232 | 232 | // | |
| 233 | 233 | // The default binding for this signal is <kbd>Alt</kbd>-<kbd>R</kbd>. | |
| 234 | - | func (x *FileChooserWidget) ConnectRecentShortcut(cb func(FileChooserWidget)) { | |
| 234 | + | func (x *FileChooserWidget) ConnectRecentShortcut(cb func(FileChooserWidget)) uint32 { | |
| 235 | 235 | fcb := func(clsPtr uintptr) { | |
| 236 | 236 | fa := FileChooserWidget{} | |
| 237 | 237 | fa.Ptr = clsPtr | |
| @@ -239,7 +239,7 @@ func (x *FileChooserWidget) ConnectRecentShortcut(cb func(FileChooserWidget)) { | |||
| 239 | 239 | cb(fa) | |
| 240 | 240 | ||
| 241 | 241 | } | |
| 242 | - | gobject.ObjectConnect(x.GoPointer(), "signal::recent-shortcut", purego.NewCallback(fcb)) | |
| 242 | + | return gobject.SignalConnect(x.GoPointer(), "recent-shortcut", purego.NewCallback(fcb)) | |
| 243 | 243 | } | |
| 244 | 244 | ||
| 245 | 245 | // Emitted when the user asks for it. | |
| @@ -249,7 +249,7 @@ func (x *FileChooserWidget) ConnectRecentShortcut(cb func(FileChooserWidget)) { | |||
| 249 | 249 | // This is used to make the file chooser show the search entry. | |
| 250 | 250 | // | |
| 251 | 251 | // The default binding for this signal is <kbd>Alt</kbd>-<kbd>S</kbd>. | |
| 252 | - | func (x *FileChooserWidget) ConnectSearchShortcut(cb func(FileChooserWidget)) { | |
| 252 | + | func (x *FileChooserWidget) ConnectSearchShortcut(cb func(FileChooserWidget)) uint32 { | |
| 253 | 253 | fcb := func(clsPtr uintptr) { | |
| 254 | 254 | fa := FileChooserWidget{} | |
| 255 | 255 | fa.Ptr = clsPtr | |
| @@ -257,7 +257,7 @@ func (x *FileChooserWidget) ConnectSearchShortcut(cb func(FileChooserWidget)) { | |||
| 257 | 257 | cb(fa) | |
| 258 | 258 | ||
| 259 | 259 | } | |
| 260 | - | gobject.ObjectConnect(x.GoPointer(), "signal::search-shortcut", purego.NewCallback(fcb)) | |
| 260 | + | return gobject.SignalConnect(x.GoPointer(), "search-shortcut", purego.NewCallback(fcb)) | |
| 261 | 261 | } | |
| 262 | 262 | ||
| 263 | 263 | // Emitted when the user asks for it. | |
| @@ -267,7 +267,7 @@ func (x *FileChooserWidget) ConnectSearchShortcut(cb func(FileChooserWidget)) { | |||
| 267 | 267 | // This is used to make the file chooser display hidden files. | |
| 268 | 268 | // | |
| 269 | 269 | // The default binding for this signal is <kbd>Control</kbd>-<kbd>H</kbd>. | |
| 270 | - | func (x *FileChooserWidget) ConnectShowHidden(cb func(FileChooserWidget)) { | |
| 270 | + | func (x *FileChooserWidget) ConnectShowHidden(cb func(FileChooserWidget)) uint32 { | |
| 271 | 271 | fcb := func(clsPtr uintptr) { | |
| 272 | 272 | fa := FileChooserWidget{} | |
| 273 | 273 | fa.Ptr = clsPtr | |
| @@ -275,7 +275,7 @@ func (x *FileChooserWidget) ConnectShowHidden(cb func(FileChooserWidget)) { | |||
| 275 | 275 | cb(fa) | |
| 276 | 276 | ||
| 277 | 277 | } | |
| 278 | - | gobject.ObjectConnect(x.GoPointer(), "signal::show-hidden", purego.NewCallback(fcb)) | |
| 278 | + | return gobject.SignalConnect(x.GoPointer(), "show-hidden", purego.NewCallback(fcb)) | |
| 279 | 279 | } | |
| 280 | 280 | ||
| 281 | 281 | // Emitted when the user asks for it. | |
| @@ -286,7 +286,7 @@ func (x *FileChooserWidget) ConnectShowHidden(cb func(FileChooserWidget)) { | |||
| 286 | 286 | // of the current folder in the file hierarchy. | |
| 287 | 287 | // | |
| 288 | 288 | // The default binding for this signal is <kbd>Alt</kbd>-<kbd>Up</kbd>. | |
| 289 | - | func (x *FileChooserWidget) ConnectUpFolder(cb func(FileChooserWidget)) { | |
| 289 | + | func (x *FileChooserWidget) ConnectUpFolder(cb func(FileChooserWidget)) uint32 { | |
| 290 | 290 | fcb := func(clsPtr uintptr) { | |
| 291 | 291 | fa := FileChooserWidget{} | |
| 292 | 292 | fa.Ptr = clsPtr | |
| @@ -294,7 +294,7 @@ func (x *FileChooserWidget) ConnectUpFolder(cb func(FileChooserWidget)) { | |||
| 294 | 294 | cb(fa) | |
| 295 | 295 | ||
| 296 | 296 | } | |
| 297 | - | gobject.ObjectConnect(x.GoPointer(), "signal::up-folder", purego.NewCallback(fcb)) | |
| 297 | + | return gobject.SignalConnect(x.GoPointer(), "up-folder", purego.NewCallback(fcb)) | |
| 298 | 298 | } | |
| 299 | 299 | ||
| 300 | 300 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkfilter.go +2 -2
| @@ -146,7 +146,7 @@ func (c *Filter) SetGoPointer(ptr uintptr) { | |||
| 146 | 146 | // Depending on the @change parameter, not all items need | |
| 147 | 147 | // to be checked, but only some. Refer to the [enum@Gtk.FilterChange] | |
| 148 | 148 | // documentation for details. | |
| 149 | - | func (x *Filter) ConnectChanged(cb func(Filter, FilterChange)) { | |
| 149 | + | func (x *Filter) ConnectChanged(cb func(Filter, FilterChange)) uint32 { | |
| 150 | 150 | fcb := func(clsPtr uintptr, ChangeVarp FilterChange) { | |
| 151 | 151 | fa := Filter{} | |
| 152 | 152 | fa.Ptr = clsPtr | |
| @@ -154,7 +154,7 @@ func (x *Filter) ConnectChanged(cb func(Filter, FilterChange)) { | |||
| 154 | 154 | cb(fa, ChangeVarp) | |
| 155 | 155 | ||
| 156 | 156 | } | |
| 157 | - | gobject.ObjectConnect(x.GoPointer(), "signal::changed", purego.NewCallback(fcb)) | |
| 157 | + | return gobject.SignalConnect(x.GoPointer(), "changed", purego.NewCallback(fcb)) | |
| 158 | 158 | } | |
| 159 | 159 | ||
| 160 | 160 | func init() { | |
M v4/gtk/gtkflowbox.go +16 -16
| @@ -530,7 +530,7 @@ func (c *FlowBox) SetGoPointer(ptr uintptr) { | |||
| 530 | 530 | // Emitted when the user activates the @box. | |
| 531 | 531 | // | |
| 532 | 532 | // This is a [keybinding signal](class.SignalAction.html). | |
| 533 | - | func (x *FlowBox) ConnectActivateCursorChild(cb func(FlowBox)) { | |
| 533 | + | func (x *FlowBox) ConnectActivateCursorChild(cb func(FlowBox)) uint32 { | |
| 534 | 534 | fcb := func(clsPtr uintptr) { | |
| 535 | 535 | fa := FlowBox{} | |
| 536 | 536 | fa.Ptr = clsPtr | |
| @@ -538,11 +538,11 @@ func (x *FlowBox) ConnectActivateCursorChild(cb func(FlowBox)) { | |||
| 538 | 538 | cb(fa) | |
| 539 | 539 | ||
| 540 | 540 | } | |
| 541 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate-cursor-child", purego.NewCallback(fcb)) | |
| 541 | + | return gobject.SignalConnect(x.GoPointer(), "activate-cursor-child", purego.NewCallback(fcb)) | |
| 542 | 542 | } | |
| 543 | 543 | ||
| 544 | 544 | // Emitted when a child has been activated by the user. | |
| 545 | - | func (x *FlowBox) ConnectChildActivated(cb func(FlowBox, uintptr)) { | |
| 545 | + | func (x *FlowBox) ConnectChildActivated(cb func(FlowBox, uintptr)) uint32 { | |
| 546 | 546 | fcb := func(clsPtr uintptr, ChildVarp uintptr) { | |
| 547 | 547 | fa := FlowBox{} | |
| 548 | 548 | fa.Ptr = clsPtr | |
| @@ -550,7 +550,7 @@ func (x *FlowBox) ConnectChildActivated(cb func(FlowBox, uintptr)) { | |||
| 550 | 550 | cb(fa, ChildVarp) | |
| 551 | 551 | ||
| 552 | 552 | } | |
| 553 | - | gobject.ObjectConnect(x.GoPointer(), "signal::child-activated", purego.NewCallback(fcb)) | |
| 553 | + | return gobject.SignalConnect(x.GoPointer(), "child-activated", purego.NewCallback(fcb)) | |
| 554 | 554 | } | |
| 555 | 555 | ||
| 556 | 556 | // Emitted when the user initiates a cursor movement. | |
| @@ -569,7 +569,7 @@ func (x *FlowBox) ConnectChildActivated(cb func(FlowBox, uintptr)) { | |||
| 569 | 569 | // move by individual children | |
| 570 | 570 | // - <kbd>Home</kbd>, <kbd>End</kbd> move to the ends of the box | |
| 571 | 571 | // - <kbd>PgUp</kbd>, <kbd>PgDn</kbd> move vertically by pages | |
| 572 | - | func (x *FlowBox) ConnectMoveCursor(cb func(FlowBox, MovementStep, int, bool, bool) bool) { | |
| 572 | + | func (x *FlowBox) ConnectMoveCursor(cb func(FlowBox, MovementStep, int, bool, bool) bool) uint32 { | |
| 573 | 573 | fcb := func(clsPtr uintptr, StepVarp MovementStep, CountVarp int, ExtendVarp bool, ModifyVarp bool) bool { | |
| 574 | 574 | fa := FlowBox{} | |
| 575 | 575 | fa.Ptr = clsPtr | |
| @@ -577,7 +577,7 @@ func (x *FlowBox) ConnectMoveCursor(cb func(FlowBox, MovementStep, int, bool, bo | |||
| 577 | 577 | return cb(fa, StepVarp, CountVarp, ExtendVarp, ModifyVarp) | |
| 578 | 578 | ||
| 579 | 579 | } | |
| 580 | - | gobject.ObjectConnect(x.GoPointer(), "signal::move-cursor", purego.NewCallback(fcb)) | |
| 580 | + | return gobject.SignalConnect(x.GoPointer(), "move-cursor", purego.NewCallback(fcb)) | |
| 581 | 581 | } | |
| 582 | 582 | ||
| 583 | 583 | // Emitted to select all children of the box, | |
| @@ -586,7 +586,7 @@ func (x *FlowBox) ConnectMoveCursor(cb func(FlowBox, MovementStep, int, bool, bo | |||
| 586 | 586 | // This is a [keybinding signal](class.SignalAction.html). | |
| 587 | 587 | // | |
| 588 | 588 | // The default bindings for this signal is <kbd>Ctrl</kbd>-<kbd>a</kbd>. | |
| 589 | - | func (x *FlowBox) ConnectSelectAll(cb func(FlowBox)) { | |
| 589 | + | func (x *FlowBox) ConnectSelectAll(cb func(FlowBox)) uint32 { | |
| 590 | 590 | fcb := func(clsPtr uintptr) { | |
| 591 | 591 | fa := FlowBox{} | |
| 592 | 592 | fa.Ptr = clsPtr | |
| @@ -594,7 +594,7 @@ func (x *FlowBox) ConnectSelectAll(cb func(FlowBox)) { | |||
| 594 | 594 | cb(fa) | |
| 595 | 595 | ||
| 596 | 596 | } | |
| 597 | - | gobject.ObjectConnect(x.GoPointer(), "signal::select-all", purego.NewCallback(fcb)) | |
| 597 | + | return gobject.SignalConnect(x.GoPointer(), "select-all", purego.NewCallback(fcb)) | |
| 598 | 598 | } | |
| 599 | 599 | ||
| 600 | 600 | // Emitted when the set of selected children changes. | |
| @@ -602,7 +602,7 @@ func (x *FlowBox) ConnectSelectAll(cb func(FlowBox)) { | |||
| 602 | 602 | // Use [method@Gtk.FlowBox.selected_foreach] or | |
| 603 | 603 | // [method@Gtk.FlowBox.get_selected_children] to obtain the | |
| 604 | 604 | // selected children. | |
| 605 | - | func (x *FlowBox) ConnectSelectedChildrenChanged(cb func(FlowBox)) { | |
| 605 | + | func (x *FlowBox) ConnectSelectedChildrenChanged(cb func(FlowBox)) uint32 { | |
| 606 | 606 | fcb := func(clsPtr uintptr) { | |
| 607 | 607 | fa := FlowBox{} | |
| 608 | 608 | fa.Ptr = clsPtr | |
| @@ -610,7 +610,7 @@ func (x *FlowBox) ConnectSelectedChildrenChanged(cb func(FlowBox)) { | |||
| 610 | 610 | cb(fa) | |
| 611 | 611 | ||
| 612 | 612 | } | |
| 613 | - | gobject.ObjectConnect(x.GoPointer(), "signal::selected-children-changed", purego.NewCallback(fcb)) | |
| 613 | + | return gobject.SignalConnect(x.GoPointer(), "selected-children-changed", purego.NewCallback(fcb)) | |
| 614 | 614 | } | |
| 615 | 615 | ||
| 616 | 616 | // Emitted to toggle the selection of the child that has the focus. | |
| @@ -618,7 +618,7 @@ func (x *FlowBox) ConnectSelectedChildrenChanged(cb func(FlowBox)) { | |||
| 618 | 618 | // This is a [keybinding signal](class.SignalAction.html). | |
| 619 | 619 | // | |
| 620 | 620 | // The default binding for this signal is <kbd>Ctrl</kbd>-<kbd>Space</kbd>. | |
| 621 | - | func (x *FlowBox) ConnectToggleCursorChild(cb func(FlowBox)) { | |
| 621 | + | func (x *FlowBox) ConnectToggleCursorChild(cb func(FlowBox)) uint32 { | |
| 622 | 622 | fcb := func(clsPtr uintptr) { | |
| 623 | 623 | fa := FlowBox{} | |
| 624 | 624 | fa.Ptr = clsPtr | |
| @@ -626,7 +626,7 @@ func (x *FlowBox) ConnectToggleCursorChild(cb func(FlowBox)) { | |||
| 626 | 626 | cb(fa) | |
| 627 | 627 | ||
| 628 | 628 | } | |
| 629 | - | gobject.ObjectConnect(x.GoPointer(), "signal::toggle-cursor-child", purego.NewCallback(fcb)) | |
| 629 | + | return gobject.SignalConnect(x.GoPointer(), "toggle-cursor-child", purego.NewCallback(fcb)) | |
| 630 | 630 | } | |
| 631 | 631 | ||
| 632 | 632 | // Emitted to unselect all children of the box, | |
| @@ -635,7 +635,7 @@ func (x *FlowBox) ConnectToggleCursorChild(cb func(FlowBox)) { | |||
| 635 | 635 | // This is a [keybinding signal](class.SignalAction.html). | |
| 636 | 636 | // | |
| 637 | 637 | // The default bindings for this signal is <kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>a</kbd>. | |
| 638 | - | func (x *FlowBox) ConnectUnselectAll(cb func(FlowBox)) { | |
| 638 | + | func (x *FlowBox) ConnectUnselectAll(cb func(FlowBox)) uint32 { | |
| 639 | 639 | fcb := func(clsPtr uintptr) { | |
| 640 | 640 | fa := FlowBox{} | |
| 641 | 641 | fa.Ptr = clsPtr | |
| @@ -643,7 +643,7 @@ func (x *FlowBox) ConnectUnselectAll(cb func(FlowBox)) { | |||
| 643 | 643 | cb(fa) | |
| 644 | 644 | ||
| 645 | 645 | } | |
| 646 | - | gobject.ObjectConnect(x.GoPointer(), "signal::unselect-all", purego.NewCallback(fcb)) | |
| 646 | + | return gobject.SignalConnect(x.GoPointer(), "unselect-all", purego.NewCallback(fcb)) | |
| 647 | 647 | } | |
| 648 | 648 | ||
| 649 | 649 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
| @@ -922,7 +922,7 @@ func (c *FlowBoxChild) SetGoPointer(ptr uintptr) { | |||
| 922 | 922 | // but it can be used by applications for their own purposes. | |
| 923 | 923 | // | |
| 924 | 924 | // The default bindings are <kbd>Space</kbd> and <kbd>Enter</kbd>. | |
| 925 | - | func (x *FlowBoxChild) ConnectActivate(cb func(FlowBoxChild)) { | |
| 925 | + | func (x *FlowBoxChild) ConnectActivate(cb func(FlowBoxChild)) uint32 { | |
| 926 | 926 | fcb := func(clsPtr uintptr) { | |
| 927 | 927 | fa := FlowBoxChild{} | |
| 928 | 928 | fa.Ptr = clsPtr | |
| @@ -930,7 +930,7 @@ func (x *FlowBoxChild) ConnectActivate(cb func(FlowBoxChild)) { | |||
| 930 | 930 | cb(fa) | |
| 931 | 931 | ||
| 932 | 932 | } | |
| 933 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 933 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 934 | 934 | } | |
| 935 | 935 | ||
| 936 | 936 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkfontbutton.go +4 -4
| @@ -158,7 +158,7 @@ func (c *FontButton) SetGoPointer(ptr uintptr) { | |||
| 158 | 158 | // | |
| 159 | 159 | // The `::activate` signal on `GtkFontButton` is an action signal and | |
| 160 | 160 | // emitting it causes the button to present its dialog. | |
| 161 | - | func (x *FontButton) ConnectActivate(cb func(FontButton)) { | |
| 161 | + | func (x *FontButton) ConnectActivate(cb func(FontButton)) uint32 { | |
| 162 | 162 | fcb := func(clsPtr uintptr) { | |
| 163 | 163 | fa := FontButton{} | |
| 164 | 164 | fa.Ptr = clsPtr | |
| @@ -166,7 +166,7 @@ func (x *FontButton) ConnectActivate(cb func(FontButton)) { | |||
| 166 | 166 | cb(fa) | |
| 167 | 167 | ||
| 168 | 168 | } | |
| 169 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 169 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 170 | 170 | } | |
| 171 | 171 | ||
| 172 | 172 | // Emitted when the user selects a font. | |
| @@ -177,7 +177,7 @@ func (x *FontButton) ConnectActivate(cb func(FontButton)) { | |||
| 177 | 177 | // Note that this signal is only emitted when the user changes the font. | |
| 178 | 178 | // If you need to react to programmatic font changes as well, use | |
| 179 | 179 | // the notify::font signal. | |
| 180 | - | func (x *FontButton) ConnectFontSet(cb func(FontButton)) { | |
| 180 | + | func (x *FontButton) ConnectFontSet(cb func(FontButton)) uint32 { | |
| 181 | 181 | fcb := func(clsPtr uintptr) { | |
| 182 | 182 | fa := FontButton{} | |
| 183 | 183 | fa.Ptr = clsPtr | |
| @@ -185,7 +185,7 @@ func (x *FontButton) ConnectFontSet(cb func(FontButton)) { | |||
| 185 | 185 | cb(fa) | |
| 186 | 186 | ||
| 187 | 187 | } | |
| 188 | - | gobject.ObjectConnect(x.GoPointer(), "signal::font-set", purego.NewCallback(fcb)) | |
| 188 | + | return gobject.SignalConnect(x.GoPointer(), "font-set", purego.NewCallback(fcb)) | |
| 189 | 189 | } | |
| 190 | 190 | ||
| 191 | 191 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkgesture.go +10 -10
| @@ -396,7 +396,7 @@ func (c *Gesture) SetGoPointer(ptr uintptr) { | |||
| 396 | 396 | // (eg. a third touch on a 2-touches gesture) is lifted, in that | |
| 397 | 397 | // situation @sequence won't pertain to the current set of active | |
| 398 | 398 | // touches, so don't rely on this being true. | |
| 399 | - | func (x *Gesture) ConnectBegin(cb func(Gesture, uintptr)) { | |
| 399 | + | func (x *Gesture) ConnectBegin(cb func(Gesture, uintptr)) uint32 { | |
| 400 | 400 | fcb := func(clsPtr uintptr, SequenceVarp uintptr) { | |
| 401 | 401 | fa := Gesture{} | |
| 402 | 402 | fa.Ptr = clsPtr | |
| @@ -404,7 +404,7 @@ func (x *Gesture) ConnectBegin(cb func(Gesture, uintptr)) { | |||
| 404 | 404 | cb(fa, SequenceVarp) | |
| 405 | 405 | ||
| 406 | 406 | } | |
| 407 | - | gobject.ObjectConnect(x.GoPointer(), "signal::begin", purego.NewCallback(fcb)) | |
| 407 | + | return gobject.SignalConnect(x.GoPointer(), "begin", purego.NewCallback(fcb)) | |
| 408 | 408 | } | |
| 409 | 409 | ||
| 410 | 410 | // Emitted whenever a sequence is cancelled. | |
| @@ -417,7 +417,7 @@ func (x *Gesture) ConnectBegin(cb func(Gesture, uintptr)) { | |||
| 417 | 417 | // | |
| 418 | 418 | // @gesture must forget everything about @sequence as in | |
| 419 | 419 | // response to this signal. | |
| 420 | - | func (x *Gesture) ConnectCancel(cb func(Gesture, uintptr)) { | |
| 420 | + | func (x *Gesture) ConnectCancel(cb func(Gesture, uintptr)) uint32 { | |
| 421 | 421 | fcb := func(clsPtr uintptr, SequenceVarp uintptr) { | |
| 422 | 422 | fa := Gesture{} | |
| 423 | 423 | fa.Ptr = clsPtr | |
| @@ -425,7 +425,7 @@ func (x *Gesture) ConnectCancel(cb func(Gesture, uintptr)) { | |||
| 425 | 425 | cb(fa, SequenceVarp) | |
| 426 | 426 | ||
| 427 | 427 | } | |
| 428 | - | gobject.ObjectConnect(x.GoPointer(), "signal::cancel", purego.NewCallback(fcb)) | |
| 428 | + | return gobject.SignalConnect(x.GoPointer(), "cancel", purego.NewCallback(fcb)) | |
| 429 | 429 | } | |
| 430 | 430 | ||
| 431 | 431 | // Emitted when @gesture either stopped recognizing the event | |
| @@ -437,7 +437,7 @@ func (x *Gesture) ConnectCancel(cb func(Gesture, uintptr)) { | |||
| 437 | 437 | // pressed touch sequence that exceeds [property@Gtk.Gesture:n-points]). | |
| 438 | 438 | // This situation may be detected by checking through | |
| 439 | 439 | // [method@Gtk.Gesture.handles_sequence]. | |
| 440 | - | func (x *Gesture) ConnectEnd(cb func(Gesture, uintptr)) { | |
| 440 | + | func (x *Gesture) ConnectEnd(cb func(Gesture, uintptr)) uint32 { | |
| 441 | 441 | fcb := func(clsPtr uintptr, SequenceVarp uintptr) { | |
| 442 | 442 | fa := Gesture{} | |
| 443 | 443 | fa.Ptr = clsPtr | |
| @@ -445,14 +445,14 @@ func (x *Gesture) ConnectEnd(cb func(Gesture, uintptr)) { | |||
| 445 | 445 | cb(fa, SequenceVarp) | |
| 446 | 446 | ||
| 447 | 447 | } | |
| 448 | - | gobject.ObjectConnect(x.GoPointer(), "signal::end", purego.NewCallback(fcb)) | |
| 448 | + | return gobject.SignalConnect(x.GoPointer(), "end", purego.NewCallback(fcb)) | |
| 449 | 449 | } | |
| 450 | 450 | ||
| 451 | 451 | // Emitted whenever a sequence state changes. | |
| 452 | 452 | // | |
| 453 | 453 | // See [method@Gtk.Gesture.set_sequence_state] to know | |
| 454 | 454 | // more about the expectable sequence lifetimes. | |
| 455 | - | func (x *Gesture) ConnectSequenceStateChanged(cb func(Gesture, uintptr, EventSequenceState)) { | |
| 455 | + | func (x *Gesture) ConnectSequenceStateChanged(cb func(Gesture, uintptr, EventSequenceState)) uint32 { | |
| 456 | 456 | fcb := func(clsPtr uintptr, SequenceVarp uintptr, StateVarp EventSequenceState) { | |
| 457 | 457 | fa := Gesture{} | |
| 458 | 458 | fa.Ptr = clsPtr | |
| @@ -460,13 +460,13 @@ func (x *Gesture) ConnectSequenceStateChanged(cb func(Gesture, uintptr, EventSeq | |||
| 460 | 460 | cb(fa, SequenceVarp, StateVarp) | |
| 461 | 461 | ||
| 462 | 462 | } | |
| 463 | - | gobject.ObjectConnect(x.GoPointer(), "signal::sequence-state-changed", purego.NewCallback(fcb)) | |
| 463 | + | return gobject.SignalConnect(x.GoPointer(), "sequence-state-changed", purego.NewCallback(fcb)) | |
| 464 | 464 | } | |
| 465 | 465 | ||
| 466 | 466 | // Emitted whenever an event is handled while the gesture is recognized. | |
| 467 | 467 | // | |
| 468 | 468 | // @sequence is guaranteed to pertain to the set of active touches. | |
| 469 | - | func (x *Gesture) ConnectUpdate(cb func(Gesture, uintptr)) { | |
| 469 | + | func (x *Gesture) ConnectUpdate(cb func(Gesture, uintptr)) uint32 { | |
| 470 | 470 | fcb := func(clsPtr uintptr, SequenceVarp uintptr) { | |
| 471 | 471 | fa := Gesture{} | |
| 472 | 472 | fa.Ptr = clsPtr | |
| @@ -474,7 +474,7 @@ func (x *Gesture) ConnectUpdate(cb func(Gesture, uintptr)) { | |||
| 474 | 474 | cb(fa, SequenceVarp) | |
| 475 | 475 | ||
| 476 | 476 | } | |
| 477 | - | gobject.ObjectConnect(x.GoPointer(), "signal::update", purego.NewCallback(fcb)) | |
| 477 | + | return gobject.SignalConnect(x.GoPointer(), "update", purego.NewCallback(fcb)) | |
| 478 | 478 | } | |
| 479 | 479 | ||
| 480 | 480 | func init() { | |
M v4/gtk/gtkgestureclick.go +8 -8
| @@ -53,7 +53,7 @@ func (c *GestureClick) SetGoPointer(ptr uintptr) { | |||
| 53 | 53 | } | |
| 54 | 54 | ||
| 55 | 55 | // Emitted whenever a button or touch press happens. | |
| 56 | - | func (x *GestureClick) ConnectPressed(cb func(GestureClick, int, float64, float64)) { | |
| 56 | + | func (x *GestureClick) ConnectPressed(cb func(GestureClick, int, float64, float64)) uint32 { | |
| 57 | 57 | fcb := func(clsPtr uintptr, NPressVarp int, XVarp float64, YVarp float64) { | |
| 58 | 58 | fa := GestureClick{} | |
| 59 | 59 | fa.Ptr = clsPtr | |
| @@ -61,7 +61,7 @@ func (x *GestureClick) ConnectPressed(cb func(GestureClick, int, float64, float6 | |||
| 61 | 61 | cb(fa, NPressVarp, XVarp, YVarp) | |
| 62 | 62 | ||
| 63 | 63 | } | |
| 64 | - | gobject.ObjectConnect(x.GoPointer(), "signal::pressed", purego.NewCallback(fcb)) | |
| 64 | + | return gobject.SignalConnect(x.GoPointer(), "pressed", purego.NewCallback(fcb)) | |
| 65 | 65 | } | |
| 66 | 66 | ||
| 67 | 67 | // Emitted when a button or touch is released. | |
| @@ -70,7 +70,7 @@ func (x *GestureClick) ConnectPressed(cb func(GestureClick, int, float64, float6 | |||
| 70 | 70 | // this event, note that [signal@Gtk.GestureClick::stopped] may | |
| 71 | 71 | // have been emitted between the press and its release, @n_press | |
| 72 | 72 | // will only start over at the next press. | |
| 73 | - | func (x *GestureClick) ConnectReleased(cb func(GestureClick, int, float64, float64)) { | |
| 73 | + | func (x *GestureClick) ConnectReleased(cb func(GestureClick, int, float64, float64)) uint32 { | |
| 74 | 74 | fcb := func(clsPtr uintptr, NPressVarp int, XVarp float64, YVarp float64) { | |
| 75 | 75 | fa := GestureClick{} | |
| 76 | 76 | fa.Ptr = clsPtr | |
| @@ -78,11 +78,11 @@ func (x *GestureClick) ConnectReleased(cb func(GestureClick, int, float64, float | |||
| 78 | 78 | cb(fa, NPressVarp, XVarp, YVarp) | |
| 79 | 79 | ||
| 80 | 80 | } | |
| 81 | - | gobject.ObjectConnect(x.GoPointer(), "signal::released", purego.NewCallback(fcb)) | |
| 81 | + | return gobject.SignalConnect(x.GoPointer(), "released", purego.NewCallback(fcb)) | |
| 82 | 82 | } | |
| 83 | 83 | ||
| 84 | 84 | // Emitted whenever any time/distance threshold has been exceeded. | |
| 85 | - | func (x *GestureClick) ConnectStopped(cb func(GestureClick)) { | |
| 85 | + | func (x *GestureClick) ConnectStopped(cb func(GestureClick)) uint32 { | |
| 86 | 86 | fcb := func(clsPtr uintptr) { | |
| 87 | 87 | fa := GestureClick{} | |
| 88 | 88 | fa.Ptr = clsPtr | |
| @@ -90,7 +90,7 @@ func (x *GestureClick) ConnectStopped(cb func(GestureClick)) { | |||
| 90 | 90 | cb(fa) | |
| 91 | 91 | ||
| 92 | 92 | } | |
| 93 | - | gobject.ObjectConnect(x.GoPointer(), "signal::stopped", purego.NewCallback(fcb)) | |
| 93 | + | return gobject.SignalConnect(x.GoPointer(), "stopped", purego.NewCallback(fcb)) | |
| 94 | 94 | } | |
| 95 | 95 | ||
| 96 | 96 | // Emitted whenever the gesture receives a release | |
| @@ -99,7 +99,7 @@ func (x *GestureClick) ConnectStopped(cb func(GestureClick)) { | |||
| 99 | 99 | // Due to implicit grabs, this can only happen on situations | |
| 100 | 100 | // where input is grabbed elsewhere mid-press or the pressed | |
| 101 | 101 | // widget voluntarily relinquishes its implicit grab. | |
| 102 | - | func (x *GestureClick) ConnectUnpairedRelease(cb func(GestureClick, float64, float64, uint, uintptr)) { | |
| 102 | + | func (x *GestureClick) ConnectUnpairedRelease(cb func(GestureClick, float64, float64, uint, uintptr)) uint32 { | |
| 103 | 103 | fcb := func(clsPtr uintptr, XVarp float64, YVarp float64, ButtonVarp uint, SequenceVarp uintptr) { | |
| 104 | 104 | fa := GestureClick{} | |
| 105 | 105 | fa.Ptr = clsPtr | |
| @@ -107,7 +107,7 @@ func (x *GestureClick) ConnectUnpairedRelease(cb func(GestureClick, float64, flo | |||
| 107 | 107 | cb(fa, XVarp, YVarp, ButtonVarp, SequenceVarp) | |
| 108 | 108 | ||
| 109 | 109 | } | |
| 110 | - | gobject.ObjectConnect(x.GoPointer(), "signal::unpaired-release", purego.NewCallback(fcb)) | |
| 110 | + | return gobject.SignalConnect(x.GoPointer(), "unpaired-release", purego.NewCallback(fcb)) | |
| 111 | 111 | } | |
| 112 | 112 | ||
| 113 | 113 | func init() { | |
M v4/gtk/gtkgesturedrag.go +6 -6
| @@ -80,7 +80,7 @@ func (c *GestureDrag) SetGoPointer(ptr uintptr) { | |||
| 80 | 80 | } | |
| 81 | 81 | ||
| 82 | 82 | // Emitted whenever dragging starts. | |
| 83 | - | func (x *GestureDrag) ConnectDragBegin(cb func(GestureDrag, float64, float64)) { | |
| 83 | + | func (x *GestureDrag) ConnectDragBegin(cb func(GestureDrag, float64, float64)) uint32 { | |
| 84 | 84 | fcb := func(clsPtr uintptr, StartXVarp float64, StartYVarp float64) { | |
| 85 | 85 | fa := GestureDrag{} | |
| 86 | 86 | fa.Ptr = clsPtr | |
| @@ -88,11 +88,11 @@ func (x *GestureDrag) ConnectDragBegin(cb func(GestureDrag, float64, float64)) { | |||
| 88 | 88 | cb(fa, StartXVarp, StartYVarp) | |
| 89 | 89 | ||
| 90 | 90 | } | |
| 91 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drag-begin", purego.NewCallback(fcb)) | |
| 91 | + | return gobject.SignalConnect(x.GoPointer(), "drag-begin", purego.NewCallback(fcb)) | |
| 92 | 92 | } | |
| 93 | 93 | ||
| 94 | 94 | // Emitted whenever the dragging is finished. | |
| 95 | - | func (x *GestureDrag) ConnectDragEnd(cb func(GestureDrag, float64, float64)) { | |
| 95 | + | func (x *GestureDrag) ConnectDragEnd(cb func(GestureDrag, float64, float64)) uint32 { | |
| 96 | 96 | fcb := func(clsPtr uintptr, OffsetXVarp float64, OffsetYVarp float64) { | |
| 97 | 97 | fa := GestureDrag{} | |
| 98 | 98 | fa.Ptr = clsPtr | |
| @@ -100,11 +100,11 @@ func (x *GestureDrag) ConnectDragEnd(cb func(GestureDrag, float64, float64)) { | |||
| 100 | 100 | cb(fa, OffsetXVarp, OffsetYVarp) | |
| 101 | 101 | ||
| 102 | 102 | } | |
| 103 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drag-end", purego.NewCallback(fcb)) | |
| 103 | + | return gobject.SignalConnect(x.GoPointer(), "drag-end", purego.NewCallback(fcb)) | |
| 104 | 104 | } | |
| 105 | 105 | ||
| 106 | 106 | // Emitted whenever the dragging point moves. | |
| 107 | - | func (x *GestureDrag) ConnectDragUpdate(cb func(GestureDrag, float64, float64)) { | |
| 107 | + | func (x *GestureDrag) ConnectDragUpdate(cb func(GestureDrag, float64, float64)) uint32 { | |
| 108 | 108 | fcb := func(clsPtr uintptr, OffsetXVarp float64, OffsetYVarp float64) { | |
| 109 | 109 | fa := GestureDrag{} | |
| 110 | 110 | fa.Ptr = clsPtr | |
| @@ -112,7 +112,7 @@ func (x *GestureDrag) ConnectDragUpdate(cb func(GestureDrag, float64, float64)) | |||
| 112 | 112 | cb(fa, OffsetXVarp, OffsetYVarp) | |
| 113 | 113 | ||
| 114 | 114 | } | |
| 115 | - | gobject.ObjectConnect(x.GoPointer(), "signal::drag-update", purego.NewCallback(fcb)) | |
| 115 | + | return gobject.SignalConnect(x.GoPointer(), "drag-update", purego.NewCallback(fcb)) | |
| 116 | 116 | } | |
| 117 | 117 | ||
| 118 | 118 | func init() { | |
M v4/gtk/gtkgesturelongpress.go +4 -4
| @@ -82,7 +82,7 @@ func (c *GestureLongPress) SetGoPointer(ptr uintptr) { | |||
| 82 | 82 | ||
| 83 | 83 | // Emitted whenever a press moved too far, or was released | |
| 84 | 84 | // before [signal@Gtk.GestureLongPress::pressed] happened. | |
| 85 | - | func (x *GestureLongPress) ConnectCancelled(cb func(GestureLongPress)) { | |
| 85 | + | func (x *GestureLongPress) ConnectCancelled(cb func(GestureLongPress)) uint32 { | |
| 86 | 86 | fcb := func(clsPtr uintptr) { | |
| 87 | 87 | fa := GestureLongPress{} | |
| 88 | 88 | fa.Ptr = clsPtr | |
| @@ -90,12 +90,12 @@ func (x *GestureLongPress) ConnectCancelled(cb func(GestureLongPress)) { | |||
| 90 | 90 | cb(fa) | |
| 91 | 91 | ||
| 92 | 92 | } | |
| 93 | - | gobject.ObjectConnect(x.GoPointer(), "signal::cancelled", purego.NewCallback(fcb)) | |
| 93 | + | return gobject.SignalConnect(x.GoPointer(), "cancelled", purego.NewCallback(fcb)) | |
| 94 | 94 | } | |
| 95 | 95 | ||
| 96 | 96 | // Emitted whenever a press goes unmoved/unreleased longer than | |
| 97 | 97 | // what the GTK defaults tell. | |
| 98 | - | func (x *GestureLongPress) ConnectPressed(cb func(GestureLongPress, float64, float64)) { | |
| 98 | + | func (x *GestureLongPress) ConnectPressed(cb func(GestureLongPress, float64, float64)) uint32 { | |
| 99 | 99 | fcb := func(clsPtr uintptr, XVarp float64, YVarp float64) { | |
| 100 | 100 | fa := GestureLongPress{} | |
| 101 | 101 | fa.Ptr = clsPtr | |
| @@ -103,7 +103,7 @@ func (x *GestureLongPress) ConnectPressed(cb func(GestureLongPress, float64, flo | |||
| 103 | 103 | cb(fa, XVarp, YVarp) | |
| 104 | 104 | ||
| 105 | 105 | } | |
| 106 | - | gobject.ObjectConnect(x.GoPointer(), "signal::pressed", purego.NewCallback(fcb)) | |
| 106 | + | return gobject.SignalConnect(x.GoPointer(), "pressed", purego.NewCallback(fcb)) | |
| 107 | 107 | } | |
| 108 | 108 | ||
| 109 | 109 | func init() { | |
M v4/gtk/gtkgesturepan.go +2 -2
| @@ -77,7 +77,7 @@ func (c *GesturePan) SetGoPointer(ptr uintptr) { | |||
| 77 | 77 | } | |
| 78 | 78 | ||
| 79 | 79 | // Emitted once a panning gesture along the expected axis is detected. | |
| 80 | - | func (x *GesturePan) ConnectPan(cb func(GesturePan, PanDirection, float64)) { | |
| 80 | + | func (x *GesturePan) ConnectPan(cb func(GesturePan, PanDirection, float64)) uint32 { | |
| 81 | 81 | fcb := func(clsPtr uintptr, DirectionVarp PanDirection, OffsetVarp float64) { | |
| 82 | 82 | fa := GesturePan{} | |
| 83 | 83 | fa.Ptr = clsPtr | |
| @@ -85,7 +85,7 @@ func (x *GesturePan) ConnectPan(cb func(GesturePan, PanDirection, float64)) { | |||
| 85 | 85 | cb(fa, DirectionVarp, OffsetVarp) | |
| 86 | 86 | ||
| 87 | 87 | } | |
| 88 | - | gobject.ObjectConnect(x.GoPointer(), "signal::pan", purego.NewCallback(fcb)) | |
| 88 | + | return gobject.SignalConnect(x.GoPointer(), "pan", purego.NewCallback(fcb)) | |
| 89 | 89 | } | |
| 90 | 90 | ||
| 91 | 91 | func init() { | |
M v4/gtk/gtkgesturerotate.go +2 -2
| @@ -63,7 +63,7 @@ func (c *GestureRotate) SetGoPointer(ptr uintptr) { | |||
| 63 | 63 | } | |
| 64 | 64 | ||
| 65 | 65 | // Emitted when the angle between both tracked points changes. | |
| 66 | - | func (x *GestureRotate) ConnectAngleChanged(cb func(GestureRotate, float64, float64)) { | |
| 66 | + | func (x *GestureRotate) ConnectAngleChanged(cb func(GestureRotate, float64, float64)) uint32 { | |
| 67 | 67 | fcb := func(clsPtr uintptr, AngleVarp float64, AngleDeltaVarp float64) { | |
| 68 | 68 | fa := GestureRotate{} | |
| 69 | 69 | fa.Ptr = clsPtr | |
| @@ -71,7 +71,7 @@ func (x *GestureRotate) ConnectAngleChanged(cb func(GestureRotate, float64, floa | |||
| 71 | 71 | cb(fa, AngleVarp, AngleDeltaVarp) | |
| 72 | 72 | ||
| 73 | 73 | } | |
| 74 | - | gobject.ObjectConnect(x.GoPointer(), "signal::angle-changed", purego.NewCallback(fcb)) | |
| 74 | + | return gobject.SignalConnect(x.GoPointer(), "angle-changed", purego.NewCallback(fcb)) | |
| 75 | 75 | } | |
| 76 | 76 | ||
| 77 | 77 | func init() { | |
M v4/gtk/gtkgesturestylus.go +8 -8
| @@ -121,7 +121,7 @@ func (c *GestureStylus) SetGoPointer(ptr uintptr) { | |||
| 121 | 121 | } | |
| 122 | 122 | ||
| 123 | 123 | // Emitted when the stylus touches the device. | |
| 124 | - | func (x *GestureStylus) ConnectDown(cb func(GestureStylus, float64, float64)) { | |
| 124 | + | func (x *GestureStylus) ConnectDown(cb func(GestureStylus, float64, float64)) uint32 { | |
| 125 | 125 | fcb := func(clsPtr uintptr, XVarp float64, YVarp float64) { | |
| 126 | 126 | fa := GestureStylus{} | |
| 127 | 127 | fa.Ptr = clsPtr | |
| @@ -129,11 +129,11 @@ func (x *GestureStylus) ConnectDown(cb func(GestureStylus, float64, float64)) { | |||
| 129 | 129 | cb(fa, XVarp, YVarp) | |
| 130 | 130 | ||
| 131 | 131 | } | |
| 132 | - | gobject.ObjectConnect(x.GoPointer(), "signal::down", purego.NewCallback(fcb)) | |
| 132 | + | return gobject.SignalConnect(x.GoPointer(), "down", purego.NewCallback(fcb)) | |
| 133 | 133 | } | |
| 134 | 134 | ||
| 135 | 135 | // Emitted when the stylus moves while touching the device. | |
| 136 | - | func (x *GestureStylus) ConnectMotion(cb func(GestureStylus, float64, float64)) { | |
| 136 | + | func (x *GestureStylus) ConnectMotion(cb func(GestureStylus, float64, float64)) uint32 { | |
| 137 | 137 | fcb := func(clsPtr uintptr, XVarp float64, YVarp float64) { | |
| 138 | 138 | fa := GestureStylus{} | |
| 139 | 139 | fa.Ptr = clsPtr | |
| @@ -141,11 +141,11 @@ func (x *GestureStylus) ConnectMotion(cb func(GestureStylus, float64, float64)) | |||
| 141 | 141 | cb(fa, XVarp, YVarp) | |
| 142 | 142 | ||
| 143 | 143 | } | |
| 144 | - | gobject.ObjectConnect(x.GoPointer(), "signal::motion", purego.NewCallback(fcb)) | |
| 144 | + | return gobject.SignalConnect(x.GoPointer(), "motion", purego.NewCallback(fcb)) | |
| 145 | 145 | } | |
| 146 | 146 | ||
| 147 | 147 | // Emitted when the stylus is in proximity of the device. | |
| 148 | - | func (x *GestureStylus) ConnectProximity(cb func(GestureStylus, float64, float64)) { | |
| 148 | + | func (x *GestureStylus) ConnectProximity(cb func(GestureStylus, float64, float64)) uint32 { | |
| 149 | 149 | fcb := func(clsPtr uintptr, XVarp float64, YVarp float64) { | |
| 150 | 150 | fa := GestureStylus{} | |
| 151 | 151 | fa.Ptr = clsPtr | |
| @@ -153,11 +153,11 @@ func (x *GestureStylus) ConnectProximity(cb func(GestureStylus, float64, float64 | |||
| 153 | 153 | cb(fa, XVarp, YVarp) | |
| 154 | 154 | ||
| 155 | 155 | } | |
| 156 | - | gobject.ObjectConnect(x.GoPointer(), "signal::proximity", purego.NewCallback(fcb)) | |
| 156 | + | return gobject.SignalConnect(x.GoPointer(), "proximity", purego.NewCallback(fcb)) | |
| 157 | 157 | } | |
| 158 | 158 | ||
| 159 | 159 | // Emitted when the stylus no longer touches the device. | |
| 160 | - | func (x *GestureStylus) ConnectUp(cb func(GestureStylus, float64, float64)) { | |
| 160 | + | func (x *GestureStylus) ConnectUp(cb func(GestureStylus, float64, float64)) uint32 { | |
| 161 | 161 | fcb := func(clsPtr uintptr, XVarp float64, YVarp float64) { | |
| 162 | 162 | fa := GestureStylus{} | |
| 163 | 163 | fa.Ptr = clsPtr | |
| @@ -165,7 +165,7 @@ func (x *GestureStylus) ConnectUp(cb func(GestureStylus, float64, float64)) { | |||
| 165 | 165 | cb(fa, XVarp, YVarp) | |
| 166 | 166 | ||
| 167 | 167 | } | |
| 168 | - | gobject.ObjectConnect(x.GoPointer(), "signal::up", purego.NewCallback(fcb)) | |
| 168 | + | return gobject.SignalConnect(x.GoPointer(), "up", purego.NewCallback(fcb)) | |
| 169 | 169 | } | |
| 170 | 170 | ||
| 171 | 171 | func init() { | |
M v4/gtk/gtkgestureswipe.go +2 -2
| @@ -72,7 +72,7 @@ func (c *GestureSwipe) SetGoPointer(ptr uintptr) { | |||
| 72 | 72 | // Emitted when the recognized gesture is finished. | |
| 73 | 73 | // | |
| 74 | 74 | // Velocity and direction are a product of previously recorded events. | |
| 75 | - | func (x *GestureSwipe) ConnectSwipe(cb func(GestureSwipe, float64, float64)) { | |
| 75 | + | func (x *GestureSwipe) ConnectSwipe(cb func(GestureSwipe, float64, float64)) uint32 { | |
| 76 | 76 | fcb := func(clsPtr uintptr, VelocityXVarp float64, VelocityYVarp float64) { | |
| 77 | 77 | fa := GestureSwipe{} | |
| 78 | 78 | fa.Ptr = clsPtr | |
| @@ -80,7 +80,7 @@ func (x *GestureSwipe) ConnectSwipe(cb func(GestureSwipe, float64, float64)) { | |||
| 80 | 80 | cb(fa, VelocityXVarp, VelocityYVarp) | |
| 81 | 81 | ||
| 82 | 82 | } | |
| 83 | - | gobject.ObjectConnect(x.GoPointer(), "signal::swipe", purego.NewCallback(fcb)) | |
| 83 | + | return gobject.SignalConnect(x.GoPointer(), "swipe", purego.NewCallback(fcb)) | |
| 84 | 84 | } | |
| 85 | 85 | ||
| 86 | 86 | func init() { | |
M v4/gtk/gtkgesturezoom.go +2 -2
| @@ -65,7 +65,7 @@ func (c *GestureZoom) SetGoPointer(ptr uintptr) { | |||
| 65 | 65 | } | |
| 66 | 66 | ||
| 67 | 67 | // Emitted whenever the distance between both tracked sequences changes. | |
| 68 | - | func (x *GestureZoom) ConnectScaleChanged(cb func(GestureZoom, float64)) { | |
| 68 | + | func (x *GestureZoom) ConnectScaleChanged(cb func(GestureZoom, float64)) uint32 { | |
| 69 | 69 | fcb := func(clsPtr uintptr, ScaleVarp float64) { | |
| 70 | 70 | fa := GestureZoom{} | |
| 71 | 71 | fa.Ptr = clsPtr | |
| @@ -73,7 +73,7 @@ func (x *GestureZoom) ConnectScaleChanged(cb func(GestureZoom, float64)) { | |||
| 73 | 73 | cb(fa, ScaleVarp) | |
| 74 | 74 | ||
| 75 | 75 | } | |
| 76 | - | gobject.ObjectConnect(x.GoPointer(), "signal::scale-changed", purego.NewCallback(fcb)) | |
| 76 | + | return gobject.SignalConnect(x.GoPointer(), "scale-changed", purego.NewCallback(fcb)) | |
| 77 | 77 | } | |
| 78 | 78 | ||
| 79 | 79 | func init() { | |
M v4/gtk/gtkglarea.go +6 -6
| @@ -372,7 +372,7 @@ func (c *GLArea) SetGoPointer(ptr uintptr) { | |||
| 372 | 372 | // If context creation fails then the signal handler can use | |
| 373 | 373 | // [method@Gtk.GLArea.set_error] to register a more detailed error | |
| 374 | 374 | // of how the construction failed. | |
| 375 | - | func (x *GLArea) ConnectCreateContext(cb func(GLArea) gdk.GLContext) { | |
| 375 | + | func (x *GLArea) ConnectCreateContext(cb func(GLArea) gdk.GLContext) uint32 { | |
| 376 | 376 | fcb := func(clsPtr uintptr) uintptr { | |
| 377 | 377 | fa := GLArea{} | |
| 378 | 378 | fa.Ptr = clsPtr | |
| @@ -381,14 +381,14 @@ func (x *GLArea) ConnectCreateContext(cb func(GLArea) gdk.GLContext) { | |||
| 381 | 381 | return CreateContextCls.Ptr | |
| 382 | 382 | ||
| 383 | 383 | } | |
| 384 | - | gobject.ObjectConnect(x.GoPointer(), "signal::create-context", purego.NewCallback(fcb)) | |
| 384 | + | return gobject.SignalConnect(x.GoPointer(), "create-context", purego.NewCallback(fcb)) | |
| 385 | 385 | } | |
| 386 | 386 | ||
| 387 | 387 | // Emitted every time the contents of the `GtkGLArea` should be redrawn. | |
| 388 | 388 | // | |
| 389 | 389 | // The @context is bound to the @area prior to emitting this function, | |
| 390 | 390 | // and the buffers are painted to the window once the emission terminates. | |
| 391 | - | func (x *GLArea) ConnectRender(cb func(GLArea, uintptr) bool) { | |
| 391 | + | func (x *GLArea) ConnectRender(cb func(GLArea, uintptr) bool) uint32 { | |
| 392 | 392 | fcb := func(clsPtr uintptr, ContextVarp uintptr) bool { | |
| 393 | 393 | fa := GLArea{} | |
| 394 | 394 | fa.Ptr = clsPtr | |
| @@ -396,7 +396,7 @@ func (x *GLArea) ConnectRender(cb func(GLArea, uintptr) bool) { | |||
| 396 | 396 | return cb(fa, ContextVarp) | |
| 397 | 397 | ||
| 398 | 398 | } | |
| 399 | - | gobject.ObjectConnect(x.GoPointer(), "signal::render", purego.NewCallback(fcb)) | |
| 399 | + | return gobject.SignalConnect(x.GoPointer(), "render", purego.NewCallback(fcb)) | |
| 400 | 400 | } | |
| 401 | 401 | ||
| 402 | 402 | // Emitted once when the widget is realized, and then each time the widget | |
| @@ -410,7 +410,7 @@ func (x *GLArea) ConnectRender(cb func(GLArea, uintptr) bool) { | |||
| 410 | 410 | // is emitted. | |
| 411 | 411 | // | |
| 412 | 412 | // The default handler sets up the GL viewport. | |
| 413 | - | func (x *GLArea) ConnectResize(cb func(GLArea, int, int)) { | |
| 413 | + | func (x *GLArea) ConnectResize(cb func(GLArea, int, int)) uint32 { | |
| 414 | 414 | fcb := func(clsPtr uintptr, WidthVarp int, HeightVarp int) { | |
| 415 | 415 | fa := GLArea{} | |
| 416 | 416 | fa.Ptr = clsPtr | |
| @@ -418,7 +418,7 @@ func (x *GLArea) ConnectResize(cb func(GLArea, int, int)) { | |||
| 418 | 418 | cb(fa, WidthVarp, HeightVarp) | |
| 419 | 419 | ||
| 420 | 420 | } | |
| 421 | - | gobject.ObjectConnect(x.GoPointer(), "signal::resize", purego.NewCallback(fcb)) | |
| 421 | + | return gobject.SignalConnect(x.GoPointer(), "resize", purego.NewCallback(fcb)) | |
| 422 | 422 | } | |
| 423 | 423 | ||
| 424 | 424 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkgridview.go +2 -2
| @@ -234,7 +234,7 @@ func (c *GridView) SetGoPointer(ptr uintptr) { | |||
| 234 | 234 | // This allows for a convenient way to handle activation in a gridview. | |
| 235 | 235 | // See [property@Gtk.ListItem:activatable] for details on how to use | |
| 236 | 236 | // this signal. | |
| 237 | - | func (x *GridView) ConnectActivate(cb func(GridView, uint)) { | |
| 237 | + | func (x *GridView) ConnectActivate(cb func(GridView, uint)) uint32 { | |
| 238 | 238 | fcb := func(clsPtr uintptr, PositionVarp uint) { | |
| 239 | 239 | fa := GridView{} | |
| 240 | 240 | fa.Ptr = clsPtr | |
| @@ -242,7 +242,7 @@ func (x *GridView) ConnectActivate(cb func(GridView, uint)) { | |||
| 242 | 242 | cb(fa, PositionVarp) | |
| 243 | 243 | ||
| 244 | 244 | } | |
| 245 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 245 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 246 | 246 | } | |
| 247 | 247 | ||
| 248 | 248 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkicontheme.go +2 -2
| @@ -581,7 +581,7 @@ func (c *IconTheme) SetGoPointer(ptr uintptr) { | |||
| 581 | 581 | // This can happen becuase current icon theme is switched or | |
| 582 | 582 | // because GTK detects that a change has occurred in the | |
| 583 | 583 | // contents of the current icon theme. | |
| 584 | - | func (x *IconTheme) ConnectChanged(cb func(IconTheme)) { | |
| 584 | + | func (x *IconTheme) ConnectChanged(cb func(IconTheme)) uint32 { | |
| 585 | 585 | fcb := func(clsPtr uintptr) { | |
| 586 | 586 | fa := IconTheme{} | |
| 587 | 587 | fa.Ptr = clsPtr | |
| @@ -589,7 +589,7 @@ func (x *IconTheme) ConnectChanged(cb func(IconTheme)) { | |||
| 589 | 589 | cb(fa) | |
| 590 | 590 | ||
| 591 | 591 | } | |
| 592 | - | gobject.ObjectConnect(x.GoPointer(), "signal::changed", purego.NewCallback(fcb)) | |
| 592 | + | return gobject.SignalConnect(x.GoPointer(), "changed", purego.NewCallback(fcb)) | |
| 593 | 593 | } | |
| 594 | 594 | ||
| 595 | 595 | func init() { | |
M v4/gtk/gtkiconview.go +16 -16
| @@ -807,7 +807,7 @@ func (c *IconView) SetGoPointer(ptr uintptr) { | |||
| 807 | 807 | // programmatically. | |
| 808 | 808 | // | |
| 809 | 809 | // The default bindings for this signal are Space, Return and Enter. | |
| 810 | - | func (x *IconView) ConnectActivateCursorItem(cb func(IconView) bool) { | |
| 810 | + | func (x *IconView) ConnectActivateCursorItem(cb func(IconView) bool) uint32 { | |
| 811 | 811 | fcb := func(clsPtr uintptr) bool { | |
| 812 | 812 | fa := IconView{} | |
| 813 | 813 | fa.Ptr = clsPtr | |
| @@ -815,7 +815,7 @@ func (x *IconView) ConnectActivateCursorItem(cb func(IconView) bool) { | |||
| 815 | 815 | return cb(fa) | |
| 816 | 816 | ||
| 817 | 817 | } | |
| 818 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate-cursor-item", purego.NewCallback(fcb)) | |
| 818 | + | return gobject.SignalConnect(x.GoPointer(), "activate-cursor-item", purego.NewCallback(fcb)) | |
| 819 | 819 | } | |
| 820 | 820 | ||
| 821 | 821 | // The ::item-activated signal is emitted when the method | |
| @@ -825,7 +825,7 @@ func (x *IconView) ConnectActivateCursorItem(cb func(IconView) bool) { | |||
| 825 | 825 | // "activate-on-single-click" property set to %TRUE. It is also | |
| 826 | 826 | // emitted when a non-editable item is selected and one of the keys: | |
| 827 | 827 | // Space, Return or Enter is pressed. | |
| 828 | - | func (x *IconView) ConnectItemActivated(cb func(IconView, uintptr)) { | |
| 828 | + | func (x *IconView) ConnectItemActivated(cb func(IconView, uintptr)) uint32 { | |
| 829 | 829 | fcb := func(clsPtr uintptr, PathVarp uintptr) { | |
| 830 | 830 | fa := IconView{} | |
| 831 | 831 | fa.Ptr = clsPtr | |
| @@ -833,7 +833,7 @@ func (x *IconView) ConnectItemActivated(cb func(IconView, uintptr)) { | |||
| 833 | 833 | cb(fa, PathVarp) | |
| 834 | 834 | ||
| 835 | 835 | } | |
| 836 | - | gobject.ObjectConnect(x.GoPointer(), "signal::item-activated", purego.NewCallback(fcb)) | |
| 836 | + | return gobject.SignalConnect(x.GoPointer(), "item-activated", purego.NewCallback(fcb)) | |
| 837 | 837 | } | |
| 838 | 838 | ||
| 839 | 839 | // The ::move-cursor signal is a | |
| @@ -850,7 +850,7 @@ func (x *IconView) ConnectItemActivated(cb func(IconView, uintptr)) { | |||
| 850 | 850 | // - PageUp/PageDown which move by "pages" | |
| 851 | 851 | // All of these will extend the selection when combined with | |
| 852 | 852 | // the Shift modifier. | |
| 853 | - | func (x *IconView) ConnectMoveCursor(cb func(IconView, MovementStep, int, bool, bool) bool) { | |
| 853 | + | func (x *IconView) ConnectMoveCursor(cb func(IconView, MovementStep, int, bool, bool) bool) uint32 { | |
| 854 | 854 | fcb := func(clsPtr uintptr, StepVarp MovementStep, CountVarp int, ExtendVarp bool, ModifyVarp bool) bool { | |
| 855 | 855 | fa := IconView{} | |
| 856 | 856 | fa.Ptr = clsPtr | |
| @@ -858,7 +858,7 @@ func (x *IconView) ConnectMoveCursor(cb func(IconView, MovementStep, int, bool, | |||
| 858 | 858 | return cb(fa, StepVarp, CountVarp, ExtendVarp, ModifyVarp) | |
| 859 | 859 | ||
| 860 | 860 | } | |
| 861 | - | gobject.ObjectConnect(x.GoPointer(), "signal::move-cursor", purego.NewCallback(fcb)) | |
| 861 | + | return gobject.SignalConnect(x.GoPointer(), "move-cursor", purego.NewCallback(fcb)) | |
| 862 | 862 | } | |
| 863 | 863 | ||
| 864 | 864 | // A [keybinding signal][class@Gtk.SignalAction] | |
| @@ -869,7 +869,7 @@ func (x *IconView) ConnectMoveCursor(cb func(IconView, MovementStep, int, bool, | |||
| 869 | 869 | // programmatically. | |
| 870 | 870 | // | |
| 871 | 871 | // The default binding for this signal is Ctrl-a. | |
| 872 | - | func (x *IconView) ConnectSelectAll(cb func(IconView)) { | |
| 872 | + | func (x *IconView) ConnectSelectAll(cb func(IconView)) uint32 { | |
| 873 | 873 | fcb := func(clsPtr uintptr) { | |
| 874 | 874 | fa := IconView{} | |
| 875 | 875 | fa.Ptr = clsPtr | |
| @@ -877,7 +877,7 @@ func (x *IconView) ConnectSelectAll(cb func(IconView)) { | |||
| 877 | 877 | cb(fa) | |
| 878 | 878 | ||
| 879 | 879 | } | |
| 880 | - | gobject.ObjectConnect(x.GoPointer(), "signal::select-all", purego.NewCallback(fcb)) | |
| 880 | + | return gobject.SignalConnect(x.GoPointer(), "select-all", purego.NewCallback(fcb)) | |
| 881 | 881 | } | |
| 882 | 882 | ||
| 883 | 883 | // A [keybinding signal][class@Gtk.SignalAction] | |
| @@ -889,7 +889,7 @@ func (x *IconView) ConnectSelectAll(cb func(IconView)) { | |||
| 889 | 889 | // programmatically. | |
| 890 | 890 | // | |
| 891 | 891 | // There is no default binding for this signal. | |
| 892 | - | func (x *IconView) ConnectSelectCursorItem(cb func(IconView)) { | |
| 892 | + | func (x *IconView) ConnectSelectCursorItem(cb func(IconView)) uint32 { | |
| 893 | 893 | fcb := func(clsPtr uintptr) { | |
| 894 | 894 | fa := IconView{} | |
| 895 | 895 | fa.Ptr = clsPtr | |
| @@ -897,12 +897,12 @@ func (x *IconView) ConnectSelectCursorItem(cb func(IconView)) { | |||
| 897 | 897 | cb(fa) | |
| 898 | 898 | ||
| 899 | 899 | } | |
| 900 | - | gobject.ObjectConnect(x.GoPointer(), "signal::select-cursor-item", purego.NewCallback(fcb)) | |
| 900 | + | return gobject.SignalConnect(x.GoPointer(), "select-cursor-item", purego.NewCallback(fcb)) | |
| 901 | 901 | } | |
| 902 | 902 | ||
| 903 | 903 | // The ::selection-changed signal is emitted when the selection | |
| 904 | 904 | // (i.e. the set of selected items) changes. | |
| 905 | - | func (x *IconView) ConnectSelectionChanged(cb func(IconView)) { | |
| 905 | + | func (x *IconView) ConnectSelectionChanged(cb func(IconView)) uint32 { | |
| 906 | 906 | fcb := func(clsPtr uintptr) { | |
| 907 | 907 | fa := IconView{} | |
| 908 | 908 | fa.Ptr = clsPtr | |
| @@ -910,7 +910,7 @@ func (x *IconView) ConnectSelectionChanged(cb func(IconView)) { | |||
| 910 | 910 | cb(fa) | |
| 911 | 911 | ||
| 912 | 912 | } | |
| 913 | - | gobject.ObjectConnect(x.GoPointer(), "signal::selection-changed", purego.NewCallback(fcb)) | |
| 913 | + | return gobject.SignalConnect(x.GoPointer(), "selection-changed", purego.NewCallback(fcb)) | |
| 914 | 914 | } | |
| 915 | 915 | ||
| 916 | 916 | // A [keybinding signal][class@Gtk.SignalAction] | |
| @@ -923,7 +923,7 @@ func (x *IconView) ConnectSelectionChanged(cb func(IconView)) { | |||
| 923 | 923 | // programmatically. | |
| 924 | 924 | // | |
| 925 | 925 | // There is no default binding for this signal is Ctrl-Space. | |
| 926 | - | func (x *IconView) ConnectToggleCursorItem(cb func(IconView)) { | |
| 926 | + | func (x *IconView) ConnectToggleCursorItem(cb func(IconView)) uint32 { | |
| 927 | 927 | fcb := func(clsPtr uintptr) { | |
| 928 | 928 | fa := IconView{} | |
| 929 | 929 | fa.Ptr = clsPtr | |
| @@ -931,7 +931,7 @@ func (x *IconView) ConnectToggleCursorItem(cb func(IconView)) { | |||
| 931 | 931 | cb(fa) | |
| 932 | 932 | ||
| 933 | 933 | } | |
| 934 | - | gobject.ObjectConnect(x.GoPointer(), "signal::toggle-cursor-item", purego.NewCallback(fcb)) | |
| 934 | + | return gobject.SignalConnect(x.GoPointer(), "toggle-cursor-item", purego.NewCallback(fcb)) | |
| 935 | 935 | } | |
| 936 | 936 | ||
| 937 | 937 | // A [keybinding signal][class@Gtk.SignalAction] | |
| @@ -942,7 +942,7 @@ func (x *IconView) ConnectToggleCursorItem(cb func(IconView)) { | |||
| 942 | 942 | // programmatically. | |
| 943 | 943 | // | |
| 944 | 944 | // The default binding for this signal is Ctrl-Shift-a. | |
| 945 | - | func (x *IconView) ConnectUnselectAll(cb func(IconView)) { | |
| 945 | + | func (x *IconView) ConnectUnselectAll(cb func(IconView)) uint32 { | |
| 946 | 946 | fcb := func(clsPtr uintptr) { | |
| 947 | 947 | fa := IconView{} | |
| 948 | 948 | fa.Ptr = clsPtr | |
| @@ -950,7 +950,7 @@ func (x *IconView) ConnectUnselectAll(cb func(IconView)) { | |||
| 950 | 950 | cb(fa) | |
| 951 | 951 | ||
| 952 | 952 | } | |
| 953 | - | gobject.ObjectConnect(x.GoPointer(), "signal::unselect-all", purego.NewCallback(fcb)) | |
| 953 | + | return gobject.SignalConnect(x.GoPointer(), "unselect-all", purego.NewCallback(fcb)) | |
| 954 | 954 | } | |
| 955 | 955 | ||
| 956 | 956 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkimcontext.go +12 -12
| @@ -278,7 +278,7 @@ func (c *IMContext) SetGoPointer(ptr uintptr) { | |||
| 278 | 278 | // | |
| 279 | 279 | // This can be a single character immediately after a key press or | |
| 280 | 280 | // the final result of preediting. | |
| 281 | - | func (x *IMContext) ConnectCommit(cb func(IMContext, string)) { | |
| 281 | + | func (x *IMContext) ConnectCommit(cb func(IMContext, string)) uint32 { | |
| 282 | 282 | fcb := func(clsPtr uintptr, StrVarp string) { | |
| 283 | 283 | fa := IMContext{} | |
| 284 | 284 | fa.Ptr = clsPtr | |
| @@ -286,12 +286,12 @@ func (x *IMContext) ConnectCommit(cb func(IMContext, string)) { | |||
| 286 | 286 | cb(fa, StrVarp) | |
| 287 | 287 | ||
| 288 | 288 | } | |
| 289 | - | gobject.ObjectConnect(x.GoPointer(), "signal::commit", purego.NewCallback(fcb)) | |
| 289 | + | return gobject.SignalConnect(x.GoPointer(), "commit", purego.NewCallback(fcb)) | |
| 290 | 290 | } | |
| 291 | 291 | ||
| 292 | 292 | // The ::delete-surrounding signal is emitted when the input method | |
| 293 | 293 | // needs to delete all or part of the context surrounding the cursor. | |
| 294 | - | func (x *IMContext) ConnectDeleteSurrounding(cb func(IMContext, int, int) bool) { | |
| 294 | + | func (x *IMContext) ConnectDeleteSurrounding(cb func(IMContext, int, int) bool) uint32 { | |
| 295 | 295 | fcb := func(clsPtr uintptr, OffsetVarp int, NCharsVarp int) bool { | |
| 296 | 296 | fa := IMContext{} | |
| 297 | 297 | fa.Ptr = clsPtr | |
| @@ -299,7 +299,7 @@ func (x *IMContext) ConnectDeleteSurrounding(cb func(IMContext, int, int) bool) | |||
| 299 | 299 | return cb(fa, OffsetVarp, NCharsVarp) | |
| 300 | 300 | ||
| 301 | 301 | } | |
| 302 | - | gobject.ObjectConnect(x.GoPointer(), "signal::delete-surrounding", purego.NewCallback(fcb)) | |
| 302 | + | return gobject.SignalConnect(x.GoPointer(), "delete-surrounding", purego.NewCallback(fcb)) | |
| 303 | 303 | } | |
| 304 | 304 | ||
| 305 | 305 | // The ::preedit-changed signal is emitted whenever the preedit sequence | |
| @@ -307,7 +307,7 @@ func (x *IMContext) ConnectDeleteSurrounding(cb func(IMContext, int, int) bool) | |||
| 307 | 307 | // | |
| 308 | 308 | // It is also emitted at the end of a preedit sequence, in which case | |
| 309 | 309 | // [method@Gtk.IMContext.get_preedit_string] returns the empty string. | |
| 310 | - | func (x *IMContext) ConnectPreeditChanged(cb func(IMContext)) { | |
| 310 | + | func (x *IMContext) ConnectPreeditChanged(cb func(IMContext)) uint32 { | |
| 311 | 311 | fcb := func(clsPtr uintptr) { | |
| 312 | 312 | fa := IMContext{} | |
| 313 | 313 | fa.Ptr = clsPtr | |
| @@ -315,12 +315,12 @@ func (x *IMContext) ConnectPreeditChanged(cb func(IMContext)) { | |||
| 315 | 315 | cb(fa) | |
| 316 | 316 | ||
| 317 | 317 | } | |
| 318 | - | gobject.ObjectConnect(x.GoPointer(), "signal::preedit-changed", purego.NewCallback(fcb)) | |
| 318 | + | return gobject.SignalConnect(x.GoPointer(), "preedit-changed", purego.NewCallback(fcb)) | |
| 319 | 319 | } | |
| 320 | 320 | ||
| 321 | 321 | // The ::preedit-end signal is emitted when a preediting sequence | |
| 322 | 322 | // has been completed or canceled. | |
| 323 | - | func (x *IMContext) ConnectPreeditEnd(cb func(IMContext)) { | |
| 323 | + | func (x *IMContext) ConnectPreeditEnd(cb func(IMContext)) uint32 { | |
| 324 | 324 | fcb := func(clsPtr uintptr) { | |
| 325 | 325 | fa := IMContext{} | |
| 326 | 326 | fa.Ptr = clsPtr | |
| @@ -328,12 +328,12 @@ func (x *IMContext) ConnectPreeditEnd(cb func(IMContext)) { | |||
| 328 | 328 | cb(fa) | |
| 329 | 329 | ||
| 330 | 330 | } | |
| 331 | - | gobject.ObjectConnect(x.GoPointer(), "signal::preedit-end", purego.NewCallback(fcb)) | |
| 331 | + | return gobject.SignalConnect(x.GoPointer(), "preedit-end", purego.NewCallback(fcb)) | |
| 332 | 332 | } | |
| 333 | 333 | ||
| 334 | 334 | // The ::preedit-start signal is emitted when a new preediting sequence | |
| 335 | 335 | // starts. | |
| 336 | - | func (x *IMContext) ConnectPreeditStart(cb func(IMContext)) { | |
| 336 | + | func (x *IMContext) ConnectPreeditStart(cb func(IMContext)) uint32 { | |
| 337 | 337 | fcb := func(clsPtr uintptr) { | |
| 338 | 338 | fa := IMContext{} | |
| 339 | 339 | fa.Ptr = clsPtr | |
| @@ -341,7 +341,7 @@ func (x *IMContext) ConnectPreeditStart(cb func(IMContext)) { | |||
| 341 | 341 | cb(fa) | |
| 342 | 342 | ||
| 343 | 343 | } | |
| 344 | - | gobject.ObjectConnect(x.GoPointer(), "signal::preedit-start", purego.NewCallback(fcb)) | |
| 344 | + | return gobject.SignalConnect(x.GoPointer(), "preedit-start", purego.NewCallback(fcb)) | |
| 345 | 345 | } | |
| 346 | 346 | ||
| 347 | 347 | // The ::retrieve-surrounding signal is emitted when the input method | |
| @@ -349,7 +349,7 @@ func (x *IMContext) ConnectPreeditStart(cb func(IMContext)) { | |||
| 349 | 349 | // | |
| 350 | 350 | // The callback should set the input method surrounding context by | |
| 351 | 351 | // calling the [method@Gtk.IMContext.set_surrounding] method. | |
| 352 | - | func (x *IMContext) ConnectRetrieveSurrounding(cb func(IMContext) bool) { | |
| 352 | + | func (x *IMContext) ConnectRetrieveSurrounding(cb func(IMContext) bool) uint32 { | |
| 353 | 353 | fcb := func(clsPtr uintptr) bool { | |
| 354 | 354 | fa := IMContext{} | |
| 355 | 355 | fa.Ptr = clsPtr | |
| @@ -357,7 +357,7 @@ func (x *IMContext) ConnectRetrieveSurrounding(cb func(IMContext) bool) { | |||
| 357 | 357 | return cb(fa) | |
| 358 | 358 | ||
| 359 | 359 | } | |
| 360 | - | gobject.ObjectConnect(x.GoPointer(), "signal::retrieve-surrounding", purego.NewCallback(fcb)) | |
| 360 | + | return gobject.SignalConnect(x.GoPointer(), "retrieve-surrounding", purego.NewCallback(fcb)) | |
| 361 | 361 | } | |
| 362 | 362 | ||
| 363 | 363 | func init() { | |
M v4/gtk/gtkinfobar.go +4 -4
| @@ -331,7 +331,7 @@ func (c *InfoBar) SetGoPointer(ptr uintptr) { | |||
| 331 | 331 | // The ::close signal is a [keybinding signal](class.SignalAction.html). | |
| 332 | 332 | // | |
| 333 | 333 | // The default binding for this signal is the Escape key. | |
| 334 | - | func (x *InfoBar) ConnectClose(cb func(InfoBar)) { | |
| 334 | + | func (x *InfoBar) ConnectClose(cb func(InfoBar)) uint32 { | |
| 335 | 335 | fcb := func(clsPtr uintptr) { | |
| 336 | 336 | fa := InfoBar{} | |
| 337 | 337 | fa.Ptr = clsPtr | |
| @@ -339,7 +339,7 @@ func (x *InfoBar) ConnectClose(cb func(InfoBar)) { | |||
| 339 | 339 | cb(fa) | |
| 340 | 340 | ||
| 341 | 341 | } | |
| 342 | - | gobject.ObjectConnect(x.GoPointer(), "signal::close", purego.NewCallback(fcb)) | |
| 342 | + | return gobject.SignalConnect(x.GoPointer(), "close", purego.NewCallback(fcb)) | |
| 343 | 343 | } | |
| 344 | 344 | ||
| 345 | 345 | // Emitted when an action widget is clicked. | |
| @@ -347,7 +347,7 @@ func (x *InfoBar) ConnectClose(cb func(InfoBar)) { | |||
| 347 | 347 | // The signal is also emitted when the application programmer | |
| 348 | 348 | // calls [method@Gtk.InfoBar.response]. The @response_id depends | |
| 349 | 349 | // on which action widget was clicked. | |
| 350 | - | func (x *InfoBar) ConnectResponse(cb func(InfoBar, int)) { | |
| 350 | + | func (x *InfoBar) ConnectResponse(cb func(InfoBar, int)) uint32 { | |
| 351 | 351 | fcb := func(clsPtr uintptr, ResponseIdVarp int) { | |
| 352 | 352 | fa := InfoBar{} | |
| 353 | 353 | fa.Ptr = clsPtr | |
| @@ -355,7 +355,7 @@ func (x *InfoBar) ConnectResponse(cb func(InfoBar, int)) { | |||
| 355 | 355 | cb(fa, ResponseIdVarp) | |
| 356 | 356 | ||
| 357 | 357 | } | |
| 358 | - | gobject.ObjectConnect(x.GoPointer(), "signal::response", purego.NewCallback(fcb)) | |
| 358 | + | return gobject.SignalConnect(x.GoPointer(), "response", purego.NewCallback(fcb)) | |
| 359 | 359 | } | |
| 360 | 360 | ||
| 361 | 361 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtklabel.go +8 -8
| @@ -925,7 +925,7 @@ func (c *Label) SetGoPointer(ptr uintptr) { | |||
| 925 | 925 | // if they need to control activation of URIs programmatically. | |
| 926 | 926 | // | |
| 927 | 927 | // The default bindings for this signal are all forms of the Enter key. | |
| 928 | - | func (x *Label) ConnectActivateCurrentLink(cb func(Label)) { | |
| 928 | + | func (x *Label) ConnectActivateCurrentLink(cb func(Label)) uint32 { | |
| 929 | 929 | fcb := func(clsPtr uintptr) { | |
| 930 | 930 | fa := Label{} | |
| 931 | 931 | fa.Ptr = clsPtr | |
| @@ -933,14 +933,14 @@ func (x *Label) ConnectActivateCurrentLink(cb func(Label)) { | |||
| 933 | 933 | cb(fa) | |
| 934 | 934 | ||
| 935 | 935 | } | |
| 936 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate-current-link", purego.NewCallback(fcb)) | |
| 936 | + | return gobject.SignalConnect(x.GoPointer(), "activate-current-link", purego.NewCallback(fcb)) | |
| 937 | 937 | } | |
| 938 | 938 | ||
| 939 | 939 | // Gets emitted to activate a URI. | |
| 940 | 940 | // | |
| 941 | 941 | // Applications may connect to it to override the default behaviour, | |
| 942 | 942 | // which is to call gtk_show_uri(). | |
| 943 | - | func (x *Label) ConnectActivateLink(cb func(Label, string) bool) { | |
| 943 | + | func (x *Label) ConnectActivateLink(cb func(Label, string) bool) uint32 { | |
| 944 | 944 | fcb := func(clsPtr uintptr, UriVarp string) bool { | |
| 945 | 945 | fa := Label{} | |
| 946 | 946 | fa.Ptr = clsPtr | |
| @@ -948,7 +948,7 @@ func (x *Label) ConnectActivateLink(cb func(Label, string) bool) { | |||
| 948 | 948 | return cb(fa, UriVarp) | |
| 949 | 949 | ||
| 950 | 950 | } | |
| 951 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate-link", purego.NewCallback(fcb)) | |
| 951 | + | return gobject.SignalConnect(x.GoPointer(), "activate-link", purego.NewCallback(fcb)) | |
| 952 | 952 | } | |
| 953 | 953 | ||
| 954 | 954 | // Gets emitted to copy the slection to the clipboard. | |
| @@ -956,7 +956,7 @@ func (x *Label) ConnectActivateLink(cb func(Label, string) bool) { | |||
| 956 | 956 | // The ::copy-clipboard signal is a [keybinding signal](class.SignalAction.html). | |
| 957 | 957 | // | |
| 958 | 958 | // The default binding for this signal is Ctrl-c. | |
| 959 | - | func (x *Label) ConnectCopyClipboard(cb func(Label)) { | |
| 959 | + | func (x *Label) ConnectCopyClipboard(cb func(Label)) uint32 { | |
| 960 | 960 | fcb := func(clsPtr uintptr) { | |
| 961 | 961 | fa := Label{} | |
| 962 | 962 | fa.Ptr = clsPtr | |
| @@ -964,7 +964,7 @@ func (x *Label) ConnectCopyClipboard(cb func(Label)) { | |||
| 964 | 964 | cb(fa) | |
| 965 | 965 | ||
| 966 | 966 | } | |
| 967 | - | gobject.ObjectConnect(x.GoPointer(), "signal::copy-clipboard", purego.NewCallback(fcb)) | |
| 967 | + | return gobject.SignalConnect(x.GoPointer(), "copy-clipboard", purego.NewCallback(fcb)) | |
| 968 | 968 | } | |
| 969 | 969 | ||
| 970 | 970 | // Gets emitted when the user initiates a cursor movement. | |
| @@ -984,7 +984,7 @@ func (x *Label) ConnectCopyClipboard(cb func(Label)) { | |||
| 984 | 984 | // - Arrow keys move by individual characters/lines | |
| 985 | 985 | // - Ctrl-arrow key combinations move by words/paragraphs | |
| 986 | 986 | // - Home/End keys move to the ends of the buffer | |
| 987 | - | func (x *Label) ConnectMoveCursor(cb func(Label, MovementStep, int, bool)) { | |
| 987 | + | func (x *Label) ConnectMoveCursor(cb func(Label, MovementStep, int, bool)) uint32 { | |
| 988 | 988 | fcb := func(clsPtr uintptr, StepVarp MovementStep, CountVarp int, ExtendSelectionVarp bool) { | |
| 989 | 989 | fa := Label{} | |
| 990 | 990 | fa.Ptr = clsPtr | |
| @@ -992,7 +992,7 @@ func (x *Label) ConnectMoveCursor(cb func(Label, MovementStep, int, bool)) { | |||
| 992 | 992 | cb(fa, StepVarp, CountVarp, ExtendSelectionVarp) | |
| 993 | 993 | ||
| 994 | 994 | } | |
| 995 | - | gobject.ObjectConnect(x.GoPointer(), "signal::move-cursor", purego.NewCallback(fcb)) | |
| 995 | + | return gobject.SignalConnect(x.GoPointer(), "move-cursor", purego.NewCallback(fcb)) | |
| 996 | 996 | } | |
| 997 | 997 | ||
| 998 | 998 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtklevelbar.go +2 -2
| @@ -302,7 +302,7 @@ func (c *LevelBar) SetGoPointer(ptr uintptr) { | |||
| 302 | 302 | // The signal supports detailed connections; you can connect to the | |
| 303 | 303 | // detailed signal "changed::x" in order to only receive callbacks when | |
| 304 | 304 | // the value of offset "x" changes. | |
| 305 | - | func (x *LevelBar) ConnectOffsetChanged(cb func(LevelBar, string)) { | |
| 305 | + | func (x *LevelBar) ConnectOffsetChanged(cb func(LevelBar, string)) uint32 { | |
| 306 | 306 | fcb := func(clsPtr uintptr, NameVarp string) { | |
| 307 | 307 | fa := LevelBar{} | |
| 308 | 308 | fa.Ptr = clsPtr | |
| @@ -310,7 +310,7 @@ func (x *LevelBar) ConnectOffsetChanged(cb func(LevelBar, string)) { | |||
| 310 | 310 | cb(fa, NameVarp) | |
| 311 | 311 | ||
| 312 | 312 | } | |
| 313 | - | gobject.ObjectConnect(x.GoPointer(), "signal::offset-changed", purego.NewCallback(fcb)) | |
| 313 | + | return gobject.SignalConnect(x.GoPointer(), "offset-changed", purego.NewCallback(fcb)) | |
| 314 | 314 | } | |
| 315 | 315 | ||
| 316 | 316 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtklinkbutton.go +2 -2
| @@ -139,7 +139,7 @@ func (c *LinkButton) SetGoPointer(ptr uintptr) { | |||
| 139 | 139 | // To override the default behavior, you can connect to the | |
| 140 | 140 | // ::activate-link signal and stop the propagation of the signal | |
| 141 | 141 | // by returning %TRUE from your handler. | |
| 142 | - | func (x *LinkButton) ConnectActivateLink(cb func(LinkButton) bool) { | |
| 142 | + | func (x *LinkButton) ConnectActivateLink(cb func(LinkButton) bool) uint32 { | |
| 143 | 143 | fcb := func(clsPtr uintptr) bool { | |
| 144 | 144 | fa := LinkButton{} | |
| 145 | 145 | fa.Ptr = clsPtr | |
| @@ -147,7 +147,7 @@ func (x *LinkButton) ConnectActivateLink(cb func(LinkButton) bool) { | |||
| 147 | 147 | return cb(fa) | |
| 148 | 148 | ||
| 149 | 149 | } | |
| 150 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate-link", purego.NewCallback(fcb)) | |
| 150 | + | return gobject.SignalConnect(x.GoPointer(), "activate-link", purego.NewCallback(fcb)) | |
| 151 | 151 | } | |
| 152 | 152 | ||
| 153 | 153 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtklistbox.go +18 -18
| @@ -556,7 +556,7 @@ func (c *ListBox) SetGoPointer(ptr uintptr) { | |||
| 556 | 556 | c.Ptr = ptr | |
| 557 | 557 | } | |
| 558 | 558 | ||
| 559 | - | func (x *ListBox) ConnectActivateCursorRow(cb func(ListBox)) { | |
| 559 | + | func (x *ListBox) ConnectActivateCursorRow(cb func(ListBox)) uint32 { | |
| 560 | 560 | fcb := func(clsPtr uintptr) { | |
| 561 | 561 | fa := ListBox{} | |
| 562 | 562 | fa.Ptr = clsPtr | |
| @@ -564,10 +564,10 @@ func (x *ListBox) ConnectActivateCursorRow(cb func(ListBox)) { | |||
| 564 | 564 | cb(fa) | |
| 565 | 565 | ||
| 566 | 566 | } | |
| 567 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate-cursor-row", purego.NewCallback(fcb)) | |
| 567 | + | return gobject.SignalConnect(x.GoPointer(), "activate-cursor-row", purego.NewCallback(fcb)) | |
| 568 | 568 | } | |
| 569 | 569 | ||
| 570 | - | func (x *ListBox) ConnectMoveCursor(cb func(ListBox, MovementStep, int, bool, bool)) { | |
| 570 | + | func (x *ListBox) ConnectMoveCursor(cb func(ListBox, MovementStep, int, bool, bool)) uint32 { | |
| 571 | 571 | fcb := func(clsPtr uintptr, ObjectVarp MovementStep, P0Varp int, P1Varp bool, P2Varp bool) { | |
| 572 | 572 | fa := ListBox{} | |
| 573 | 573 | fa.Ptr = clsPtr | |
| @@ -575,11 +575,11 @@ func (x *ListBox) ConnectMoveCursor(cb func(ListBox, MovementStep, int, bool, bo | |||
| 575 | 575 | cb(fa, ObjectVarp, P0Varp, P1Varp, P2Varp) | |
| 576 | 576 | ||
| 577 | 577 | } | |
| 578 | - | gobject.ObjectConnect(x.GoPointer(), "signal::move-cursor", purego.NewCallback(fcb)) | |
| 578 | + | return gobject.SignalConnect(x.GoPointer(), "move-cursor", purego.NewCallback(fcb)) | |
| 579 | 579 | } | |
| 580 | 580 | ||
| 581 | 581 | // Emitted when a row has been activated by the user. | |
| 582 | - | func (x *ListBox) ConnectRowActivated(cb func(ListBox, uintptr)) { | |
| 582 | + | func (x *ListBox) ConnectRowActivated(cb func(ListBox, uintptr)) uint32 { | |
| 583 | 583 | fcb := func(clsPtr uintptr, RowVarp uintptr) { | |
| 584 | 584 | fa := ListBox{} | |
| 585 | 585 | fa.Ptr = clsPtr | |
| @@ -587,7 +587,7 @@ func (x *ListBox) ConnectRowActivated(cb func(ListBox, uintptr)) { | |||
| 587 | 587 | cb(fa, RowVarp) | |
| 588 | 588 | ||
| 589 | 589 | } | |
| 590 | - | gobject.ObjectConnect(x.GoPointer(), "signal::row-activated", purego.NewCallback(fcb)) | |
| 590 | + | return gobject.SignalConnect(x.GoPointer(), "row-activated", purego.NewCallback(fcb)) | |
| 591 | 591 | } | |
| 592 | 592 | ||
| 593 | 593 | // Emitted when a new row is selected, or (with a %NULL @row) | |
| @@ -596,7 +596,7 @@ func (x *ListBox) ConnectRowActivated(cb func(ListBox, uintptr)) { | |||
| 596 | 596 | // When the @box is using %GTK_SELECTION_MULTIPLE, this signal will not | |
| 597 | 597 | // give you the full picture of selection changes, and you should use | |
| 598 | 598 | // the [signal@Gtk.ListBox::selected-rows-changed] signal instead. | |
| 599 | - | func (x *ListBox) ConnectRowSelected(cb func(ListBox, uintptr)) { | |
| 599 | + | func (x *ListBox) ConnectRowSelected(cb func(ListBox, uintptr)) uint32 { | |
| 600 | 600 | fcb := func(clsPtr uintptr, RowVarp uintptr) { | |
| 601 | 601 | fa := ListBox{} | |
| 602 | 602 | fa.Ptr = clsPtr | |
| @@ -604,7 +604,7 @@ func (x *ListBox) ConnectRowSelected(cb func(ListBox, uintptr)) { | |||
| 604 | 604 | cb(fa, RowVarp) | |
| 605 | 605 | ||
| 606 | 606 | } | |
| 607 | - | gobject.ObjectConnect(x.GoPointer(), "signal::row-selected", purego.NewCallback(fcb)) | |
| 607 | + | return gobject.SignalConnect(x.GoPointer(), "row-selected", purego.NewCallback(fcb)) | |
| 608 | 608 | } | |
| 609 | 609 | ||
| 610 | 610 | // Emitted to select all children of the box, if the selection | |
| @@ -613,7 +613,7 @@ func (x *ListBox) ConnectRowSelected(cb func(ListBox, uintptr)) { | |||
| 613 | 613 | // This is a [keybinding signal](class.SignalAction.html). | |
| 614 | 614 | // | |
| 615 | 615 | // The default binding for this signal is <kbd>Ctrl</kbd>-<kbd>a</kbd>. | |
| 616 | - | func (x *ListBox) ConnectSelectAll(cb func(ListBox)) { | |
| 616 | + | func (x *ListBox) ConnectSelectAll(cb func(ListBox)) uint32 { | |
| 617 | 617 | fcb := func(clsPtr uintptr) { | |
| 618 | 618 | fa := ListBox{} | |
| 619 | 619 | fa.Ptr = clsPtr | |
| @@ -621,11 +621,11 @@ func (x *ListBox) ConnectSelectAll(cb func(ListBox)) { | |||
| 621 | 621 | cb(fa) | |
| 622 | 622 | ||
| 623 | 623 | } | |
| 624 | - | gobject.ObjectConnect(x.GoPointer(), "signal::select-all", purego.NewCallback(fcb)) | |
| 624 | + | return gobject.SignalConnect(x.GoPointer(), "select-all", purego.NewCallback(fcb)) | |
| 625 | 625 | } | |
| 626 | 626 | ||
| 627 | 627 | // Emitted when the set of selected rows changes. | |
| 628 | - | func (x *ListBox) ConnectSelectedRowsChanged(cb func(ListBox)) { | |
| 628 | + | func (x *ListBox) ConnectSelectedRowsChanged(cb func(ListBox)) uint32 { | |
| 629 | 629 | fcb := func(clsPtr uintptr) { | |
| 630 | 630 | fa := ListBox{} | |
| 631 | 631 | fa.Ptr = clsPtr | |
| @@ -633,10 +633,10 @@ func (x *ListBox) ConnectSelectedRowsChanged(cb func(ListBox)) { | |||
| 633 | 633 | cb(fa) | |
| 634 | 634 | ||
| 635 | 635 | } | |
| 636 | - | gobject.ObjectConnect(x.GoPointer(), "signal::selected-rows-changed", purego.NewCallback(fcb)) | |
| 636 | + | return gobject.SignalConnect(x.GoPointer(), "selected-rows-changed", purego.NewCallback(fcb)) | |
| 637 | 637 | } | |
| 638 | 638 | ||
| 639 | - | func (x *ListBox) ConnectToggleCursorRow(cb func(ListBox)) { | |
| 639 | + | func (x *ListBox) ConnectToggleCursorRow(cb func(ListBox)) uint32 { | |
| 640 | 640 | fcb := func(clsPtr uintptr) { | |
| 641 | 641 | fa := ListBox{} | |
| 642 | 642 | fa.Ptr = clsPtr | |
| @@ -644,7 +644,7 @@ func (x *ListBox) ConnectToggleCursorRow(cb func(ListBox)) { | |||
| 644 | 644 | cb(fa) | |
| 645 | 645 | ||
| 646 | 646 | } | |
| 647 | - | gobject.ObjectConnect(x.GoPointer(), "signal::toggle-cursor-row", purego.NewCallback(fcb)) | |
| 647 | + | return gobject.SignalConnect(x.GoPointer(), "toggle-cursor-row", purego.NewCallback(fcb)) | |
| 648 | 648 | } | |
| 649 | 649 | ||
| 650 | 650 | // Emitted to unselect all children of the box, if the selection | |
| @@ -654,7 +654,7 @@ func (x *ListBox) ConnectToggleCursorRow(cb func(ListBox)) { | |||
| 654 | 654 | // | |
| 655 | 655 | // The default binding for this signal is | |
| 656 | 656 | // <kbd>Ctrl</kbd>-<kbd>Shift</kbd>-<kbd>a</kbd>. | |
| 657 | - | func (x *ListBox) ConnectUnselectAll(cb func(ListBox)) { | |
| 657 | + | func (x *ListBox) ConnectUnselectAll(cb func(ListBox)) uint32 { | |
| 658 | 658 | fcb := func(clsPtr uintptr) { | |
| 659 | 659 | fa := ListBox{} | |
| 660 | 660 | fa.Ptr = clsPtr | |
| @@ -662,7 +662,7 @@ func (x *ListBox) ConnectUnselectAll(cb func(ListBox)) { | |||
| 662 | 662 | cb(fa) | |
| 663 | 663 | ||
| 664 | 664 | } | |
| 665 | - | gobject.ObjectConnect(x.GoPointer(), "signal::unselect-all", purego.NewCallback(fcb)) | |
| 665 | + | return gobject.SignalConnect(x.GoPointer(), "unselect-all", purego.NewCallback(fcb)) | |
| 666 | 666 | } | |
| 667 | 667 | ||
| 668 | 668 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
| @@ -992,7 +992,7 @@ func (c *ListBoxRow) SetGoPointer(ptr uintptr) { | |||
| 992 | 992 | // If you want to be notified when the user activates a row (by key or not), | |
| 993 | 993 | // use the [signal@Gtk.ListBox::row-activated] signal on the row’s parent | |
| 994 | 994 | // `GtkListBox`. | |
| 995 | - | func (x *ListBoxRow) ConnectActivate(cb func(ListBoxRow)) { | |
| 995 | + | func (x *ListBoxRow) ConnectActivate(cb func(ListBoxRow)) uint32 { | |
| 996 | 996 | fcb := func(clsPtr uintptr) { | |
| 997 | 997 | fa := ListBoxRow{} | |
| 998 | 998 | fa.Ptr = clsPtr | |
| @@ -1000,7 +1000,7 @@ func (x *ListBoxRow) ConnectActivate(cb func(ListBoxRow)) { | |||
| 1000 | 1000 | cb(fa) | |
| 1001 | 1001 | ||
| 1002 | 1002 | } | |
| 1003 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 1003 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 1004 | 1004 | } | |
| 1005 | 1005 | ||
| 1006 | 1006 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtklistview.go +2 -2
| @@ -277,7 +277,7 @@ func (c *ListView) SetGoPointer(ptr uintptr) { | |||
| 277 | 277 | // This allows for a convenient way to handle activation in a listview. | |
| 278 | 278 | // See [method@Gtk.ListItem.set_activatable] for details on how to use | |
| 279 | 279 | // this signal. | |
| 280 | - | func (x *ListView) ConnectActivate(cb func(ListView, uint)) { | |
| 280 | + | func (x *ListView) ConnectActivate(cb func(ListView, uint)) uint32 { | |
| 281 | 281 | fcb := func(clsPtr uintptr, PositionVarp uint) { | |
| 282 | 282 | fa := ListView{} | |
| 283 | 283 | fa.Ptr = clsPtr | |
| @@ -285,7 +285,7 @@ func (x *ListView) ConnectActivate(cb func(ListView, uint)) { | |||
| 285 | 285 | cb(fa, PositionVarp) | |
| 286 | 286 | ||
| 287 | 287 | } | |
| 288 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 288 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 289 | 289 | } | |
| 290 | 290 | ||
| 291 | 291 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkmenubutton.go +2 -2
| @@ -416,7 +416,7 @@ func (c *MenuButton) SetGoPointer(ptr uintptr) { | |||
| 416 | 416 | // | |
| 417 | 417 | // The `::activate` signal on `GtkMenuButton` is an action signal and | |
| 418 | 418 | // emitting it causes the button to pop up its menu. | |
| 419 | - | func (x *MenuButton) ConnectActivate(cb func(MenuButton)) { | |
| 419 | + | func (x *MenuButton) ConnectActivate(cb func(MenuButton)) uint32 { | |
| 420 | 420 | fcb := func(clsPtr uintptr) { | |
| 421 | 421 | fa := MenuButton{} | |
| 422 | 422 | fa.Ptr = clsPtr | |
| @@ -424,7 +424,7 @@ func (x *MenuButton) ConnectActivate(cb func(MenuButton)) { | |||
| 424 | 424 | cb(fa) | |
| 425 | 425 | ||
| 426 | 426 | } | |
| 427 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 427 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 428 | 428 | } | |
| 429 | 429 | ||
| 430 | 430 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtknativedialog.go +2 -2
| @@ -185,7 +185,7 @@ func (c *NativeDialog) SetGoPointer(ptr uintptr) { | |||
| 185 | 185 | // | |
| 186 | 186 | // If you call [method@Gtk.NativeDialog.hide] before the user | |
| 187 | 187 | // responds to the dialog this signal will not be emitted. | |
| 188 | - | func (x *NativeDialog) ConnectResponse(cb func(NativeDialog, int)) { | |
| 188 | + | func (x *NativeDialog) ConnectResponse(cb func(NativeDialog, int)) uint32 { | |
| 189 | 189 | fcb := func(clsPtr uintptr, ResponseIdVarp int) { | |
| 190 | 190 | fa := NativeDialog{} | |
| 191 | 191 | fa.Ptr = clsPtr | |
| @@ -193,7 +193,7 @@ func (x *NativeDialog) ConnectResponse(cb func(NativeDialog, int)) { | |||
| 193 | 193 | cb(fa, ResponseIdVarp) | |
| 194 | 194 | ||
| 195 | 195 | } | |
| 196 | - | gobject.ObjectConnect(x.GoPointer(), "signal::response", purego.NewCallback(fcb)) | |
| 196 | + | return gobject.SignalConnect(x.GoPointer(), "response", purego.NewCallback(fcb)) | |
| 197 | 197 | } | |
| 198 | 198 | ||
| 199 | 199 | func init() { | |
M v4/gtk/gtknotebook.go +20 -20
| @@ -692,7 +692,7 @@ func (c *Notebook) SetGoPointer(ptr uintptr) { | |||
| 692 | 692 | c.Ptr = ptr | |
| 693 | 693 | } | |
| 694 | 694 | ||
| 695 | - | func (x *Notebook) ConnectChangeCurrentPage(cb func(Notebook, int) bool) { | |
| 695 | + | func (x *Notebook) ConnectChangeCurrentPage(cb func(Notebook, int) bool) uint32 { | |
| 696 | 696 | fcb := func(clsPtr uintptr, ObjectVarp int) bool { | |
| 697 | 697 | fa := Notebook{} | |
| 698 | 698 | fa.Ptr = clsPtr | |
| @@ -700,7 +700,7 @@ func (x *Notebook) ConnectChangeCurrentPage(cb func(Notebook, int) bool) { | |||
| 700 | 700 | return cb(fa, ObjectVarp) | |
| 701 | 701 | ||
| 702 | 702 | } | |
| 703 | - | gobject.ObjectConnect(x.GoPointer(), "signal::change-current-page", purego.NewCallback(fcb)) | |
| 703 | + | return gobject.SignalConnect(x.GoPointer(), "change-current-page", purego.NewCallback(fcb)) | |
| 704 | 704 | } | |
| 705 | 705 | ||
| 706 | 706 | // The ::create-window signal is emitted when a detachable | |
| @@ -711,7 +711,7 @@ func (x *Notebook) ConnectChangeCurrentPage(cb func(Notebook, int) bool) { | |||
| 711 | 711 | // responsible for moving/resizing the window and adding the | |
| 712 | 712 | // necessary properties to the notebook (e.g. the | |
| 713 | 713 | // `GtkNotebook`:group-name ). | |
| 714 | - | func (x *Notebook) ConnectCreateWindow(cb func(Notebook, uintptr) Notebook) { | |
| 714 | + | func (x *Notebook) ConnectCreateWindow(cb func(Notebook, uintptr) Notebook) uint32 { | |
| 715 | 715 | fcb := func(clsPtr uintptr, PageVarp uintptr) uintptr { | |
| 716 | 716 | fa := Notebook{} | |
| 717 | 717 | fa.Ptr = clsPtr | |
| @@ -720,10 +720,10 @@ func (x *Notebook) ConnectCreateWindow(cb func(Notebook, uintptr) Notebook) { | |||
| 720 | 720 | return CreateWindowCls.Ptr | |
| 721 | 721 | ||
| 722 | 722 | } | |
| 723 | - | gobject.ObjectConnect(x.GoPointer(), "signal::create-window", purego.NewCallback(fcb)) | |
| 723 | + | return gobject.SignalConnect(x.GoPointer(), "create-window", purego.NewCallback(fcb)) | |
| 724 | 724 | } | |
| 725 | 725 | ||
| 726 | - | func (x *Notebook) ConnectFocusTab(cb func(Notebook, NotebookTab) bool) { | |
| 726 | + | func (x *Notebook) ConnectFocusTab(cb func(Notebook, NotebookTab) bool) uint32 { | |
| 727 | 727 | fcb := func(clsPtr uintptr, ObjectVarp NotebookTab) bool { | |
| 728 | 728 | fa := Notebook{} | |
| 729 | 729 | fa.Ptr = clsPtr | |
| @@ -731,10 +731,10 @@ func (x *Notebook) ConnectFocusTab(cb func(Notebook, NotebookTab) bool) { | |||
| 731 | 731 | return cb(fa, ObjectVarp) | |
| 732 | 732 | ||
| 733 | 733 | } | |
| 734 | - | gobject.ObjectConnect(x.GoPointer(), "signal::focus-tab", purego.NewCallback(fcb)) | |
| 734 | + | return gobject.SignalConnect(x.GoPointer(), "focus-tab", purego.NewCallback(fcb)) | |
| 735 | 735 | } | |
| 736 | 736 | ||
| 737 | - | func (x *Notebook) ConnectMoveFocusOut(cb func(Notebook, DirectionType)) { | |
| 737 | + | func (x *Notebook) ConnectMoveFocusOut(cb func(Notebook, DirectionType)) uint32 { | |
| 738 | 738 | fcb := func(clsPtr uintptr, ObjectVarp DirectionType) { | |
| 739 | 739 | fa := Notebook{} | |
| 740 | 740 | fa.Ptr = clsPtr | |
| @@ -742,12 +742,12 @@ func (x *Notebook) ConnectMoveFocusOut(cb func(Notebook, DirectionType)) { | |||
| 742 | 742 | cb(fa, ObjectVarp) | |
| 743 | 743 | ||
| 744 | 744 | } | |
| 745 | - | gobject.ObjectConnect(x.GoPointer(), "signal::move-focus-out", purego.NewCallback(fcb)) | |
| 745 | + | return gobject.SignalConnect(x.GoPointer(), "move-focus-out", purego.NewCallback(fcb)) | |
| 746 | 746 | } | |
| 747 | 747 | ||
| 748 | 748 | // the ::page-added signal is emitted in the notebook | |
| 749 | 749 | // right after a page is added to the notebook. | |
| 750 | - | func (x *Notebook) ConnectPageAdded(cb func(Notebook, uintptr, uint)) { | |
| 750 | + | func (x *Notebook) ConnectPageAdded(cb func(Notebook, uintptr, uint)) uint32 { | |
| 751 | 751 | fcb := func(clsPtr uintptr, ChildVarp uintptr, PageNumVarp uint) { | |
| 752 | 752 | fa := Notebook{} | |
| 753 | 753 | fa.Ptr = clsPtr | |
| @@ -755,12 +755,12 @@ func (x *Notebook) ConnectPageAdded(cb func(Notebook, uintptr, uint)) { | |||
| 755 | 755 | cb(fa, ChildVarp, PageNumVarp) | |
| 756 | 756 | ||
| 757 | 757 | } | |
| 758 | - | gobject.ObjectConnect(x.GoPointer(), "signal::page-added", purego.NewCallback(fcb)) | |
| 758 | + | return gobject.SignalConnect(x.GoPointer(), "page-added", purego.NewCallback(fcb)) | |
| 759 | 759 | } | |
| 760 | 760 | ||
| 761 | 761 | // the ::page-removed signal is emitted in the notebook | |
| 762 | 762 | // right after a page is removed from the notebook. | |
| 763 | - | func (x *Notebook) ConnectPageRemoved(cb func(Notebook, uintptr, uint)) { | |
| 763 | + | func (x *Notebook) ConnectPageRemoved(cb func(Notebook, uintptr, uint)) uint32 { | |
| 764 | 764 | fcb := func(clsPtr uintptr, ChildVarp uintptr, PageNumVarp uint) { | |
| 765 | 765 | fa := Notebook{} | |
| 766 | 766 | fa.Ptr = clsPtr | |
| @@ -768,12 +768,12 @@ func (x *Notebook) ConnectPageRemoved(cb func(Notebook, uintptr, uint)) { | |||
| 768 | 768 | cb(fa, ChildVarp, PageNumVarp) | |
| 769 | 769 | ||
| 770 | 770 | } | |
| 771 | - | gobject.ObjectConnect(x.GoPointer(), "signal::page-removed", purego.NewCallback(fcb)) | |
| 771 | + | return gobject.SignalConnect(x.GoPointer(), "page-removed", purego.NewCallback(fcb)) | |
| 772 | 772 | } | |
| 773 | 773 | ||
| 774 | 774 | // the ::page-reordered signal is emitted in the notebook | |
| 775 | 775 | // right after a page has been reordered. | |
| 776 | - | func (x *Notebook) ConnectPageReordered(cb func(Notebook, uintptr, uint)) { | |
| 776 | + | func (x *Notebook) ConnectPageReordered(cb func(Notebook, uintptr, uint)) uint32 { | |
| 777 | 777 | fcb := func(clsPtr uintptr, ChildVarp uintptr, PageNumVarp uint) { | |
| 778 | 778 | fa := Notebook{} | |
| 779 | 779 | fa.Ptr = clsPtr | |
| @@ -781,10 +781,10 @@ func (x *Notebook) ConnectPageReordered(cb func(Notebook, uintptr, uint)) { | |||
| 781 | 781 | cb(fa, ChildVarp, PageNumVarp) | |
| 782 | 782 | ||
| 783 | 783 | } | |
| 784 | - | gobject.ObjectConnect(x.GoPointer(), "signal::page-reordered", purego.NewCallback(fcb)) | |
| 784 | + | return gobject.SignalConnect(x.GoPointer(), "page-reordered", purego.NewCallback(fcb)) | |
| 785 | 785 | } | |
| 786 | 786 | ||
| 787 | - | func (x *Notebook) ConnectReorderTab(cb func(Notebook, DirectionType, bool) bool) { | |
| 787 | + | func (x *Notebook) ConnectReorderTab(cb func(Notebook, DirectionType, bool) bool) uint32 { | |
| 788 | 788 | fcb := func(clsPtr uintptr, ObjectVarp DirectionType, P0Varp bool) bool { | |
| 789 | 789 | fa := Notebook{} | |
| 790 | 790 | fa.Ptr = clsPtr | |
| @@ -792,10 +792,10 @@ func (x *Notebook) ConnectReorderTab(cb func(Notebook, DirectionType, bool) bool | |||
| 792 | 792 | return cb(fa, ObjectVarp, P0Varp) | |
| 793 | 793 | ||
| 794 | 794 | } | |
| 795 | - | gobject.ObjectConnect(x.GoPointer(), "signal::reorder-tab", purego.NewCallback(fcb)) | |
| 795 | + | return gobject.SignalConnect(x.GoPointer(), "reorder-tab", purego.NewCallback(fcb)) | |
| 796 | 796 | } | |
| 797 | 797 | ||
| 798 | - | func (x *Notebook) ConnectSelectPage(cb func(Notebook, bool) bool) { | |
| 798 | + | func (x *Notebook) ConnectSelectPage(cb func(Notebook, bool) bool) uint32 { | |
| 799 | 799 | fcb := func(clsPtr uintptr, ObjectVarp bool) bool { | |
| 800 | 800 | fa := Notebook{} | |
| 801 | 801 | fa.Ptr = clsPtr | |
| @@ -803,11 +803,11 @@ func (x *Notebook) ConnectSelectPage(cb func(Notebook, bool) bool) { | |||
| 803 | 803 | return cb(fa, ObjectVarp) | |
| 804 | 804 | ||
| 805 | 805 | } | |
| 806 | - | gobject.ObjectConnect(x.GoPointer(), "signal::select-page", purego.NewCallback(fcb)) | |
| 806 | + | return gobject.SignalConnect(x.GoPointer(), "select-page", purego.NewCallback(fcb)) | |
| 807 | 807 | } | |
| 808 | 808 | ||
| 809 | 809 | // Emitted when the user or a function changes the current page. | |
| 810 | - | func (x *Notebook) ConnectSwitchPage(cb func(Notebook, uintptr, uint)) { | |
| 810 | + | func (x *Notebook) ConnectSwitchPage(cb func(Notebook, uintptr, uint)) uint32 { | |
| 811 | 811 | fcb := func(clsPtr uintptr, PageVarp uintptr, PageNumVarp uint) { | |
| 812 | 812 | fa := Notebook{} | |
| 813 | 813 | fa.Ptr = clsPtr | |
| @@ -815,7 +815,7 @@ func (x *Notebook) ConnectSwitchPage(cb func(Notebook, uintptr, uint)) { | |||
| 815 | 815 | cb(fa, PageVarp, PageNumVarp) | |
| 816 | 816 | ||
| 817 | 817 | } | |
| 818 | - | gobject.ObjectConnect(x.GoPointer(), "signal::switch-page", purego.NewCallback(fcb)) | |
| 818 | + | return gobject.SignalConnect(x.GoPointer(), "switch-page", purego.NewCallback(fcb)) | |
| 819 | 819 | } | |
| 820 | 820 | ||
| 821 | 821 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkoverlay.go +2 -2
| @@ -180,7 +180,7 @@ func (c *Overlay) SetGoPointer(ptr uintptr) { | |||
| 180 | 180 | // be full-width/height). If the main child is a | |
| 181 | 181 | // `GtkScrolledWindow`, the overlays are placed relative | |
| 182 | 182 | // to its contents. | |
| 183 | - | func (x *Overlay) ConnectGetChildPosition(cb func(Overlay, uintptr, uintptr) bool) { | |
| 183 | + | func (x *Overlay) ConnectGetChildPosition(cb func(Overlay, uintptr, uintptr) bool) uint32 { | |
| 184 | 184 | fcb := func(clsPtr uintptr, WidgetVarp uintptr, AllocationVarp uintptr) bool { | |
| 185 | 185 | fa := Overlay{} | |
| 186 | 186 | fa.Ptr = clsPtr | |
| @@ -188,7 +188,7 @@ func (x *Overlay) ConnectGetChildPosition(cb func(Overlay, uintptr, uintptr) boo | |||
| 188 | 188 | return cb(fa, WidgetVarp, AllocationVarp) | |
| 189 | 189 | ||
| 190 | 190 | } | |
| 191 | - | gobject.ObjectConnect(x.GoPointer(), "signal::get-child-position", purego.NewCallback(fcb)) | |
| 191 | + | return gobject.SignalConnect(x.GoPointer(), "get-child-position", purego.NewCallback(fcb)) | |
| 192 | 192 | } | |
| 193 | 193 | ||
| 194 | 194 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkpaned.go +12 -12
| @@ -280,7 +280,7 @@ func (c *Paned) SetGoPointer(ptr uintptr) { | |||
| 280 | 280 | // | |
| 281 | 281 | // The default binding for this signal is <kbd>Return</kbd> or | |
| 282 | 282 | // <kbd>Space</kbd>. | |
| 283 | - | func (x *Paned) ConnectAcceptPosition(cb func(Paned) bool) { | |
| 283 | + | func (x *Paned) ConnectAcceptPosition(cb func(Paned) bool) uint32 { | |
| 284 | 284 | fcb := func(clsPtr uintptr) bool { | |
| 285 | 285 | fa := Paned{} | |
| 286 | 286 | fa.Ptr = clsPtr | |
| @@ -288,7 +288,7 @@ func (x *Paned) ConnectAcceptPosition(cb func(Paned) bool) { | |||
| 288 | 288 | return cb(fa) | |
| 289 | 289 | ||
| 290 | 290 | } | |
| 291 | - | gobject.ObjectConnect(x.GoPointer(), "signal::accept-position", purego.NewCallback(fcb)) | |
| 291 | + | return gobject.SignalConnect(x.GoPointer(), "accept-position", purego.NewCallback(fcb)) | |
| 292 | 292 | } | |
| 293 | 293 | ||
| 294 | 294 | // Emitted to cancel moving the position of the handle using key | |
| @@ -300,7 +300,7 @@ func (x *Paned) ConnectAcceptPosition(cb func(Paned) bool) { | |||
| 300 | 300 | // This is a [keybinding signal](class.SignalAction.html). | |
| 301 | 301 | // | |
| 302 | 302 | // The default binding for this signal is <kbd>Escape</kbd>. | |
| 303 | - | func (x *Paned) ConnectCancelPosition(cb func(Paned) bool) { | |
| 303 | + | func (x *Paned) ConnectCancelPosition(cb func(Paned) bool) uint32 { | |
| 304 | 304 | fcb := func(clsPtr uintptr) bool { | |
| 305 | 305 | fa := Paned{} | |
| 306 | 306 | fa.Ptr = clsPtr | |
| @@ -308,7 +308,7 @@ func (x *Paned) ConnectCancelPosition(cb func(Paned) bool) { | |||
| 308 | 308 | return cb(fa) | |
| 309 | 309 | ||
| 310 | 310 | } | |
| 311 | - | gobject.ObjectConnect(x.GoPointer(), "signal::cancel-position", purego.NewCallback(fcb)) | |
| 311 | + | return gobject.SignalConnect(x.GoPointer(), "cancel-position", purego.NewCallback(fcb)) | |
| 312 | 312 | } | |
| 313 | 313 | ||
| 314 | 314 | // Emitted to cycle the focus between the children of the paned. | |
| @@ -316,7 +316,7 @@ func (x *Paned) ConnectCancelPosition(cb func(Paned) bool) { | |||
| 316 | 316 | // This is a [keybinding signal](class.SignalAction.html). | |
| 317 | 317 | // | |
| 318 | 318 | // The default binding is <kbd>F6</kbd>. | |
| 319 | - | func (x *Paned) ConnectCycleChildFocus(cb func(Paned, bool) bool) { | |
| 319 | + | func (x *Paned) ConnectCycleChildFocus(cb func(Paned, bool) bool) uint32 { | |
| 320 | 320 | fcb := func(clsPtr uintptr, ReversedVarp bool) bool { | |
| 321 | 321 | fa := Paned{} | |
| 322 | 322 | fa.Ptr = clsPtr | |
| @@ -324,7 +324,7 @@ func (x *Paned) ConnectCycleChildFocus(cb func(Paned, bool) bool) { | |||
| 324 | 324 | return cb(fa, ReversedVarp) | |
| 325 | 325 | ||
| 326 | 326 | } | |
| 327 | - | gobject.ObjectConnect(x.GoPointer(), "signal::cycle-child-focus", purego.NewCallback(fcb)) | |
| 327 | + | return gobject.SignalConnect(x.GoPointer(), "cycle-child-focus", purego.NewCallback(fcb)) | |
| 328 | 328 | } | |
| 329 | 329 | ||
| 330 | 330 | // Emitted to cycle whether the paned should grab focus to allow | |
| @@ -333,7 +333,7 @@ func (x *Paned) ConnectCycleChildFocus(cb func(Paned, bool) bool) { | |||
| 333 | 333 | // This is a [keybinding signal](class.SignalAction.html). | |
| 334 | 334 | // | |
| 335 | 335 | // The default binding for this signal is <kbd>F8</kbd>. | |
| 336 | - | func (x *Paned) ConnectCycleHandleFocus(cb func(Paned, bool) bool) { | |
| 336 | + | func (x *Paned) ConnectCycleHandleFocus(cb func(Paned, bool) bool) uint32 { | |
| 337 | 337 | fcb := func(clsPtr uintptr, ReversedVarp bool) bool { | |
| 338 | 338 | fa := Paned{} | |
| 339 | 339 | fa.Ptr = clsPtr | |
| @@ -341,13 +341,13 @@ func (x *Paned) ConnectCycleHandleFocus(cb func(Paned, bool) bool) { | |||
| 341 | 341 | return cb(fa, ReversedVarp) | |
| 342 | 342 | ||
| 343 | 343 | } | |
| 344 | - | gobject.ObjectConnect(x.GoPointer(), "signal::cycle-handle-focus", purego.NewCallback(fcb)) | |
| 344 | + | return gobject.SignalConnect(x.GoPointer(), "cycle-handle-focus", purego.NewCallback(fcb)) | |
| 345 | 345 | } | |
| 346 | 346 | ||
| 347 | 347 | // Emitted to move the handle with key bindings. | |
| 348 | 348 | // | |
| 349 | 349 | // This is a [keybinding signal](class.SignalAction.html). | |
| 350 | - | func (x *Paned) ConnectMoveHandle(cb func(Paned, ScrollType) bool) { | |
| 350 | + | func (x *Paned) ConnectMoveHandle(cb func(Paned, ScrollType) bool) uint32 { | |
| 351 | 351 | fcb := func(clsPtr uintptr, ScrollTypeVarp ScrollType) bool { | |
| 352 | 352 | fa := Paned{} | |
| 353 | 353 | fa.Ptr = clsPtr | |
| @@ -355,7 +355,7 @@ func (x *Paned) ConnectMoveHandle(cb func(Paned, ScrollType) bool) { | |||
| 355 | 355 | return cb(fa, ScrollTypeVarp) | |
| 356 | 356 | ||
| 357 | 357 | } | |
| 358 | - | gobject.ObjectConnect(x.GoPointer(), "signal::move-handle", purego.NewCallback(fcb)) | |
| 358 | + | return gobject.SignalConnect(x.GoPointer(), "move-handle", purego.NewCallback(fcb)) | |
| 359 | 359 | } | |
| 360 | 360 | ||
| 361 | 361 | // Emitted to accept the current position of the handle and then | |
| @@ -364,7 +364,7 @@ func (x *Paned) ConnectMoveHandle(cb func(Paned, ScrollType) bool) { | |||
| 364 | 364 | // This is a [keybinding signal](class.SignalAction.html). | |
| 365 | 365 | // | |
| 366 | 366 | // The default binding is <kbd>Tab</kbd>. | |
| 367 | - | func (x *Paned) ConnectToggleHandleFocus(cb func(Paned) bool) { | |
| 367 | + | func (x *Paned) ConnectToggleHandleFocus(cb func(Paned) bool) uint32 { | |
| 368 | 368 | fcb := func(clsPtr uintptr) bool { | |
| 369 | 369 | fa := Paned{} | |
| 370 | 370 | fa.Ptr = clsPtr | |
| @@ -372,7 +372,7 @@ func (x *Paned) ConnectToggleHandleFocus(cb func(Paned) bool) { | |||
| 372 | 372 | return cb(fa) | |
| 373 | 373 | ||
| 374 | 374 | } | |
| 375 | - | gobject.ObjectConnect(x.GoPointer(), "signal::toggle-handle-focus", purego.NewCallback(fcb)) | |
| 375 | + | return gobject.SignalConnect(x.GoPointer(), "toggle-handle-focus", purego.NewCallback(fcb)) | |
| 376 | 376 | } | |
| 377 | 377 | ||
| 378 | 378 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkpasswordentry.go +2 -2
| @@ -132,7 +132,7 @@ func (c *PasswordEntry) SetGoPointer(ptr uintptr) { | |||
| 132 | 132 | // Emitted when the entry is activated. | |
| 133 | 133 | // | |
| 134 | 134 | // The keybindings for this signal are all forms of the Enter key. | |
| 135 | - | func (x *PasswordEntry) ConnectActivate(cb func(PasswordEntry)) { | |
| 135 | + | func (x *PasswordEntry) ConnectActivate(cb func(PasswordEntry)) uint32 { | |
| 136 | 136 | fcb := func(clsPtr uintptr) { | |
| 137 | 137 | fa := PasswordEntry{} | |
| 138 | 138 | fa.Ptr = clsPtr | |
| @@ -140,7 +140,7 @@ func (x *PasswordEntry) ConnectActivate(cb func(PasswordEntry)) { | |||
| 140 | 140 | cb(fa) | |
| 141 | 141 | ||
| 142 | 142 | } | |
| 143 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 143 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 144 | 144 | } | |
| 145 | 145 | ||
| 146 | 146 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkpopover.go +4 -4
| @@ -362,7 +362,7 @@ func (c *Popover) SetGoPointer(ptr uintptr) { | |||
| 362 | 362 | // Emitted whend the user activates the default widget. | |
| 363 | 363 | // | |
| 364 | 364 | // This is a [keybinding signal](class.SignalAction.html). | |
| 365 | - | func (x *Popover) ConnectActivateDefault(cb func(Popover)) { | |
| 365 | + | func (x *Popover) ConnectActivateDefault(cb func(Popover)) uint32 { | |
| 366 | 366 | fcb := func(clsPtr uintptr) { | |
| 367 | 367 | fa := Popover{} | |
| 368 | 368 | fa.Ptr = clsPtr | |
| @@ -370,11 +370,11 @@ func (x *Popover) ConnectActivateDefault(cb func(Popover)) { | |||
| 370 | 370 | cb(fa) | |
| 371 | 371 | ||
| 372 | 372 | } | |
| 373 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate-default", purego.NewCallback(fcb)) | |
| 373 | + | return gobject.SignalConnect(x.GoPointer(), "activate-default", purego.NewCallback(fcb)) | |
| 374 | 374 | } | |
| 375 | 375 | ||
| 376 | 376 | // Emitted when the popover is closed. | |
| 377 | - | func (x *Popover) ConnectClosed(cb func(Popover)) { | |
| 377 | + | func (x *Popover) ConnectClosed(cb func(Popover)) uint32 { | |
| 378 | 378 | fcb := func(clsPtr uintptr) { | |
| 379 | 379 | fa := Popover{} | |
| 380 | 380 | fa.Ptr = clsPtr | |
| @@ -382,7 +382,7 @@ func (x *Popover) ConnectClosed(cb func(Popover)) { | |||
| 382 | 382 | cb(fa) | |
| 383 | 383 | ||
| 384 | 384 | } | |
| 385 | - | gobject.ObjectConnect(x.GoPointer(), "signal::closed", purego.NewCallback(fcb)) | |
| 385 | + | return gobject.SignalConnect(x.GoPointer(), "closed", purego.NewCallback(fcb)) | |
| 386 | 386 | } | |
| 387 | 387 | ||
| 388 | 388 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkprinter.go +2 -2
| @@ -355,7 +355,7 @@ func (c *Printer) SetGoPointer(ptr uintptr) { | |||
| 355 | 355 | // | |
| 356 | 356 | // The @success parameter indicates if the information was | |
| 357 | 357 | // actually obtained. | |
| 358 | - | func (x *Printer) ConnectDetailsAcquired(cb func(Printer, bool)) { | |
| 358 | + | func (x *Printer) ConnectDetailsAcquired(cb func(Printer, bool)) uint32 { | |
| 359 | 359 | fcb := func(clsPtr uintptr, SuccessVarp bool) { | |
| 360 | 360 | fa := Printer{} | |
| 361 | 361 | fa.Ptr = clsPtr | |
| @@ -363,7 +363,7 @@ func (x *Printer) ConnectDetailsAcquired(cb func(Printer, bool)) { | |||
| 363 | 363 | cb(fa, SuccessVarp) | |
| 364 | 364 | ||
| 365 | 365 | } | |
| 366 | - | gobject.ObjectConnect(x.GoPointer(), "signal::details-acquired", purego.NewCallback(fcb)) | |
| 366 | + | return gobject.SignalConnect(x.GoPointer(), "details-acquired", purego.NewCallback(fcb)) | |
| 367 | 367 | } | |
| 368 | 368 | ||
| 369 | 369 | func init() { | |
M v4/gtk/gtkprintjob.go +2 -2
| @@ -391,7 +391,7 @@ func (c *PrintJob) SetGoPointer(ptr uintptr) { | |||
| 391 | 391 | // | |
| 392 | 392 | // The signal handler can use [method@Gtk.PrintJob.get_status] | |
| 393 | 393 | // to obtain the new status. | |
| 394 | - | func (x *PrintJob) ConnectStatusChanged(cb func(PrintJob)) { | |
| 394 | + | func (x *PrintJob) ConnectStatusChanged(cb func(PrintJob)) uint32 { | |
| 395 | 395 | fcb := func(clsPtr uintptr) { | |
| 396 | 396 | fa := PrintJob{} | |
| 397 | 397 | fa.Ptr = clsPtr | |
| @@ -399,7 +399,7 @@ func (x *PrintJob) ConnectStatusChanged(cb func(PrintJob)) { | |||
| 399 | 399 | cb(fa) | |
| 400 | 400 | ||
| 401 | 401 | } | |
| 402 | - | gobject.ObjectConnect(x.GoPointer(), "signal::status-changed", purego.NewCallback(fcb)) | |
| 402 | + | return gobject.SignalConnect(x.GoPointer(), "status-changed", purego.NewCallback(fcb)) | |
| 403 | 403 | } | |
| 404 | 404 | ||
| 405 | 405 | func init() { | |
M v4/gtk/gtkprintoperation.go +22 -22
| @@ -729,7 +729,7 @@ func (c *PrintOperation) SetGoPointer(ptr uintptr) { | |||
| 729 | 729 | // [class@Gtk.PrintContext] and paginate the document accordingly, | |
| 730 | 730 | // and then set the number of pages with | |
| 731 | 731 | // [method@Gtk.PrintOperation.set_n_pages]. | |
| 732 | - | func (x *PrintOperation) ConnectBeginPrint(cb func(PrintOperation, uintptr)) { | |
| 732 | + | func (x *PrintOperation) ConnectBeginPrint(cb func(PrintOperation, uintptr)) uint32 { | |
| 733 | 733 | fcb := func(clsPtr uintptr, ContextVarp uintptr) { | |
| 734 | 734 | fa := PrintOperation{} | |
| 735 | 735 | fa.Ptr = clsPtr | |
| @@ -737,7 +737,7 @@ func (x *PrintOperation) ConnectBeginPrint(cb func(PrintOperation, uintptr)) { | |||
| 737 | 737 | cb(fa, ContextVarp) | |
| 738 | 738 | ||
| 739 | 739 | } | |
| 740 | - | gobject.ObjectConnect(x.GoPointer(), "signal::begin-print", purego.NewCallback(fcb)) | |
| 740 | + | return gobject.SignalConnect(x.GoPointer(), "begin-print", purego.NewCallback(fcb)) | |
| 741 | 741 | } | |
| 742 | 742 | ||
| 743 | 743 | // Emitted when displaying the print dialog. | |
| @@ -751,7 +751,7 @@ func (x *PrintOperation) ConnectBeginPrint(cb func(PrintOperation, uintptr)) { | |||
| 751 | 751 | // to stay around until the [signal@Gtk.PrintOperation::custom-widget-apply] | |
| 752 | 752 | // signal is emitted on the operation. Then you can read out any | |
| 753 | 753 | // information you need from the widgets. | |
| 754 | - | func (x *PrintOperation) ConnectCreateCustomWidget(cb func(PrintOperation) gobject.Object) { | |
| 754 | + | func (x *PrintOperation) ConnectCreateCustomWidget(cb func(PrintOperation) gobject.Object) uint32 { | |
| 755 | 755 | fcb := func(clsPtr uintptr) uintptr { | |
| 756 | 756 | fa := PrintOperation{} | |
| 757 | 757 | fa.Ptr = clsPtr | |
| @@ -760,7 +760,7 @@ func (x *PrintOperation) ConnectCreateCustomWidget(cb func(PrintOperation) gobje | |||
| 760 | 760 | return CreateCustomWidgetCls.Ptr | |
| 761 | 761 | ||
| 762 | 762 | } | |
| 763 | - | gobject.ObjectConnect(x.GoPointer(), "signal::create-custom-widget", purego.NewCallback(fcb)) | |
| 763 | + | return gobject.SignalConnect(x.GoPointer(), "create-custom-widget", purego.NewCallback(fcb)) | |
| 764 | 764 | } | |
| 765 | 765 | ||
| 766 | 766 | // Emitted right before ::begin-print if you added | |
| @@ -769,7 +769,7 @@ func (x *PrintOperation) ConnectCreateCustomWidget(cb func(PrintOperation) gobje | |||
| 769 | 769 | // When you get this signal you should read the information from the | |
| 770 | 770 | // custom widgets, as the widgets are not guaranteed to be around at a | |
| 771 | 771 | // later time. | |
| 772 | - | func (x *PrintOperation) ConnectCustomWidgetApply(cb func(PrintOperation, uintptr)) { | |
| 772 | + | func (x *PrintOperation) ConnectCustomWidgetApply(cb func(PrintOperation, uintptr)) uint32 { | |
| 773 | 773 | fcb := func(clsPtr uintptr, WidgetVarp uintptr) { | |
| 774 | 774 | fa := PrintOperation{} | |
| 775 | 775 | fa.Ptr = clsPtr | |
| @@ -777,7 +777,7 @@ func (x *PrintOperation) ConnectCustomWidgetApply(cb func(PrintOperation, uintpt | |||
| 777 | 777 | cb(fa, WidgetVarp) | |
| 778 | 778 | ||
| 779 | 779 | } | |
| 780 | - | gobject.ObjectConnect(x.GoPointer(), "signal::custom-widget-apply", purego.NewCallback(fcb)) | |
| 780 | + | return gobject.SignalConnect(x.GoPointer(), "custom-widget-apply", purego.NewCallback(fcb)) | |
| 781 | 781 | } | |
| 782 | 782 | ||
| 783 | 783 | // Emitted when the print operation run has finished doing | |
| @@ -790,7 +790,7 @@ func (x *PrintOperation) ConnectCustomWidgetApply(cb func(PrintOperation, uintpt | |||
| 790 | 790 | // If you enabled print status tracking then | |
| 791 | 791 | // [method@Gtk.PrintOperation.is_finished] may still return %FALSE | |
| 792 | 792 | // after the ::done signal was emitted. | |
| 793 | - | func (x *PrintOperation) ConnectDone(cb func(PrintOperation, PrintOperationResult)) { | |
| 793 | + | func (x *PrintOperation) ConnectDone(cb func(PrintOperation, PrintOperationResult)) uint32 { | |
| 794 | 794 | fcb := func(clsPtr uintptr, ResultVarp PrintOperationResult) { | |
| 795 | 795 | fa := PrintOperation{} | |
| 796 | 796 | fa.Ptr = clsPtr | |
| @@ -798,7 +798,7 @@ func (x *PrintOperation) ConnectDone(cb func(PrintOperation, PrintOperationResul | |||
| 798 | 798 | cb(fa, ResultVarp) | |
| 799 | 799 | ||
| 800 | 800 | } | |
| 801 | - | gobject.ObjectConnect(x.GoPointer(), "signal::done", purego.NewCallback(fcb)) | |
| 801 | + | return gobject.SignalConnect(x.GoPointer(), "done", purego.NewCallback(fcb)) | |
| 802 | 802 | } | |
| 803 | 803 | ||
| 804 | 804 | // Emitted for every page that is printed. | |
| @@ -855,7 +855,7 @@ func (x *PrintOperation) ConnectDone(cb func(PrintOperation, PrintOperationResul | |||
| 855 | 855 | // [method@Gtk.PrintOperation.set_unit] before starting the print | |
| 856 | 856 | // operation to set up the transformation of the cairo context | |
| 857 | 857 | // according to your needs. | |
| 858 | - | func (x *PrintOperation) ConnectDrawPage(cb func(PrintOperation, uintptr, int)) { | |
| 858 | + | func (x *PrintOperation) ConnectDrawPage(cb func(PrintOperation, uintptr, int)) uint32 { | |
| 859 | 859 | fcb := func(clsPtr uintptr, ContextVarp uintptr, PageNrVarp int) { | |
| 860 | 860 | fa := PrintOperation{} | |
| 861 | 861 | fa.Ptr = clsPtr | |
| @@ -863,14 +863,14 @@ func (x *PrintOperation) ConnectDrawPage(cb func(PrintOperation, uintptr, int)) | |||
| 863 | 863 | cb(fa, ContextVarp, PageNrVarp) | |
| 864 | 864 | ||
| 865 | 865 | } | |
| 866 | - | gobject.ObjectConnect(x.GoPointer(), "signal::draw-page", purego.NewCallback(fcb)) | |
| 866 | + | return gobject.SignalConnect(x.GoPointer(), "draw-page", purego.NewCallback(fcb)) | |
| 867 | 867 | } | |
| 868 | 868 | ||
| 869 | 869 | // Emitted after all pages have been rendered. | |
| 870 | 870 | // | |
| 871 | 871 | // A handler for this signal can clean up any resources that have | |
| 872 | 872 | // been allocated in the [signal@Gtk.PrintOperation::begin-print] handler. | |
| 873 | - | func (x *PrintOperation) ConnectEndPrint(cb func(PrintOperation, uintptr)) { | |
| 873 | + | func (x *PrintOperation) ConnectEndPrint(cb func(PrintOperation, uintptr)) uint32 { | |
| 874 | 874 | fcb := func(clsPtr uintptr, ContextVarp uintptr) { | |
| 875 | 875 | fa := PrintOperation{} | |
| 876 | 876 | fa.Ptr = clsPtr | |
| @@ -878,7 +878,7 @@ func (x *PrintOperation) ConnectEndPrint(cb func(PrintOperation, uintptr)) { | |||
| 878 | 878 | cb(fa, ContextVarp) | |
| 879 | 879 | ||
| 880 | 880 | } | |
| 881 | - | gobject.ObjectConnect(x.GoPointer(), "signal::end-print", purego.NewCallback(fcb)) | |
| 881 | + | return gobject.SignalConnect(x.GoPointer(), "end-print", purego.NewCallback(fcb)) | |
| 882 | 882 | } | |
| 883 | 883 | ||
| 884 | 884 | // Emitted after the ::begin-print signal, but before the actual rendering | |
| @@ -895,7 +895,7 @@ func (x *PrintOperation) ConnectEndPrint(cb func(PrintOperation, uintptr)) { | |||
| 895 | 895 | // If you don't need to do pagination in chunks, you can simply do | |
| 896 | 896 | // it all in the ::begin-print handler, and set the number of pages | |
| 897 | 897 | // from there. | |
| 898 | - | func (x *PrintOperation) ConnectPaginate(cb func(PrintOperation, uintptr) bool) { | |
| 898 | + | func (x *PrintOperation) ConnectPaginate(cb func(PrintOperation, uintptr) bool) uint32 { | |
| 899 | 899 | fcb := func(clsPtr uintptr, ContextVarp uintptr) bool { | |
| 900 | 900 | fa := PrintOperation{} | |
| 901 | 901 | fa.Ptr = clsPtr | |
| @@ -903,7 +903,7 @@ func (x *PrintOperation) ConnectPaginate(cb func(PrintOperation, uintptr) bool) | |||
| 903 | 903 | return cb(fa, ContextVarp) | |
| 904 | 904 | ||
| 905 | 905 | } | |
| 906 | - | gobject.ObjectConnect(x.GoPointer(), "signal::paginate", purego.NewCallback(fcb)) | |
| 906 | + | return gobject.SignalConnect(x.GoPointer(), "paginate", purego.NewCallback(fcb)) | |
| 907 | 907 | } | |
| 908 | 908 | ||
| 909 | 909 | // Gets emitted when a preview is requested from the native dialog. | |
| @@ -923,7 +923,7 @@ func (x *PrintOperation) ConnectPaginate(cb func(PrintOperation, uintptr) bool) | |||
| 923 | 923 | // are selected for print and render them. The preview must be | |
| 924 | 924 | // finished by calling [method@Gtk.PrintOperationPreview.end_preview] | |
| 925 | 925 | // (typically in response to the user clicking a close button). | |
| 926 | - | func (x *PrintOperation) ConnectPreview(cb func(PrintOperation, uintptr, uintptr, uintptr) bool) { | |
| 926 | + | func (x *PrintOperation) ConnectPreview(cb func(PrintOperation, uintptr, uintptr, uintptr) bool) uint32 { | |
| 927 | 927 | fcb := func(clsPtr uintptr, PreviewVarp uintptr, ContextVarp uintptr, ParentVarp uintptr) bool { | |
| 928 | 928 | fa := PrintOperation{} | |
| 929 | 929 | fa.Ptr = clsPtr | |
| @@ -931,7 +931,7 @@ func (x *PrintOperation) ConnectPreview(cb func(PrintOperation, uintptr, uintptr | |||
| 931 | 931 | return cb(fa, PreviewVarp, ContextVarp, ParentVarp) | |
| 932 | 932 | ||
| 933 | 933 | } | |
| 934 | - | gobject.ObjectConnect(x.GoPointer(), "signal::preview", purego.NewCallback(fcb)) | |
| 934 | + | return gobject.SignalConnect(x.GoPointer(), "preview", purego.NewCallback(fcb)) | |
| 935 | 935 | } | |
| 936 | 936 | ||
| 937 | 937 | // Emitted once for every page that is printed. | |
| @@ -939,7 +939,7 @@ func (x *PrintOperation) ConnectPreview(cb func(PrintOperation, uintptr, uintptr | |||
| 939 | 939 | // This gives the application a chance to modify the page setup. | |
| 940 | 940 | // Any changes done to @setup will be in force only for printing | |
| 941 | 941 | // this page. | |
| 942 | - | func (x *PrintOperation) ConnectRequestPageSetup(cb func(PrintOperation, uintptr, int, uintptr)) { | |
| 942 | + | func (x *PrintOperation) ConnectRequestPageSetup(cb func(PrintOperation, uintptr, int, uintptr)) uint32 { | |
| 943 | 943 | fcb := func(clsPtr uintptr, ContextVarp uintptr, PageNrVarp int, SetupVarp uintptr) { | |
| 944 | 944 | fa := PrintOperation{} | |
| 945 | 945 | fa.Ptr = clsPtr | |
| @@ -947,7 +947,7 @@ func (x *PrintOperation) ConnectRequestPageSetup(cb func(PrintOperation, uintptr | |||
| 947 | 947 | cb(fa, ContextVarp, PageNrVarp, SetupVarp) | |
| 948 | 948 | ||
| 949 | 949 | } | |
| 950 | - | gobject.ObjectConnect(x.GoPointer(), "signal::request-page-setup", purego.NewCallback(fcb)) | |
| 950 | + | return gobject.SignalConnect(x.GoPointer(), "request-page-setup", purego.NewCallback(fcb)) | |
| 951 | 951 | } | |
| 952 | 952 | ||
| 953 | 953 | // Emitted at between the various phases of the print operation. | |
| @@ -955,7 +955,7 @@ func (x *PrintOperation) ConnectRequestPageSetup(cb func(PrintOperation, uintptr | |||
| 955 | 955 | // See [enum@Gtk.PrintStatus] for the phases that are being discriminated. | |
| 956 | 956 | // Use [method@Gtk.PrintOperation.get_status] to find out the current | |
| 957 | 957 | // status. | |
| 958 | - | func (x *PrintOperation) ConnectStatusChanged(cb func(PrintOperation)) { | |
| 958 | + | func (x *PrintOperation) ConnectStatusChanged(cb func(PrintOperation)) uint32 { | |
| 959 | 959 | fcb := func(clsPtr uintptr) { | |
| 960 | 960 | fa := PrintOperation{} | |
| 961 | 961 | fa.Ptr = clsPtr | |
| @@ -963,14 +963,14 @@ func (x *PrintOperation) ConnectStatusChanged(cb func(PrintOperation)) { | |||
| 963 | 963 | cb(fa) | |
| 964 | 964 | ||
| 965 | 965 | } | |
| 966 | - | gobject.ObjectConnect(x.GoPointer(), "signal::status-changed", purego.NewCallback(fcb)) | |
| 966 | + | return gobject.SignalConnect(x.GoPointer(), "status-changed", purego.NewCallback(fcb)) | |
| 967 | 967 | } | |
| 968 | 968 | ||
| 969 | 969 | // Emitted after change of selected printer. | |
| 970 | 970 | // | |
| 971 | 971 | // The actual page setup and print settings are passed to the custom | |
| 972 | 972 | // widget, which can actualize itself according to this change. | |
| 973 | - | func (x *PrintOperation) ConnectUpdateCustomWidget(cb func(PrintOperation, uintptr, uintptr, uintptr)) { | |
| 973 | + | func (x *PrintOperation) ConnectUpdateCustomWidget(cb func(PrintOperation, uintptr, uintptr, uintptr)) uint32 { | |
| 974 | 974 | fcb := func(clsPtr uintptr, WidgetVarp uintptr, SetupVarp uintptr, SettingsVarp uintptr) { | |
| 975 | 975 | fa := PrintOperation{} | |
| 976 | 976 | fa.Ptr = clsPtr | |
| @@ -978,7 +978,7 @@ func (x *PrintOperation) ConnectUpdateCustomWidget(cb func(PrintOperation, uintp | |||
| 978 | 978 | cb(fa, WidgetVarp, SetupVarp, SettingsVarp) | |
| 979 | 979 | ||
| 980 | 980 | } | |
| 981 | - | gobject.ObjectConnect(x.GoPointer(), "signal::update-custom-widget", purego.NewCallback(fcb)) | |
| 981 | + | return gobject.SignalConnect(x.GoPointer(), "update-custom-widget", purego.NewCallback(fcb)) | |
| 982 | 982 | } | |
| 983 | 983 | ||
| 984 | 984 | // Ends a preview. | |
M v4/gtk/gtkrange.go +8 -8
| @@ -322,7 +322,7 @@ func (c *Range) SetGoPointer(ptr uintptr) { | |||
| 322 | 322 | ||
| 323 | 323 | // Emitted before clamping a value, to give the application a | |
| 324 | 324 | // chance to adjust the bounds. | |
| 325 | - | func (x *Range) ConnectAdjustBounds(cb func(Range, float64)) { | |
| 325 | + | func (x *Range) ConnectAdjustBounds(cb func(Range, float64)) uint32 { | |
| 326 | 326 | fcb := func(clsPtr uintptr, ValueVarp float64) { | |
| 327 | 327 | fa := Range{} | |
| 328 | 328 | fa.Ptr = clsPtr | |
| @@ -330,7 +330,7 @@ func (x *Range) ConnectAdjustBounds(cb func(Range, float64)) { | |||
| 330 | 330 | cb(fa, ValueVarp) | |
| 331 | 331 | ||
| 332 | 332 | } | |
| 333 | - | gobject.ObjectConnect(x.GoPointer(), "signal::adjust-bounds", purego.NewCallback(fcb)) | |
| 333 | + | return gobject.SignalConnect(x.GoPointer(), "adjust-bounds", purego.NewCallback(fcb)) | |
| 334 | 334 | } | |
| 335 | 335 | ||
| 336 | 336 | // Emitted when a scroll action is performed on a range. | |
| @@ -345,7 +345,7 @@ func (x *Range) ConnectAdjustBounds(cb func(Range, float64)) { | |||
| 345 | 345 | // the ::change-value signal is responsible for clamping the value | |
| 346 | 346 | // to the desired number of decimal digits; the default GTK | |
| 347 | 347 | // handler clamps the value based on [property@Gtk.Range:round-digits]. | |
| 348 | - | func (x *Range) ConnectChangeValue(cb func(Range, ScrollType, float64) bool) { | |
| 348 | + | func (x *Range) ConnectChangeValue(cb func(Range, ScrollType, float64) bool) uint32 { | |
| 349 | 349 | fcb := func(clsPtr uintptr, ScrollVarp ScrollType, ValueVarp float64) bool { | |
| 350 | 350 | fa := Range{} | |
| 351 | 351 | fa.Ptr = clsPtr | |
| @@ -353,13 +353,13 @@ func (x *Range) ConnectChangeValue(cb func(Range, ScrollType, float64) bool) { | |||
| 353 | 353 | return cb(fa, ScrollVarp, ValueVarp) | |
| 354 | 354 | ||
| 355 | 355 | } | |
| 356 | - | gobject.ObjectConnect(x.GoPointer(), "signal::change-value", purego.NewCallback(fcb)) | |
| 356 | + | return gobject.SignalConnect(x.GoPointer(), "change-value", purego.NewCallback(fcb)) | |
| 357 | 357 | } | |
| 358 | 358 | ||
| 359 | 359 | // Virtual function that moves the slider. | |
| 360 | 360 | // | |
| 361 | 361 | // Used for keybindings. | |
| 362 | - | func (x *Range) ConnectMoveSlider(cb func(Range, ScrollType)) { | |
| 362 | + | func (x *Range) ConnectMoveSlider(cb func(Range, ScrollType)) uint32 { | |
| 363 | 363 | fcb := func(clsPtr uintptr, StepVarp ScrollType) { | |
| 364 | 364 | fa := Range{} | |
| 365 | 365 | fa.Ptr = clsPtr | |
| @@ -367,11 +367,11 @@ func (x *Range) ConnectMoveSlider(cb func(Range, ScrollType)) { | |||
| 367 | 367 | cb(fa, StepVarp) | |
| 368 | 368 | ||
| 369 | 369 | } | |
| 370 | - | gobject.ObjectConnect(x.GoPointer(), "signal::move-slider", purego.NewCallback(fcb)) | |
| 370 | + | return gobject.SignalConnect(x.GoPointer(), "move-slider", purego.NewCallback(fcb)) | |
| 371 | 371 | } | |
| 372 | 372 | ||
| 373 | 373 | // Emitted when the range value changes. | |
| 374 | - | func (x *Range) ConnectValueChanged(cb func(Range)) { | |
| 374 | + | func (x *Range) ConnectValueChanged(cb func(Range)) uint32 { | |
| 375 | 375 | fcb := func(clsPtr uintptr) { | |
| 376 | 376 | fa := Range{} | |
| 377 | 377 | fa.Ptr = clsPtr | |
| @@ -379,7 +379,7 @@ func (x *Range) ConnectValueChanged(cb func(Range)) { | |||
| 379 | 379 | cb(fa) | |
| 380 | 380 | ||
| 381 | 381 | } | |
| 382 | - | gobject.ObjectConnect(x.GoPointer(), "signal::value-changed", purego.NewCallback(fcb)) | |
| 382 | + | return gobject.SignalConnect(x.GoPointer(), "value-changed", purego.NewCallback(fcb)) | |
| 383 | 383 | } | |
| 384 | 384 | ||
| 385 | 385 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkrecentmanager.go +2 -2
| @@ -298,7 +298,7 @@ func (c *RecentManager) SetGoPointer(ptr uintptr) { | |||
| 298 | 298 | // | |
| 299 | 299 | // This can happen either by calling [method@Gtk.RecentManager.add_item] | |
| 300 | 300 | // or by another application. | |
| 301 | - | func (x *RecentManager) ConnectChanged(cb func(RecentManager)) { | |
| 301 | + | func (x *RecentManager) ConnectChanged(cb func(RecentManager)) uint32 { | |
| 302 | 302 | fcb := func(clsPtr uintptr) { | |
| 303 | 303 | fa := RecentManager{} | |
| 304 | 304 | fa.Ptr = clsPtr | |
| @@ -306,7 +306,7 @@ func (x *RecentManager) ConnectChanged(cb func(RecentManager)) { | |||
| 306 | 306 | cb(fa) | |
| 307 | 307 | ||
| 308 | 308 | } | |
| 309 | - | gobject.ObjectConnect(x.GoPointer(), "signal::changed", purego.NewCallback(fcb)) | |
| 309 | + | return gobject.SignalConnect(x.GoPointer(), "changed", purego.NewCallback(fcb)) | |
| 310 | 310 | } | |
| 311 | 311 | ||
| 312 | 312 | func init() { | |
M v4/gtk/gtkscalebutton.go +6 -6
| @@ -181,7 +181,7 @@ func (c *ScaleButton) SetGoPointer(ptr uintptr) { | |||
| 181 | 181 | // This is a [keybinding signal](class.SignalAction.html). | |
| 182 | 182 | // | |
| 183 | 183 | // The default binding for this signal is <kbd>Escape</kbd>. | |
| 184 | - | func (x *ScaleButton) ConnectPopdown(cb func(ScaleButton)) { | |
| 184 | + | func (x *ScaleButton) ConnectPopdown(cb func(ScaleButton)) uint32 { | |
| 185 | 185 | fcb := func(clsPtr uintptr) { | |
| 186 | 186 | fa := ScaleButton{} | |
| 187 | 187 | fa.Ptr = clsPtr | |
| @@ -189,7 +189,7 @@ func (x *ScaleButton) ConnectPopdown(cb func(ScaleButton)) { | |||
| 189 | 189 | cb(fa) | |
| 190 | 190 | ||
| 191 | 191 | } | |
| 192 | - | gobject.ObjectConnect(x.GoPointer(), "signal::popdown", purego.NewCallback(fcb)) | |
| 192 | + | return gobject.SignalConnect(x.GoPointer(), "popdown", purego.NewCallback(fcb)) | |
| 193 | 193 | } | |
| 194 | 194 | ||
| 195 | 195 | // Emitted to popup the scale widget. | |
| @@ -198,7 +198,7 @@ func (x *ScaleButton) ConnectPopdown(cb func(ScaleButton)) { | |||
| 198 | 198 | // | |
| 199 | 199 | // The default bindings for this signal are <kbd>Space</kbd>, | |
| 200 | 200 | // <kbd>Enter</kbd> and <kbd>Return</kbd>. | |
| 201 | - | func (x *ScaleButton) ConnectPopup(cb func(ScaleButton)) { | |
| 201 | + | func (x *ScaleButton) ConnectPopup(cb func(ScaleButton)) uint32 { | |
| 202 | 202 | fcb := func(clsPtr uintptr) { | |
| 203 | 203 | fa := ScaleButton{} | |
| 204 | 204 | fa.Ptr = clsPtr | |
| @@ -206,11 +206,11 @@ func (x *ScaleButton) ConnectPopup(cb func(ScaleButton)) { | |||
| 206 | 206 | cb(fa) | |
| 207 | 207 | ||
| 208 | 208 | } | |
| 209 | - | gobject.ObjectConnect(x.GoPointer(), "signal::popup", purego.NewCallback(fcb)) | |
| 209 | + | return gobject.SignalConnect(x.GoPointer(), "popup", purego.NewCallback(fcb)) | |
| 210 | 210 | } | |
| 211 | 211 | ||
| 212 | 212 | // Emitted when the value field has changed. | |
| 213 | - | func (x *ScaleButton) ConnectValueChanged(cb func(ScaleButton, float64)) { | |
| 213 | + | func (x *ScaleButton) ConnectValueChanged(cb func(ScaleButton, float64)) uint32 { | |
| 214 | 214 | fcb := func(clsPtr uintptr, ValueVarp float64) { | |
| 215 | 215 | fa := ScaleButton{} | |
| 216 | 216 | fa.Ptr = clsPtr | |
| @@ -218,7 +218,7 @@ func (x *ScaleButton) ConnectValueChanged(cb func(ScaleButton, float64)) { | |||
| 218 | 218 | cb(fa, ValueVarp) | |
| 219 | 219 | ||
| 220 | 220 | } | |
| 221 | - | gobject.ObjectConnect(x.GoPointer(), "signal::value-changed", purego.NewCallback(fcb)) | |
| 221 | + | return gobject.SignalConnect(x.GoPointer(), "value-changed", purego.NewCallback(fcb)) | |
| 222 | 222 | } | |
| 223 | 223 | ||
| 224 | 224 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkscrolledwindow.go +8 -8
| @@ -557,7 +557,7 @@ func (c *ScrolledWindow) SetGoPointer(ptr uintptr) { | |||
| 557 | 557 | // | |
| 558 | 558 | // Note: The @pos argument is LTR/RTL aware, so callers should be | |
| 559 | 559 | // aware too if intending to provide behavior on horizontal edges. | |
| 560 | - | func (x *ScrolledWindow) ConnectEdgeOvershot(cb func(ScrolledWindow, PositionType)) { | |
| 560 | + | func (x *ScrolledWindow) ConnectEdgeOvershot(cb func(ScrolledWindow, PositionType)) uint32 { | |
| 561 | 561 | fcb := func(clsPtr uintptr, PosVarp PositionType) { | |
| 562 | 562 | fa := ScrolledWindow{} | |
| 563 | 563 | fa.Ptr = clsPtr | |
| @@ -565,7 +565,7 @@ func (x *ScrolledWindow) ConnectEdgeOvershot(cb func(ScrolledWindow, PositionTyp | |||
| 565 | 565 | cb(fa, PosVarp) | |
| 566 | 566 | ||
| 567 | 567 | } | |
| 568 | - | gobject.ObjectConnect(x.GoPointer(), "signal::edge-overshot", purego.NewCallback(fcb)) | |
| 568 | + | return gobject.SignalConnect(x.GoPointer(), "edge-overshot", purego.NewCallback(fcb)) | |
| 569 | 569 | } | |
| 570 | 570 | ||
| 571 | 571 | // Emitted whenever user-initiated scrolling makes the scrolled | |
| @@ -577,7 +577,7 @@ func (x *ScrolledWindow) ConnectEdgeOvershot(cb func(ScrolledWindow, PositionTyp | |||
| 577 | 577 | // | |
| 578 | 578 | // Note: The @pos argument is LTR/RTL aware, so callers should be | |
| 579 | 579 | // aware too if intending to provide behavior on horizontal edges. | |
| 580 | - | func (x *ScrolledWindow) ConnectEdgeReached(cb func(ScrolledWindow, PositionType)) { | |
| 580 | + | func (x *ScrolledWindow) ConnectEdgeReached(cb func(ScrolledWindow, PositionType)) uint32 { | |
| 581 | 581 | fcb := func(clsPtr uintptr, PosVarp PositionType) { | |
| 582 | 582 | fa := ScrolledWindow{} | |
| 583 | 583 | fa.Ptr = clsPtr | |
| @@ -585,7 +585,7 @@ func (x *ScrolledWindow) ConnectEdgeReached(cb func(ScrolledWindow, PositionType | |||
| 585 | 585 | cb(fa, PosVarp) | |
| 586 | 586 | ||
| 587 | 587 | } | |
| 588 | - | gobject.ObjectConnect(x.GoPointer(), "signal::edge-reached", purego.NewCallback(fcb)) | |
| 588 | + | return gobject.SignalConnect(x.GoPointer(), "edge-reached", purego.NewCallback(fcb)) | |
| 589 | 589 | } | |
| 590 | 590 | ||
| 591 | 591 | // Emitted when focus is moved away from the scrolled window by a | |
| @@ -596,7 +596,7 @@ func (x *ScrolledWindow) ConnectEdgeReached(cb func(ScrolledWindow, PositionType | |||
| 596 | 596 | // The default bindings for this signal are | |
| 597 | 597 | // `Ctrl + Tab` to move forward and `Ctrl + Shift + Tab` to | |
| 598 | 598 | // move backward. | |
| 599 | - | func (x *ScrolledWindow) ConnectMoveFocusOut(cb func(ScrolledWindow, DirectionType)) { | |
| 599 | + | func (x *ScrolledWindow) ConnectMoveFocusOut(cb func(ScrolledWindow, DirectionType)) uint32 { | |
| 600 | 600 | fcb := func(clsPtr uintptr, DirectionTypeVarp DirectionType) { | |
| 601 | 601 | fa := ScrolledWindow{} | |
| 602 | 602 | fa.Ptr = clsPtr | |
| @@ -604,7 +604,7 @@ func (x *ScrolledWindow) ConnectMoveFocusOut(cb func(ScrolledWindow, DirectionTy | |||
| 604 | 604 | cb(fa, DirectionTypeVarp) | |
| 605 | 605 | ||
| 606 | 606 | } | |
| 607 | - | gobject.ObjectConnect(x.GoPointer(), "signal::move-focus-out", purego.NewCallback(fcb)) | |
| 607 | + | return gobject.SignalConnect(x.GoPointer(), "move-focus-out", purego.NewCallback(fcb)) | |
| 608 | 608 | } | |
| 609 | 609 | ||
| 610 | 610 | // Emitted when a keybinding that scrolls is pressed. | |
| @@ -613,7 +613,7 @@ func (x *ScrolledWindow) ConnectMoveFocusOut(cb func(ScrolledWindow, DirectionTy | |||
| 613 | 613 | // | |
| 614 | 614 | // The horizontal or vertical adjustment is updated which triggers a | |
| 615 | 615 | // signal that the scrolled window’s child may listen to and scroll itself. | |
| 616 | - | func (x *ScrolledWindow) ConnectScrollChild(cb func(ScrolledWindow, ScrollType, bool) bool) { | |
| 616 | + | func (x *ScrolledWindow) ConnectScrollChild(cb func(ScrolledWindow, ScrollType, bool) bool) uint32 { | |
| 617 | 617 | fcb := func(clsPtr uintptr, ScrollVarp ScrollType, HorizontalVarp bool) bool { | |
| 618 | 618 | fa := ScrolledWindow{} | |
| 619 | 619 | fa.Ptr = clsPtr | |
| @@ -621,7 +621,7 @@ func (x *ScrolledWindow) ConnectScrollChild(cb func(ScrolledWindow, ScrollType, | |||
| 621 | 621 | return cb(fa, ScrollVarp, HorizontalVarp) | |
| 622 | 622 | ||
| 623 | 623 | } | |
| 624 | - | gobject.ObjectConnect(x.GoPointer(), "signal::scroll-child", purego.NewCallback(fcb)) | |
| 624 | + | return gobject.SignalConnect(x.GoPointer(), "scroll-child", purego.NewCallback(fcb)) | |
| 625 | 625 | } | |
| 626 | 626 | ||
| 627 | 627 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtksearchentry.go +12 -12
| @@ -151,7 +151,7 @@ func (c *SearchEntry) SetGoPointer(ptr uintptr) { | |||
| 151 | 151 | // Emitted when the entry is activated. | |
| 152 | 152 | // | |
| 153 | 153 | // The keybindings for this signal are all forms of the Enter key. | |
| 154 | - | func (x *SearchEntry) ConnectActivate(cb func(SearchEntry)) { | |
| 154 | + | func (x *SearchEntry) ConnectActivate(cb func(SearchEntry)) uint32 { | |
| 155 | 155 | fcb := func(clsPtr uintptr) { | |
| 156 | 156 | fa := SearchEntry{} | |
| 157 | 157 | fa.Ptr = clsPtr | |
| @@ -159,7 +159,7 @@ func (x *SearchEntry) ConnectActivate(cb func(SearchEntry)) { | |||
| 159 | 159 | cb(fa) | |
| 160 | 160 | ||
| 161 | 161 | } | |
| 162 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 162 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 163 | 163 | } | |
| 164 | 164 | ||
| 165 | 165 | // Emitted when the user initiates a move to the next match | |
| @@ -171,7 +171,7 @@ func (x *SearchEntry) ConnectActivate(cb func(SearchEntry)) { | |||
| 171 | 171 | // between matches. | |
| 172 | 172 | // | |
| 173 | 173 | // The default bindings for this signal is Ctrl-g. | |
| 174 | - | func (x *SearchEntry) ConnectNextMatch(cb func(SearchEntry)) { | |
| 174 | + | func (x *SearchEntry) ConnectNextMatch(cb func(SearchEntry)) uint32 { | |
| 175 | 175 | fcb := func(clsPtr uintptr) { | |
| 176 | 176 | fa := SearchEntry{} | |
| 177 | 177 | fa.Ptr = clsPtr | |
| @@ -179,7 +179,7 @@ func (x *SearchEntry) ConnectNextMatch(cb func(SearchEntry)) { | |||
| 179 | 179 | cb(fa) | |
| 180 | 180 | ||
| 181 | 181 | } | |
| 182 | - | gobject.ObjectConnect(x.GoPointer(), "signal::next-match", purego.NewCallback(fcb)) | |
| 182 | + | return gobject.SignalConnect(x.GoPointer(), "next-match", purego.NewCallback(fcb)) | |
| 183 | 183 | } | |
| 184 | 184 | ||
| 185 | 185 | // Emitted when the user initiates a move to the previous match | |
| @@ -191,7 +191,7 @@ func (x *SearchEntry) ConnectNextMatch(cb func(SearchEntry)) { | |||
| 191 | 191 | // between matches. | |
| 192 | 192 | // | |
| 193 | 193 | // The default bindings for this signal is Ctrl-Shift-g. | |
| 194 | - | func (x *SearchEntry) ConnectPreviousMatch(cb func(SearchEntry)) { | |
| 194 | + | func (x *SearchEntry) ConnectPreviousMatch(cb func(SearchEntry)) uint32 { | |
| 195 | 195 | fcb := func(clsPtr uintptr) { | |
| 196 | 196 | fa := SearchEntry{} | |
| 197 | 197 | fa.Ptr = clsPtr | |
| @@ -199,13 +199,13 @@ func (x *SearchEntry) ConnectPreviousMatch(cb func(SearchEntry)) { | |||
| 199 | 199 | cb(fa) | |
| 200 | 200 | ||
| 201 | 201 | } | |
| 202 | - | gobject.ObjectConnect(x.GoPointer(), "signal::previous-match", purego.NewCallback(fcb)) | |
| 202 | + | return gobject.SignalConnect(x.GoPointer(), "previous-match", purego.NewCallback(fcb)) | |
| 203 | 203 | } | |
| 204 | 204 | ||
| 205 | 205 | // Emitted with a delay. The length of the delay can be | |
| 206 | 206 | // changed with the [property@Gtk.SearchEntry:search-delay] | |
| 207 | 207 | // property. | |
| 208 | - | func (x *SearchEntry) ConnectSearchChanged(cb func(SearchEntry)) { | |
| 208 | + | func (x *SearchEntry) ConnectSearchChanged(cb func(SearchEntry)) uint32 { | |
| 209 | 209 | fcb := func(clsPtr uintptr) { | |
| 210 | 210 | fa := SearchEntry{} | |
| 211 | 211 | fa.Ptr = clsPtr | |
| @@ -213,11 +213,11 @@ func (x *SearchEntry) ConnectSearchChanged(cb func(SearchEntry)) { | |||
| 213 | 213 | cb(fa) | |
| 214 | 214 | ||
| 215 | 215 | } | |
| 216 | - | gobject.ObjectConnect(x.GoPointer(), "signal::search-changed", purego.NewCallback(fcb)) | |
| 216 | + | return gobject.SignalConnect(x.GoPointer(), "search-changed", purego.NewCallback(fcb)) | |
| 217 | 217 | } | |
| 218 | 218 | ||
| 219 | 219 | // Emitted when the user initiated a search on the entry. | |
| 220 | - | func (x *SearchEntry) ConnectSearchStarted(cb func(SearchEntry)) { | |
| 220 | + | func (x *SearchEntry) ConnectSearchStarted(cb func(SearchEntry)) uint32 { | |
| 221 | 221 | fcb := func(clsPtr uintptr) { | |
| 222 | 222 | fa := SearchEntry{} | |
| 223 | 223 | fa.Ptr = clsPtr | |
| @@ -225,7 +225,7 @@ func (x *SearchEntry) ConnectSearchStarted(cb func(SearchEntry)) { | |||
| 225 | 225 | cb(fa) | |
| 226 | 226 | ||
| 227 | 227 | } | |
| 228 | - | gobject.ObjectConnect(x.GoPointer(), "signal::search-started", purego.NewCallback(fcb)) | |
| 228 | + | return gobject.SignalConnect(x.GoPointer(), "search-started", purego.NewCallback(fcb)) | |
| 229 | 229 | } | |
| 230 | 230 | ||
| 231 | 231 | // Emitted when the user stops a search via keyboard input. | |
| @@ -236,7 +236,7 @@ func (x *SearchEntry) ConnectSearchStarted(cb func(SearchEntry)) { | |||
| 236 | 236 | // the search entry in this case. | |
| 237 | 237 | // | |
| 238 | 238 | // The default bindings for this signal is Escape. | |
| 239 | - | func (x *SearchEntry) ConnectStopSearch(cb func(SearchEntry)) { | |
| 239 | + | func (x *SearchEntry) ConnectStopSearch(cb func(SearchEntry)) uint32 { | |
| 240 | 240 | fcb := func(clsPtr uintptr) { | |
| 241 | 241 | fa := SearchEntry{} | |
| 242 | 242 | fa.Ptr = clsPtr | |
| @@ -244,7 +244,7 @@ func (x *SearchEntry) ConnectStopSearch(cb func(SearchEntry)) { | |||
| 244 | 244 | cb(fa) | |
| 245 | 245 | ||
| 246 | 246 | } | |
| 247 | - | gobject.ObjectConnect(x.GoPointer(), "signal::stop-search", purego.NewCallback(fcb)) | |
| 247 | + | return gobject.SignalConnect(x.GoPointer(), "stop-search", purego.NewCallback(fcb)) | |
| 248 | 248 | } | |
| 249 | 249 | ||
| 250 | 250 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkshortcutssection.go +2 -2
| @@ -40,7 +40,7 @@ func (c *ShortcutsSection) SetGoPointer(ptr uintptr) { | |||
| 40 | 40 | c.Ptr = ptr | |
| 41 | 41 | } | |
| 42 | 42 | ||
| 43 | - | func (x *ShortcutsSection) ConnectChangeCurrentPage(cb func(ShortcutsSection, int) bool) { | |
| 43 | + | func (x *ShortcutsSection) ConnectChangeCurrentPage(cb func(ShortcutsSection, int) bool) uint32 { | |
| 44 | 44 | fcb := func(clsPtr uintptr, ObjectVarp int) bool { | |
| 45 | 45 | fa := ShortcutsSection{} | |
| 46 | 46 | fa.Ptr = clsPtr | |
| @@ -48,7 +48,7 @@ func (x *ShortcutsSection) ConnectChangeCurrentPage(cb func(ShortcutsSection, in | |||
| 48 | 48 | return cb(fa, ObjectVarp) | |
| 49 | 49 | ||
| 50 | 50 | } | |
| 51 | - | gobject.ObjectConnect(x.GoPointer(), "signal::change-current-page", purego.NewCallback(fcb)) | |
| 51 | + | return gobject.SignalConnect(x.GoPointer(), "change-current-page", purego.NewCallback(fcb)) | |
| 52 | 52 | } | |
| 53 | 53 | ||
| 54 | 54 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkshortcutswindow.go +4 -4
| @@ -72,7 +72,7 @@ func (c *ShortcutsWindow) SetGoPointer(ptr uintptr) { | |||
| 72 | 72 | // This is a [keybinding signal](class.SignalAction.html). | |
| 73 | 73 | // | |
| 74 | 74 | // The default binding for this signal is the Escape key. | |
| 75 | - | func (x *ShortcutsWindow) ConnectClose(cb func(ShortcutsWindow)) { | |
| 75 | + | func (x *ShortcutsWindow) ConnectClose(cb func(ShortcutsWindow)) uint32 { | |
| 76 | 76 | fcb := func(clsPtr uintptr) { | |
| 77 | 77 | fa := ShortcutsWindow{} | |
| 78 | 78 | fa.Ptr = clsPtr | |
| @@ -80,7 +80,7 @@ func (x *ShortcutsWindow) ConnectClose(cb func(ShortcutsWindow)) { | |||
| 80 | 80 | cb(fa) | |
| 81 | 81 | ||
| 82 | 82 | } | |
| 83 | - | gobject.ObjectConnect(x.GoPointer(), "signal::close", purego.NewCallback(fcb)) | |
| 83 | + | return gobject.SignalConnect(x.GoPointer(), "close", purego.NewCallback(fcb)) | |
| 84 | 84 | } | |
| 85 | 85 | ||
| 86 | 86 | // Emitted when the user uses a keybinding to start a search. | |
| @@ -88,7 +88,7 @@ func (x *ShortcutsWindow) ConnectClose(cb func(ShortcutsWindow)) { | |||
| 88 | 88 | // This is a [keybinding signal](class.SignalAction.html). | |
| 89 | 89 | // | |
| 90 | 90 | // The default binding for this signal is Control-F. | |
| 91 | - | func (x *ShortcutsWindow) ConnectSearch(cb func(ShortcutsWindow)) { | |
| 91 | + | func (x *ShortcutsWindow) ConnectSearch(cb func(ShortcutsWindow)) uint32 { | |
| 92 | 92 | fcb := func(clsPtr uintptr) { | |
| 93 | 93 | fa := ShortcutsWindow{} | |
| 94 | 94 | fa.Ptr = clsPtr | |
| @@ -96,7 +96,7 @@ func (x *ShortcutsWindow) ConnectSearch(cb func(ShortcutsWindow)) { | |||
| 96 | 96 | cb(fa) | |
| 97 | 97 | ||
| 98 | 98 | } | |
| 99 | - | gobject.ObjectConnect(x.GoPointer(), "signal::search", purego.NewCallback(fcb)) | |
| 99 | + | return gobject.SignalConnect(x.GoPointer(), "search", purego.NewCallback(fcb)) | |
| 100 | 100 | } | |
| 101 | 101 | ||
| 102 | 102 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtksignallistitemfactory.go +8 -8
| @@ -96,7 +96,7 @@ func (c *SignalListItemFactory) SetGoPointer(ptr uintptr) { | |||
| 96 | 96 | // The [signal@Gtk.SignalListItemFactory::unbind] signal is the | |
| 97 | 97 | // opposite of this signal and can be used to undo everything done | |
| 98 | 98 | // in this signal. | |
| 99 | - | func (x *SignalListItemFactory) ConnectBind(cb func(SignalListItemFactory, uintptr)) { | |
| 99 | + | func (x *SignalListItemFactory) ConnectBind(cb func(SignalListItemFactory, uintptr)) uint32 { | |
| 100 | 100 | fcb := func(clsPtr uintptr, ObjectVarp uintptr) { | |
| 101 | 101 | fa := SignalListItemFactory{} | |
| 102 | 102 | fa.Ptr = clsPtr | |
| @@ -104,7 +104,7 @@ func (x *SignalListItemFactory) ConnectBind(cb func(SignalListItemFactory, uintp | |||
| 104 | 104 | cb(fa, ObjectVarp) | |
| 105 | 105 | ||
| 106 | 106 | } | |
| 107 | - | gobject.ObjectConnect(x.GoPointer(), "signal::bind", purego.NewCallback(fcb)) | |
| 107 | + | return gobject.SignalConnect(x.GoPointer(), "bind", purego.NewCallback(fcb)) | |
| 108 | 108 | } | |
| 109 | 109 | ||
| 110 | 110 | // Emitted when a new listitem has been created and needs to be setup for use. | |
| @@ -113,7 +113,7 @@ func (x *SignalListItemFactory) ConnectBind(cb func(SignalListItemFactory, uintp | |||
| 113 | 113 | // | |
| 114 | 114 | // The [signal@Gtk.SignalListItemFactory::teardown] signal is the opposite | |
| 115 | 115 | // of this signal and can be used to undo everything done in this signal. | |
| 116 | - | func (x *SignalListItemFactory) ConnectSetup(cb func(SignalListItemFactory, uintptr)) { | |
| 116 | + | func (x *SignalListItemFactory) ConnectSetup(cb func(SignalListItemFactory, uintptr)) uint32 { | |
| 117 | 117 | fcb := func(clsPtr uintptr, ObjectVarp uintptr) { | |
| 118 | 118 | fa := SignalListItemFactory{} | |
| 119 | 119 | fa.Ptr = clsPtr | |
| @@ -121,7 +121,7 @@ func (x *SignalListItemFactory) ConnectSetup(cb func(SignalListItemFactory, uint | |||
| 121 | 121 | cb(fa, ObjectVarp) | |
| 122 | 122 | ||
| 123 | 123 | } | |
| 124 | - | gobject.ObjectConnect(x.GoPointer(), "signal::setup", purego.NewCallback(fcb)) | |
| 124 | + | return gobject.SignalConnect(x.GoPointer(), "setup", purego.NewCallback(fcb)) | |
| 125 | 125 | } | |
| 126 | 126 | ||
| 127 | 127 | // Emitted when an object is about to be destroyed. | |
| @@ -130,7 +130,7 @@ func (x *SignalListItemFactory) ConnectSetup(cb func(SignalListItemFactory, uint | |||
| 130 | 130 | // | |
| 131 | 131 | // This signal is the opposite of the [signal@Gtk.SignalListItemFactory::setup] | |
| 132 | 132 | // signal and should be used to undo everything done in that signal. | |
| 133 | - | func (x *SignalListItemFactory) ConnectTeardown(cb func(SignalListItemFactory, uintptr)) { | |
| 133 | + | func (x *SignalListItemFactory) ConnectTeardown(cb func(SignalListItemFactory, uintptr)) uint32 { | |
| 134 | 134 | fcb := func(clsPtr uintptr, ObjectVarp uintptr) { | |
| 135 | 135 | fa := SignalListItemFactory{} | |
| 136 | 136 | fa.Ptr = clsPtr | |
| @@ -138,7 +138,7 @@ func (x *SignalListItemFactory) ConnectTeardown(cb func(SignalListItemFactory, u | |||
| 138 | 138 | cb(fa, ObjectVarp) | |
| 139 | 139 | ||
| 140 | 140 | } | |
| 141 | - | gobject.ObjectConnect(x.GoPointer(), "signal::teardown", purego.NewCallback(fcb)) | |
| 141 | + | return gobject.SignalConnect(x.GoPointer(), "teardown", purego.NewCallback(fcb)) | |
| 142 | 142 | } | |
| 143 | 143 | ||
| 144 | 144 | // Emitted when a object has been unbound from its item, for example when | |
| @@ -147,7 +147,7 @@ func (x *SignalListItemFactory) ConnectTeardown(cb func(SignalListItemFactory, u | |||
| 147 | 147 | // | |
| 148 | 148 | // This signal is the opposite of the [signal@Gtk.SignalListItemFactory::bind] | |
| 149 | 149 | // signal and should be used to undo everything done in that signal. | |
| 150 | - | func (x *SignalListItemFactory) ConnectUnbind(cb func(SignalListItemFactory, uintptr)) { | |
| 150 | + | func (x *SignalListItemFactory) ConnectUnbind(cb func(SignalListItemFactory, uintptr)) uint32 { | |
| 151 | 151 | fcb := func(clsPtr uintptr, ObjectVarp uintptr) { | |
| 152 | 152 | fa := SignalListItemFactory{} | |
| 153 | 153 | fa.Ptr = clsPtr | |
| @@ -155,7 +155,7 @@ func (x *SignalListItemFactory) ConnectUnbind(cb func(SignalListItemFactory, uin | |||
| 155 | 155 | cb(fa, ObjectVarp) | |
| 156 | 156 | ||
| 157 | 157 | } | |
| 158 | - | gobject.ObjectConnect(x.GoPointer(), "signal::unbind", purego.NewCallback(fcb)) | |
| 158 | + | return gobject.SignalConnect(x.GoPointer(), "unbind", purego.NewCallback(fcb)) | |
| 159 | 159 | } | |
| 160 | 160 | ||
| 161 | 161 | func init() { | |
M v4/gtk/gtksorter.go +2 -2
| @@ -151,7 +151,7 @@ func (c *Sorter) SetGoPointer(ptr uintptr) { | |||
| 151 | 151 | // Depending on the @change parameter, it may be possible to update | |
| 152 | 152 | // the sort order without a full resorting. Refer to the | |
| 153 | 153 | // [enum@Gtk.SorterChange] documentation for details. | |
| 154 | - | func (x *Sorter) ConnectChanged(cb func(Sorter, SorterChange)) { | |
| 154 | + | func (x *Sorter) ConnectChanged(cb func(Sorter, SorterChange)) uint32 { | |
| 155 | 155 | fcb := func(clsPtr uintptr, ChangeVarp SorterChange) { | |
| 156 | 156 | fa := Sorter{} | |
| 157 | 157 | fa.Ptr = clsPtr | |
| @@ -159,7 +159,7 @@ func (x *Sorter) ConnectChanged(cb func(Sorter, SorterChange)) { | |||
| 159 | 159 | cb(fa, ChangeVarp) | |
| 160 | 160 | ||
| 161 | 161 | } | |
| 162 | - | gobject.ObjectConnect(x.GoPointer(), "signal::changed", purego.NewCallback(fcb)) | |
| 162 | + | return gobject.SignalConnect(x.GoPointer(), "changed", purego.NewCallback(fcb)) | |
| 163 | 163 | } | |
| 164 | 164 | ||
| 165 | 165 | func init() { | |
M v4/gtk/gtkspinbutton.go +10 -10
| @@ -493,7 +493,7 @@ func (c *SpinButton) SetGoPointer(ptr uintptr) { | |||
| 493 | 493 | // programmatically. | |
| 494 | 494 | // | |
| 495 | 495 | // The default bindings for this signal are Up/Down and PageUp/PageDown. | |
| 496 | - | func (x *SpinButton) ConnectChangeValue(cb func(SpinButton, ScrollType)) { | |
| 496 | + | func (x *SpinButton) ConnectChangeValue(cb func(SpinButton, ScrollType)) uint32 { | |
| 497 | 497 | fcb := func(clsPtr uintptr, ScrollVarp ScrollType) { | |
| 498 | 498 | fa := SpinButton{} | |
| 499 | 499 | fa.Ptr = clsPtr | |
| @@ -501,7 +501,7 @@ func (x *SpinButton) ConnectChangeValue(cb func(SpinButton, ScrollType)) { | |||
| 501 | 501 | cb(fa, ScrollVarp) | |
| 502 | 502 | ||
| 503 | 503 | } | |
| 504 | - | gobject.ObjectConnect(x.GoPointer(), "signal::change-value", purego.NewCallback(fcb)) | |
| 504 | + | return gobject.SignalConnect(x.GoPointer(), "change-value", purego.NewCallback(fcb)) | |
| 505 | 505 | } | |
| 506 | 506 | ||
| 507 | 507 | // Emitted to convert the users input into a double value. | |
| @@ -511,7 +511,7 @@ func (x *SpinButton) ConnectChangeValue(cb func(SpinButton, ScrollType)) { | |||
| 511 | 511 | // new value. | |
| 512 | 512 | // | |
| 513 | 513 | // The default conversion uses g_strtod(). | |
| 514 | - | func (x *SpinButton) ConnectInput(cb func(SpinButton, float64) int) { | |
| 514 | + | func (x *SpinButton) ConnectInput(cb func(SpinButton, float64) int) uint32 { | |
| 515 | 515 | fcb := func(clsPtr uintptr, NewValueVarp float64) int { | |
| 516 | 516 | fa := SpinButton{} | |
| 517 | 517 | fa.Ptr = clsPtr | |
| @@ -519,7 +519,7 @@ func (x *SpinButton) ConnectInput(cb func(SpinButton, float64) int) { | |||
| 519 | 519 | return cb(fa, NewValueVarp) | |
| 520 | 520 | ||
| 521 | 521 | } | |
| 522 | - | gobject.ObjectConnect(x.GoPointer(), "signal::input", purego.NewCallback(fcb)) | |
| 522 | + | return gobject.SignalConnect(x.GoPointer(), "input", purego.NewCallback(fcb)) | |
| 523 | 523 | } | |
| 524 | 524 | ||
| 525 | 525 | // Emitted to tweak the formatting of the value for display. | |
| @@ -546,7 +546,7 @@ func (x *SpinButton) ConnectInput(cb func(SpinButton, float64) int) { | |||
| 546 | 546 | // } | |
| 547 | 547 | // | |
| 548 | 548 | // ``` | |
| 549 | - | func (x *SpinButton) ConnectOutput(cb func(SpinButton) bool) { | |
| 549 | + | func (x *SpinButton) ConnectOutput(cb func(SpinButton) bool) uint32 { | |
| 550 | 550 | fcb := func(clsPtr uintptr) bool { | |
| 551 | 551 | fa := SpinButton{} | |
| 552 | 552 | fa.Ptr = clsPtr | |
| @@ -554,13 +554,13 @@ func (x *SpinButton) ConnectOutput(cb func(SpinButton) bool) { | |||
| 554 | 554 | return cb(fa) | |
| 555 | 555 | ||
| 556 | 556 | } | |
| 557 | - | gobject.ObjectConnect(x.GoPointer(), "signal::output", purego.NewCallback(fcb)) | |
| 557 | + | return gobject.SignalConnect(x.GoPointer(), "output", purego.NewCallback(fcb)) | |
| 558 | 558 | } | |
| 559 | 559 | ||
| 560 | 560 | // Emitted when the value is changed. | |
| 561 | 561 | // | |
| 562 | 562 | // Also see the [signal@Gtk.SpinButton::output] signal. | |
| 563 | - | func (x *SpinButton) ConnectValueChanged(cb func(SpinButton)) { | |
| 563 | + | func (x *SpinButton) ConnectValueChanged(cb func(SpinButton)) uint32 { | |
| 564 | 564 | fcb := func(clsPtr uintptr) { | |
| 565 | 565 | fa := SpinButton{} | |
| 566 | 566 | fa.Ptr = clsPtr | |
| @@ -568,12 +568,12 @@ func (x *SpinButton) ConnectValueChanged(cb func(SpinButton)) { | |||
| 568 | 568 | cb(fa) | |
| 569 | 569 | ||
| 570 | 570 | } | |
| 571 | - | gobject.ObjectConnect(x.GoPointer(), "signal::value-changed", purego.NewCallback(fcb)) | |
| 571 | + | return gobject.SignalConnect(x.GoPointer(), "value-changed", purego.NewCallback(fcb)) | |
| 572 | 572 | } | |
| 573 | 573 | ||
| 574 | 574 | // Emitted right after the spinbutton wraps from its maximum | |
| 575 | 575 | // to its minimum value or vice-versa. | |
| 576 | - | func (x *SpinButton) ConnectWrapped(cb func(SpinButton)) { | |
| 576 | + | func (x *SpinButton) ConnectWrapped(cb func(SpinButton)) uint32 { | |
| 577 | 577 | fcb := func(clsPtr uintptr) { | |
| 578 | 578 | fa := SpinButton{} | |
| 579 | 579 | fa.Ptr = clsPtr | |
| @@ -581,7 +581,7 @@ func (x *SpinButton) ConnectWrapped(cb func(SpinButton)) { | |||
| 581 | 581 | cb(fa) | |
| 582 | 582 | ||
| 583 | 583 | } | |
| 584 | - | gobject.ObjectConnect(x.GoPointer(), "signal::wrapped", purego.NewCallback(fcb)) | |
| 584 | + | return gobject.SignalConnect(x.GoPointer(), "wrapped", purego.NewCallback(fcb)) | |
| 585 | 585 | } | |
| 586 | 586 | ||
| 587 | 587 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkstatusbar.go +4 -4
| @@ -134,7 +134,7 @@ func (c *Statusbar) SetGoPointer(ptr uintptr) { | |||
| 134 | 134 | } | |
| 135 | 135 | ||
| 136 | 136 | // Emitted whenever a new message is popped off a statusbar's stack. | |
| 137 | - | func (x *Statusbar) ConnectTextPopped(cb func(Statusbar, uint, string)) { | |
| 137 | + | func (x *Statusbar) ConnectTextPopped(cb func(Statusbar, uint, string)) uint32 { | |
| 138 | 138 | fcb := func(clsPtr uintptr, ContextIdVarp uint, TextVarp string) { | |
| 139 | 139 | fa := Statusbar{} | |
| 140 | 140 | fa.Ptr = clsPtr | |
| @@ -142,11 +142,11 @@ func (x *Statusbar) ConnectTextPopped(cb func(Statusbar, uint, string)) { | |||
| 142 | 142 | cb(fa, ContextIdVarp, TextVarp) | |
| 143 | 143 | ||
| 144 | 144 | } | |
| 145 | - | gobject.ObjectConnect(x.GoPointer(), "signal::text-popped", purego.NewCallback(fcb)) | |
| 145 | + | return gobject.SignalConnect(x.GoPointer(), "text-popped", purego.NewCallback(fcb)) | |
| 146 | 146 | } | |
| 147 | 147 | ||
| 148 | 148 | // Emitted whenever a new message gets pushed onto a statusbar's stack. | |
| 149 | - | func (x *Statusbar) ConnectTextPushed(cb func(Statusbar, uint, string)) { | |
| 149 | + | func (x *Statusbar) ConnectTextPushed(cb func(Statusbar, uint, string)) uint32 { | |
| 150 | 150 | fcb := func(clsPtr uintptr, ContextIdVarp uint, TextVarp string) { | |
| 151 | 151 | fa := Statusbar{} | |
| 152 | 152 | fa.Ptr = clsPtr | |
| @@ -154,7 +154,7 @@ func (x *Statusbar) ConnectTextPushed(cb func(Statusbar, uint, string)) { | |||
| 154 | 154 | cb(fa, ContextIdVarp, TextVarp) | |
| 155 | 155 | ||
| 156 | 156 | } | |
| 157 | - | gobject.ObjectConnect(x.GoPointer(), "signal::text-pushed", purego.NewCallback(fcb)) | |
| 157 | + | return gobject.SignalConnect(x.GoPointer(), "text-pushed", purego.NewCallback(fcb)) | |
| 158 | 158 | } | |
| 159 | 159 | ||
| 160 | 160 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkswitch.go +4 -4
| @@ -115,7 +115,7 @@ func (c *Switch) SetGoPointer(ptr uintptr) { | |||
| 115 | 115 | // | |
| 116 | 116 | // Applications should never connect to this signal, | |
| 117 | 117 | // but use the [property@Gtk.Switch:active] property. | |
| 118 | - | func (x *Switch) ConnectActivate(cb func(Switch)) { | |
| 118 | + | func (x *Switch) ConnectActivate(cb func(Switch)) uint32 { | |
| 119 | 119 | fcb := func(clsPtr uintptr) { | |
| 120 | 120 | fa := Switch{} | |
| 121 | 121 | fa.Ptr = clsPtr | |
| @@ -123,7 +123,7 @@ func (x *Switch) ConnectActivate(cb func(Switch)) { | |||
| 123 | 123 | cb(fa) | |
| 124 | 124 | ||
| 125 | 125 | } | |
| 126 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 126 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 127 | 127 | } | |
| 128 | 128 | ||
| 129 | 129 | // Emitted to change the underlying state. | |
| @@ -141,7 +141,7 @@ func (x *Switch) ConnectActivate(cb func(Switch)) { | |||
| 141 | 141 | // Visually, the underlying state is represented by the trough color of | |
| 142 | 142 | // the switch, while the [property@Gtk.Switch:active] property is | |
| 143 | 143 | // represented by the position of the switch. | |
| 144 | - | func (x *Switch) ConnectStateSet(cb func(Switch, bool) bool) { | |
| 144 | + | func (x *Switch) ConnectStateSet(cb func(Switch, bool) bool) uint32 { | |
| 145 | 145 | fcb := func(clsPtr uintptr, StateVarp bool) bool { | |
| 146 | 146 | fa := Switch{} | |
| 147 | 147 | fa.Ptr = clsPtr | |
| @@ -149,7 +149,7 @@ func (x *Switch) ConnectStateSet(cb func(Switch, bool) bool) { | |||
| 149 | 149 | return cb(fa, StateVarp) | |
| 150 | 150 | ||
| 151 | 151 | } | |
| 152 | - | gobject.ObjectConnect(x.GoPointer(), "signal::state-set", purego.NewCallback(fcb)) | |
| 152 | + | return gobject.SignalConnect(x.GoPointer(), "state-set", purego.NewCallback(fcb)) | |
| 153 | 153 | } | |
| 154 | 154 | ||
| 155 | 155 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtktext.go +22 -22
| @@ -542,7 +542,7 @@ func (c *Text) SetGoPointer(ptr uintptr) { | |||
| 542 | 542 | // | |
| 543 | 543 | // The default bindings for this signal are all forms | |
| 544 | 544 | // of the <kbd>Enter</kbd> key. | |
| 545 | - | func (x *Text) ConnectActivate(cb func(Text)) { | |
| 545 | + | func (x *Text) ConnectActivate(cb func(Text)) uint32 { | |
| 546 | 546 | fcb := func(clsPtr uintptr) { | |
| 547 | 547 | fa := Text{} | |
| 548 | 548 | fa.Ptr = clsPtr | |
| @@ -550,7 +550,7 @@ func (x *Text) ConnectActivate(cb func(Text)) { | |||
| 550 | 550 | cb(fa) | |
| 551 | 551 | ||
| 552 | 552 | } | |
| 553 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate", purego.NewCallback(fcb)) | |
| 553 | + | return gobject.SignalConnect(x.GoPointer(), "activate", purego.NewCallback(fcb)) | |
| 554 | 554 | } | |
| 555 | 555 | ||
| 556 | 556 | // Emitted when the user asks for it. | |
| @@ -559,7 +559,7 @@ func (x *Text) ConnectActivate(cb func(Text)) { | |||
| 559 | 559 | // | |
| 560 | 560 | // The default bindings for this signal are | |
| 561 | 561 | // <kbd>Backspace</kbd> and <kbd>Shift</kbd>-<kbd>Backspace</kbd>. | |
| 562 | - | func (x *Text) ConnectBackspace(cb func(Text)) { | |
| 562 | + | func (x *Text) ConnectBackspace(cb func(Text)) uint32 { | |
| 563 | 563 | fcb := func(clsPtr uintptr) { | |
| 564 | 564 | fa := Text{} | |
| 565 | 565 | fa.Ptr = clsPtr | |
| @@ -567,7 +567,7 @@ func (x *Text) ConnectBackspace(cb func(Text)) { | |||
| 567 | 567 | cb(fa) | |
| 568 | 568 | ||
| 569 | 569 | } | |
| 570 | - | gobject.ObjectConnect(x.GoPointer(), "signal::backspace", purego.NewCallback(fcb)) | |
| 570 | + | return gobject.SignalConnect(x.GoPointer(), "backspace", purego.NewCallback(fcb)) | |
| 571 | 571 | } | |
| 572 | 572 | ||
| 573 | 573 | // Emitted to copy the selection to the clipboard. | |
| @@ -577,7 +577,7 @@ func (x *Text) ConnectBackspace(cb func(Text)) { | |||
| 577 | 577 | // The default bindings for this signal are | |
| 578 | 578 | // <kbd>Ctrl</kbd>-<kbd>c</kbd> and | |
| 579 | 579 | // <kbd>Ctrl</kbd>-<kbd>Insert</kbd>. | |
| 580 | - | func (x *Text) ConnectCopyClipboard(cb func(Text)) { | |
| 580 | + | func (x *Text) ConnectCopyClipboard(cb func(Text)) uint32 { | |
| 581 | 581 | fcb := func(clsPtr uintptr) { | |
| 582 | 582 | fa := Text{} | |
| 583 | 583 | fa.Ptr = clsPtr | |
| @@ -585,7 +585,7 @@ func (x *Text) ConnectCopyClipboard(cb func(Text)) { | |||
| 585 | 585 | cb(fa) | |
| 586 | 586 | ||
| 587 | 587 | } | |
| 588 | - | gobject.ObjectConnect(x.GoPointer(), "signal::copy-clipboard", purego.NewCallback(fcb)) | |
| 588 | + | return gobject.SignalConnect(x.GoPointer(), "copy-clipboard", purego.NewCallback(fcb)) | |
| 589 | 589 | } | |
| 590 | 590 | ||
| 591 | 591 | // Emitted to cut the selection to the clipboard. | |
| @@ -595,7 +595,7 @@ func (x *Text) ConnectCopyClipboard(cb func(Text)) { | |||
| 595 | 595 | // The default bindings for this signal are | |
| 596 | 596 | // <kbd>Ctrl</kbd>-<kbd>x</kbd> and | |
| 597 | 597 | // <kbd>Shift</kbd>-<kbd>Delete</kbd>. | |
| 598 | - | func (x *Text) ConnectCutClipboard(cb func(Text)) { | |
| 598 | + | func (x *Text) ConnectCutClipboard(cb func(Text)) uint32 { | |
| 599 | 599 | fcb := func(clsPtr uintptr) { | |
| 600 | 600 | fa := Text{} | |
| 601 | 601 | fa.Ptr = clsPtr | |
| @@ -603,7 +603,7 @@ func (x *Text) ConnectCutClipboard(cb func(Text)) { | |||
| 603 | 603 | cb(fa) | |
| 604 | 604 | ||
| 605 | 605 | } | |
| 606 | - | gobject.ObjectConnect(x.GoPointer(), "signal::cut-clipboard", purego.NewCallback(fcb)) | |
| 606 | + | return gobject.SignalConnect(x.GoPointer(), "cut-clipboard", purego.NewCallback(fcb)) | |
| 607 | 607 | } | |
| 608 | 608 | ||
| 609 | 609 | // Emitted when the user initiates a text deletion. | |
| @@ -617,7 +617,7 @@ func (x *Text) ConnectCutClipboard(cb func(Text)) { | |||
| 617 | 617 | // The default bindings for this signal are <kbd>Delete</kbd> | |
| 618 | 618 | // for deleting a character and <kbd>Ctrl</kbd>-<kbd>Delete</kbd> | |
| 619 | 619 | // for deleting a word. | |
| 620 | - | func (x *Text) ConnectDeleteFromCursor(cb func(Text, DeleteType, int)) { | |
| 620 | + | func (x *Text) ConnectDeleteFromCursor(cb func(Text, DeleteType, int)) uint32 { | |
| 621 | 621 | fcb := func(clsPtr uintptr, TypeVarp DeleteType, CountVarp int) { | |
| 622 | 622 | fa := Text{} | |
| 623 | 623 | fa.Ptr = clsPtr | |
| @@ -625,7 +625,7 @@ func (x *Text) ConnectDeleteFromCursor(cb func(Text, DeleteType, int)) { | |||
| 625 | 625 | cb(fa, TypeVarp, CountVarp) | |
| 626 | 626 | ||
| 627 | 627 | } | |
| 628 | - | gobject.ObjectConnect(x.GoPointer(), "signal::delete-from-cursor", purego.NewCallback(fcb)) | |
| 628 | + | return gobject.SignalConnect(x.GoPointer(), "delete-from-cursor", purego.NewCallback(fcb)) | |
| 629 | 629 | } | |
| 630 | 630 | ||
| 631 | 631 | // Emitted when the user initiates the insertion of a | |
| @@ -634,7 +634,7 @@ func (x *Text) ConnectDeleteFromCursor(cb func(Text, DeleteType, int)) { | |||
| 634 | 634 | // This is a [keybinding signal](class.SignalAction.html). | |
| 635 | 635 | // | |
| 636 | 636 | // This signal has no default bindings. | |
| 637 | - | func (x *Text) ConnectInsertAtCursor(cb func(Text, string)) { | |
| 637 | + | func (x *Text) ConnectInsertAtCursor(cb func(Text, string)) uint32 { | |
| 638 | 638 | fcb := func(clsPtr uintptr, StringVarp string) { | |
| 639 | 639 | fa := Text{} | |
| 640 | 640 | fa.Ptr = clsPtr | |
| @@ -642,7 +642,7 @@ func (x *Text) ConnectInsertAtCursor(cb func(Text, string)) { | |||
| 642 | 642 | cb(fa, StringVarp) | |
| 643 | 643 | ||
| 644 | 644 | } | |
| 645 | - | gobject.ObjectConnect(x.GoPointer(), "signal::insert-at-cursor", purego.NewCallback(fcb)) | |
| 645 | + | return gobject.SignalConnect(x.GoPointer(), "insert-at-cursor", purego.NewCallback(fcb)) | |
| 646 | 646 | } | |
| 647 | 647 | ||
| 648 | 648 | // Emitted to present the Emoji chooser for the widget. | |
| @@ -652,7 +652,7 @@ func (x *Text) ConnectInsertAtCursor(cb func(Text, string)) { | |||
| 652 | 652 | // The default bindings for this signal are | |
| 653 | 653 | // <kbd>Ctrl</kbd>-<kbd>.</kbd> and | |
| 654 | 654 | // <kbd>Ctrl</kbd>-<kbd>;</kbd> | |
| 655 | - | func (x *Text) ConnectInsertEmoji(cb func(Text)) { | |
| 655 | + | func (x *Text) ConnectInsertEmoji(cb func(Text)) uint32 { | |
| 656 | 656 | fcb := func(clsPtr uintptr) { | |
| 657 | 657 | fa := Text{} | |
| 658 | 658 | fa.Ptr = clsPtr | |
| @@ -660,7 +660,7 @@ func (x *Text) ConnectInsertEmoji(cb func(Text)) { | |||
| 660 | 660 | cb(fa) | |
| 661 | 661 | ||
| 662 | 662 | } | |
| 663 | - | gobject.ObjectConnect(x.GoPointer(), "signal::insert-emoji", purego.NewCallback(fcb)) | |
| 663 | + | return gobject.SignalConnect(x.GoPointer(), "insert-emoji", purego.NewCallback(fcb)) | |
| 664 | 664 | } | |
| 665 | 665 | ||
| 666 | 666 | // Emitted when the user initiates a cursor movement. | |
| @@ -683,7 +683,7 @@ func (x *Text) ConnectInsertEmoji(cb func(Text)) { | |||
| 683 | 683 | // move by individual characters/lines | |
| 684 | 684 | // - <kbd>Ctrl</kbd>-<kbd>→</kbd>, etc. move by words/paragraphs | |
| 685 | 685 | // - <kbd>Home</kbd>, <kbd>End</kbd> move to the ends of the buffer | |
| 686 | - | func (x *Text) ConnectMoveCursor(cb func(Text, MovementStep, int, bool)) { | |
| 686 | + | func (x *Text) ConnectMoveCursor(cb func(Text, MovementStep, int, bool)) uint32 { | |
| 687 | 687 | fcb := func(clsPtr uintptr, StepVarp MovementStep, CountVarp int, ExtendVarp bool) { | |
| 688 | 688 | fa := Text{} | |
| 689 | 689 | fa.Ptr = clsPtr | |
| @@ -691,7 +691,7 @@ func (x *Text) ConnectMoveCursor(cb func(Text, MovementStep, int, bool)) { | |||
| 691 | 691 | cb(fa, StepVarp, CountVarp, ExtendVarp) | |
| 692 | 692 | ||
| 693 | 693 | } | |
| 694 | - | gobject.ObjectConnect(x.GoPointer(), "signal::move-cursor", purego.NewCallback(fcb)) | |
| 694 | + | return gobject.SignalConnect(x.GoPointer(), "move-cursor", purego.NewCallback(fcb)) | |
| 695 | 695 | } | |
| 696 | 696 | ||
| 697 | 697 | // Emitted to paste the contents of the clipboard. | |
| @@ -700,7 +700,7 @@ func (x *Text) ConnectMoveCursor(cb func(Text, MovementStep, int, bool)) { | |||
| 700 | 700 | // | |
| 701 | 701 | // The default bindings for this signal are | |
| 702 | 702 | // <kbd>Ctrl</kbd>-<kbd>v</kbd> and <kbd>Shift</kbd>-<kbd>Insert</kbd>. | |
| 703 | - | func (x *Text) ConnectPasteClipboard(cb func(Text)) { | |
| 703 | + | func (x *Text) ConnectPasteClipboard(cb func(Text)) uint32 { | |
| 704 | 704 | fcb := func(clsPtr uintptr) { | |
| 705 | 705 | fa := Text{} | |
| 706 | 706 | fa.Ptr = clsPtr | |
| @@ -708,7 +708,7 @@ func (x *Text) ConnectPasteClipboard(cb func(Text)) { | |||
| 708 | 708 | cb(fa) | |
| 709 | 709 | ||
| 710 | 710 | } | |
| 711 | - | gobject.ObjectConnect(x.GoPointer(), "signal::paste-clipboard", purego.NewCallback(fcb)) | |
| 711 | + | return gobject.SignalConnect(x.GoPointer(), "paste-clipboard", purego.NewCallback(fcb)) | |
| 712 | 712 | } | |
| 713 | 713 | ||
| 714 | 714 | // Emitted when the preedit text changes. | |
| @@ -716,7 +716,7 @@ func (x *Text) ConnectPasteClipboard(cb func(Text)) { | |||
| 716 | 716 | // If an input method is used, the typed text will not immediately | |
| 717 | 717 | // be committed to the buffer. So if you are interested in the text, | |
| 718 | 718 | // connect to this signal. | |
| 719 | - | func (x *Text) ConnectPreeditChanged(cb func(Text, string)) { | |
| 719 | + | func (x *Text) ConnectPreeditChanged(cb func(Text, string)) uint32 { | |
| 720 | 720 | fcb := func(clsPtr uintptr, PreeditVarp string) { | |
| 721 | 721 | fa := Text{} | |
| 722 | 722 | fa.Ptr = clsPtr | |
| @@ -724,7 +724,7 @@ func (x *Text) ConnectPreeditChanged(cb func(Text, string)) { | |||
| 724 | 724 | cb(fa, PreeditVarp) | |
| 725 | 725 | ||
| 726 | 726 | } | |
| 727 | - | gobject.ObjectConnect(x.GoPointer(), "signal::preedit-changed", purego.NewCallback(fcb)) | |
| 727 | + | return gobject.SignalConnect(x.GoPointer(), "preedit-changed", purego.NewCallback(fcb)) | |
| 728 | 728 | } | |
| 729 | 729 | ||
| 730 | 730 | // Emitted to toggle the overwrite mode of the `GtkText`. | |
| @@ -732,7 +732,7 @@ func (x *Text) ConnectPreeditChanged(cb func(Text, string)) { | |||
| 732 | 732 | // This is a [keybinding signal](class.SignalAction.html). | |
| 733 | 733 | // | |
| 734 | 734 | // The default bindings for this signal is <kbd>Insert</kbd>. | |
| 735 | - | func (x *Text) ConnectToggleOverwrite(cb func(Text)) { | |
| 735 | + | func (x *Text) ConnectToggleOverwrite(cb func(Text)) uint32 { | |
| 736 | 736 | fcb := func(clsPtr uintptr) { | |
| 737 | 737 | fa := Text{} | |
| 738 | 738 | fa.Ptr = clsPtr | |
| @@ -740,7 +740,7 @@ func (x *Text) ConnectToggleOverwrite(cb func(Text)) { | |||
| 740 | 740 | cb(fa) | |
| 741 | 741 | ||
| 742 | 742 | } | |
| 743 | - | gobject.ObjectConnect(x.GoPointer(), "signal::toggle-overwrite", purego.NewCallback(fcb)) | |
| 743 | + | return gobject.SignalConnect(x.GoPointer(), "toggle-overwrite", purego.NewCallback(fcb)) | |
| 744 | 744 | } | |
| 745 | 745 | ||
| 746 | 746 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtktextbuffer.go +30 -30
| @@ -1147,7 +1147,7 @@ func (c *TextBuffer) SetGoPointer(ptr uintptr) { | |||
| 1147 | 1147 | // [method@Gtk.TextBuffer.apply_tag], | |
| 1148 | 1148 | // [method@Gtk.TextBuffer.insert_with_tags], | |
| 1149 | 1149 | // [method@Gtk.TextBuffer.insert_range]. | |
| 1150 | - | func (x *TextBuffer) ConnectApplyTag(cb func(TextBuffer, uintptr, uintptr, uintptr)) { | |
| 1150 | + | func (x *TextBuffer) ConnectApplyTag(cb func(TextBuffer, uintptr, uintptr, uintptr)) uint32 { | |
| 1151 | 1151 | fcb := func(clsPtr uintptr, TagVarp uintptr, StartVarp uintptr, EndVarp uintptr) { | |
| 1152 | 1152 | fa := TextBuffer{} | |
| 1153 | 1153 | fa.Ptr = clsPtr | |
| @@ -1155,7 +1155,7 @@ func (x *TextBuffer) ConnectApplyTag(cb func(TextBuffer, uintptr, uintptr, uintp | |||
| 1155 | 1155 | cb(fa, TagVarp, StartVarp, EndVarp) | |
| 1156 | 1156 | ||
| 1157 | 1157 | } | |
| 1158 | - | gobject.ObjectConnect(x.GoPointer(), "signal::apply-tag", purego.NewCallback(fcb)) | |
| 1158 | + | return gobject.SignalConnect(x.GoPointer(), "apply-tag", purego.NewCallback(fcb)) | |
| 1159 | 1159 | } | |
| 1160 | 1160 | ||
| 1161 | 1161 | // Emitted at the beginning of a single user-visible | |
| @@ -1168,7 +1168,7 @@ func (x *TextBuffer) ConnectApplyTag(cb func(TextBuffer, uintptr, uintptr, uintp | |||
| 1168 | 1168 | // [method@Gtk.TextBuffer.delete_interactive], | |
| 1169 | 1169 | // [method@Gtk.TextBuffer.backspace], | |
| 1170 | 1170 | // [method@Gtk.TextBuffer.delete_selection]. | |
| 1171 | - | func (x *TextBuffer) ConnectBeginUserAction(cb func(TextBuffer)) { | |
| 1171 | + | func (x *TextBuffer) ConnectBeginUserAction(cb func(TextBuffer)) uint32 { | |
| 1172 | 1172 | fcb := func(clsPtr uintptr) { | |
| 1173 | 1173 | fa := TextBuffer{} | |
| 1174 | 1174 | fa.Ptr = clsPtr | |
| @@ -1176,11 +1176,11 @@ func (x *TextBuffer) ConnectBeginUserAction(cb func(TextBuffer)) { | |||
| 1176 | 1176 | cb(fa) | |
| 1177 | 1177 | ||
| 1178 | 1178 | } | |
| 1179 | - | gobject.ObjectConnect(x.GoPointer(), "signal::begin-user-action", purego.NewCallback(fcb)) | |
| 1179 | + | return gobject.SignalConnect(x.GoPointer(), "begin-user-action", purego.NewCallback(fcb)) | |
| 1180 | 1180 | } | |
| 1181 | 1181 | ||
| 1182 | 1182 | // Emitted when the content of a `GtkTextBuffer` has changed. | |
| 1183 | - | func (x *TextBuffer) ConnectChanged(cb func(TextBuffer)) { | |
| 1183 | + | func (x *TextBuffer) ConnectChanged(cb func(TextBuffer)) uint32 { | |
| 1184 | 1184 | fcb := func(clsPtr uintptr) { | |
| 1185 | 1185 | fa := TextBuffer{} | |
| 1186 | 1186 | fa.Ptr = clsPtr | |
| @@ -1188,7 +1188,7 @@ func (x *TextBuffer) ConnectChanged(cb func(TextBuffer)) { | |||
| 1188 | 1188 | cb(fa) | |
| 1189 | 1189 | ||
| 1190 | 1190 | } | |
| 1191 | - | gobject.ObjectConnect(x.GoPointer(), "signal::changed", purego.NewCallback(fcb)) | |
| 1191 | + | return gobject.SignalConnect(x.GoPointer(), "changed", purego.NewCallback(fcb)) | |
| 1192 | 1192 | } | |
| 1193 | 1193 | ||
| 1194 | 1194 | // Emitted to delete a range from a `GtkTextBuffer`. | |
| @@ -1202,7 +1202,7 @@ func (x *TextBuffer) ConnectChanged(cb func(TextBuffer)) { | |||
| 1202 | 1202 | // the deleted text. | |
| 1203 | 1203 | // | |
| 1204 | 1204 | // See also: [method@Gtk.TextBuffer.delete]. | |
| 1205 | - | func (x *TextBuffer) ConnectDeleteRange(cb func(TextBuffer, uintptr, uintptr)) { | |
| 1205 | + | func (x *TextBuffer) ConnectDeleteRange(cb func(TextBuffer, uintptr, uintptr)) uint32 { | |
| 1206 | 1206 | fcb := func(clsPtr uintptr, StartVarp uintptr, EndVarp uintptr) { | |
| 1207 | 1207 | fa := TextBuffer{} | |
| 1208 | 1208 | fa.Ptr = clsPtr | |
| @@ -1210,7 +1210,7 @@ func (x *TextBuffer) ConnectDeleteRange(cb func(TextBuffer, uintptr, uintptr)) { | |||
| 1210 | 1210 | cb(fa, StartVarp, EndVarp) | |
| 1211 | 1211 | ||
| 1212 | 1212 | } | |
| 1213 | - | gobject.ObjectConnect(x.GoPointer(), "signal::delete-range", purego.NewCallback(fcb)) | |
| 1213 | + | return gobject.SignalConnect(x.GoPointer(), "delete-range", purego.NewCallback(fcb)) | |
| 1214 | 1214 | } | |
| 1215 | 1215 | ||
| 1216 | 1216 | // Emitted at the end of a single user-visible | |
| @@ -1224,7 +1224,7 @@ func (x *TextBuffer) ConnectDeleteRange(cb func(TextBuffer, uintptr, uintptr)) { | |||
| 1224 | 1224 | // [method@Gtk.TextBuffer.backspace], | |
| 1225 | 1225 | // [method@Gtk.TextBuffer.delete_selection], | |
| 1226 | 1226 | // [method@Gtk.TextBuffer.backspace]. | |
| 1227 | - | func (x *TextBuffer) ConnectEndUserAction(cb func(TextBuffer)) { | |
| 1227 | + | func (x *TextBuffer) ConnectEndUserAction(cb func(TextBuffer)) uint32 { | |
| 1228 | 1228 | fcb := func(clsPtr uintptr) { | |
| 1229 | 1229 | fa := TextBuffer{} | |
| 1230 | 1230 | fa.Ptr = clsPtr | |
| @@ -1232,7 +1232,7 @@ func (x *TextBuffer) ConnectEndUserAction(cb func(TextBuffer)) { | |||
| 1232 | 1232 | cb(fa) | |
| 1233 | 1233 | ||
| 1234 | 1234 | } | |
| 1235 | - | gobject.ObjectConnect(x.GoPointer(), "signal::end-user-action", purego.NewCallback(fcb)) | |
| 1235 | + | return gobject.SignalConnect(x.GoPointer(), "end-user-action", purego.NewCallback(fcb)) | |
| 1236 | 1236 | } | |
| 1237 | 1237 | ||
| 1238 | 1238 | // Emitted to insert a `GtkTextChildAnchor` in a `GtkTextBuffer`. | |
| @@ -1245,7 +1245,7 @@ func (x *TextBuffer) ConnectEndUserAction(cb func(TextBuffer)) { | |||
| 1245 | 1245 | // it to be placed after the inserted @anchor. | |
| 1246 | 1246 | // | |
| 1247 | 1247 | // See also: [method@Gtk.TextBuffer.insert_child_anchor]. | |
| 1248 | - | func (x *TextBuffer) ConnectInsertChildAnchor(cb func(TextBuffer, uintptr, uintptr)) { | |
| 1248 | + | func (x *TextBuffer) ConnectInsertChildAnchor(cb func(TextBuffer, uintptr, uintptr)) uint32 { | |
| 1249 | 1249 | fcb := func(clsPtr uintptr, LocationVarp uintptr, AnchorVarp uintptr) { | |
| 1250 | 1250 | fa := TextBuffer{} | |
| 1251 | 1251 | fa.Ptr = clsPtr | |
| @@ -1253,7 +1253,7 @@ func (x *TextBuffer) ConnectInsertChildAnchor(cb func(TextBuffer, uintptr, uintp | |||
| 1253 | 1253 | cb(fa, LocationVarp, AnchorVarp) | |
| 1254 | 1254 | ||
| 1255 | 1255 | } | |
| 1256 | - | gobject.ObjectConnect(x.GoPointer(), "signal::insert-child-anchor", purego.NewCallback(fcb)) | |
| 1256 | + | return gobject.SignalConnect(x.GoPointer(), "insert-child-anchor", purego.NewCallback(fcb)) | |
| 1257 | 1257 | } | |
| 1258 | 1258 | ||
| 1259 | 1259 | // Emitted to insert a `GdkPaintable` in a `GtkTextBuffer`. | |
| @@ -1266,7 +1266,7 @@ func (x *TextBuffer) ConnectInsertChildAnchor(cb func(TextBuffer, uintptr, uintp | |||
| 1266 | 1266 | // it to be placed after the inserted @paintable. | |
| 1267 | 1267 | // | |
| 1268 | 1268 | // See also: [method@Gtk.TextBuffer.insert_paintable]. | |
| 1269 | - | func (x *TextBuffer) ConnectInsertPaintable(cb func(TextBuffer, uintptr, uintptr)) { | |
| 1269 | + | func (x *TextBuffer) ConnectInsertPaintable(cb func(TextBuffer, uintptr, uintptr)) uint32 { | |
| 1270 | 1270 | fcb := func(clsPtr uintptr, LocationVarp uintptr, PaintableVarp uintptr) { | |
| 1271 | 1271 | fa := TextBuffer{} | |
| 1272 | 1272 | fa.Ptr = clsPtr | |
| @@ -1274,7 +1274,7 @@ func (x *TextBuffer) ConnectInsertPaintable(cb func(TextBuffer, uintptr, uintptr | |||
| 1274 | 1274 | cb(fa, LocationVarp, PaintableVarp) | |
| 1275 | 1275 | ||
| 1276 | 1276 | } | |
| 1277 | - | gobject.ObjectConnect(x.GoPointer(), "signal::insert-paintable", purego.NewCallback(fcb)) | |
| 1277 | + | return gobject.SignalConnect(x.GoPointer(), "insert-paintable", purego.NewCallback(fcb)) | |
| 1278 | 1278 | } | |
| 1279 | 1279 | ||
| 1280 | 1280 | // Emitted to insert text in a `GtkTextBuffer`. | |
| @@ -1288,7 +1288,7 @@ func (x *TextBuffer) ConnectInsertPaintable(cb func(TextBuffer, uintptr, uintptr | |||
| 1288 | 1288 | // | |
| 1289 | 1289 | // See also: [method@Gtk.TextBuffer.insert], | |
| 1290 | 1290 | // [method@Gtk.TextBuffer.insert_range]. | |
| 1291 | - | func (x *TextBuffer) ConnectInsertText(cb func(TextBuffer, uintptr, string, int)) { | |
| 1291 | + | func (x *TextBuffer) ConnectInsertText(cb func(TextBuffer, uintptr, string, int)) uint32 { | |
| 1292 | 1292 | fcb := func(clsPtr uintptr, LocationVarp uintptr, TextVarp string, LenVarp int) { | |
| 1293 | 1293 | fa := TextBuffer{} | |
| 1294 | 1294 | fa.Ptr = clsPtr | |
| @@ -1296,13 +1296,13 @@ func (x *TextBuffer) ConnectInsertText(cb func(TextBuffer, uintptr, string, int) | |||
| 1296 | 1296 | cb(fa, LocationVarp, TextVarp, LenVarp) | |
| 1297 | 1297 | ||
| 1298 | 1298 | } | |
| 1299 | - | gobject.ObjectConnect(x.GoPointer(), "signal::insert-text", purego.NewCallback(fcb)) | |
| 1299 | + | return gobject.SignalConnect(x.GoPointer(), "insert-text", purego.NewCallback(fcb)) | |
| 1300 | 1300 | } | |
| 1301 | 1301 | ||
| 1302 | 1302 | // Emitted as notification after a `GtkTextMark` is deleted. | |
| 1303 | 1303 | // | |
| 1304 | 1304 | // See also: [method@Gtk.TextBuffer.delete_mark]. | |
| 1305 | - | func (x *TextBuffer) ConnectMarkDeleted(cb func(TextBuffer, uintptr)) { | |
| 1305 | + | func (x *TextBuffer) ConnectMarkDeleted(cb func(TextBuffer, uintptr)) uint32 { | |
| 1306 | 1306 | fcb := func(clsPtr uintptr, MarkVarp uintptr) { | |
| 1307 | 1307 | fa := TextBuffer{} | |
| 1308 | 1308 | fa.Ptr = clsPtr | |
| @@ -1310,7 +1310,7 @@ func (x *TextBuffer) ConnectMarkDeleted(cb func(TextBuffer, uintptr)) { | |||
| 1310 | 1310 | cb(fa, MarkVarp) | |
| 1311 | 1311 | ||
| 1312 | 1312 | } | |
| 1313 | - | gobject.ObjectConnect(x.GoPointer(), "signal::mark-deleted", purego.NewCallback(fcb)) | |
| 1313 | + | return gobject.SignalConnect(x.GoPointer(), "mark-deleted", purego.NewCallback(fcb)) | |
| 1314 | 1314 | } | |
| 1315 | 1315 | ||
| 1316 | 1316 | // Emitted as notification after a `GtkTextMark` is set. | |
| @@ -1318,7 +1318,7 @@ func (x *TextBuffer) ConnectMarkDeleted(cb func(TextBuffer, uintptr)) { | |||
| 1318 | 1318 | // See also: | |
| 1319 | 1319 | // [method@Gtk.TextBuffer.create_mark], | |
| 1320 | 1320 | // [method@Gtk.TextBuffer.move_mark]. | |
| 1321 | - | func (x *TextBuffer) ConnectMarkSet(cb func(TextBuffer, uintptr, uintptr)) { | |
| 1321 | + | func (x *TextBuffer) ConnectMarkSet(cb func(TextBuffer, uintptr, uintptr)) uint32 { | |
| 1322 | 1322 | fcb := func(clsPtr uintptr, LocationVarp uintptr, MarkVarp uintptr) { | |
| 1323 | 1323 | fa := TextBuffer{} | |
| 1324 | 1324 | fa.Ptr = clsPtr | |
| @@ -1326,13 +1326,13 @@ func (x *TextBuffer) ConnectMarkSet(cb func(TextBuffer, uintptr, uintptr)) { | |||
| 1326 | 1326 | cb(fa, LocationVarp, MarkVarp) | |
| 1327 | 1327 | ||
| 1328 | 1328 | } | |
| 1329 | - | gobject.ObjectConnect(x.GoPointer(), "signal::mark-set", purego.NewCallback(fcb)) | |
| 1329 | + | return gobject.SignalConnect(x.GoPointer(), "mark-set", purego.NewCallback(fcb)) | |
| 1330 | 1330 | } | |
| 1331 | 1331 | ||
| 1332 | 1332 | // Emitted when the modified bit of a `GtkTextBuffer` flips. | |
| 1333 | 1333 | // | |
| 1334 | 1334 | // See also: [method@Gtk.TextBuffer.set_modified]. | |
| 1335 | - | func (x *TextBuffer) ConnectModifiedChanged(cb func(TextBuffer)) { | |
| 1335 | + | func (x *TextBuffer) ConnectModifiedChanged(cb func(TextBuffer)) uint32 { | |
| 1336 | 1336 | fcb := func(clsPtr uintptr) { | |
| 1337 | 1337 | fa := TextBuffer{} | |
| 1338 | 1338 | fa.Ptr = clsPtr | |
| @@ -1340,7 +1340,7 @@ func (x *TextBuffer) ConnectModifiedChanged(cb func(TextBuffer)) { | |||
| 1340 | 1340 | cb(fa) | |
| 1341 | 1341 | ||
| 1342 | 1342 | } | |
| 1343 | - | gobject.ObjectConnect(x.GoPointer(), "signal::modified-changed", purego.NewCallback(fcb)) | |
| 1343 | + | return gobject.SignalConnect(x.GoPointer(), "modified-changed", purego.NewCallback(fcb)) | |
| 1344 | 1344 | } | |
| 1345 | 1345 | ||
| 1346 | 1346 | // Emitted after paste operation has been completed. | |
| @@ -1348,7 +1348,7 @@ func (x *TextBuffer) ConnectModifiedChanged(cb func(TextBuffer)) { | |||
| 1348 | 1348 | // This is useful to properly scroll the view to the end | |
| 1349 | 1349 | // of the pasted text. See [method@Gtk.TextBuffer.paste_clipboard] | |
| 1350 | 1350 | // for more details. | |
| 1351 | - | func (x *TextBuffer) ConnectPasteDone(cb func(TextBuffer, uintptr)) { | |
| 1351 | + | func (x *TextBuffer) ConnectPasteDone(cb func(TextBuffer, uintptr)) uint32 { | |
| 1352 | 1352 | fcb := func(clsPtr uintptr, ClipboardVarp uintptr) { | |
| 1353 | 1353 | fa := TextBuffer{} | |
| 1354 | 1354 | fa.Ptr = clsPtr | |
| @@ -1356,12 +1356,12 @@ func (x *TextBuffer) ConnectPasteDone(cb func(TextBuffer, uintptr)) { | |||
| 1356 | 1356 | cb(fa, ClipboardVarp) | |
| 1357 | 1357 | ||
| 1358 | 1358 | } | |
| 1359 | - | gobject.ObjectConnect(x.GoPointer(), "signal::paste-done", purego.NewCallback(fcb)) | |
| 1359 | + | return gobject.SignalConnect(x.GoPointer(), "paste-done", purego.NewCallback(fcb)) | |
| 1360 | 1360 | } | |
| 1361 | 1361 | ||
| 1362 | 1362 | // Emitted when a request has been made to redo the | |
| 1363 | 1363 | // previously undone operation. | |
| 1364 | - | func (x *TextBuffer) ConnectRedo(cb func(TextBuffer)) { | |
| 1364 | + | func (x *TextBuffer) ConnectRedo(cb func(TextBuffer)) uint32 { | |
| 1365 | 1365 | fcb := func(clsPtr uintptr) { | |
| 1366 | 1366 | fa := TextBuffer{} | |
| 1367 | 1367 | fa.Ptr = clsPtr | |
| @@ -1369,7 +1369,7 @@ func (x *TextBuffer) ConnectRedo(cb func(TextBuffer)) { | |||
| 1369 | 1369 | cb(fa) | |
| 1370 | 1370 | ||
| 1371 | 1371 | } | |
| 1372 | - | gobject.ObjectConnect(x.GoPointer(), "signal::redo", purego.NewCallback(fcb)) | |
| 1372 | + | return gobject.SignalConnect(x.GoPointer(), "redo", purego.NewCallback(fcb)) | |
| 1373 | 1373 | } | |
| 1374 | 1374 | ||
| 1375 | 1375 | // Emitted to remove all occurrences of @tag from a range | |
| @@ -1382,7 +1382,7 @@ func (x *TextBuffer) ConnectRedo(cb func(TextBuffer)) { | |||
| 1382 | 1382 | // to revalidate them). | |
| 1383 | 1383 | // | |
| 1384 | 1384 | // See also: [method@Gtk.TextBuffer.remove_tag]. | |
| 1385 | - | func (x *TextBuffer) ConnectRemoveTag(cb func(TextBuffer, uintptr, uintptr, uintptr)) { | |
| 1385 | + | func (x *TextBuffer) ConnectRemoveTag(cb func(TextBuffer, uintptr, uintptr, uintptr)) uint32 { | |
| 1386 | 1386 | fcb := func(clsPtr uintptr, TagVarp uintptr, StartVarp uintptr, EndVarp uintptr) { | |
| 1387 | 1387 | fa := TextBuffer{} | |
| 1388 | 1388 | fa.Ptr = clsPtr | |
| @@ -1390,13 +1390,13 @@ func (x *TextBuffer) ConnectRemoveTag(cb func(TextBuffer, uintptr, uintptr, uint | |||
| 1390 | 1390 | cb(fa, TagVarp, StartVarp, EndVarp) | |
| 1391 | 1391 | ||
| 1392 | 1392 | } | |
| 1393 | - | gobject.ObjectConnect(x.GoPointer(), "signal::remove-tag", purego.NewCallback(fcb)) | |
| 1393 | + | return gobject.SignalConnect(x.GoPointer(), "remove-tag", purego.NewCallback(fcb)) | |
| 1394 | 1394 | } | |
| 1395 | 1395 | ||
| 1396 | 1396 | // Emitted when a request has been made to undo the | |
| 1397 | 1397 | // previous operation or set of operations that have | |
| 1398 | 1398 | // been grouped together. | |
| 1399 | - | func (x *TextBuffer) ConnectUndo(cb func(TextBuffer)) { | |
| 1399 | + | func (x *TextBuffer) ConnectUndo(cb func(TextBuffer)) uint32 { | |
| 1400 | 1400 | fcb := func(clsPtr uintptr) { | |
| 1401 | 1401 | fa := TextBuffer{} | |
| 1402 | 1402 | fa.Ptr = clsPtr | |
| @@ -1404,7 +1404,7 @@ func (x *TextBuffer) ConnectUndo(cb func(TextBuffer)) { | |||
| 1404 | 1404 | cb(fa) | |
| 1405 | 1405 | ||
| 1406 | 1406 | } | |
| 1407 | - | gobject.ObjectConnect(x.GoPointer(), "signal::undo", purego.NewCallback(fcb)) | |
| 1407 | + | return gobject.SignalConnect(x.GoPointer(), "undo", purego.NewCallback(fcb)) | |
| 1408 | 1408 | } | |
| 1409 | 1409 | ||
| 1410 | 1410 | func init() { | |
M v4/gtk/gtktexttagtable.go +6 -6
| @@ -137,7 +137,7 @@ func (c *TextTagTable) SetGoPointer(ptr uintptr) { | |||
| 137 | 137 | } | |
| 138 | 138 | ||
| 139 | 139 | // Emitted every time a new tag is added in the `GtkTextTagTable`. | |
| 140 | - | func (x *TextTagTable) ConnectTagAdded(cb func(TextTagTable, uintptr)) { | |
| 140 | + | func (x *TextTagTable) ConnectTagAdded(cb func(TextTagTable, uintptr)) uint32 { | |
| 141 | 141 | fcb := func(clsPtr uintptr, TagVarp uintptr) { | |
| 142 | 142 | fa := TextTagTable{} | |
| 143 | 143 | fa.Ptr = clsPtr | |
| @@ -145,11 +145,11 @@ func (x *TextTagTable) ConnectTagAdded(cb func(TextTagTable, uintptr)) { | |||
| 145 | 145 | cb(fa, TagVarp) | |
| 146 | 146 | ||
| 147 | 147 | } | |
| 148 | - | gobject.ObjectConnect(x.GoPointer(), "signal::tag-added", purego.NewCallback(fcb)) | |
| 148 | + | return gobject.SignalConnect(x.GoPointer(), "tag-added", purego.NewCallback(fcb)) | |
| 149 | 149 | } | |
| 150 | 150 | ||
| 151 | 151 | // Emitted every time a tag in the `GtkTextTagTable` changes. | |
| 152 | - | func (x *TextTagTable) ConnectTagChanged(cb func(TextTagTable, uintptr, bool)) { | |
| 152 | + | func (x *TextTagTable) ConnectTagChanged(cb func(TextTagTable, uintptr, bool)) uint32 { | |
| 153 | 153 | fcb := func(clsPtr uintptr, TagVarp uintptr, SizeChangedVarp bool) { | |
| 154 | 154 | fa := TextTagTable{} | |
| 155 | 155 | fa.Ptr = clsPtr | |
| @@ -157,14 +157,14 @@ func (x *TextTagTable) ConnectTagChanged(cb func(TextTagTable, uintptr, bool)) { | |||
| 157 | 157 | cb(fa, TagVarp, SizeChangedVarp) | |
| 158 | 158 | ||
| 159 | 159 | } | |
| 160 | - | gobject.ObjectConnect(x.GoPointer(), "signal::tag-changed", purego.NewCallback(fcb)) | |
| 160 | + | return gobject.SignalConnect(x.GoPointer(), "tag-changed", purego.NewCallback(fcb)) | |
| 161 | 161 | } | |
| 162 | 162 | ||
| 163 | 163 | // Emitted every time a tag is removed from the `GtkTextTagTable`. | |
| 164 | 164 | // | |
| 165 | 165 | // The @tag is still valid by the time the signal is emitted, but | |
| 166 | 166 | // it is not associated with a tag table any more. | |
| 167 | - | func (x *TextTagTable) ConnectTagRemoved(cb func(TextTagTable, uintptr)) { | |
| 167 | + | func (x *TextTagTable) ConnectTagRemoved(cb func(TextTagTable, uintptr)) uint32 { | |
| 168 | 168 | fcb := func(clsPtr uintptr, TagVarp uintptr) { | |
| 169 | 169 | fa := TextTagTable{} | |
| 170 | 170 | fa.Ptr = clsPtr | |
| @@ -172,7 +172,7 @@ func (x *TextTagTable) ConnectTagRemoved(cb func(TextTagTable, uintptr)) { | |||
| 172 | 172 | cb(fa, TagVarp) | |
| 173 | 173 | ||
| 174 | 174 | } | |
| 175 | - | gobject.ObjectConnect(x.GoPointer(), "signal::tag-removed", purego.NewCallback(fcb)) | |
| 175 | + | return gobject.SignalConnect(x.GoPointer(), "tag-removed", purego.NewCallback(fcb)) | |
| 176 | 176 | } | |
| 177 | 177 | ||
| 178 | 178 | // Gets the ID of the @buildable object. | |
M v4/gtk/gtktextview.go +30 -30
| @@ -1121,7 +1121,7 @@ func (c *TextView) SetGoPointer(ptr uintptr) { | |||
| 1121 | 1121 | // | |
| 1122 | 1122 | // The default bindings for this signal are | |
| 1123 | 1123 | // <kbd>Backspace</kbd> and <kbd>Shift</kbd>-<kbd>Backspace</kbd>. | |
| 1124 | - | func (x *TextView) ConnectBackspace(cb func(TextView)) { | |
| 1124 | + | func (x *TextView) ConnectBackspace(cb func(TextView)) uint32 { | |
| 1125 | 1125 | fcb := func(clsPtr uintptr) { | |
| 1126 | 1126 | fa := TextView{} | |
| 1127 | 1127 | fa.Ptr = clsPtr | |
| @@ -1129,7 +1129,7 @@ func (x *TextView) ConnectBackspace(cb func(TextView)) { | |||
| 1129 | 1129 | cb(fa) | |
| 1130 | 1130 | ||
| 1131 | 1131 | } | |
| 1132 | - | gobject.ObjectConnect(x.GoPointer(), "signal::backspace", purego.NewCallback(fcb)) | |
| 1132 | + | return gobject.SignalConnect(x.GoPointer(), "backspace", purego.NewCallback(fcb)) | |
| 1133 | 1133 | } | |
| 1134 | 1134 | ||
| 1135 | 1135 | // Gets emitted to copy the selection to the clipboard. | |
| @@ -1139,7 +1139,7 @@ func (x *TextView) ConnectBackspace(cb func(TextView)) { | |||
| 1139 | 1139 | // The default bindings for this signal are | |
| 1140 | 1140 | // <kbd>Ctrl</kbd>-<kbd>c</kbd> and | |
| 1141 | 1141 | // <kbd>Ctrl</kbd>-<kbd>Insert</kbd>. | |
| 1142 | - | func (x *TextView) ConnectCopyClipboard(cb func(TextView)) { | |
| 1142 | + | func (x *TextView) ConnectCopyClipboard(cb func(TextView)) uint32 { | |
| 1143 | 1143 | fcb := func(clsPtr uintptr) { | |
| 1144 | 1144 | fa := TextView{} | |
| 1145 | 1145 | fa.Ptr = clsPtr | |
| @@ -1147,7 +1147,7 @@ func (x *TextView) ConnectCopyClipboard(cb func(TextView)) { | |||
| 1147 | 1147 | cb(fa) | |
| 1148 | 1148 | ||
| 1149 | 1149 | } | |
| 1150 | - | gobject.ObjectConnect(x.GoPointer(), "signal::copy-clipboard", purego.NewCallback(fcb)) | |
| 1150 | + | return gobject.SignalConnect(x.GoPointer(), "copy-clipboard", purego.NewCallback(fcb)) | |
| 1151 | 1151 | } | |
| 1152 | 1152 | ||
| 1153 | 1153 | // Gets emitted to cut the selection to the clipboard. | |
| @@ -1157,7 +1157,7 @@ func (x *TextView) ConnectCopyClipboard(cb func(TextView)) { | |||
| 1157 | 1157 | // The default bindings for this signal are | |
| 1158 | 1158 | // <kbd>Ctrl</kbd>-<kbd>x</kbd> and | |
| 1159 | 1159 | // <kbd>Shift</kbd>-<kbd>Delete</kbd>. | |
| 1160 | - | func (x *TextView) ConnectCutClipboard(cb func(TextView)) { | |
| 1160 | + | func (x *TextView) ConnectCutClipboard(cb func(TextView)) uint32 { | |
| 1161 | 1161 | fcb := func(clsPtr uintptr) { | |
| 1162 | 1162 | fa := TextView{} | |
| 1163 | 1163 | fa.Ptr = clsPtr | |
| @@ -1165,7 +1165,7 @@ func (x *TextView) ConnectCutClipboard(cb func(TextView)) { | |||
| 1165 | 1165 | cb(fa) | |
| 1166 | 1166 | ||
| 1167 | 1167 | } | |
| 1168 | - | gobject.ObjectConnect(x.GoPointer(), "signal::cut-clipboard", purego.NewCallback(fcb)) | |
| 1168 | + | return gobject.SignalConnect(x.GoPointer(), "cut-clipboard", purego.NewCallback(fcb)) | |
| 1169 | 1169 | } | |
| 1170 | 1170 | ||
| 1171 | 1171 | // Gets emitted when the user initiates a text deletion. | |
| @@ -1180,7 +1180,7 @@ func (x *TextView) ConnectCutClipboard(cb func(TextView)) { | |||
| 1180 | 1180 | // deleting a character, <kbd>Ctrl</kbd>-<kbd>Delete</kbd> for | |
| 1181 | 1181 | // deleting a word and <kbd>Ctrl</kbd>-<kbd>Backspace</kbd> for | |
| 1182 | 1182 | // deleting a word backwards. | |
| 1183 | - | func (x *TextView) ConnectDeleteFromCursor(cb func(TextView, DeleteType, int)) { | |
| 1183 | + | func (x *TextView) ConnectDeleteFromCursor(cb func(TextView, DeleteType, int)) uint32 { | |
| 1184 | 1184 | fcb := func(clsPtr uintptr, TypeVarp DeleteType, CountVarp int) { | |
| 1185 | 1185 | fa := TextView{} | |
| 1186 | 1186 | fa.Ptr = clsPtr | |
| @@ -1188,11 +1188,11 @@ func (x *TextView) ConnectDeleteFromCursor(cb func(TextView, DeleteType, int)) { | |||
| 1188 | 1188 | cb(fa, TypeVarp, CountVarp) | |
| 1189 | 1189 | ||
| 1190 | 1190 | } | |
| 1191 | - | gobject.ObjectConnect(x.GoPointer(), "signal::delete-from-cursor", purego.NewCallback(fcb)) | |
| 1191 | + | return gobject.SignalConnect(x.GoPointer(), "delete-from-cursor", purego.NewCallback(fcb)) | |
| 1192 | 1192 | } | |
| 1193 | 1193 | ||
| 1194 | 1194 | // Emitted when the selection needs to be extended at @location. | |
| 1195 | - | func (x *TextView) ConnectExtendSelection(cb func(TextView, TextExtendSelection, uintptr, uintptr, uintptr) bool) { | |
| 1195 | + | func (x *TextView) ConnectExtendSelection(cb func(TextView, TextExtendSelection, uintptr, uintptr, uintptr) bool) uint32 { | |
| 1196 | 1196 | fcb := func(clsPtr uintptr, GranularityVarp TextExtendSelection, LocationVarp uintptr, StartVarp uintptr, EndVarp uintptr) bool { | |
| 1197 | 1197 | fa := TextView{} | |
| 1198 | 1198 | fa.Ptr = clsPtr | |
| @@ -1200,7 +1200,7 @@ func (x *TextView) ConnectExtendSelection(cb func(TextView, TextExtendSelection, | |||
| 1200 | 1200 | return cb(fa, GranularityVarp, LocationVarp, StartVarp, EndVarp) | |
| 1201 | 1201 | ||
| 1202 | 1202 | } | |
| 1203 | - | gobject.ObjectConnect(x.GoPointer(), "signal::extend-selection", purego.NewCallback(fcb)) | |
| 1203 | + | return gobject.SignalConnect(x.GoPointer(), "extend-selection", purego.NewCallback(fcb)) | |
| 1204 | 1204 | } | |
| 1205 | 1205 | ||
| 1206 | 1206 | // Gets emitted when the user initiates the insertion of a | |
| @@ -1209,7 +1209,7 @@ func (x *TextView) ConnectExtendSelection(cb func(TextView, TextExtendSelection, | |||
| 1209 | 1209 | // The ::insert-at-cursor signal is a [keybinding signal](class.SignalAction.html). | |
| 1210 | 1210 | // | |
| 1211 | 1211 | // This signal has no default bindings. | |
| 1212 | - | func (x *TextView) ConnectInsertAtCursor(cb func(TextView, string)) { | |
| 1212 | + | func (x *TextView) ConnectInsertAtCursor(cb func(TextView, string)) uint32 { | |
| 1213 | 1213 | fcb := func(clsPtr uintptr, StringVarp string) { | |
| 1214 | 1214 | fa := TextView{} | |
| 1215 | 1215 | fa.Ptr = clsPtr | |
| @@ -1217,7 +1217,7 @@ func (x *TextView) ConnectInsertAtCursor(cb func(TextView, string)) { | |||
| 1217 | 1217 | cb(fa, StringVarp) | |
| 1218 | 1218 | ||
| 1219 | 1219 | } | |
| 1220 | - | gobject.ObjectConnect(x.GoPointer(), "signal::insert-at-cursor", purego.NewCallback(fcb)) | |
| 1220 | + | return gobject.SignalConnect(x.GoPointer(), "insert-at-cursor", purego.NewCallback(fcb)) | |
| 1221 | 1221 | } | |
| 1222 | 1222 | ||
| 1223 | 1223 | // Gets emitted to present the Emoji chooser for the @text_view. | |
| @@ -1227,7 +1227,7 @@ func (x *TextView) ConnectInsertAtCursor(cb func(TextView, string)) { | |||
| 1227 | 1227 | // The default bindings for this signal are | |
| 1228 | 1228 | // <kbd>Ctrl</kbd>-<kbd>.</kbd> and | |
| 1229 | 1229 | // <kbd>Ctrl</kbd>-<kbd>;</kbd> | |
| 1230 | - | func (x *TextView) ConnectInsertEmoji(cb func(TextView)) { | |
| 1230 | + | func (x *TextView) ConnectInsertEmoji(cb func(TextView)) uint32 { | |
| 1231 | 1231 | fcb := func(clsPtr uintptr) { | |
| 1232 | 1232 | fa := TextView{} | |
| 1233 | 1233 | fa.Ptr = clsPtr | |
| @@ -1235,7 +1235,7 @@ func (x *TextView) ConnectInsertEmoji(cb func(TextView)) { | |||
| 1235 | 1235 | cb(fa) | |
| 1236 | 1236 | ||
| 1237 | 1237 | } | |
| 1238 | - | gobject.ObjectConnect(x.GoPointer(), "signal::insert-emoji", purego.NewCallback(fcb)) | |
| 1238 | + | return gobject.SignalConnect(x.GoPointer(), "insert-emoji", purego.NewCallback(fcb)) | |
| 1239 | 1239 | } | |
| 1240 | 1240 | ||
| 1241 | 1241 | // Gets emitted when the user initiates a cursor movement. | |
| @@ -1260,7 +1260,7 @@ func (x *TextView) ConnectInsertEmoji(cb func(TextView)) { | |||
| 1260 | 1260 | // - <kbd>PgUp</kbd>, <kbd>PgDn</kbd> move vertically by pages | |
| 1261 | 1261 | // - <kbd>Ctrl</kbd>-<kbd>PgUp</kbd>, <kbd>Ctrl</kbd>-<kbd>PgDn</kbd> | |
| 1262 | 1262 | // move horizontally by pages | |
| 1263 | - | func (x *TextView) ConnectMoveCursor(cb func(TextView, MovementStep, int, bool)) { | |
| 1263 | + | func (x *TextView) ConnectMoveCursor(cb func(TextView, MovementStep, int, bool)) uint32 { | |
| 1264 | 1264 | fcb := func(clsPtr uintptr, StepVarp MovementStep, CountVarp int, ExtendSelectionVarp bool) { | |
| 1265 | 1265 | fa := TextView{} | |
| 1266 | 1266 | fa.Ptr = clsPtr | |
| @@ -1268,7 +1268,7 @@ func (x *TextView) ConnectMoveCursor(cb func(TextView, MovementStep, int, bool)) | |||
| 1268 | 1268 | cb(fa, StepVarp, CountVarp, ExtendSelectionVarp) | |
| 1269 | 1269 | ||
| 1270 | 1270 | } | |
| 1271 | - | gobject.ObjectConnect(x.GoPointer(), "signal::move-cursor", purego.NewCallback(fcb)) | |
| 1271 | + | return gobject.SignalConnect(x.GoPointer(), "move-cursor", purego.NewCallback(fcb)) | |
| 1272 | 1272 | } | |
| 1273 | 1273 | ||
| 1274 | 1274 | // Gets emitted to move the viewport. | |
| @@ -1279,7 +1279,7 @@ func (x *TextView) ConnectMoveCursor(cb func(TextView, MovementStep, int, bool)) | |||
| 1279 | 1279 | // window. | |
| 1280 | 1280 | // | |
| 1281 | 1281 | // There are no default bindings for this signal. | |
| 1282 | - | func (x *TextView) ConnectMoveViewport(cb func(TextView, ScrollStep, int)) { | |
| 1282 | + | func (x *TextView) ConnectMoveViewport(cb func(TextView, ScrollStep, int)) uint32 { | |
| 1283 | 1283 | fcb := func(clsPtr uintptr, StepVarp ScrollStep, CountVarp int) { | |
| 1284 | 1284 | fa := TextView{} | |
| 1285 | 1285 | fa.Ptr = clsPtr | |
| @@ -1287,7 +1287,7 @@ func (x *TextView) ConnectMoveViewport(cb func(TextView, ScrollStep, int)) { | |||
| 1287 | 1287 | cb(fa, StepVarp, CountVarp) | |
| 1288 | 1288 | ||
| 1289 | 1289 | } | |
| 1290 | - | gobject.ObjectConnect(x.GoPointer(), "signal::move-viewport", purego.NewCallback(fcb)) | |
| 1290 | + | return gobject.SignalConnect(x.GoPointer(), "move-viewport", purego.NewCallback(fcb)) | |
| 1291 | 1291 | } | |
| 1292 | 1292 | ||
| 1293 | 1293 | // Gets emitted to paste the contents of the clipboard | |
| @@ -1298,7 +1298,7 @@ func (x *TextView) ConnectMoveViewport(cb func(TextView, ScrollStep, int)) { | |||
| 1298 | 1298 | // The default bindings for this signal are | |
| 1299 | 1299 | // <kbd>Ctrl</kbd>-<kbd>v</kbd> and | |
| 1300 | 1300 | // <kbd>Shift</kbd>-<kbd>Insert</kbd>. | |
| 1301 | - | func (x *TextView) ConnectPasteClipboard(cb func(TextView)) { | |
| 1301 | + | func (x *TextView) ConnectPasteClipboard(cb func(TextView)) uint32 { | |
| 1302 | 1302 | fcb := func(clsPtr uintptr) { | |
| 1303 | 1303 | fa := TextView{} | |
| 1304 | 1304 | fa.Ptr = clsPtr | |
| @@ -1306,7 +1306,7 @@ func (x *TextView) ConnectPasteClipboard(cb func(TextView)) { | |||
| 1306 | 1306 | cb(fa) | |
| 1307 | 1307 | ||
| 1308 | 1308 | } | |
| 1309 | - | gobject.ObjectConnect(x.GoPointer(), "signal::paste-clipboard", purego.NewCallback(fcb)) | |
| 1309 | + | return gobject.SignalConnect(x.GoPointer(), "paste-clipboard", purego.NewCallback(fcb)) | |
| 1310 | 1310 | } | |
| 1311 | 1311 | ||
| 1312 | 1312 | // Emitted when preedit text of the active IM changes. | |
| @@ -1317,7 +1317,7 @@ func (x *TextView) ConnectPasteClipboard(cb func(TextView)) { | |||
| 1317 | 1317 | // | |
| 1318 | 1318 | // This signal is only emitted if the text at the given position | |
| 1319 | 1319 | // is actually editable. | |
| 1320 | - | func (x *TextView) ConnectPreeditChanged(cb func(TextView, string)) { | |
| 1320 | + | func (x *TextView) ConnectPreeditChanged(cb func(TextView, string)) uint32 { | |
| 1321 | 1321 | fcb := func(clsPtr uintptr, PreeditVarp string) { | |
| 1322 | 1322 | fa := TextView{} | |
| 1323 | 1323 | fa.Ptr = clsPtr | |
| @@ -1325,7 +1325,7 @@ func (x *TextView) ConnectPreeditChanged(cb func(TextView, string)) { | |||
| 1325 | 1325 | cb(fa, PreeditVarp) | |
| 1326 | 1326 | ||
| 1327 | 1327 | } | |
| 1328 | - | gobject.ObjectConnect(x.GoPointer(), "signal::preedit-changed", purego.NewCallback(fcb)) | |
| 1328 | + | return gobject.SignalConnect(x.GoPointer(), "preedit-changed", purego.NewCallback(fcb)) | |
| 1329 | 1329 | } | |
| 1330 | 1330 | ||
| 1331 | 1331 | // Gets emitted to select or unselect the complete contents of the text view. | |
| @@ -1337,7 +1337,7 @@ func (x *TextView) ConnectPreeditChanged(cb func(TextView, string)) { | |||
| 1337 | 1337 | // <kbd>Ctrl</kbd>-<kbd>/</kbd> for selecting and | |
| 1338 | 1338 | // <kbd>Shift</kbd>-<kbd>Ctrl</kbd>-<kbd>a</kbd> and | |
| 1339 | 1339 | // <kbd>Ctrl</kbd>-<kbd>\</kbd> for unselecting. | |
| 1340 | - | func (x *TextView) ConnectSelectAll(cb func(TextView, bool)) { | |
| 1340 | + | func (x *TextView) ConnectSelectAll(cb func(TextView, bool)) uint32 { | |
| 1341 | 1341 | fcb := func(clsPtr uintptr, SelectVarp bool) { | |
| 1342 | 1342 | fa := TextView{} | |
| 1343 | 1343 | fa.Ptr = clsPtr | |
| @@ -1345,7 +1345,7 @@ func (x *TextView) ConnectSelectAll(cb func(TextView, bool)) { | |||
| 1345 | 1345 | cb(fa, SelectVarp) | |
| 1346 | 1346 | ||
| 1347 | 1347 | } | |
| 1348 | - | gobject.ObjectConnect(x.GoPointer(), "signal::select-all", purego.NewCallback(fcb)) | |
| 1348 | + | return gobject.SignalConnect(x.GoPointer(), "select-all", purego.NewCallback(fcb)) | |
| 1349 | 1349 | } | |
| 1350 | 1350 | ||
| 1351 | 1351 | // Gets emitted when the user initiates settings the "anchor" mark. | |
| @@ -1356,7 +1356,7 @@ func (x *TextView) ConnectSelectAll(cb func(TextView, bool)) { | |||
| 1356 | 1356 | // "insert" mark. | |
| 1357 | 1357 | // | |
| 1358 | 1358 | // This signal has no default bindings. | |
| 1359 | - | func (x *TextView) ConnectSetAnchor(cb func(TextView)) { | |
| 1359 | + | func (x *TextView) ConnectSetAnchor(cb func(TextView)) uint32 { | |
| 1360 | 1360 | fcb := func(clsPtr uintptr) { | |
| 1361 | 1361 | fa := TextView{} | |
| 1362 | 1362 | fa.Ptr = clsPtr | |
| @@ -1364,7 +1364,7 @@ func (x *TextView) ConnectSetAnchor(cb func(TextView)) { | |||
| 1364 | 1364 | cb(fa) | |
| 1365 | 1365 | ||
| 1366 | 1366 | } | |
| 1367 | - | gobject.ObjectConnect(x.GoPointer(), "signal::set-anchor", purego.NewCallback(fcb)) | |
| 1367 | + | return gobject.SignalConnect(x.GoPointer(), "set-anchor", purego.NewCallback(fcb)) | |
| 1368 | 1368 | } | |
| 1369 | 1369 | ||
| 1370 | 1370 | // Gets emitted to toggle the `cursor-visible` property. | |
| @@ -1373,7 +1373,7 @@ func (x *TextView) ConnectSetAnchor(cb func(TextView)) { | |||
| 1373 | 1373 | // [keybinding signal](class.SignalAction.html). | |
| 1374 | 1374 | // | |
| 1375 | 1375 | // The default binding for this signal is <kbd>F7</kbd>. | |
| 1376 | - | func (x *TextView) ConnectToggleCursorVisible(cb func(TextView)) { | |
| 1376 | + | func (x *TextView) ConnectToggleCursorVisible(cb func(TextView)) uint32 { | |
| 1377 | 1377 | fcb := func(clsPtr uintptr) { | |
| 1378 | 1378 | fa := TextView{} | |
| 1379 | 1379 | fa.Ptr = clsPtr | |
| @@ -1381,7 +1381,7 @@ func (x *TextView) ConnectToggleCursorVisible(cb func(TextView)) { | |||
| 1381 | 1381 | cb(fa) | |
| 1382 | 1382 | ||
| 1383 | 1383 | } | |
| 1384 | - | gobject.ObjectConnect(x.GoPointer(), "signal::toggle-cursor-visible", purego.NewCallback(fcb)) | |
| 1384 | + | return gobject.SignalConnect(x.GoPointer(), "toggle-cursor-visible", purego.NewCallback(fcb)) | |
| 1385 | 1385 | } | |
| 1386 | 1386 | ||
| 1387 | 1387 | // Gets emitted to toggle the overwrite mode of the text view. | |
| @@ -1389,7 +1389,7 @@ func (x *TextView) ConnectToggleCursorVisible(cb func(TextView)) { | |||
| 1389 | 1389 | // The ::toggle-overwrite signal is a [keybinding signal](class.SignalAction.html). | |
| 1390 | 1390 | // | |
| 1391 | 1391 | // The default binding for this signal is <kbd>Insert</kbd>. | |
| 1392 | - | func (x *TextView) ConnectToggleOverwrite(cb func(TextView)) { | |
| 1392 | + | func (x *TextView) ConnectToggleOverwrite(cb func(TextView)) uint32 { | |
| 1393 | 1393 | fcb := func(clsPtr uintptr) { | |
| 1394 | 1394 | fa := TextView{} | |
| 1395 | 1395 | fa.Ptr = clsPtr | |
| @@ -1397,7 +1397,7 @@ func (x *TextView) ConnectToggleOverwrite(cb func(TextView)) { | |||
| 1397 | 1397 | cb(fa) | |
| 1398 | 1398 | ||
| 1399 | 1399 | } | |
| 1400 | - | gobject.ObjectConnect(x.GoPointer(), "signal::toggle-overwrite", purego.NewCallback(fcb)) | |
| 1400 | + | return gobject.SignalConnect(x.GoPointer(), "toggle-overwrite", purego.NewCallback(fcb)) | |
| 1401 | 1401 | } | |
| 1402 | 1402 | ||
| 1403 | 1403 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtktogglebutton.go +2 -2
| @@ -221,7 +221,7 @@ func (c *ToggleButton) SetGoPointer(ptr uintptr) { | |||
| 221 | 221 | } | |
| 222 | 222 | ||
| 223 | 223 | // Emitted whenever the `GtkToggleButton`'s state is changed. | |
| 224 | - | func (x *ToggleButton) ConnectToggled(cb func(ToggleButton)) { | |
| 224 | + | func (x *ToggleButton) ConnectToggled(cb func(ToggleButton)) uint32 { | |
| 225 | 225 | fcb := func(clsPtr uintptr) { | |
| 226 | 226 | fa := ToggleButton{} | |
| 227 | 227 | fa.Ptr = clsPtr | |
| @@ -229,7 +229,7 @@ func (x *ToggleButton) ConnectToggled(cb func(ToggleButton)) { | |||
| 229 | 229 | cb(fa) | |
| 230 | 230 | ||
| 231 | 231 | } | |
| 232 | - | gobject.ObjectConnect(x.GoPointer(), "signal::toggled", purego.NewCallback(fcb)) | |
| 232 | + | return gobject.SignalConnect(x.GoPointer(), "toggled", purego.NewCallback(fcb)) | |
| 233 | 233 | } | |
| 234 | 234 | ||
| 235 | 235 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtktreeselection.go +2 -2
| @@ -281,7 +281,7 @@ func (c *TreeSelection) SetGoPointer(ptr uintptr) { | |||
| 281 | 281 | // this signal is mostly a hint. It may only be emitted once when a range | |
| 282 | 282 | // of rows are selected, and it may occasionally be emitted when nothing | |
| 283 | 283 | // has happened. | |
| 284 | - | func (x *TreeSelection) ConnectChanged(cb func(TreeSelection)) { | |
| 284 | + | func (x *TreeSelection) ConnectChanged(cb func(TreeSelection)) uint32 { | |
| 285 | 285 | fcb := func(clsPtr uintptr) { | |
| 286 | 286 | fa := TreeSelection{} | |
| 287 | 287 | fa.Ptr = clsPtr | |
| @@ -289,7 +289,7 @@ func (x *TreeSelection) ConnectChanged(cb func(TreeSelection)) { | |||
| 289 | 289 | cb(fa) | |
| 290 | 290 | ||
| 291 | 291 | } | |
| 292 | - | gobject.ObjectConnect(x.GoPointer(), "signal::changed", purego.NewCallback(fcb)) | |
| 292 | + | return gobject.SignalConnect(x.GoPointer(), "changed", purego.NewCallback(fcb)) | |
| 293 | 293 | } | |
| 294 | 294 | ||
| 295 | 295 | func init() { | |
M v4/gtk/gtktreeview.go +30 -30
| @@ -1294,7 +1294,7 @@ func (c *TreeView) SetGoPointer(ptr uintptr) { | |||
| 1294 | 1294 | } | |
| 1295 | 1295 | ||
| 1296 | 1296 | // The number of columns of the treeview has changed. | |
| 1297 | - | func (x *TreeView) ConnectColumnsChanged(cb func(TreeView)) { | |
| 1297 | + | func (x *TreeView) ConnectColumnsChanged(cb func(TreeView)) uint32 { | |
| 1298 | 1298 | fcb := func(clsPtr uintptr) { | |
| 1299 | 1299 | fa := TreeView{} | |
| 1300 | 1300 | fa.Ptr = clsPtr | |
| @@ -1302,11 +1302,11 @@ func (x *TreeView) ConnectColumnsChanged(cb func(TreeView)) { | |||
| 1302 | 1302 | cb(fa) | |
| 1303 | 1303 | ||
| 1304 | 1304 | } | |
| 1305 | - | gobject.ObjectConnect(x.GoPointer(), "signal::columns-changed", purego.NewCallback(fcb)) | |
| 1305 | + | return gobject.SignalConnect(x.GoPointer(), "columns-changed", purego.NewCallback(fcb)) | |
| 1306 | 1306 | } | |
| 1307 | 1307 | ||
| 1308 | 1308 | // The position of the cursor (focused cell) has changed. | |
| 1309 | - | func (x *TreeView) ConnectCursorChanged(cb func(TreeView)) { | |
| 1309 | + | func (x *TreeView) ConnectCursorChanged(cb func(TreeView)) uint32 { | |
| 1310 | 1310 | fcb := func(clsPtr uintptr) { | |
| 1311 | 1311 | fa := TreeView{} | |
| 1312 | 1312 | fa.Ptr = clsPtr | |
| @@ -1314,10 +1314,10 @@ func (x *TreeView) ConnectCursorChanged(cb func(TreeView)) { | |||
| 1314 | 1314 | cb(fa) | |
| 1315 | 1315 | ||
| 1316 | 1316 | } | |
| 1317 | - | gobject.ObjectConnect(x.GoPointer(), "signal::cursor-changed", purego.NewCallback(fcb)) | |
| 1317 | + | return gobject.SignalConnect(x.GoPointer(), "cursor-changed", purego.NewCallback(fcb)) | |
| 1318 | 1318 | } | |
| 1319 | 1319 | ||
| 1320 | - | func (x *TreeView) ConnectExpandCollapseCursorRow(cb func(TreeView, bool, bool, bool) bool) { | |
| 1320 | + | func (x *TreeView) ConnectExpandCollapseCursorRow(cb func(TreeView, bool, bool, bool) bool) uint32 { | |
| 1321 | 1321 | fcb := func(clsPtr uintptr, ObjectVarp bool, P0Varp bool, P1Varp bool) bool { | |
| 1322 | 1322 | fa := TreeView{} | |
| 1323 | 1323 | fa.Ptr = clsPtr | |
| @@ -1325,7 +1325,7 @@ func (x *TreeView) ConnectExpandCollapseCursorRow(cb func(TreeView, bool, bool, | |||
| 1325 | 1325 | return cb(fa, ObjectVarp, P0Varp, P1Varp) | |
| 1326 | 1326 | ||
| 1327 | 1327 | } | |
| 1328 | - | gobject.ObjectConnect(x.GoPointer(), "signal::expand-collapse-cursor-row", purego.NewCallback(fcb)) | |
| 1328 | + | return gobject.SignalConnect(x.GoPointer(), "expand-collapse-cursor-row", purego.NewCallback(fcb)) | |
| 1329 | 1329 | } | |
| 1330 | 1330 | ||
| 1331 | 1331 | // The `GtkTreeView`::move-cursor signal is a [keybinding | |
| @@ -1337,7 +1337,7 @@ func (x *TreeView) ConnectExpandCollapseCursorRow(cb func(TreeView, bool, bool, | |||
| 1337 | 1337 | // programmatically. In contrast to gtk_tree_view_set_cursor() and | |
| 1338 | 1338 | // gtk_tree_view_set_cursor_on_cell() when moving horizontally | |
| 1339 | 1339 | // `GtkTreeView`::move-cursor does not reset the current selection. | |
| 1340 | - | func (x *TreeView) ConnectMoveCursor(cb func(TreeView, MovementStep, int, bool, bool) bool) { | |
| 1340 | + | func (x *TreeView) ConnectMoveCursor(cb func(TreeView, MovementStep, int, bool, bool) bool) uint32 { | |
| 1341 | 1341 | fcb := func(clsPtr uintptr, StepVarp MovementStep, DirectionVarp int, ExtendVarp bool, ModifyVarp bool) bool { | |
| 1342 | 1342 | fa := TreeView{} | |
| 1343 | 1343 | fa.Ptr = clsPtr | |
| @@ -1345,7 +1345,7 @@ func (x *TreeView) ConnectMoveCursor(cb func(TreeView, MovementStep, int, bool, | |||
| 1345 | 1345 | return cb(fa, StepVarp, DirectionVarp, ExtendVarp, ModifyVarp) | |
| 1346 | 1346 | ||
| 1347 | 1347 | } | |
| 1348 | - | gobject.ObjectConnect(x.GoPointer(), "signal::move-cursor", purego.NewCallback(fcb)) | |
| 1348 | + | return gobject.SignalConnect(x.GoPointer(), "move-cursor", purego.NewCallback(fcb)) | |
| 1349 | 1349 | } | |
| 1350 | 1350 | ||
| 1351 | 1351 | // The "row-activated" signal is emitted when the method | |
| @@ -1362,7 +1362,7 @@ func (x *TreeView) ConnectMoveCursor(cb func(TreeView, MovementStep, int, bool, | |||
| 1362 | 1362 | // For selection handling refer to the | |
| 1363 | 1363 | // [tree widget conceptual overview](section-tree-widget.html) | |
| 1364 | 1364 | // as well as `GtkTreeSelection`. | |
| 1365 | - | func (x *TreeView) ConnectRowActivated(cb func(TreeView, uintptr, uintptr)) { | |
| 1365 | + | func (x *TreeView) ConnectRowActivated(cb func(TreeView, uintptr, uintptr)) uint32 { | |
| 1366 | 1366 | fcb := func(clsPtr uintptr, PathVarp uintptr, ColumnVarp uintptr) { | |
| 1367 | 1367 | fa := TreeView{} | |
| 1368 | 1368 | fa.Ptr = clsPtr | |
| @@ -1370,11 +1370,11 @@ func (x *TreeView) ConnectRowActivated(cb func(TreeView, uintptr, uintptr)) { | |||
| 1370 | 1370 | cb(fa, PathVarp, ColumnVarp) | |
| 1371 | 1371 | ||
| 1372 | 1372 | } | |
| 1373 | - | gobject.ObjectConnect(x.GoPointer(), "signal::row-activated", purego.NewCallback(fcb)) | |
| 1373 | + | return gobject.SignalConnect(x.GoPointer(), "row-activated", purego.NewCallback(fcb)) | |
| 1374 | 1374 | } | |
| 1375 | 1375 | ||
| 1376 | 1376 | // The given row has been collapsed (child nodes are hidden). | |
| 1377 | - | func (x *TreeView) ConnectRowCollapsed(cb func(TreeView, uintptr, uintptr)) { | |
| 1377 | + | func (x *TreeView) ConnectRowCollapsed(cb func(TreeView, uintptr, uintptr)) uint32 { | |
| 1378 | 1378 | fcb := func(clsPtr uintptr, IterVarp uintptr, PathVarp uintptr) { | |
| 1379 | 1379 | fa := TreeView{} | |
| 1380 | 1380 | fa.Ptr = clsPtr | |
| @@ -1382,11 +1382,11 @@ func (x *TreeView) ConnectRowCollapsed(cb func(TreeView, uintptr, uintptr)) { | |||
| 1382 | 1382 | cb(fa, IterVarp, PathVarp) | |
| 1383 | 1383 | ||
| 1384 | 1384 | } | |
| 1385 | - | gobject.ObjectConnect(x.GoPointer(), "signal::row-collapsed", purego.NewCallback(fcb)) | |
| 1385 | + | return gobject.SignalConnect(x.GoPointer(), "row-collapsed", purego.NewCallback(fcb)) | |
| 1386 | 1386 | } | |
| 1387 | 1387 | ||
| 1388 | 1388 | // The given row has been expanded (child nodes are shown). | |
| 1389 | - | func (x *TreeView) ConnectRowExpanded(cb func(TreeView, uintptr, uintptr)) { | |
| 1389 | + | func (x *TreeView) ConnectRowExpanded(cb func(TreeView, uintptr, uintptr)) uint32 { | |
| 1390 | 1390 | fcb := func(clsPtr uintptr, IterVarp uintptr, PathVarp uintptr) { | |
| 1391 | 1391 | fa := TreeView{} | |
| 1392 | 1392 | fa.Ptr = clsPtr | |
| @@ -1394,10 +1394,10 @@ func (x *TreeView) ConnectRowExpanded(cb func(TreeView, uintptr, uintptr)) { | |||
| 1394 | 1394 | cb(fa, IterVarp, PathVarp) | |
| 1395 | 1395 | ||
| 1396 | 1396 | } | |
| 1397 | - | gobject.ObjectConnect(x.GoPointer(), "signal::row-expanded", purego.NewCallback(fcb)) | |
| 1397 | + | return gobject.SignalConnect(x.GoPointer(), "row-expanded", purego.NewCallback(fcb)) | |
| 1398 | 1398 | } | |
| 1399 | 1399 | ||
| 1400 | - | func (x *TreeView) ConnectSelectAll(cb func(TreeView) bool) { | |
| 1400 | + | func (x *TreeView) ConnectSelectAll(cb func(TreeView) bool) uint32 { | |
| 1401 | 1401 | fcb := func(clsPtr uintptr) bool { | |
| 1402 | 1402 | fa := TreeView{} | |
| 1403 | 1403 | fa.Ptr = clsPtr | |
| @@ -1405,10 +1405,10 @@ func (x *TreeView) ConnectSelectAll(cb func(TreeView) bool) { | |||
| 1405 | 1405 | return cb(fa) | |
| 1406 | 1406 | ||
| 1407 | 1407 | } | |
| 1408 | - | gobject.ObjectConnect(x.GoPointer(), "signal::select-all", purego.NewCallback(fcb)) | |
| 1408 | + | return gobject.SignalConnect(x.GoPointer(), "select-all", purego.NewCallback(fcb)) | |
| 1409 | 1409 | } | |
| 1410 | 1410 | ||
| 1411 | - | func (x *TreeView) ConnectSelectCursorParent(cb func(TreeView) bool) { | |
| 1411 | + | func (x *TreeView) ConnectSelectCursorParent(cb func(TreeView) bool) uint32 { | |
| 1412 | 1412 | fcb := func(clsPtr uintptr) bool { | |
| 1413 | 1413 | fa := TreeView{} | |
| 1414 | 1414 | fa.Ptr = clsPtr | |
| @@ -1416,10 +1416,10 @@ func (x *TreeView) ConnectSelectCursorParent(cb func(TreeView) bool) { | |||
| 1416 | 1416 | return cb(fa) | |
| 1417 | 1417 | ||
| 1418 | 1418 | } | |
| 1419 | - | gobject.ObjectConnect(x.GoPointer(), "signal::select-cursor-parent", purego.NewCallback(fcb)) | |
| 1419 | + | return gobject.SignalConnect(x.GoPointer(), "select-cursor-parent", purego.NewCallback(fcb)) | |
| 1420 | 1420 | } | |
| 1421 | 1421 | ||
| 1422 | - | func (x *TreeView) ConnectSelectCursorRow(cb func(TreeView, bool) bool) { | |
| 1422 | + | func (x *TreeView) ConnectSelectCursorRow(cb func(TreeView, bool) bool) uint32 { | |
| 1423 | 1423 | fcb := func(clsPtr uintptr, ObjectVarp bool) bool { | |
| 1424 | 1424 | fa := TreeView{} | |
| 1425 | 1425 | fa.Ptr = clsPtr | |
| @@ -1427,10 +1427,10 @@ func (x *TreeView) ConnectSelectCursorRow(cb func(TreeView, bool) bool) { | |||
| 1427 | 1427 | return cb(fa, ObjectVarp) | |
| 1428 | 1428 | ||
| 1429 | 1429 | } | |
| 1430 | - | gobject.ObjectConnect(x.GoPointer(), "signal::select-cursor-row", purego.NewCallback(fcb)) | |
| 1430 | + | return gobject.SignalConnect(x.GoPointer(), "select-cursor-row", purego.NewCallback(fcb)) | |
| 1431 | 1431 | } | |
| 1432 | 1432 | ||
| 1433 | - | func (x *TreeView) ConnectStartInteractiveSearch(cb func(TreeView) bool) { | |
| 1433 | + | func (x *TreeView) ConnectStartInteractiveSearch(cb func(TreeView) bool) uint32 { | |
| 1434 | 1434 | fcb := func(clsPtr uintptr) bool { | |
| 1435 | 1435 | fa := TreeView{} | |
| 1436 | 1436 | fa.Ptr = clsPtr | |
| @@ -1438,12 +1438,12 @@ func (x *TreeView) ConnectStartInteractiveSearch(cb func(TreeView) bool) { | |||
| 1438 | 1438 | return cb(fa) | |
| 1439 | 1439 | ||
| 1440 | 1440 | } | |
| 1441 | - | gobject.ObjectConnect(x.GoPointer(), "signal::start-interactive-search", purego.NewCallback(fcb)) | |
| 1441 | + | return gobject.SignalConnect(x.GoPointer(), "start-interactive-search", purego.NewCallback(fcb)) | |
| 1442 | 1442 | } | |
| 1443 | 1443 | ||
| 1444 | 1444 | // The given row is about to be collapsed (hide its children nodes). Use this | |
| 1445 | 1445 | // signal if you need to control the collapsibility of individual rows. | |
| 1446 | - | func (x *TreeView) ConnectTestCollapseRow(cb func(TreeView, uintptr, uintptr) bool) { | |
| 1446 | + | func (x *TreeView) ConnectTestCollapseRow(cb func(TreeView, uintptr, uintptr) bool) uint32 { | |
| 1447 | 1447 | fcb := func(clsPtr uintptr, IterVarp uintptr, PathVarp uintptr) bool { | |
| 1448 | 1448 | fa := TreeView{} | |
| 1449 | 1449 | fa.Ptr = clsPtr | |
| @@ -1451,12 +1451,12 @@ func (x *TreeView) ConnectTestCollapseRow(cb func(TreeView, uintptr, uintptr) bo | |||
| 1451 | 1451 | return cb(fa, IterVarp, PathVarp) | |
| 1452 | 1452 | ||
| 1453 | 1453 | } | |
| 1454 | - | gobject.ObjectConnect(x.GoPointer(), "signal::test-collapse-row", purego.NewCallback(fcb)) | |
| 1454 | + | return gobject.SignalConnect(x.GoPointer(), "test-collapse-row", purego.NewCallback(fcb)) | |
| 1455 | 1455 | } | |
| 1456 | 1456 | ||
| 1457 | 1457 | // The given row is about to be expanded (show its children nodes). Use this | |
| 1458 | 1458 | // signal if you need to control the expandability of individual rows. | |
| 1459 | - | func (x *TreeView) ConnectTestExpandRow(cb func(TreeView, uintptr, uintptr) bool) { | |
| 1459 | + | func (x *TreeView) ConnectTestExpandRow(cb func(TreeView, uintptr, uintptr) bool) uint32 { | |
| 1460 | 1460 | fcb := func(clsPtr uintptr, IterVarp uintptr, PathVarp uintptr) bool { | |
| 1461 | 1461 | fa := TreeView{} | |
| 1462 | 1462 | fa.Ptr = clsPtr | |
| @@ -1464,10 +1464,10 @@ func (x *TreeView) ConnectTestExpandRow(cb func(TreeView, uintptr, uintptr) bool | |||
| 1464 | 1464 | return cb(fa, IterVarp, PathVarp) | |
| 1465 | 1465 | ||
| 1466 | 1466 | } | |
| 1467 | - | gobject.ObjectConnect(x.GoPointer(), "signal::test-expand-row", purego.NewCallback(fcb)) | |
| 1467 | + | return gobject.SignalConnect(x.GoPointer(), "test-expand-row", purego.NewCallback(fcb)) | |
| 1468 | 1468 | } | |
| 1469 | 1469 | ||
| 1470 | - | func (x *TreeView) ConnectToggleCursorRow(cb func(TreeView) bool) { | |
| 1470 | + | func (x *TreeView) ConnectToggleCursorRow(cb func(TreeView) bool) uint32 { | |
| 1471 | 1471 | fcb := func(clsPtr uintptr) bool { | |
| 1472 | 1472 | fa := TreeView{} | |
| 1473 | 1473 | fa.Ptr = clsPtr | |
| @@ -1475,10 +1475,10 @@ func (x *TreeView) ConnectToggleCursorRow(cb func(TreeView) bool) { | |||
| 1475 | 1475 | return cb(fa) | |
| 1476 | 1476 | ||
| 1477 | 1477 | } | |
| 1478 | - | gobject.ObjectConnect(x.GoPointer(), "signal::toggle-cursor-row", purego.NewCallback(fcb)) | |
| 1478 | + | return gobject.SignalConnect(x.GoPointer(), "toggle-cursor-row", purego.NewCallback(fcb)) | |
| 1479 | 1479 | } | |
| 1480 | 1480 | ||
| 1481 | - | func (x *TreeView) ConnectUnselectAll(cb func(TreeView) bool) { | |
| 1481 | + | func (x *TreeView) ConnectUnselectAll(cb func(TreeView) bool) uint32 { | |
| 1482 | 1482 | fcb := func(clsPtr uintptr) bool { | |
| 1483 | 1483 | fa := TreeView{} | |
| 1484 | 1484 | fa.Ptr = clsPtr | |
| @@ -1486,7 +1486,7 @@ func (x *TreeView) ConnectUnselectAll(cb func(TreeView) bool) { | |||
| 1486 | 1486 | return cb(fa) | |
| 1487 | 1487 | ||
| 1488 | 1488 | } | |
| 1489 | - | gobject.ObjectConnect(x.GoPointer(), "signal::unselect-all", purego.NewCallback(fcb)) | |
| 1489 | + | return gobject.SignalConnect(x.GoPointer(), "unselect-all", purego.NewCallback(fcb)) | |
| 1490 | 1490 | } | |
| 1491 | 1491 | ||
| 1492 | 1492 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtktreeviewcolumn.go +2 -2
| @@ -699,7 +699,7 @@ func (c *TreeViewColumn) SetGoPointer(ptr uintptr) { | |||
| 699 | 699 | } | |
| 700 | 700 | ||
| 701 | 701 | // Emitted when the column's header has been clicked. | |
| 702 | - | func (x *TreeViewColumn) ConnectClicked(cb func(TreeViewColumn)) { | |
| 702 | + | func (x *TreeViewColumn) ConnectClicked(cb func(TreeViewColumn)) uint32 { | |
| 703 | 703 | fcb := func(clsPtr uintptr) { | |
| 704 | 704 | fa := TreeViewColumn{} | |
| 705 | 705 | fa.Ptr = clsPtr | |
| @@ -707,7 +707,7 @@ func (x *TreeViewColumn) ConnectClicked(cb func(TreeViewColumn)) { | |||
| 707 | 707 | cb(fa) | |
| 708 | 708 | ||
| 709 | 709 | } | |
| 710 | - | gobject.ObjectConnect(x.GoPointer(), "signal::clicked", purego.NewCallback(fcb)) | |
| 710 | + | return gobject.SignalConnect(x.GoPointer(), "clicked", purego.NewCallback(fcb)) | |
| 711 | 711 | } | |
| 712 | 712 | ||
| 713 | 713 | // Gets the ID of the @buildable object. | |
M v4/gtk/gtkwidget.go +26 -26
| @@ -3075,7 +3075,7 @@ func (c *Widget) SetGoPointer(ptr uintptr) { | |||
| 3075 | 3075 | // May result in finalization of the widget if all references are released. | |
| 3076 | 3076 | // | |
| 3077 | 3077 | // This signal is not suitable for saving widget state. | |
| 3078 | - | func (x *Widget) ConnectDestroy(cb func(Widget)) { | |
| 3078 | + | func (x *Widget) ConnectDestroy(cb func(Widget)) uint32 { | |
| 3079 | 3079 | fcb := func(clsPtr uintptr) { | |
| 3080 | 3080 | fa := Widget{} | |
| 3081 | 3081 | fa.Ptr = clsPtr | |
| @@ -3083,11 +3083,11 @@ func (x *Widget) ConnectDestroy(cb func(Widget)) { | |||
| 3083 | 3083 | cb(fa) | |
| 3084 | 3084 | ||
| 3085 | 3085 | } | |
| 3086 | - | gobject.ObjectConnect(x.GoPointer(), "signal::destroy", purego.NewCallback(fcb)) | |
| 3086 | + | return gobject.SignalConnect(x.GoPointer(), "destroy", purego.NewCallback(fcb)) | |
| 3087 | 3087 | } | |
| 3088 | 3088 | ||
| 3089 | 3089 | // Emitted when the text direction of a widget changes. | |
| 3090 | - | func (x *Widget) ConnectDirectionChanged(cb func(Widget, TextDirection)) { | |
| 3090 | + | func (x *Widget) ConnectDirectionChanged(cb func(Widget, TextDirection)) uint32 { | |
| 3091 | 3091 | fcb := func(clsPtr uintptr, PreviousDirectionVarp TextDirection) { | |
| 3092 | 3092 | fa := Widget{} | |
| 3093 | 3093 | fa.Ptr = clsPtr | |
| @@ -3095,11 +3095,11 @@ func (x *Widget) ConnectDirectionChanged(cb func(Widget, TextDirection)) { | |||
| 3095 | 3095 | cb(fa, PreviousDirectionVarp) | |
| 3096 | 3096 | ||
| 3097 | 3097 | } | |
| 3098 | - | gobject.ObjectConnect(x.GoPointer(), "signal::direction-changed", purego.NewCallback(fcb)) | |
| 3098 | + | return gobject.SignalConnect(x.GoPointer(), "direction-changed", purego.NewCallback(fcb)) | |
| 3099 | 3099 | } | |
| 3100 | 3100 | ||
| 3101 | 3101 | // Emitted when @widget is hidden. | |
| 3102 | - | func (x *Widget) ConnectHide(cb func(Widget)) { | |
| 3102 | + | func (x *Widget) ConnectHide(cb func(Widget)) uint32 { | |
| 3103 | 3103 | fcb := func(clsPtr uintptr) { | |
| 3104 | 3104 | fa := Widget{} | |
| 3105 | 3105 | fa.Ptr = clsPtr | |
| @@ -3107,13 +3107,13 @@ func (x *Widget) ConnectHide(cb func(Widget)) { | |||
| 3107 | 3107 | cb(fa) | |
| 3108 | 3108 | ||
| 3109 | 3109 | } | |
| 3110 | - | gobject.ObjectConnect(x.GoPointer(), "signal::hide", purego.NewCallback(fcb)) | |
| 3110 | + | return gobject.SignalConnect(x.GoPointer(), "hide", purego.NewCallback(fcb)) | |
| 3111 | 3111 | } | |
| 3112 | 3112 | ||
| 3113 | 3113 | // Emitted if keyboard navigation fails. | |
| 3114 | 3114 | // | |
| 3115 | 3115 | // See [method@Gtk.Widget.keynav_failed] for details. | |
| 3116 | - | func (x *Widget) ConnectKeynavFailed(cb func(Widget, DirectionType) bool) { | |
| 3116 | + | func (x *Widget) ConnectKeynavFailed(cb func(Widget, DirectionType) bool) uint32 { | |
| 3117 | 3117 | fcb := func(clsPtr uintptr, DirectionVarp DirectionType) bool { | |
| 3118 | 3118 | fa := Widget{} | |
| 3119 | 3119 | fa.Ptr = clsPtr | |
| @@ -3121,7 +3121,7 @@ func (x *Widget) ConnectKeynavFailed(cb func(Widget, DirectionType) bool) { | |||
| 3121 | 3121 | return cb(fa, DirectionVarp) | |
| 3122 | 3122 | ||
| 3123 | 3123 | } | |
| 3124 | - | gobject.ObjectConnect(x.GoPointer(), "signal::keynav-failed", purego.NewCallback(fcb)) | |
| 3124 | + | return gobject.SignalConnect(x.GoPointer(), "keynav-failed", purego.NewCallback(fcb)) | |
| 3125 | 3125 | } | |
| 3126 | 3126 | ||
| 3127 | 3127 | // Emitted when @widget is going to be mapped. | |
| @@ -3133,7 +3133,7 @@ func (x *Widget) ConnectKeynavFailed(cb func(Widget, DirectionType) bool) { | |||
| 3133 | 3133 | // The ::map signal can be used to determine whether a widget will be drawn, | |
| 3134 | 3134 | // for instance it can resume an animation that was stopped during the | |
| 3135 | 3135 | // emission of [signal@Gtk.Widget::unmap]. | |
| 3136 | - | func (x *Widget) ConnectMap(cb func(Widget)) { | |
| 3136 | + | func (x *Widget) ConnectMap(cb func(Widget)) uint32 { | |
| 3137 | 3137 | fcb := func(clsPtr uintptr) { | |
| 3138 | 3138 | fa := Widget{} | |
| 3139 | 3139 | fa.Ptr = clsPtr | |
| @@ -3141,14 +3141,14 @@ func (x *Widget) ConnectMap(cb func(Widget)) { | |||
| 3141 | 3141 | cb(fa) | |
| 3142 | 3142 | ||
| 3143 | 3143 | } | |
| 3144 | - | gobject.ObjectConnect(x.GoPointer(), "signal::map", purego.NewCallback(fcb)) | |
| 3144 | + | return gobject.SignalConnect(x.GoPointer(), "map", purego.NewCallback(fcb)) | |
| 3145 | 3145 | } | |
| 3146 | 3146 | ||
| 3147 | 3147 | // Emitted when a widget is activated via a mnemonic. | |
| 3148 | 3148 | // | |
| 3149 | 3149 | // The default handler for this signal activates @widget if @group_cycling | |
| 3150 | 3150 | // is %FALSE, or just makes @widget grab focus if @group_cycling is %TRUE. | |
| 3151 | - | func (x *Widget) ConnectMnemonicActivate(cb func(Widget, bool) bool) { | |
| 3151 | + | func (x *Widget) ConnectMnemonicActivate(cb func(Widget, bool) bool) uint32 { | |
| 3152 | 3152 | fcb := func(clsPtr uintptr, GroupCyclingVarp bool) bool { | |
| 3153 | 3153 | fa := Widget{} | |
| 3154 | 3154 | fa.Ptr = clsPtr | |
| @@ -3156,11 +3156,11 @@ func (x *Widget) ConnectMnemonicActivate(cb func(Widget, bool) bool) { | |||
| 3156 | 3156 | return cb(fa, GroupCyclingVarp) | |
| 3157 | 3157 | ||
| 3158 | 3158 | } | |
| 3159 | - | gobject.ObjectConnect(x.GoPointer(), "signal::mnemonic-activate", purego.NewCallback(fcb)) | |
| 3159 | + | return gobject.SignalConnect(x.GoPointer(), "mnemonic-activate", purego.NewCallback(fcb)) | |
| 3160 | 3160 | } | |
| 3161 | 3161 | ||
| 3162 | 3162 | // Emitted when the focus is moved. | |
| 3163 | - | func (x *Widget) ConnectMoveFocus(cb func(Widget, DirectionType)) { | |
| 3163 | + | func (x *Widget) ConnectMoveFocus(cb func(Widget, DirectionType)) uint32 { | |
| 3164 | 3164 | fcb := func(clsPtr uintptr, DirectionVarp DirectionType) { | |
| 3165 | 3165 | fa := Widget{} | |
| 3166 | 3166 | fa.Ptr = clsPtr | |
| @@ -3168,7 +3168,7 @@ func (x *Widget) ConnectMoveFocus(cb func(Widget, DirectionType)) { | |||
| 3168 | 3168 | cb(fa, DirectionVarp) | |
| 3169 | 3169 | ||
| 3170 | 3170 | } | |
| 3171 | - | gobject.ObjectConnect(x.GoPointer(), "signal::move-focus", purego.NewCallback(fcb)) | |
| 3171 | + | return gobject.SignalConnect(x.GoPointer(), "move-focus", purego.NewCallback(fcb)) | |
| 3172 | 3172 | } | |
| 3173 | 3173 | ||
| 3174 | 3174 | // Emitted when the widgets tooltip is about to be shown. | |
| @@ -3185,7 +3185,7 @@ func (x *Widget) ConnectMoveFocus(cb func(Widget, DirectionType)) { | |||
| 3185 | 3185 | // | |
| 3186 | 3186 | // The signal handler is free to manipulate @tooltip with the therefore | |
| 3187 | 3187 | // destined function calls. | |
| 3188 | - | func (x *Widget) ConnectQueryTooltip(cb func(Widget, int, int, bool, uintptr) bool) { | |
| 3188 | + | func (x *Widget) ConnectQueryTooltip(cb func(Widget, int, int, bool, uintptr) bool) uint32 { | |
| 3189 | 3189 | fcb := func(clsPtr uintptr, XVarp int, YVarp int, KeyboardModeVarp bool, TooltipVarp uintptr) bool { | |
| 3190 | 3190 | fa := Widget{} | |
| 3191 | 3191 | fa.Ptr = clsPtr | |
| @@ -3193,14 +3193,14 @@ func (x *Widget) ConnectQueryTooltip(cb func(Widget, int, int, bool, uintptr) bo | |||
| 3193 | 3193 | return cb(fa, XVarp, YVarp, KeyboardModeVarp, TooltipVarp) | |
| 3194 | 3194 | ||
| 3195 | 3195 | } | |
| 3196 | - | gobject.ObjectConnect(x.GoPointer(), "signal::query-tooltip", purego.NewCallback(fcb)) | |
| 3196 | + | return gobject.SignalConnect(x.GoPointer(), "query-tooltip", purego.NewCallback(fcb)) | |
| 3197 | 3197 | } | |
| 3198 | 3198 | ||
| 3199 | 3199 | // Emitted when @widget is associated with a `GdkSurface`. | |
| 3200 | 3200 | // | |
| 3201 | 3201 | // This means that [method@Gtk.Widget.realize] has been called | |
| 3202 | 3202 | // or the widget has been mapped (that is, it is going to be drawn). | |
| 3203 | - | func (x *Widget) ConnectRealize(cb func(Widget)) { | |
| 3203 | + | func (x *Widget) ConnectRealize(cb func(Widget)) uint32 { | |
| 3204 | 3204 | fcb := func(clsPtr uintptr) { | |
| 3205 | 3205 | fa := Widget{} | |
| 3206 | 3206 | fa.Ptr = clsPtr | |
| @@ -3208,11 +3208,11 @@ func (x *Widget) ConnectRealize(cb func(Widget)) { | |||
| 3208 | 3208 | cb(fa) | |
| 3209 | 3209 | ||
| 3210 | 3210 | } | |
| 3211 | - | gobject.ObjectConnect(x.GoPointer(), "signal::realize", purego.NewCallback(fcb)) | |
| 3211 | + | return gobject.SignalConnect(x.GoPointer(), "realize", purego.NewCallback(fcb)) | |
| 3212 | 3212 | } | |
| 3213 | 3213 | ||
| 3214 | 3214 | // Emitted when @widget is shown. | |
| 3215 | - | func (x *Widget) ConnectShow(cb func(Widget)) { | |
| 3215 | + | func (x *Widget) ConnectShow(cb func(Widget)) uint32 { | |
| 3216 | 3216 | fcb := func(clsPtr uintptr) { | |
| 3217 | 3217 | fa := Widget{} | |
| 3218 | 3218 | fa.Ptr = clsPtr | |
| @@ -3220,13 +3220,13 @@ func (x *Widget) ConnectShow(cb func(Widget)) { | |||
| 3220 | 3220 | cb(fa) | |
| 3221 | 3221 | ||
| 3222 | 3222 | } | |
| 3223 | - | gobject.ObjectConnect(x.GoPointer(), "signal::show", purego.NewCallback(fcb)) | |
| 3223 | + | return gobject.SignalConnect(x.GoPointer(), "show", purego.NewCallback(fcb)) | |
| 3224 | 3224 | } | |
| 3225 | 3225 | ||
| 3226 | 3226 | // Emitted when the widget state changes. | |
| 3227 | 3227 | // | |
| 3228 | 3228 | // See [method@Gtk.Widget.get_state_flags]. | |
| 3229 | - | func (x *Widget) ConnectStateFlagsChanged(cb func(Widget, StateFlags)) { | |
| 3229 | + | func (x *Widget) ConnectStateFlagsChanged(cb func(Widget, StateFlags)) uint32 { | |
| 3230 | 3230 | fcb := func(clsPtr uintptr, FlagsVarp StateFlags) { | |
| 3231 | 3231 | fa := Widget{} | |
| 3232 | 3232 | fa.Ptr = clsPtr | |
| @@ -3234,7 +3234,7 @@ func (x *Widget) ConnectStateFlagsChanged(cb func(Widget, StateFlags)) { | |||
| 3234 | 3234 | cb(fa, FlagsVarp) | |
| 3235 | 3235 | ||
| 3236 | 3236 | } | |
| 3237 | - | gobject.ObjectConnect(x.GoPointer(), "signal::state-flags-changed", purego.NewCallback(fcb)) | |
| 3237 | + | return gobject.SignalConnect(x.GoPointer(), "state-flags-changed", purego.NewCallback(fcb)) | |
| 3238 | 3238 | } | |
| 3239 | 3239 | ||
| 3240 | 3240 | // Emitted when @widget is going to be unmapped. | |
| @@ -3244,7 +3244,7 @@ func (x *Widget) ConnectStateFlagsChanged(cb func(Widget, StateFlags)) { | |||
| 3244 | 3244 | // | |
| 3245 | 3245 | // As ::unmap indicates that a widget will not be shown any longer, | |
| 3246 | 3246 | // it can be used to, for example, stop an animation on the widget. | |
| 3247 | - | func (x *Widget) ConnectUnmap(cb func(Widget)) { | |
| 3247 | + | func (x *Widget) ConnectUnmap(cb func(Widget)) uint32 { | |
| 3248 | 3248 | fcb := func(clsPtr uintptr) { | |
| 3249 | 3249 | fa := Widget{} | |
| 3250 | 3250 | fa.Ptr = clsPtr | |
| @@ -3252,14 +3252,14 @@ func (x *Widget) ConnectUnmap(cb func(Widget)) { | |||
| 3252 | 3252 | cb(fa) | |
| 3253 | 3253 | ||
| 3254 | 3254 | } | |
| 3255 | - | gobject.ObjectConnect(x.GoPointer(), "signal::unmap", purego.NewCallback(fcb)) | |
| 3255 | + | return gobject.SignalConnect(x.GoPointer(), "unmap", purego.NewCallback(fcb)) | |
| 3256 | 3256 | } | |
| 3257 | 3257 | ||
| 3258 | 3258 | // Emitted when the `GdkSurface` associated with @widget is destroyed. | |
| 3259 | 3259 | // | |
| 3260 | 3260 | // This means that [method@Gtk.Widget.unrealize] has been called | |
| 3261 | 3261 | // or the widget has been unmapped (that is, it is going to be hidden). | |
| 3262 | - | func (x *Widget) ConnectUnrealize(cb func(Widget)) { | |
| 3262 | + | func (x *Widget) ConnectUnrealize(cb func(Widget)) uint32 { | |
| 3263 | 3263 | fcb := func(clsPtr uintptr) { | |
| 3264 | 3264 | fa := Widget{} | |
| 3265 | 3265 | fa.Ptr = clsPtr | |
| @@ -3267,7 +3267,7 @@ func (x *Widget) ConnectUnrealize(cb func(Widget)) { | |||
| 3267 | 3267 | cb(fa) | |
| 3268 | 3268 | ||
| 3269 | 3269 | } | |
| 3270 | - | gobject.ObjectConnect(x.GoPointer(), "signal::unrealize", purego.NewCallback(fcb)) | |
| 3270 | + | return gobject.SignalConnect(x.GoPointer(), "unrealize", purego.NewCallback(fcb)) | |
| 3271 | 3271 | } | |
| 3272 | 3272 | ||
| 3273 | 3273 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |
M v4/gtk/gtkwindow.go +10 -10
| @@ -938,7 +938,7 @@ func (c *Window) SetGoPointer(ptr uintptr) { | |||
| 938 | 938 | // of @window. | |
| 939 | 939 | // | |
| 940 | 940 | // This is a [keybinding signal](class.SignalAction.html). | |
| 941 | - | func (x *Window) ConnectActivateDefault(cb func(Window)) { | |
| 941 | + | func (x *Window) ConnectActivateDefault(cb func(Window)) uint32 { | |
| 942 | 942 | fcb := func(clsPtr uintptr) { | |
| 943 | 943 | fa := Window{} | |
| 944 | 944 | fa.Ptr = clsPtr | |
| @@ -946,14 +946,14 @@ func (x *Window) ConnectActivateDefault(cb func(Window)) { | |||
| 946 | 946 | cb(fa) | |
| 947 | 947 | ||
| 948 | 948 | } | |
| 949 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate-default", purego.NewCallback(fcb)) | |
| 949 | + | return gobject.SignalConnect(x.GoPointer(), "activate-default", purego.NewCallback(fcb)) | |
| 950 | 950 | } | |
| 951 | 951 | ||
| 952 | 952 | // Emitted when the user activates the currently focused | |
| 953 | 953 | // widget of @window. | |
| 954 | 954 | // | |
| 955 | 955 | // This is a [keybinding signal](class.SignalAction.html). | |
| 956 | - | func (x *Window) ConnectActivateFocus(cb func(Window)) { | |
| 956 | + | func (x *Window) ConnectActivateFocus(cb func(Window)) uint32 { | |
| 957 | 957 | fcb := func(clsPtr uintptr) { | |
| 958 | 958 | fa := Window{} | |
| 959 | 959 | fa.Ptr = clsPtr | |
| @@ -961,11 +961,11 @@ func (x *Window) ConnectActivateFocus(cb func(Window)) { | |||
| 961 | 961 | cb(fa) | |
| 962 | 962 | ||
| 963 | 963 | } | |
| 964 | - | gobject.ObjectConnect(x.GoPointer(), "signal::activate-focus", purego.NewCallback(fcb)) | |
| 964 | + | return gobject.SignalConnect(x.GoPointer(), "activate-focus", purego.NewCallback(fcb)) | |
| 965 | 965 | } | |
| 966 | 966 | ||
| 967 | 967 | // Emitted when the user clicks on the close button of the window. | |
| 968 | - | func (x *Window) ConnectCloseRequest(cb func(Window) bool) { | |
| 968 | + | func (x *Window) ConnectCloseRequest(cb func(Window) bool) uint32 { | |
| 969 | 969 | fcb := func(clsPtr uintptr) bool { | |
| 970 | 970 | fa := Window{} | |
| 971 | 971 | fa.Ptr = clsPtr | |
| @@ -973,7 +973,7 @@ func (x *Window) ConnectCloseRequest(cb func(Window) bool) { | |||
| 973 | 973 | return cb(fa) | |
| 974 | 974 | ||
| 975 | 975 | } | |
| 976 | - | gobject.ObjectConnect(x.GoPointer(), "signal::close-request", purego.NewCallback(fcb)) | |
| 976 | + | return gobject.SignalConnect(x.GoPointer(), "close-request", purego.NewCallback(fcb)) | |
| 977 | 977 | } | |
| 978 | 978 | ||
| 979 | 979 | // Emitted when the user enables or disables interactive debugging. | |
| @@ -986,7 +986,7 @@ func (x *Window) ConnectCloseRequest(cb func(Window) bool) { | |||
| 986 | 986 | // | |
| 987 | 987 | // The default bindings for this signal are Ctrl-Shift-I | |
| 988 | 988 | // and Ctrl-Shift-D. | |
| 989 | - | func (x *Window) ConnectEnableDebugging(cb func(Window, bool) bool) { | |
| 989 | + | func (x *Window) ConnectEnableDebugging(cb func(Window, bool) bool) uint32 { | |
| 990 | 990 | fcb := func(clsPtr uintptr, ToggleVarp bool) bool { | |
| 991 | 991 | fa := Window{} | |
| 992 | 992 | fa.Ptr = clsPtr | |
| @@ -994,12 +994,12 @@ func (x *Window) ConnectEnableDebugging(cb func(Window, bool) bool) { | |||
| 994 | 994 | return cb(fa, ToggleVarp) | |
| 995 | 995 | ||
| 996 | 996 | } | |
| 997 | - | gobject.ObjectConnect(x.GoPointer(), "signal::enable-debugging", purego.NewCallback(fcb)) | |
| 997 | + | return gobject.SignalConnect(x.GoPointer(), "enable-debugging", purego.NewCallback(fcb)) | |
| 998 | 998 | } | |
| 999 | 999 | ||
| 1000 | 1000 | // emitted when the set of accelerators or mnemonics that | |
| 1001 | 1001 | // are associated with @window changes. | |
| 1002 | - | func (x *Window) ConnectKeysChanged(cb func(Window)) { | |
| 1002 | + | func (x *Window) ConnectKeysChanged(cb func(Window)) uint32 { | |
| 1003 | 1003 | fcb := func(clsPtr uintptr) { | |
| 1004 | 1004 | fa := Window{} | |
| 1005 | 1005 | fa.Ptr = clsPtr | |
| @@ -1007,7 +1007,7 @@ func (x *Window) ConnectKeysChanged(cb func(Window)) { | |||
| 1007 | 1007 | cb(fa) | |
| 1008 | 1008 | ||
| 1009 | 1009 | } | |
| 1010 | - | gobject.ObjectConnect(x.GoPointer(), "signal::keys-changed", purego.NewCallback(fcb)) | |
| 1010 | + | return gobject.SignalConnect(x.GoPointer(), "keys-changed", purego.NewCallback(fcb)) | |
| 1011 | 1011 | } | |
| 1012 | 1012 | ||
| 1013 | 1013 | // Retrieves the `GtkAccessibleRole` for the given `GtkAccessible`. | |