Merge pull request #350 from bnema/fix/repin-fixed-puregotk
fix(deps): validate puregotk lazy registration fix
907 files · +27874 -25296
M go.mod +3 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.0 | |
| 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714200603-7370c78950ef | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -47,6 +47,7 @@ require ( | |||
| 47 | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | |
| 48 | 48 | github.com/fatih/color v1.19.0 // indirect | |
| 49 | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | |
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |
| 50 | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | |
| 51 | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | |
| 52 | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | |
| @@ -80,6 +81,7 @@ require ( | |||
| 80 | 81 | golang.org/x/text v0.40.0 // indirect | |
| 81 | 82 | golang.org/x/tools v0.47.0 // indirect | |
| 82 | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | |
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |
| 83 | 85 | ) | |
| 84 | 86 | ||
| 85 | 87 | tool github.com/a-h/templ/cmd/templ | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.0 | 14 | + | github.com/bnema/puregotk v0.7.1-0.20260714200603-7370c78950ef |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
| @@ -47,6 +47,7 @@ require ( | |||||
| 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | 47 | github.com/erikgeiser/coninput v0.0.0-20211004153227-1c3628e74d0f // indirect | ||
| 48 | github.com/fatih/color v1.19.0 // indirect | 48 | github.com/fatih/color v1.19.0 // indirect | ||
| 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | 49 | github.com/go-viper/mapstructure/v2 v2.5.0 // indirect | ||
| 50 | + | github.com/google/go-cmp v0.7.0 // indirect | |||
| 50 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | 51 | github.com/inconshreveable/mousetrap v1.1.0 // indirect | ||
| 51 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | 52 | github.com/lucasb-eyer/go-colorful v1.4.0 // indirect | ||
| 52 | github.com/mattn/go-colorable v0.1.14 // indirect | 53 | github.com/mattn/go-colorable v0.1.14 // indirect | ||
| @@ -80,6 +81,7 @@ require ( | |||||
| 80 | golang.org/x/text v0.40.0 // indirect | 81 | golang.org/x/text v0.40.0 // indirect | ||
| 81 | golang.org/x/tools v0.47.0 // indirect | 82 | golang.org/x/tools v0.47.0 // indirect | ||
| 82 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | 83 | gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect | ||
| 84 | + | mvdan.cc/gofumpt v0.9.2 // indirect | |||
| 83 | ) | 85 | ) | ||
| 84 | 86 | ||||
| 85 | tool github.com/a-h/templ/cmd/templ | 87 | tool github.com/a-h/templ/cmd/templ | ||
M go.sum +4 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +197 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +10 -0 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +99 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +95 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +7 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +33 -29 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +66 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +10 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +4 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +24 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +14 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +3 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +22 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +23 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +47 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +10 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +33 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +18 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +10 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +5 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +47 -37 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +14 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +17 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +34 -33
| @@ -5,7 +5,6 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | - | "github.com/bnema/purego" | |
| 9 | 8 | "github.com/bnema/puregotk/pkg/core" | |
| 10 | 9 | "github.com/bnema/puregotk/v4/gio" | |
| 11 | 10 | "github.com/bnema/puregotk/v4/glib" | |
| @@ -92,6 +91,7 @@ type ComboRow struct { | |||
| 92 | 91 | var xComboRowGLibType func() types.GType | |
| 93 | 92 | ||
| 94 | 93 | func ComboRowGLibType() types.GType { | |
| 94 | + | core.LazyRegister(&xComboRowGLibType, "ADW", "adw_combo_row_get_type", false) | |
| 95 | 95 | return xComboRowGLibType() | |
| 96 | 96 | } | |
| 97 | 97 | ||
| @@ -105,6 +105,7 @@ var xNewComboRow func() uintptr | |||
| 105 | 105 | ||
| 106 | 106 | // Creates a new `AdwComboRow`. | |
| 107 | 107 | func NewComboRow() *ComboRow { | |
| 108 | + | core.LazyRegister(&xNewComboRow, "ADW", "adw_combo_row_new", false) | |
| 108 | 109 | var cls *ComboRow | |
| 109 | 110 | ||
| 110 | 111 | cret := xNewComboRow() | |
| @@ -127,6 +128,8 @@ var xComboRowGetEnableSearch func(uintptr) bool | |||
| 127 | 128 | // | |
| 128 | 129 | // Search requires [property@ComboRow:expression] to be set. | |
| 129 | 130 | func (x *ComboRow) GetEnableSearch() bool { | |
| 131 | + | core.LazyRegister(&xComboRowGetEnableSearch, "ADW", "adw_combo_row_get_enable_search", false) | |
| 132 | + | ||
| 130 | 133 | cret := xComboRowGetEnableSearch(x.GoPointer()) | |
| 131 | 134 | return cret | |
| 132 | 135 | } | |
| @@ -135,6 +138,7 @@ var xComboRowGetExpression func(uintptr) uintptr | |||
| 135 | 138 | ||
| 136 | 139 | // Gets the expression used to obtain strings from items. | |
| 137 | 140 | func (x *ComboRow) GetExpression() *gtk.Expression { | |
| 141 | + | core.LazyRegister(&xComboRowGetExpression, "ADW", "adw_combo_row_get_expression", false) | |
| 138 | 142 | var cls *gtk.Expression | |
| 139 | 143 | ||
| 140 | 144 | cret := xComboRowGetExpression(x.GoPointer()) | |
| @@ -152,6 +156,7 @@ var xComboRowGetFactory func(uintptr) uintptr | |||
| 152 | 156 | ||
| 153 | 157 | // Gets the factory for populating list items. | |
| 154 | 158 | func (x *ComboRow) GetFactory() *gtk.ListItemFactory { | |
| 159 | + | core.LazyRegister(&xComboRowGetFactory, "ADW", "adw_combo_row_get_factory", false) | |
| 155 | 160 | var cls *gtk.ListItemFactory | |
| 156 | 161 | ||
| 157 | 162 | cret := xComboRowGetFactory(x.GoPointer()) | |
| @@ -169,6 +174,7 @@ var xComboRowGetHeaderFactory func(uintptr) uintptr | |||
| 169 | 174 | ||
| 170 | 175 | // Gets the factory that's currently used to create header widgets for the popup. | |
| 171 | 176 | func (x *ComboRow) GetHeaderFactory() *gtk.ListItemFactory { | |
| 177 | + | core.LazyRegister(&xComboRowGetHeaderFactory, "ADW", "adw_combo_row_get_header_factory", false) | |
| 172 | 178 | var cls *gtk.ListItemFactory | |
| 173 | 179 | ||
| 174 | 180 | cret := xComboRowGetHeaderFactory(x.GoPointer()) | |
| @@ -186,6 +192,7 @@ var xComboRowGetListFactory func(uintptr) uintptr | |||
| 186 | 192 | ||
| 187 | 193 | // Gets the factory for populating list items in the popup. | |
| 188 | 194 | func (x *ComboRow) GetListFactory() *gtk.ListItemFactory { | |
| 195 | + | core.LazyRegister(&xComboRowGetListFactory, "ADW", "adw_combo_row_get_list_factory", false) | |
| 189 | 196 | var cls *gtk.ListItemFactory | |
| 190 | 197 | ||
| 191 | 198 | cret := xComboRowGetListFactory(x.GoPointer()) | |
| @@ -203,6 +210,7 @@ var xComboRowGetModel func(uintptr) uintptr | |||
| 203 | 210 | ||
| 204 | 211 | // Gets the model that provides the displayed items. | |
| 205 | 212 | func (x *ComboRow) GetModel() *gio.ListModelBase { | |
| 213 | + | core.LazyRegister(&xComboRowGetModel, "ADW", "adw_combo_row_get_model", false) | |
| 206 | 214 | var cls *gio.ListModelBase | |
| 207 | 215 | ||
| 208 | 216 | cret := xComboRowGetModel(x.GoPointer()) | |
| @@ -220,6 +228,8 @@ var xComboRowGetSearchMatchMode func(uintptr) gtk.StringFilterMatchMode | |||
| 220 | 228 | ||
| 221 | 229 | // Returns the match mode that the search filter is using. | |
| 222 | 230 | func (x *ComboRow) GetSearchMatchMode() gtk.StringFilterMatchMode { | |
| 231 | + | core.LazyRegister(&xComboRowGetSearchMatchMode, "ADW", "adw_combo_row_get_search_match_mode", false) | |
| 232 | + | ||
| 223 | 233 | cret := xComboRowGetSearchMatchMode(x.GoPointer()) | |
| 224 | 234 | return cret | |
| 225 | 235 | } | |
| @@ -228,6 +238,8 @@ var xComboRowGetSelected func(uintptr) uint | |||
| 228 | 238 | ||
| 229 | 239 | // Gets the position of the selected item. | |
| 230 | 240 | func (x *ComboRow) GetSelected() uint { | |
| 241 | + | core.LazyRegister(&xComboRowGetSelected, "ADW", "adw_combo_row_get_selected", false) | |
| 242 | + | ||
| 231 | 243 | cret := xComboRowGetSelected(x.GoPointer()) | |
| 232 | 244 | return cret | |
| 233 | 245 | } | |
| @@ -236,6 +248,7 @@ var xComboRowGetSelectedItem func(uintptr) uintptr | |||
| 236 | 248 | ||
| 237 | 249 | // Gets the selected item. | |
| 238 | 250 | func (x *ComboRow) GetSelectedItem() *gobject.Object { | |
| 251 | + | core.LazyRegister(&xComboRowGetSelectedItem, "ADW", "adw_combo_row_get_selected_item", false) | |
| 239 | 252 | var cls *gobject.Object | |
| 240 | 253 | ||
| 241 | 254 | cret := xComboRowGetSelectedItem(x.GoPointer()) | |
| @@ -253,6 +266,8 @@ var xComboRowGetUseSubtitle func(uintptr) bool | |||
| 253 | 266 | ||
| 254 | 267 | // Gets whether to use the current value as the subtitle. | |
| 255 | 268 | func (x *ComboRow) GetUseSubtitle() bool { | |
| 269 | + | core.LazyRegister(&xComboRowGetUseSubtitle, "ADW", "adw_combo_row_get_use_subtitle", false) | |
| 270 | + | ||
| 256 | 271 | cret := xComboRowGetUseSubtitle(x.GoPointer()) | |
| 257 | 272 | return cret | |
| 258 | 273 | } | |
| @@ -266,6 +281,8 @@ var xComboRowSetEnableSearch func(uintptr, bool) | |||
| 266 | 281 | // | |
| 267 | 282 | // Search requires [property@ComboRow:expression] to be set. | |
| 268 | 283 | func (x *ComboRow) SetEnableSearch(EnableSearchVar bool) { | |
| 284 | + | core.LazyRegister(&xComboRowSetEnableSearch, "ADW", "adw_combo_row_set_enable_search", false) | |
| 285 | + | ||
| 269 | 286 | xComboRowSetEnableSearch(x.GoPointer(), EnableSearchVar) | |
| 270 | 287 | } | |
| 271 | 288 | ||
| @@ -279,6 +296,8 @@ var xComboRowSetExpression func(uintptr, uintptr) | |||
| 279 | 296 | // [property@ComboRow:factory] is not set, or when | |
| 280 | 297 | // [property@ComboRow:use-subtitle] is set to `TRUE`. | |
| 281 | 298 | func (x *ComboRow) SetExpression(ExpressionVar *gtk.Expression) { | |
| 299 | + | core.LazyRegister(&xComboRowSetExpression, "ADW", "adw_combo_row_set_expression", false) | |
| 300 | + | ||
| 282 | 301 | xComboRowSetExpression(x.GoPointer(), ExpressionVar.GoPointer()) | |
| 283 | 302 | } | |
| 284 | 303 | ||
| @@ -289,6 +308,8 @@ var xComboRowSetFactory func(uintptr, uintptr) | |||
| 289 | 308 | // This factory is always used for the item in the row. It is also used for | |
| 290 | 309 | // items in the popup unless [property@ComboRow:list-factory] is set. | |
| 291 | 310 | func (x *ComboRow) SetFactory(FactoryVar *gtk.ListItemFactory) { | |
| 311 | + | core.LazyRegister(&xComboRowSetFactory, "ADW", "adw_combo_row_set_factory", false) | |
| 312 | + | ||
| 292 | 313 | xComboRowSetFactory(x.GoPointer(), FactoryVar.GoPointer()) | |
| 293 | 314 | } | |
| 294 | 315 | ||
| @@ -296,6 +317,8 @@ var xComboRowSetHeaderFactory func(uintptr, uintptr) | |||
| 296 | 317 | ||
| 297 | 318 | // Sets the factory to use for creating header widgets for the popup. | |
| 298 | 319 | func (x *ComboRow) SetHeaderFactory(FactoryVar *gtk.ListItemFactory) { | |
| 320 | + | core.LazyRegister(&xComboRowSetHeaderFactory, "ADW", "adw_combo_row_set_header_factory", false) | |
| 321 | + | ||
| 299 | 322 | xComboRowSetHeaderFactory(x.GoPointer(), FactoryVar.GoPointer()) | |
| 300 | 323 | } | |
| 301 | 324 | ||
| @@ -305,6 +328,8 @@ var xComboRowSetListFactory func(uintptr, uintptr) | |||
| 305 | 328 | // | |
| 306 | 329 | // If this is not set, [property@ComboRow:factory] is used. | |
| 307 | 330 | func (x *ComboRow) SetListFactory(FactoryVar *gtk.ListItemFactory) { | |
| 331 | + | core.LazyRegister(&xComboRowSetListFactory, "ADW", "adw_combo_row_set_list_factory", false) | |
| 332 | + | ||
| 308 | 333 | xComboRowSetListFactory(x.GoPointer(), FactoryVar.GoPointer()) | |
| 309 | 334 | } | |
| 310 | 335 | ||
| @@ -312,6 +337,8 @@ var xComboRowSetModel func(uintptr, uintptr) | |||
| 312 | 337 | ||
| 313 | 338 | // Sets the model that provides the displayed items. | |
| 314 | 339 | func (x *ComboRow) SetModel(ModelVar gio.ListModel) { | |
| 340 | + | core.LazyRegister(&xComboRowSetModel, "ADW", "adw_combo_row_set_model", false) | |
| 341 | + | ||
| 315 | 342 | xComboRowSetModel(x.GoPointer(), ModelVar.GoPointer()) | |
| 316 | 343 | } | |
| 317 | 344 | ||
| @@ -319,6 +346,8 @@ var xComboRowSetSearchMatchMode func(uintptr, gtk.StringFilterMatchMode) | |||
| 319 | 346 | ||
| 320 | 347 | // Sets the match mode for the search filter. | |
| 321 | 348 | func (x *ComboRow) SetSearchMatchMode(SearchMatchModeVar gtk.StringFilterMatchMode) { | |
| 349 | + | core.LazyRegister(&xComboRowSetSearchMatchMode, "ADW", "adw_combo_row_set_search_match_mode", false) | |
| 350 | + | ||
| 322 | 351 | xComboRowSetSearchMatchMode(x.GoPointer(), SearchMatchModeVar) | |
| 323 | 352 | } | |
| 324 | 353 | ||
| @@ -326,6 +355,8 @@ var xComboRowSetSelected func(uintptr, uint) | |||
| 326 | 355 | ||
| 327 | 356 | // Selects the item at the given position. | |
| 328 | 357 | func (x *ComboRow) SetSelected(PositionVar uint) { | |
| 358 | + | core.LazyRegister(&xComboRowSetSelected, "ADW", "adw_combo_row_set_selected", false) | |
| 359 | + | ||
| 329 | 360 | xComboRowSetSelected(x.GoPointer(), PositionVar) | |
| 330 | 361 | } | |
| 331 | 362 | ||
| @@ -341,6 +372,8 @@ var xComboRowSetUseSubtitle func(uintptr, bool) | |||
| 341 | 372 | // The subtitle is interpreted as Pango markup if | |
| 342 | 373 | // [property@PreferencesRow:use-markup] is set to `TRUE`. | |
| 343 | 374 | func (x *ComboRow) SetUseSubtitle(UseSubtitleVar bool) { | |
| 375 | + | core.LazyRegister(&xComboRowSetUseSubtitle, "ADW", "adw_combo_row_set_use_subtitle", false) | |
| 376 | + | ||
| 344 | 377 | xComboRowSetUseSubtitle(x.GoPointer(), UseSubtitleVar) | |
| 345 | 378 | } | |
| 346 | 379 | ||
| @@ -780,36 +813,4 @@ func (x *ComboRow) GetBuildableId() string { | |||
| 780 | 813 | func init() { | |
| 781 | 814 | core.SetPackageName("ADW", "libadwaita-1") | |
| 782 | 815 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 783 | - | var libs []uintptr | |
| 784 | - | for _, libPath := range core.GetPaths("ADW") { | |
| 785 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 786 | - | if err != nil { | |
| 787 | - | panic(err) | |
| 788 | - | } | |
| 789 | - | libs = append(libs, lib) | |
| 790 | - | } | |
| 791 | - | ||
| 792 | - | core.PuregoSafeRegister(&xComboRowGLibType, libs, "adw_combo_row_get_type") | |
| 793 | - | ||
| 794 | - | core.PuregoSafeRegister(&xNewComboRow, libs, "adw_combo_row_new") | |
| 795 | - | ||
| 796 | - | core.PuregoSafeRegister(&xComboRowGetEnableSearch, libs, "adw_combo_row_get_enable_search") | |
| 797 | - | core.PuregoSafeRegister(&xComboRowGetExpression, libs, "adw_combo_row_get_expression") | |
| 798 | - | core.PuregoSafeRegister(&xComboRowGetFactory, libs, "adw_combo_row_get_factory") | |
| 799 | - | core.PuregoSafeRegister(&xComboRowGetHeaderFactory, libs, "adw_combo_row_get_header_factory") | |
| 800 | - | core.PuregoSafeRegister(&xComboRowGetListFactory, libs, "adw_combo_row_get_list_factory") | |
| 801 | - | core.PuregoSafeRegister(&xComboRowGetModel, libs, "adw_combo_row_get_model") | |
| 802 | - | core.PuregoSafeRegister(&xComboRowGetSearchMatchMode, libs, "adw_combo_row_get_search_match_mode") | |
| 803 | - | core.PuregoSafeRegister(&xComboRowGetSelected, libs, "adw_combo_row_get_selected") | |
| 804 | - | core.PuregoSafeRegister(&xComboRowGetSelectedItem, libs, "adw_combo_row_get_selected_item") | |
| 805 | - | core.PuregoSafeRegister(&xComboRowGetUseSubtitle, libs, "adw_combo_row_get_use_subtitle") | |
| 806 | - | core.PuregoSafeRegister(&xComboRowSetEnableSearch, libs, "adw_combo_row_set_enable_search") | |
| 807 | - | core.PuregoSafeRegister(&xComboRowSetExpression, libs, "adw_combo_row_set_expression") | |
| 808 | - | core.PuregoSafeRegister(&xComboRowSetFactory, libs, "adw_combo_row_set_factory") | |
| 809 | - | core.PuregoSafeRegister(&xComboRowSetHeaderFactory, libs, "adw_combo_row_set_header_factory") | |
| 810 | - | core.PuregoSafeRegister(&xComboRowSetListFactory, libs, "adw_combo_row_set_list_factory") | |
| 811 | - | core.PuregoSafeRegister(&xComboRowSetModel, libs, "adw_combo_row_set_model") | |
| 812 | - | core.PuregoSafeRegister(&xComboRowSetSearchMatchMode, libs, "adw_combo_row_set_search_match_mode") | |
| 813 | - | core.PuregoSafeRegister(&xComboRowSetSelected, libs, "adw_combo_row_set_selected") | |
| 814 | - | core.PuregoSafeRegister(&xComboRowSetUseSubtitle, libs, "adw_combo_row_set_use_subtitle") | |
| 815 | 816 | } | |
| @@ -5,7 +5,6 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | - | "github.com/bnema/purego" | |||
| 9 | "github.com/bnema/puregotk/pkg/core" | 8 | "github.com/bnema/puregotk/pkg/core" | ||
| 10 | "github.com/bnema/puregotk/v4/gio" | 9 | "github.com/bnema/puregotk/v4/gio" | ||
| 11 | "github.com/bnema/puregotk/v4/glib" | 10 | "github.com/bnema/puregotk/v4/glib" | ||
| @@ -92,6 +91,7 @@ type ComboRow struct { | |||||
| 92 | var xComboRowGLibType func() types.GType | 91 | var xComboRowGLibType func() types.GType | ||
| 93 | 92 | ||||
| 94 | func ComboRowGLibType() types.GType { | 93 | func ComboRowGLibType() types.GType { | ||
| 94 | + | core.LazyRegister(&xComboRowGLibType, "ADW", "adw_combo_row_get_type", false) | |||
| 95 | return xComboRowGLibType() | 95 | return xComboRowGLibType() | ||
| 96 | } | 96 | } | ||
| 97 | 97 | ||||
| @@ -105,6 +105,7 @@ var xNewComboRow func() uintptr | |||||
| 105 | 105 | ||||
| 106 | // Creates a new `AdwComboRow`. | 106 | // Creates a new `AdwComboRow`. | ||
| 107 | func NewComboRow() *ComboRow { | 107 | func NewComboRow() *ComboRow { | ||
| 108 | + | core.LazyRegister(&xNewComboRow, "ADW", "adw_combo_row_new", false) | |||
| 108 | var cls *ComboRow | 109 | var cls *ComboRow | ||
| 109 | 110 | ||||
| 110 | cret := xNewComboRow() | 111 | cret := xNewComboRow() | ||
| @@ -127,6 +128,8 @@ var xComboRowGetEnableSearch func(uintptr) bool | |||||
| 127 | // | 128 | // | ||
| 128 | // Search requires [property@ComboRow:expression] to be set. | 129 | // Search requires [property@ComboRow:expression] to be set. | ||
| 129 | func (x *ComboRow) GetEnableSearch() bool { | 130 | func (x *ComboRow) GetEnableSearch() bool { | ||
| 131 | + | core.LazyRegister(&xComboRowGetEnableSearch, "ADW", "adw_combo_row_get_enable_search", false) | |||
| 132 | + | ||||
| 130 | cret := xComboRowGetEnableSearch(x.GoPointer()) | 133 | cret := xComboRowGetEnableSearch(x.GoPointer()) | ||
| 131 | return cret | 134 | return cret | ||
| 132 | } | 135 | } | ||
| @@ -135,6 +138,7 @@ var xComboRowGetExpression func(uintptr) uintptr | |||||
| 135 | 138 | ||||
| 136 | // Gets the expression used to obtain strings from items. | 139 | // Gets the expression used to obtain strings from items. | ||
| 137 | func (x *ComboRow) GetExpression() *gtk.Expression { | 140 | func (x *ComboRow) GetExpression() *gtk.Expression { | ||
| 141 | + | core.LazyRegister(&xComboRowGetExpression, "ADW", "adw_combo_row_get_expression", false) | |||
| 138 | var cls *gtk.Expression | 142 | var cls *gtk.Expression | ||
| 139 | 143 | ||||
| 140 | cret := xComboRowGetExpression(x.GoPointer()) | 144 | cret := xComboRowGetExpression(x.GoPointer()) | ||
| @@ -152,6 +156,7 @@ var xComboRowGetFactory func(uintptr) uintptr | |||||
| 152 | 156 | ||||
| 153 | // Gets the factory for populating list items. | 157 | // Gets the factory for populating list items. | ||
| 154 | func (x *ComboRow) GetFactory() *gtk.ListItemFactory { | 158 | func (x *ComboRow) GetFactory() *gtk.ListItemFactory { | ||
| 159 | + | core.LazyRegister(&xComboRowGetFactory, "ADW", "adw_combo_row_get_factory", false) | |||
| 155 | var cls *gtk.ListItemFactory | 160 | var cls *gtk.ListItemFactory | ||
| 156 | 161 | ||||
| 157 | cret := xComboRowGetFactory(x.GoPointer()) | 162 | cret := xComboRowGetFactory(x.GoPointer()) | ||
| @@ -169,6 +174,7 @@ var xComboRowGetHeaderFactory func(uintptr) uintptr | |||||
| 169 | 174 | ||||
| 170 | // Gets the factory that's currently used to create header widgets for the popup. | 175 | // Gets the factory that's currently used to create header widgets for the popup. | ||
| 171 | func (x *ComboRow) GetHeaderFactory() *gtk.ListItemFactory { | 176 | func (x *ComboRow) GetHeaderFactory() *gtk.ListItemFactory { | ||
| 177 | + | core.LazyRegister(&xComboRowGetHeaderFactory, "ADW", "adw_combo_row_get_header_factory", false) | |||
| 172 | var cls *gtk.ListItemFactory | 178 | var cls *gtk.ListItemFactory | ||
| 173 | 179 | ||||
| 174 | cret := xComboRowGetHeaderFactory(x.GoPointer()) | 180 | cret := xComboRowGetHeaderFactory(x.GoPointer()) | ||
| @@ -186,6 +192,7 @@ var xComboRowGetListFactory func(uintptr) uintptr | |||||
| 186 | 192 | ||||
| 187 | // Gets the factory for populating list items in the popup. | 193 | // Gets the factory for populating list items in the popup. | ||
| 188 | func (x *ComboRow) GetListFactory() *gtk.ListItemFactory { | 194 | func (x *ComboRow) GetListFactory() *gtk.ListItemFactory { | ||
| 195 | + | core.LazyRegister(&xComboRowGetListFactory, "ADW", "adw_combo_row_get_list_factory", false) | |||
| 189 | var cls *gtk.ListItemFactory | 196 | var cls *gtk.ListItemFactory | ||
| 190 | 197 | ||||
| 191 | cret := xComboRowGetListFactory(x.GoPointer()) | 198 | cret := xComboRowGetListFactory(x.GoPointer()) | ||
| @@ -203,6 +210,7 @@ var xComboRowGetModel func(uintptr) uintptr | |||||
| 203 | 210 | ||||
| 204 | // Gets the model that provides the displayed items. | 211 | // Gets the model that provides the displayed items. | ||
| 205 | func (x *ComboRow) GetModel() *gio.ListModelBase { | 212 | func (x *ComboRow) GetModel() *gio.ListModelBase { | ||
| 213 | + | core.LazyRegister(&xComboRowGetModel, "ADW", "adw_combo_row_get_model", false) | |||
| 206 | var cls *gio.ListModelBase | 214 | var cls *gio.ListModelBase | ||
| 207 | 215 | ||||
| 208 | cret := xComboRowGetModel(x.GoPointer()) | 216 | cret := xComboRowGetModel(x.GoPointer()) | ||
| @@ -220,6 +228,8 @@ var xComboRowGetSearchMatchMode func(uintptr) gtk.StringFilterMatchMode | |||||
| 220 | 228 | ||||
| 221 | // Returns the match mode that the search filter is using. | 229 | // Returns the match mode that the search filter is using. | ||
| 222 | func (x *ComboRow) GetSearchMatchMode() gtk.StringFilterMatchMode { | 230 | func (x *ComboRow) GetSearchMatchMode() gtk.StringFilterMatchMode { | ||
| 231 | + | core.LazyRegister(&xComboRowGetSearchMatchMode, "ADW", "adw_combo_row_get_search_match_mode", false) | |||
| 232 | + | ||||
| 223 | cret := xComboRowGetSearchMatchMode(x.GoPointer()) | 233 | cret := xComboRowGetSearchMatchMode(x.GoPointer()) | ||
| 224 | return cret | 234 | return cret | ||
| 225 | } | 235 | } | ||
| @@ -228,6 +238,8 @@ var xComboRowGetSelected func(uintptr) uint | |||||
| 228 | 238 | ||||
| 229 | // Gets the position of the selected item. | 239 | // Gets the position of the selected item. | ||
| 230 | func (x *ComboRow) GetSelected() uint { | 240 | func (x *ComboRow) GetSelected() uint { | ||
| 241 | + | core.LazyRegister(&xComboRowGetSelected, "ADW", "adw_combo_row_get_selected", false) | |||
| 242 | + | ||||
| 231 | cret := xComboRowGetSelected(x.GoPointer()) | 243 | cret := xComboRowGetSelected(x.GoPointer()) | ||
| 232 | return cret | 244 | return cret | ||
| 233 | } | 245 | } | ||
| @@ -236,6 +248,7 @@ var xComboRowGetSelectedItem func(uintptr) uintptr | |||||
| 236 | 248 | ||||
| 237 | // Gets the selected item. | 249 | // Gets the selected item. | ||
| 238 | func (x *ComboRow) GetSelectedItem() *gobject.Object { | 250 | func (x *ComboRow) GetSelectedItem() *gobject.Object { | ||
| 251 | + | core.LazyRegister(&xComboRowGetSelectedItem, "ADW", "adw_combo_row_get_selected_item", false) | |||
| 239 | var cls *gobject.Object | 252 | var cls *gobject.Object | ||
| 240 | 253 | ||||
| 241 | cret := xComboRowGetSelectedItem(x.GoPointer()) | 254 | cret := xComboRowGetSelectedItem(x.GoPointer()) | ||
| @@ -253,6 +266,8 @@ var xComboRowGetUseSubtitle func(uintptr) bool | |||||
| 253 | 266 | ||||
| 254 | // Gets whether to use the current value as the subtitle. | 267 | // Gets whether to use the current value as the subtitle. | ||
| 255 | func (x *ComboRow) GetUseSubtitle() bool { | 268 | func (x *ComboRow) GetUseSubtitle() bool { | ||
| 269 | + | core.LazyRegister(&xComboRowGetUseSubtitle, "ADW", "adw_combo_row_get_use_subtitle", false) | |||
| 270 | + | ||||
| 256 | cret := xComboRowGetUseSubtitle(x.GoPointer()) | 271 | cret := xComboRowGetUseSubtitle(x.GoPointer()) | ||
| 257 | return cret | 272 | return cret | ||
| 258 | } | 273 | } | ||
| @@ -266,6 +281,8 @@ var xComboRowSetEnableSearch func(uintptr, bool) | |||||
| 266 | // | 281 | // | ||
| 267 | // Search requires [property@ComboRow:expression] to be set. | 282 | // Search requires [property@ComboRow:expression] to be set. | ||
| 268 | func (x *ComboRow) SetEnableSearch(EnableSearchVar bool) { | 283 | func (x *ComboRow) SetEnableSearch(EnableSearchVar bool) { | ||
| 284 | + | core.LazyRegister(&xComboRowSetEnableSearch, "ADW", "adw_combo_row_set_enable_search", false) | |||
| 285 | + | ||||
| 269 | xComboRowSetEnableSearch(x.GoPointer(), EnableSearchVar) | 286 | xComboRowSetEnableSearch(x.GoPointer(), EnableSearchVar) | ||
| 270 | } | 287 | } | ||
| 271 | 288 | ||||
| @@ -279,6 +296,8 @@ var xComboRowSetExpression func(uintptr, uintptr) | |||||
| 279 | // [property@ComboRow:factory] is not set, or when | 296 | // [property@ComboRow:factory] is not set, or when | ||
| 280 | // [property@ComboRow:use-subtitle] is set to `TRUE`. | 297 | // [property@ComboRow:use-subtitle] is set to `TRUE`. | ||
| 281 | func (x *ComboRow) SetExpression(ExpressionVar *gtk.Expression) { | 298 | func (x *ComboRow) SetExpression(ExpressionVar *gtk.Expression) { | ||
| 299 | + | core.LazyRegister(&xComboRowSetExpression, "ADW", "adw_combo_row_set_expression", false) | |||
| 300 | + | ||||
| 282 | xComboRowSetExpression(x.GoPointer(), ExpressionVar.GoPointer()) | 301 | xComboRowSetExpression(x.GoPointer(), ExpressionVar.GoPointer()) | ||
| 283 | } | 302 | } | ||
| 284 | 303 | ||||
| @@ -289,6 +308,8 @@ var xComboRowSetFactory func(uintptr, uintptr) | |||||
| 289 | // This factory is always used for the item in the row. It is also used for | 308 | // This factory is always used for the item in the row. It is also used for | ||
| 290 | // items in the popup unless [property@ComboRow:list-factory] is set. | 309 | // items in the popup unless [property@ComboRow:list-factory] is set. | ||
| 291 | func (x *ComboRow) SetFactory(FactoryVar *gtk.ListItemFactory) { | 310 | func (x *ComboRow) SetFactory(FactoryVar *gtk.ListItemFactory) { | ||
| 311 | + | core.LazyRegister(&xComboRowSetFactory, "ADW", "adw_combo_row_set_factory", false) | |||
| 312 | + | ||||
| 292 | xComboRowSetFactory(x.GoPointer(), FactoryVar.GoPointer()) | 313 | xComboRowSetFactory(x.GoPointer(), FactoryVar.GoPointer()) | ||
| 293 | } | 314 | } | ||
| 294 | 315 | ||||
| @@ -296,6 +317,8 @@ var xComboRowSetHeaderFactory func(uintptr, uintptr) | |||||
| 296 | 317 | ||||
| 297 | // Sets the factory to use for creating header widgets for the popup. | 318 | // Sets the factory to use for creating header widgets for the popup. | ||
| 298 | func (x *ComboRow) SetHeaderFactory(FactoryVar *gtk.ListItemFactory) { | 319 | func (x *ComboRow) SetHeaderFactory(FactoryVar *gtk.ListItemFactory) { | ||
| 320 | + | core.LazyRegister(&xComboRowSetHeaderFactory, "ADW", "adw_combo_row_set_header_factory", false) | |||
| 321 | + | ||||
| 299 | xComboRowSetHeaderFactory(x.GoPointer(), FactoryVar.GoPointer()) | 322 | xComboRowSetHeaderFactory(x.GoPointer(), FactoryVar.GoPointer()) | ||
| 300 | } | 323 | } | ||
| 301 | 324 | ||||
| @@ -305,6 +328,8 @@ var xComboRowSetListFactory func(uintptr, uintptr) | |||||
| 305 | // | 328 | // | ||
| 306 | // If this is not set, [property@ComboRow:factory] is used. | 329 | // If this is not set, [property@ComboRow:factory] is used. | ||
| 307 | func (x *ComboRow) SetListFactory(FactoryVar *gtk.ListItemFactory) { | 330 | func (x *ComboRow) SetListFactory(FactoryVar *gtk.ListItemFactory) { | ||
| 331 | + | core.LazyRegister(&xComboRowSetListFactory, "ADW", "adw_combo_row_set_list_factory", false) | |||
| 332 | + | ||||
| 308 | xComboRowSetListFactory(x.GoPointer(), FactoryVar.GoPointer()) | 333 | xComboRowSetListFactory(x.GoPointer(), FactoryVar.GoPointer()) | ||
| 309 | } | 334 | } | ||
| 310 | 335 | ||||
| @@ -312,6 +337,8 @@ var xComboRowSetModel func(uintptr, uintptr) | |||||
| 312 | 337 | ||||
| 313 | // Sets the model that provides the displayed items. | 338 | // Sets the model that provides the displayed items. | ||
| 314 | func (x *ComboRow) SetModel(ModelVar gio.ListModel) { | 339 | func (x *ComboRow) SetModel(ModelVar gio.ListModel) { | ||
| 340 | + | core.LazyRegister(&xComboRowSetModel, "ADW", "adw_combo_row_set_model", false) | |||
| 341 | + | ||||
| 315 | xComboRowSetModel(x.GoPointer(), ModelVar.GoPointer()) | 342 | xComboRowSetModel(x.GoPointer(), ModelVar.GoPointer()) | ||
| 316 | } | 343 | } | ||
| 317 | 344 | ||||
| @@ -319,6 +346,8 @@ var xComboRowSetSearchMatchMode func(uintptr, gtk.StringFilterMatchMode) | |||||
| 319 | 346 | ||||
| 320 | // Sets the match mode for the search filter. | 347 | // Sets the match mode for the search filter. | ||
| 321 | func (x *ComboRow) SetSearchMatchMode(SearchMatchModeVar gtk.StringFilterMatchMode) { | 348 | func (x *ComboRow) SetSearchMatchMode(SearchMatchModeVar gtk.StringFilterMatchMode) { | ||
| 349 | + | core.LazyRegister(&xComboRowSetSearchMatchMode, "ADW", "adw_combo_row_set_search_match_mode", false) | |||
| 350 | + | ||||
| 322 | xComboRowSetSearchMatchMode(x.GoPointer(), SearchMatchModeVar) | 351 | xComboRowSetSearchMatchMode(x.GoPointer(), SearchMatchModeVar) | ||
| 323 | } | 352 | } | ||
| 324 | 353 | ||||
| @@ -326,6 +355,8 @@ var xComboRowSetSelected func(uintptr, uint) | |||||
| 326 | 355 | ||||
| 327 | // Selects the item at the given position. | 356 | // Selects the item at the given position. | ||
| 328 | func (x *ComboRow) SetSelected(PositionVar uint) { | 357 | func (x *ComboRow) SetSelected(PositionVar uint) { | ||
| 358 | + | core.LazyRegister(&xComboRowSetSelected, "ADW", "adw_combo_row_set_selected", false) | |||
| 359 | + | ||||
| 329 | xComboRowSetSelected(x.GoPointer(), PositionVar) | 360 | xComboRowSetSelected(x.GoPointer(), PositionVar) | ||
| 330 | } | 361 | } | ||
| 331 | 362 | ||||
| @@ -341,6 +372,8 @@ var xComboRowSetUseSubtitle func(uintptr, bool) | |||||
| 341 | // The subtitle is interpreted as Pango markup if | 372 | // The subtitle is interpreted as Pango markup if | ||
| 342 | // [property@PreferencesRow:use-markup] is set to `TRUE`. | 373 | // [property@PreferencesRow:use-markup] is set to `TRUE`. | ||
| 343 | func (x *ComboRow) SetUseSubtitle(UseSubtitleVar bool) { | 374 | func (x *ComboRow) SetUseSubtitle(UseSubtitleVar bool) { | ||
| 375 | + | core.LazyRegister(&xComboRowSetUseSubtitle, "ADW", "adw_combo_row_set_use_subtitle", false) | |||
| 376 | + | ||||
| 344 | xComboRowSetUseSubtitle(x.GoPointer(), UseSubtitleVar) | 377 | xComboRowSetUseSubtitle(x.GoPointer(), UseSubtitleVar) | ||
| 345 | } | 378 | } | ||
| 346 | 379 | ||||
| @@ -780,36 +813,4 @@ func (x *ComboRow) GetBuildableId() string { | |||||
| 780 | func init() { | 813 | func init() { | ||
| 781 | core.SetPackageName("ADW", "libadwaita-1") | 814 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 782 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 815 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 783 | - | var libs []uintptr | |||
| 784 | - | for _, libPath := range core.GetPaths("ADW") { | |||
| 785 | - | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 786 | - | if err != nil { | |||
| 787 | - | panic(err) | |||
| 788 | - | } | |||
| 789 | - | libs = append(libs, lib) | |||
| 790 | - | } | |||
| 791 | - | ||||
| 792 | - | core.PuregoSafeRegister(&xComboRowGLibType, libs, "adw_combo_row_get_type") | |||
| 793 | - | ||||
| 794 | - | core.PuregoSafeRegister(&xNewComboRow, libs, "adw_combo_row_new") | |||
| 795 | - | ||||
| 796 | - | core.PuregoSafeRegister(&xComboRowGetEnableSearch, libs, "adw_combo_row_get_enable_search") | |||
| 797 | - | core.PuregoSafeRegister(&xComboRowGetExpression, libs, "adw_combo_row_get_expression") | |||
| 798 | - | core.PuregoSafeRegister(&xComboRowGetFactory, libs, "adw_combo_row_get_factory") | |||
| 799 | - | core.PuregoSafeRegister(&xComboRowGetHeaderFactory, libs, "adw_combo_row_get_header_factory") | |||
| 800 | - | core.PuregoSafeRegister(&xComboRowGetListFactory, libs, "adw_combo_row_get_list_factory") | |||
| 801 | - | core.PuregoSafeRegister(&xComboRowGetModel, libs, "adw_combo_row_get_model") | |||
| 802 | - | core.PuregoSafeRegister(&xComboRowGetSearchMatchMode, libs, "adw_combo_row_get_search_match_mode") | |||
| 803 | - | core.PuregoSafeRegister(&xComboRowGetSelected, libs, "adw_combo_row_get_selected") | |||
| 804 | - | core.PuregoSafeRegister(&xComboRowGetSelectedItem, libs, "adw_combo_row_get_selected_item") | |||
| 805 | - | core.PuregoSafeRegister(&xComboRowGetUseSubtitle, libs, "adw_combo_row_get_use_subtitle") | |||
| 806 | - | core.PuregoSafeRegister(&xComboRowSetEnableSearch, libs, "adw_combo_row_set_enable_search") | |||
| 807 | - | core.PuregoSafeRegister(&xComboRowSetExpression, libs, "adw_combo_row_set_expression") | |||
| 808 | - | core.PuregoSafeRegister(&xComboRowSetFactory, libs, "adw_combo_row_set_factory") | |||
| 809 | - | core.PuregoSafeRegister(&xComboRowSetHeaderFactory, libs, "adw_combo_row_set_header_factory") | |||
| 810 | - | core.PuregoSafeRegister(&xComboRowSetListFactory, libs, "adw_combo_row_set_list_factory") | |||
| 811 | - | core.PuregoSafeRegister(&xComboRowSetModel, libs, "adw_combo_row_set_model") | |||
| 812 | - | core.PuregoSafeRegister(&xComboRowSetSearchMatchMode, libs, "adw_combo_row_set_search_match_mode") | |||
| 813 | - | core.PuregoSafeRegister(&xComboRowSetSelected, libs, "adw_combo_row_set_selected") | |||
| 814 | - | core.PuregoSafeRegister(&xComboRowSetUseSubtitle, libs, "adw_combo_row_set_use_subtitle") | |||
| 815 | } | 816 | } | ||