Revert "chore(deps): pin puregotk nil-signal fix"
This reverts commit a161e348e2093172038390b0906448f0ae979a0d.
- commit
- 40378d5e4fd2372d054e49168ab2a6f67aedd0fd
- author
- brice · · 2026-07-14 17:59 UTC
- parent
- 8d647bb
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
905 files · +25263 -27842
M go.mod +1 -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.1-0.20260714170452-0b6b9b901234 | |
| 14 | + | github.com/bnema/puregotk v0.7.0 | |
| 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 | |
| @@ -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.1-0.20260714170452-0b6b9b901234 | 14 | + | github.com/bnema/puregotk v0.7.0 |
| 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 | ||
M go.sum +0 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +4 -197 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +0 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +64 -99 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +62 -95 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +15 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +29 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +47 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +27 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +12 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +22 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +15 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +25 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +26 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +38 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +19 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +37 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +37 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +20 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +33 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +38 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +33 -40
| @@ -5,6 +5,7 @@ import ( | |||
| 5 | 5 | "structs" | |
| 6 | 6 | "unsafe" | |
| 7 | 7 | ||
| 8 | + | "github.com/bnema/purego" | |
| 8 | 9 | "github.com/bnema/puregotk/pkg/core" | |
| 9 | 10 | "github.com/bnema/puregotk/v4/glib" | |
| 10 | 11 | "github.com/bnema/puregotk/v4/gobject" | |
| @@ -74,7 +75,6 @@ type EntryRow struct { | |||
| 74 | 75 | var xEntryRowGLibType func() types.GType | |
| 75 | 76 | ||
| 76 | 77 | func EntryRowGLibType() types.GType { | |
| 77 | - | core.LazyRegister(&xEntryRowGLibType, "ADW", "adw_entry_row_get_type", false) | |
| 78 | 78 | return xEntryRowGLibType() | |
| 79 | 79 | } | |
| 80 | 80 | ||
| @@ -88,7 +88,6 @@ var xNewEntryRow func() uintptr | |||
| 88 | 88 | ||
| 89 | 89 | // Creates a new `AdwEntryRow`. | |
| 90 | 90 | func NewEntryRow() *EntryRow { | |
| 91 | - | core.LazyRegister(&xNewEntryRow, "ADW", "adw_entry_row_new", false) | |
| 92 | 91 | var cls *EntryRow | |
| 93 | 92 | ||
| 94 | 93 | cret := xNewEntryRow() | |
| @@ -106,8 +105,6 @@ var xEntryRowAddPrefix func(uintptr, uintptr) | |||
| 106 | 105 | ||
| 107 | 106 | // Adds a prefix widget to @self. | |
| 108 | 107 | func (x *EntryRow) AddPrefix(WidgetVar *gtk.Widget) { | |
| 109 | - | core.LazyRegister(&xEntryRowAddPrefix, "ADW", "adw_entry_row_add_prefix", false) | |
| 110 | - | ||
| 111 | 108 | xEntryRowAddPrefix(x.GoPointer(), WidgetVar.GoPointer()) | |
| 112 | 109 | } | |
| 113 | 110 | ||
| @@ -115,8 +112,6 @@ var xEntryRowAddSuffix func(uintptr, uintptr) | |||
| 115 | 112 | ||
| 116 | 113 | // Adds a suffix widget to @self. | |
| 117 | 114 | func (x *EntryRow) AddSuffix(WidgetVar *gtk.Widget) { | |
| 118 | - | core.LazyRegister(&xEntryRowAddSuffix, "ADW", "adw_entry_row_add_suffix", false) | |
| 119 | - | ||
| 120 | 115 | xEntryRowAddSuffix(x.GoPointer(), WidgetVar.GoPointer()) | |
| 121 | 116 | } | |
| 122 | 117 | ||
| @@ -124,8 +119,6 @@ var xEntryRowGetActivatesDefault func(uintptr) bool | |||
| 124 | 119 | ||
| 125 | 120 | // Gets whether activating the embedded entry can activate the default widget. | |
| 126 | 121 | func (x *EntryRow) GetActivatesDefault() bool { | |
| 127 | - | core.LazyRegister(&xEntryRowGetActivatesDefault, "ADW", "adw_entry_row_get_activates_default", false) | |
| 128 | - | ||
| 129 | 122 | cret := xEntryRowGetActivatesDefault(x.GoPointer()) | |
| 130 | 123 | return cret | |
| 131 | 124 | } | |
| @@ -134,8 +127,6 @@ var xEntryRowGetAttributes func(uintptr) uintptr | |||
| 134 | 127 | ||
| 135 | 128 | // Gets Pango attributes applied to the text of the embedded entry. | |
| 136 | 129 | func (x *EntryRow) GetAttributes() *pango.AttrList { | |
| 137 | - | core.LazyRegister(&xEntryRowGetAttributes, "ADW", "adw_entry_row_get_attributes", false) | |
| 138 | - | ||
| 139 | 130 | cret := xEntryRowGetAttributes(x.GoPointer()) | |
| 140 | 131 | if cret == 0 { | |
| 141 | 132 | return nil | |
| @@ -147,8 +138,6 @@ var xEntryRowGetEnableEmojiCompletion func(uintptr) bool | |||
| 147 | 138 | ||
| 148 | 139 | // Gets whether to suggest emoji replacements on @self. | |
| 149 | 140 | func (x *EntryRow) GetEnableEmojiCompletion() bool { | |
| 150 | - | core.LazyRegister(&xEntryRowGetEnableEmojiCompletion, "ADW", "adw_entry_row_get_enable_emoji_completion", false) | |
| 151 | - | ||
| 152 | 141 | cret := xEntryRowGetEnableEmojiCompletion(x.GoPointer()) | |
| 153 | 142 | return cret | |
| 154 | 143 | } | |
| @@ -157,8 +146,6 @@ var xEntryRowGetInputHints func(uintptr) gtk.InputHints | |||
| 157 | 146 | ||
| 158 | 147 | // Gets the additional input hints of @self. | |
| 159 | 148 | func (x *EntryRow) GetInputHints() gtk.InputHints { | |
| 160 | - | core.LazyRegister(&xEntryRowGetInputHints, "ADW", "adw_entry_row_get_input_hints", false) | |
| 161 | - | ||
| 162 | 149 | cret := xEntryRowGetInputHints(x.GoPointer()) | |
| 163 | 150 | return cret | |
| 164 | 151 | } | |
| @@ -167,8 +154,6 @@ var xEntryRowGetInputPurpose func(uintptr) gtk.InputPurpose | |||
| 167 | 154 | ||
| 168 | 155 | // Gets the input purpose of @self. | |
| 169 | 156 | func (x *EntryRow) GetInputPurpose() gtk.InputPurpose { | |
| 170 | - | core.LazyRegister(&xEntryRowGetInputPurpose, "ADW", "adw_entry_row_get_input_purpose", false) | |
| 171 | - | ||
| 172 | 157 | cret := xEntryRowGetInputPurpose(x.GoPointer()) | |
| 173 | 158 | return cret | |
| 174 | 159 | } | |
| @@ -177,8 +162,6 @@ var xEntryRowGetMaxLength func(uintptr) int | |||
| 177 | 162 | ||
| 178 | 163 | // Retrieves the maximum length of the entry. | |
| 179 | 164 | func (x *EntryRow) GetMaxLength() int { | |
| 180 | - | core.LazyRegister(&xEntryRowGetMaxLength, "ADW", "adw_entry_row_get_max_length", false) | |
| 181 | - | ||
| 182 | 165 | cret := xEntryRowGetMaxLength(x.GoPointer()) | |
| 183 | 166 | return cret | |
| 184 | 167 | } | |
| @@ -187,8 +170,6 @@ var xEntryRowGetShowApplyButton func(uintptr) bool | |||
| 187 | 170 | ||
| 188 | 171 | // Gets whether @self can show the apply button. | |
| 189 | 172 | func (x *EntryRow) GetShowApplyButton() bool { | |
| 190 | - | core.LazyRegister(&xEntryRowGetShowApplyButton, "ADW", "adw_entry_row_get_show_apply_button", false) | |
| 191 | - | ||
| 192 | 173 | cret := xEntryRowGetShowApplyButton(x.GoPointer()) | |
| 193 | 174 | return cret | |
| 194 | 175 | } | |
| @@ -197,8 +178,6 @@ var xEntryRowGetTextLength func(uintptr) uint | |||
| 197 | 178 | ||
| 198 | 179 | // Retrieves the current length of the text in @self. | |
| 199 | 180 | func (x *EntryRow) GetTextLength() uint { | |
| 200 | - | core.LazyRegister(&xEntryRowGetTextLength, "ADW", "adw_entry_row_get_text_length", false) | |
| 201 | - | ||
| 202 | 181 | cret := xEntryRowGetTextLength(x.GoPointer()) | |
| 203 | 182 | return cret | |
| 204 | 183 | } | |
| @@ -209,8 +188,6 @@ var xEntryRowGrabFocusWithoutSelecting func(uintptr) bool | |||
| 209 | 188 | // | |
| 210 | 189 | // See [method@Gtk.Text.grab_focus_without_selecting] for more information. | |
| 211 | 190 | func (x *EntryRow) GrabFocusWithoutSelecting() bool { | |
| 212 | - | core.LazyRegister(&xEntryRowGrabFocusWithoutSelecting, "ADW", "adw_entry_row_grab_focus_without_selecting", false) | |
| 213 | - | ||
| 214 | 191 | cret := xEntryRowGrabFocusWithoutSelecting(x.GoPointer()) | |
| 215 | 192 | return cret | |
| 216 | 193 | } | |
| @@ -219,8 +196,6 @@ var xEntryRowRemove func(uintptr, uintptr) | |||
| 219 | 196 | ||
| 220 | 197 | // Removes a child from @self. | |
| 221 | 198 | func (x *EntryRow) Remove(WidgetVar *gtk.Widget) { | |
| 222 | - | core.LazyRegister(&xEntryRowRemove, "ADW", "adw_entry_row_remove", false) | |
| 223 | - | ||
| 224 | 199 | xEntryRowRemove(x.GoPointer(), WidgetVar.GoPointer()) | |
| 225 | 200 | } | |
| 226 | 201 | ||
| @@ -228,8 +203,6 @@ var xEntryRowSetActivatesDefault func(uintptr, bool) | |||
| 228 | 203 | ||
| 229 | 204 | // Sets whether activating the embedded entry can activate the default widget. | |
| 230 | 205 | func (x *EntryRow) SetActivatesDefault(ActivatesVar bool) { | |
| 231 | - | core.LazyRegister(&xEntryRowSetActivatesDefault, "ADW", "adw_entry_row_set_activates_default", false) | |
| 232 | - | ||
| 233 | 206 | xEntryRowSetActivatesDefault(x.GoPointer(), ActivatesVar) | |
| 234 | 207 | } | |
| 235 | 208 | ||
| @@ -240,8 +213,6 @@ var xEntryRowSetAttributes func(uintptr, *pango.AttrList) | |||
| 240 | 213 | // The [struct@Pango.Attribute]'s `start_index` and `end_index` must refer to | |
| 241 | 214 | // the [class@Gtk.EntryBuffer] text, i.e. without the preedit string. | |
| 242 | 215 | func (x *EntryRow) SetAttributes(AttributesVar *pango.AttrList) { | |
| 243 | - | core.LazyRegister(&xEntryRowSetAttributes, "ADW", "adw_entry_row_set_attributes", false) | |
| 244 | - | ||
| 245 | 216 | xEntryRowSetAttributes(x.GoPointer(), AttributesVar) | |
| 246 | 217 | } | |
| 247 | 218 | ||
| @@ -251,8 +222,6 @@ var xEntryRowSetEnableEmojiCompletion func(uintptr, bool) | |||
| 251 | 222 | // | |
| 252 | 223 | // Emoji replacement is done with :-delimited names, like `:heart:`. | |
| 253 | 224 | func (x *EntryRow) SetEnableEmojiCompletion(EnableEmojiCompletionVar bool) { | |
| 254 | - | core.LazyRegister(&xEntryRowSetEnableEmojiCompletion, "ADW", "adw_entry_row_set_enable_emoji_completion", false) | |
| 255 | - | ||
| 256 | 225 | xEntryRowSetEnableEmojiCompletion(x.GoPointer(), EnableEmojiCompletionVar) | |
| 257 | 226 | } | |
| 258 | 227 | ||
| @@ -264,8 +233,6 @@ var xEntryRowSetInputHints func(uintptr, gtk.InputHints) | |||
| 264 | 233 | // | |
| 265 | 234 | // See also: [property@AdwEntryRow:input-purpose] | |
| 266 | 235 | func (x *EntryRow) SetInputHints(HintsVar gtk.InputHints) { | |
| 267 | - | core.LazyRegister(&xEntryRowSetInputHints, "ADW", "adw_entry_row_set_input_hints", false) | |
| 268 | - | ||
| 269 | 236 | xEntryRowSetInputHints(x.GoPointer(), HintsVar) | |
| 270 | 237 | } | |
| 271 | 238 | ||
| @@ -275,8 +242,6 @@ var xEntryRowSetInputPurpose func(uintptr, gtk.InputPurpose) | |||
| 275 | 242 | // | |
| 276 | 243 | // The input purpose can be used by input methods to adjust their behavior. | |
| 277 | 244 | func (x *EntryRow) SetInputPurpose(PurposeVar gtk.InputPurpose) { | |
| 278 | - | core.LazyRegister(&xEntryRowSetInputPurpose, "ADW", "adw_entry_row_set_input_purpose", false) | |
| 279 | - | ||
| 280 | 245 | xEntryRowSetInputPurpose(x.GoPointer(), PurposeVar) | |
| 281 | 246 | } | |
| 282 | 247 | ||
| @@ -284,8 +249,6 @@ var xEntryRowSetMaxLength func(uintptr, int) | |||
| 284 | 249 | ||
| 285 | 250 | // Sets the maximum length of the entry. | |
| 286 | 251 | func (x *EntryRow) SetMaxLength(MaxLengthVar int) { | |
| 287 | - | core.LazyRegister(&xEntryRowSetMaxLength, "ADW", "adw_entry_row_set_max_length", false) | |
| 288 | - | ||
| 289 | 252 | xEntryRowSetMaxLength(x.GoPointer(), MaxLengthVar) | |
| 290 | 253 | } | |
| 291 | 254 | ||
| @@ -301,8 +264,6 @@ var xEntryRowSetShowApplyButton func(uintptr, bool) | |||
| 301 | 264 | // operation, e.g. network activity, to avoid triggering it after typing every | |
| 302 | 265 | // character. | |
| 303 | 266 | func (x *EntryRow) SetShowApplyButton(ShowApplyButtonVar bool) { | |
| 304 | - | core.LazyRegister(&xEntryRowSetShowApplyButton, "ADW", "adw_entry_row_set_show_apply_button", false) | |
| 305 | - | ||
| 306 | 267 | xEntryRowSetShowApplyButton(x.GoPointer(), ShowApplyButtonVar) | |
| 307 | 268 | } | |
| 308 | 269 | ||
| @@ -1074,4 +1035,36 @@ func (x *EntryRow) SetWidthChars(NCharsVar int) { | |||
| 1074 | 1035 | func init() { | |
| 1075 | 1036 | core.SetPackageName("ADW", "libadwaita-1") | |
| 1076 | 1037 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | |
| 1038 | + | var libs []uintptr | |
| 1039 | + | for _, libPath := range core.GetPaths("ADW") { | |
| 1040 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 1041 | + | if err != nil { | |
| 1042 | + | panic(err) | |
| 1043 | + | } | |
| 1044 | + | libs = append(libs, lib) | |
| 1045 | + | } | |
| 1046 | + | ||
| 1047 | + | core.PuregoSafeRegister(&xEntryRowGLibType, libs, "adw_entry_row_get_type") | |
| 1048 | + | ||
| 1049 | + | core.PuregoSafeRegister(&xNewEntryRow, libs, "adw_entry_row_new") | |
| 1050 | + | ||
| 1051 | + | core.PuregoSafeRegister(&xEntryRowAddPrefix, libs, "adw_entry_row_add_prefix") | |
| 1052 | + | core.PuregoSafeRegister(&xEntryRowAddSuffix, libs, "adw_entry_row_add_suffix") | |
| 1053 | + | core.PuregoSafeRegister(&xEntryRowGetActivatesDefault, libs, "adw_entry_row_get_activates_default") | |
| 1054 | + | core.PuregoSafeRegister(&xEntryRowGetAttributes, libs, "adw_entry_row_get_attributes") | |
| 1055 | + | core.PuregoSafeRegister(&xEntryRowGetEnableEmojiCompletion, libs, "adw_entry_row_get_enable_emoji_completion") | |
| 1056 | + | core.PuregoSafeRegister(&xEntryRowGetInputHints, libs, "adw_entry_row_get_input_hints") | |
| 1057 | + | core.PuregoSafeRegister(&xEntryRowGetInputPurpose, libs, "adw_entry_row_get_input_purpose") | |
| 1058 | + | core.PuregoSafeRegister(&xEntryRowGetMaxLength, libs, "adw_entry_row_get_max_length") | |
| 1059 | + | core.PuregoSafeRegister(&xEntryRowGetShowApplyButton, libs, "adw_entry_row_get_show_apply_button") | |
| 1060 | + | core.PuregoSafeRegister(&xEntryRowGetTextLength, libs, "adw_entry_row_get_text_length") | |
| 1061 | + | core.PuregoSafeRegister(&xEntryRowGrabFocusWithoutSelecting, libs, "adw_entry_row_grab_focus_without_selecting") | |
| 1062 | + | core.PuregoSafeRegister(&xEntryRowRemove, libs, "adw_entry_row_remove") | |
| 1063 | + | core.PuregoSafeRegister(&xEntryRowSetActivatesDefault, libs, "adw_entry_row_set_activates_default") | |
| 1064 | + | core.PuregoSafeRegister(&xEntryRowSetAttributes, libs, "adw_entry_row_set_attributes") | |
| 1065 | + | core.PuregoSafeRegister(&xEntryRowSetEnableEmojiCompletion, libs, "adw_entry_row_set_enable_emoji_completion") | |
| 1066 | + | core.PuregoSafeRegister(&xEntryRowSetInputHints, libs, "adw_entry_row_set_input_hints") | |
| 1067 | + | core.PuregoSafeRegister(&xEntryRowSetInputPurpose, libs, "adw_entry_row_set_input_purpose") | |
| 1068 | + | core.PuregoSafeRegister(&xEntryRowSetMaxLength, libs, "adw_entry_row_set_max_length") | |
| 1069 | + | core.PuregoSafeRegister(&xEntryRowSetShowApplyButton, libs, "adw_entry_row_set_show_apply_button") | |
| 1077 | 1070 | } | |
| @@ -5,6 +5,7 @@ import ( | |||||
| 5 | "structs" | 5 | "structs" | ||
| 6 | "unsafe" | 6 | "unsafe" | ||
| 7 | 7 | ||||
| 8 | + | "github.com/bnema/purego" | |||
| 8 | "github.com/bnema/puregotk/pkg/core" | 9 | "github.com/bnema/puregotk/pkg/core" | ||
| 9 | "github.com/bnema/puregotk/v4/glib" | 10 | "github.com/bnema/puregotk/v4/glib" | ||
| 10 | "github.com/bnema/puregotk/v4/gobject" | 11 | "github.com/bnema/puregotk/v4/gobject" | ||
| @@ -74,7 +75,6 @@ type EntryRow struct { | |||||
| 74 | var xEntryRowGLibType func() types.GType | 75 | var xEntryRowGLibType func() types.GType | ||
| 75 | 76 | ||||
| 76 | func EntryRowGLibType() types.GType { | 77 | func EntryRowGLibType() types.GType { | ||
| 77 | - | core.LazyRegister(&xEntryRowGLibType, "ADW", "adw_entry_row_get_type", false) | |||
| 78 | return xEntryRowGLibType() | 78 | return xEntryRowGLibType() | ||
| 79 | } | 79 | } | ||
| 80 | 80 | ||||
| @@ -88,7 +88,6 @@ var xNewEntryRow func() uintptr | |||||
| 88 | 88 | ||||
| 89 | // Creates a new `AdwEntryRow`. | 89 | // Creates a new `AdwEntryRow`. | ||
| 90 | func NewEntryRow() *EntryRow { | 90 | func NewEntryRow() *EntryRow { | ||
| 91 | - | core.LazyRegister(&xNewEntryRow, "ADW", "adw_entry_row_new", false) | |||
| 92 | var cls *EntryRow | 91 | var cls *EntryRow | ||
| 93 | 92 | ||||
| 94 | cret := xNewEntryRow() | 93 | cret := xNewEntryRow() | ||
| @@ -106,8 +105,6 @@ var xEntryRowAddPrefix func(uintptr, uintptr) | |||||
| 106 | 105 | ||||
| 107 | // Adds a prefix widget to @self. | 106 | // Adds a prefix widget to @self. | ||
| 108 | func (x *EntryRow) AddPrefix(WidgetVar *gtk.Widget) { | 107 | func (x *EntryRow) AddPrefix(WidgetVar *gtk.Widget) { | ||
| 109 | - | core.LazyRegister(&xEntryRowAddPrefix, "ADW", "adw_entry_row_add_prefix", false) | |||
| 110 | - | ||||
| 111 | xEntryRowAddPrefix(x.GoPointer(), WidgetVar.GoPointer()) | 108 | xEntryRowAddPrefix(x.GoPointer(), WidgetVar.GoPointer()) | ||
| 112 | } | 109 | } | ||
| 113 | 110 | ||||
| @@ -115,8 +112,6 @@ var xEntryRowAddSuffix func(uintptr, uintptr) | |||||
| 115 | 112 | ||||
| 116 | // Adds a suffix widget to @self. | 113 | // Adds a suffix widget to @self. | ||
| 117 | func (x *EntryRow) AddSuffix(WidgetVar *gtk.Widget) { | 114 | func (x *EntryRow) AddSuffix(WidgetVar *gtk.Widget) { | ||
| 118 | - | core.LazyRegister(&xEntryRowAddSuffix, "ADW", "adw_entry_row_add_suffix", false) | |||
| 119 | - | ||||
| 120 | xEntryRowAddSuffix(x.GoPointer(), WidgetVar.GoPointer()) | 115 | xEntryRowAddSuffix(x.GoPointer(), WidgetVar.GoPointer()) | ||
| 121 | } | 116 | } | ||
| 122 | 117 | ||||
| @@ -124,8 +119,6 @@ var xEntryRowGetActivatesDefault func(uintptr) bool | |||||
| 124 | 119 | ||||
| 125 | // Gets whether activating the embedded entry can activate the default widget. | 120 | // Gets whether activating the embedded entry can activate the default widget. | ||
| 126 | func (x *EntryRow) GetActivatesDefault() bool { | 121 | func (x *EntryRow) GetActivatesDefault() bool { | ||
| 127 | - | core.LazyRegister(&xEntryRowGetActivatesDefault, "ADW", "adw_entry_row_get_activates_default", false) | |||
| 128 | - | ||||
| 129 | cret := xEntryRowGetActivatesDefault(x.GoPointer()) | 122 | cret := xEntryRowGetActivatesDefault(x.GoPointer()) | ||
| 130 | return cret | 123 | return cret | ||
| 131 | } | 124 | } | ||
| @@ -134,8 +127,6 @@ var xEntryRowGetAttributes func(uintptr) uintptr | |||||
| 134 | 127 | ||||
| 135 | // Gets Pango attributes applied to the text of the embedded entry. | 128 | // Gets Pango attributes applied to the text of the embedded entry. | ||
| 136 | func (x *EntryRow) GetAttributes() *pango.AttrList { | 129 | func (x *EntryRow) GetAttributes() *pango.AttrList { | ||
| 137 | - | core.LazyRegister(&xEntryRowGetAttributes, "ADW", "adw_entry_row_get_attributes", false) | |||
| 138 | - | ||||
| 139 | cret := xEntryRowGetAttributes(x.GoPointer()) | 130 | cret := xEntryRowGetAttributes(x.GoPointer()) | ||
| 140 | if cret == 0 { | 131 | if cret == 0 { | ||
| 141 | return nil | 132 | return nil | ||
| @@ -147,8 +138,6 @@ var xEntryRowGetEnableEmojiCompletion func(uintptr) bool | |||||
| 147 | 138 | ||||
| 148 | // Gets whether to suggest emoji replacements on @self. | 139 | // Gets whether to suggest emoji replacements on @self. | ||
| 149 | func (x *EntryRow) GetEnableEmojiCompletion() bool { | 140 | func (x *EntryRow) GetEnableEmojiCompletion() bool { | ||
| 150 | - | core.LazyRegister(&xEntryRowGetEnableEmojiCompletion, "ADW", "adw_entry_row_get_enable_emoji_completion", false) | |||
| 151 | - | ||||
| 152 | cret := xEntryRowGetEnableEmojiCompletion(x.GoPointer()) | 141 | cret := xEntryRowGetEnableEmojiCompletion(x.GoPointer()) | ||
| 153 | return cret | 142 | return cret | ||
| 154 | } | 143 | } | ||
| @@ -157,8 +146,6 @@ var xEntryRowGetInputHints func(uintptr) gtk.InputHints | |||||
| 157 | 146 | ||||
| 158 | // Gets the additional input hints of @self. | 147 | // Gets the additional input hints of @self. | ||
| 159 | func (x *EntryRow) GetInputHints() gtk.InputHints { | 148 | func (x *EntryRow) GetInputHints() gtk.InputHints { | ||
| 160 | - | core.LazyRegister(&xEntryRowGetInputHints, "ADW", "adw_entry_row_get_input_hints", false) | |||
| 161 | - | ||||
| 162 | cret := xEntryRowGetInputHints(x.GoPointer()) | 149 | cret := xEntryRowGetInputHints(x.GoPointer()) | ||
| 163 | return cret | 150 | return cret | ||
| 164 | } | 151 | } | ||
| @@ -167,8 +154,6 @@ var xEntryRowGetInputPurpose func(uintptr) gtk.InputPurpose | |||||
| 167 | 154 | ||||
| 168 | // Gets the input purpose of @self. | 155 | // Gets the input purpose of @self. | ||
| 169 | func (x *EntryRow) GetInputPurpose() gtk.InputPurpose { | 156 | func (x *EntryRow) GetInputPurpose() gtk.InputPurpose { | ||
| 170 | - | core.LazyRegister(&xEntryRowGetInputPurpose, "ADW", "adw_entry_row_get_input_purpose", false) | |||
| 171 | - | ||||
| 172 | cret := xEntryRowGetInputPurpose(x.GoPointer()) | 157 | cret := xEntryRowGetInputPurpose(x.GoPointer()) | ||
| 173 | return cret | 158 | return cret | ||
| 174 | } | 159 | } | ||
| @@ -177,8 +162,6 @@ var xEntryRowGetMaxLength func(uintptr) int | |||||
| 177 | 162 | ||||
| 178 | // Retrieves the maximum length of the entry. | 163 | // Retrieves the maximum length of the entry. | ||
| 179 | func (x *EntryRow) GetMaxLength() int { | 164 | func (x *EntryRow) GetMaxLength() int { | ||
| 180 | - | core.LazyRegister(&xEntryRowGetMaxLength, "ADW", "adw_entry_row_get_max_length", false) | |||
| 181 | - | ||||
| 182 | cret := xEntryRowGetMaxLength(x.GoPointer()) | 165 | cret := xEntryRowGetMaxLength(x.GoPointer()) | ||
| 183 | return cret | 166 | return cret | ||
| 184 | } | 167 | } | ||
| @@ -187,8 +170,6 @@ var xEntryRowGetShowApplyButton func(uintptr) bool | |||||
| 187 | 170 | ||||
| 188 | // Gets whether @self can show the apply button. | 171 | // Gets whether @self can show the apply button. | ||
| 189 | func (x *EntryRow) GetShowApplyButton() bool { | 172 | func (x *EntryRow) GetShowApplyButton() bool { | ||
| 190 | - | core.LazyRegister(&xEntryRowGetShowApplyButton, "ADW", "adw_entry_row_get_show_apply_button", false) | |||
| 191 | - | ||||
| 192 | cret := xEntryRowGetShowApplyButton(x.GoPointer()) | 173 | cret := xEntryRowGetShowApplyButton(x.GoPointer()) | ||
| 193 | return cret | 174 | return cret | ||
| 194 | } | 175 | } | ||
| @@ -197,8 +178,6 @@ var xEntryRowGetTextLength func(uintptr) uint | |||||
| 197 | 178 | ||||
| 198 | // Retrieves the current length of the text in @self. | 179 | // Retrieves the current length of the text in @self. | ||
| 199 | func (x *EntryRow) GetTextLength() uint { | 180 | func (x *EntryRow) GetTextLength() uint { | ||
| 200 | - | core.LazyRegister(&xEntryRowGetTextLength, "ADW", "adw_entry_row_get_text_length", false) | |||
| 201 | - | ||||
| 202 | cret := xEntryRowGetTextLength(x.GoPointer()) | 181 | cret := xEntryRowGetTextLength(x.GoPointer()) | ||
| 203 | return cret | 182 | return cret | ||
| 204 | } | 183 | } | ||
| @@ -209,8 +188,6 @@ var xEntryRowGrabFocusWithoutSelecting func(uintptr) bool | |||||
| 209 | // | 188 | // | ||
| 210 | // See [method@Gtk.Text.grab_focus_without_selecting] for more information. | 189 | // See [method@Gtk.Text.grab_focus_without_selecting] for more information. | ||
| 211 | func (x *EntryRow) GrabFocusWithoutSelecting() bool { | 190 | func (x *EntryRow) GrabFocusWithoutSelecting() bool { | ||
| 212 | - | core.LazyRegister(&xEntryRowGrabFocusWithoutSelecting, "ADW", "adw_entry_row_grab_focus_without_selecting", false) | |||
| 213 | - | ||||
| 214 | cret := xEntryRowGrabFocusWithoutSelecting(x.GoPointer()) | 191 | cret := xEntryRowGrabFocusWithoutSelecting(x.GoPointer()) | ||
| 215 | return cret | 192 | return cret | ||
| 216 | } | 193 | } | ||
| @@ -219,8 +196,6 @@ var xEntryRowRemove func(uintptr, uintptr) | |||||
| 219 | 196 | ||||
| 220 | // Removes a child from @self. | 197 | // Removes a child from @self. | ||
| 221 | func (x *EntryRow) Remove(WidgetVar *gtk.Widget) { | 198 | func (x *EntryRow) Remove(WidgetVar *gtk.Widget) { | ||
| 222 | - | core.LazyRegister(&xEntryRowRemove, "ADW", "adw_entry_row_remove", false) | |||
| 223 | - | ||||
| 224 | xEntryRowRemove(x.GoPointer(), WidgetVar.GoPointer()) | 199 | xEntryRowRemove(x.GoPointer(), WidgetVar.GoPointer()) | ||
| 225 | } | 200 | } | ||
| 226 | 201 | ||||
| @@ -228,8 +203,6 @@ var xEntryRowSetActivatesDefault func(uintptr, bool) | |||||
| 228 | 203 | ||||
| 229 | // Sets whether activating the embedded entry can activate the default widget. | 204 | // Sets whether activating the embedded entry can activate the default widget. | ||
| 230 | func (x *EntryRow) SetActivatesDefault(ActivatesVar bool) { | 205 | func (x *EntryRow) SetActivatesDefault(ActivatesVar bool) { | ||
| 231 | - | core.LazyRegister(&xEntryRowSetActivatesDefault, "ADW", "adw_entry_row_set_activates_default", false) | |||
| 232 | - | ||||
| 233 | xEntryRowSetActivatesDefault(x.GoPointer(), ActivatesVar) | 206 | xEntryRowSetActivatesDefault(x.GoPointer(), ActivatesVar) | ||
| 234 | } | 207 | } | ||
| 235 | 208 | ||||
| @@ -240,8 +213,6 @@ var xEntryRowSetAttributes func(uintptr, *pango.AttrList) | |||||
| 240 | // The [struct@Pango.Attribute]'s `start_index` and `end_index` must refer to | 213 | // The [struct@Pango.Attribute]'s `start_index` and `end_index` must refer to | ||
| 241 | // the [class@Gtk.EntryBuffer] text, i.e. without the preedit string. | 214 | // the [class@Gtk.EntryBuffer] text, i.e. without the preedit string. | ||
| 242 | func (x *EntryRow) SetAttributes(AttributesVar *pango.AttrList) { | 215 | func (x *EntryRow) SetAttributes(AttributesVar *pango.AttrList) { | ||
| 243 | - | core.LazyRegister(&xEntryRowSetAttributes, "ADW", "adw_entry_row_set_attributes", false) | |||
| 244 | - | ||||
| 245 | xEntryRowSetAttributes(x.GoPointer(), AttributesVar) | 216 | xEntryRowSetAttributes(x.GoPointer(), AttributesVar) | ||
| 246 | } | 217 | } | ||
| 247 | 218 | ||||
| @@ -251,8 +222,6 @@ var xEntryRowSetEnableEmojiCompletion func(uintptr, bool) | |||||
| 251 | // | 222 | // | ||
| 252 | // Emoji replacement is done with :-delimited names, like `:heart:`. | 223 | // Emoji replacement is done with :-delimited names, like `:heart:`. | ||
| 253 | func (x *EntryRow) SetEnableEmojiCompletion(EnableEmojiCompletionVar bool) { | 224 | func (x *EntryRow) SetEnableEmojiCompletion(EnableEmojiCompletionVar bool) { | ||
| 254 | - | core.LazyRegister(&xEntryRowSetEnableEmojiCompletion, "ADW", "adw_entry_row_set_enable_emoji_completion", false) | |||
| 255 | - | ||||
| 256 | xEntryRowSetEnableEmojiCompletion(x.GoPointer(), EnableEmojiCompletionVar) | 225 | xEntryRowSetEnableEmojiCompletion(x.GoPointer(), EnableEmojiCompletionVar) | ||
| 257 | } | 226 | } | ||
| 258 | 227 | ||||
| @@ -264,8 +233,6 @@ var xEntryRowSetInputHints func(uintptr, gtk.InputHints) | |||||
| 264 | // | 233 | // | ||
| 265 | // See also: [property@AdwEntryRow:input-purpose] | 234 | // See also: [property@AdwEntryRow:input-purpose] | ||
| 266 | func (x *EntryRow) SetInputHints(HintsVar gtk.InputHints) { | 235 | func (x *EntryRow) SetInputHints(HintsVar gtk.InputHints) { | ||
| 267 | - | core.LazyRegister(&xEntryRowSetInputHints, "ADW", "adw_entry_row_set_input_hints", false) | |||
| 268 | - | ||||
| 269 | xEntryRowSetInputHints(x.GoPointer(), HintsVar) | 236 | xEntryRowSetInputHints(x.GoPointer(), HintsVar) | ||
| 270 | } | 237 | } | ||
| 271 | 238 | ||||
| @@ -275,8 +242,6 @@ var xEntryRowSetInputPurpose func(uintptr, gtk.InputPurpose) | |||||
| 275 | // | 242 | // | ||
| 276 | // The input purpose can be used by input methods to adjust their behavior. | 243 | // The input purpose can be used by input methods to adjust their behavior. | ||
| 277 | func (x *EntryRow) SetInputPurpose(PurposeVar gtk.InputPurpose) { | 244 | func (x *EntryRow) SetInputPurpose(PurposeVar gtk.InputPurpose) { | ||
| 278 | - | core.LazyRegister(&xEntryRowSetInputPurpose, "ADW", "adw_entry_row_set_input_purpose", false) | |||
| 279 | - | ||||
| 280 | xEntryRowSetInputPurpose(x.GoPointer(), PurposeVar) | 245 | xEntryRowSetInputPurpose(x.GoPointer(), PurposeVar) | ||
| 281 | } | 246 | } | ||
| 282 | 247 | ||||
| @@ -284,8 +249,6 @@ var xEntryRowSetMaxLength func(uintptr, int) | |||||
| 284 | 249 | ||||
| 285 | // Sets the maximum length of the entry. | 250 | // Sets the maximum length of the entry. | ||
| 286 | func (x *EntryRow) SetMaxLength(MaxLengthVar int) { | 251 | func (x *EntryRow) SetMaxLength(MaxLengthVar int) { | ||
| 287 | - | core.LazyRegister(&xEntryRowSetMaxLength, "ADW", "adw_entry_row_set_max_length", false) | |||
| 288 | - | ||||
| 289 | xEntryRowSetMaxLength(x.GoPointer(), MaxLengthVar) | 252 | xEntryRowSetMaxLength(x.GoPointer(), MaxLengthVar) | ||
| 290 | } | 253 | } | ||
| 291 | 254 | ||||
| @@ -301,8 +264,6 @@ var xEntryRowSetShowApplyButton func(uintptr, bool) | |||||
| 301 | // operation, e.g. network activity, to avoid triggering it after typing every | 264 | // operation, e.g. network activity, to avoid triggering it after typing every | ||
| 302 | // character. | 265 | // character. | ||
| 303 | func (x *EntryRow) SetShowApplyButton(ShowApplyButtonVar bool) { | 266 | func (x *EntryRow) SetShowApplyButton(ShowApplyButtonVar bool) { | ||
| 304 | - | core.LazyRegister(&xEntryRowSetShowApplyButton, "ADW", "adw_entry_row_set_show_apply_button", false) | |||
| 305 | - | ||||
| 306 | xEntryRowSetShowApplyButton(x.GoPointer(), ShowApplyButtonVar) | 267 | xEntryRowSetShowApplyButton(x.GoPointer(), ShowApplyButtonVar) | ||
| 307 | } | 268 | } | ||
| 308 | 269 | ||||
| @@ -1074,4 +1035,36 @@ func (x *EntryRow) SetWidthChars(NCharsVar int) { | |||||
| 1074 | func init() { | 1035 | func init() { | ||
| 1075 | core.SetPackageName("ADW", "libadwaita-1") | 1036 | core.SetPackageName("ADW", "libadwaita-1") | ||
| 1076 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | 1037 | core.SetSharedLibraries("ADW", []string{"libadwaita-1.so.0", "libadwaita-1.0.dylib"}) | ||
| 1038 | + | var libs []uintptr | |||
| 1039 | + | for _, libPath := range core.GetPaths("ADW") { | |||
| 1040 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 1041 | + | if err != nil { | |||
| 1042 | + | panic(err) | |||
| 1043 | + | } | |||
| 1044 | + | libs = append(libs, lib) | |||
| 1045 | + | } | |||
| 1046 | + | ||||
| 1047 | + | core.PuregoSafeRegister(&xEntryRowGLibType, libs, "adw_entry_row_get_type") | |||
| 1048 | + | ||||
| 1049 | + | core.PuregoSafeRegister(&xNewEntryRow, libs, "adw_entry_row_new") | |||
| 1050 | + | ||||
| 1051 | + | core.PuregoSafeRegister(&xEntryRowAddPrefix, libs, "adw_entry_row_add_prefix") | |||
| 1052 | + | core.PuregoSafeRegister(&xEntryRowAddSuffix, libs, "adw_entry_row_add_suffix") | |||
| 1053 | + | core.PuregoSafeRegister(&xEntryRowGetActivatesDefault, libs, "adw_entry_row_get_activates_default") | |||
| 1054 | + | core.PuregoSafeRegister(&xEntryRowGetAttributes, libs, "adw_entry_row_get_attributes") | |||
| 1055 | + | core.PuregoSafeRegister(&xEntryRowGetEnableEmojiCompletion, libs, "adw_entry_row_get_enable_emoji_completion") | |||
| 1056 | + | core.PuregoSafeRegister(&xEntryRowGetInputHints, libs, "adw_entry_row_get_input_hints") | |||
| 1057 | + | core.PuregoSafeRegister(&xEntryRowGetInputPurpose, libs, "adw_entry_row_get_input_purpose") | |||
| 1058 | + | core.PuregoSafeRegister(&xEntryRowGetMaxLength, libs, "adw_entry_row_get_max_length") | |||
| 1059 | + | core.PuregoSafeRegister(&xEntryRowGetShowApplyButton, libs, "adw_entry_row_get_show_apply_button") | |||
| 1060 | + | core.PuregoSafeRegister(&xEntryRowGetTextLength, libs, "adw_entry_row_get_text_length") | |||
| 1061 | + | core.PuregoSafeRegister(&xEntryRowGrabFocusWithoutSelecting, libs, "adw_entry_row_grab_focus_without_selecting") | |||
| 1062 | + | core.PuregoSafeRegister(&xEntryRowRemove, libs, "adw_entry_row_remove") | |||
| 1063 | + | core.PuregoSafeRegister(&xEntryRowSetActivatesDefault, libs, "adw_entry_row_set_activates_default") | |||
| 1064 | + | core.PuregoSafeRegister(&xEntryRowSetAttributes, libs, "adw_entry_row_set_attributes") | |||
| 1065 | + | core.PuregoSafeRegister(&xEntryRowSetEnableEmojiCompletion, libs, "adw_entry_row_set_enable_emoji_completion") | |||
| 1066 | + | core.PuregoSafeRegister(&xEntryRowSetInputHints, libs, "adw_entry_row_set_input_hints") | |||
| 1067 | + | core.PuregoSafeRegister(&xEntryRowSetInputPurpose, libs, "adw_entry_row_set_input_purpose") | |||
| 1068 | + | core.PuregoSafeRegister(&xEntryRowSetMaxLength, libs, "adw_entry_row_set_max_length") | |||
| 1069 | + | core.PuregoSafeRegister(&xEntryRowSetShowApplyButton, libs, "adw_entry_row_set_show_apply_button") | |||
| 1077 | } | 1070 | } | ||