Merge pull request #349 from bnema/fix/rollback-lazy-puregotk
fix(deps): emergency rollback puregotk lazy registration regression
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 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-enum-list-model.go +22 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-expander-row.go +33 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-flap.go +48 -61 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-fold-threshold-policy.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-header-bar.go +33 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-inline-view-switcher.go +24 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout-slot.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-layout.go +17 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-leaflet.go +56 -69 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-length-unit.go +14 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-main.go +15 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-message-dialog.go +44 -63 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-multi-layout-view.go +23 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-direction.go +1 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-split-view.go +32 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-navigation-view.go +49 -60 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-overlay-split-view.go +38 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-password-entry-row.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-dialog.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-group.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-page.go +33 -38 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-row.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-preferences-window.go +29 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcut-label.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-dialog.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-item.go +25 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-shortcuts-section.go +17 -8 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-item.go +37 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar-section.go +27 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-sidebar.go +39 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spin-row.go +34 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner-paintable.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spinner.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-split-button.go +34 -39 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-animation.go +30 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-spring-params.go +21 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-squeezer.go +44 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-status-page.go +24 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-style-manager.go +28 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipe-tracker.go +30 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-swipeable.go +21 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-switch-row.go +16 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-bar.go +32 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-button.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-overview.go +37 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-tab-view.go +87 -123 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-timed-animation.go +28 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast-overlay.go +18 -9 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toast.go +36 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toggle-group.go +51 -64 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-toolbar-view.go +35 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-version.go +16 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-stack.go +62 -78 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-bar.go +18 -9 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-sidebar.go +22 -15 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher-title.go +23 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-view-switcher.go +20 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window-title.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-window.go +22 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-box.go +46 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-wrap-layout.go +46 -57 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/cairo/main.go +79 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkapplaunchcontext.go +17 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairo.go +16 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcairocontext.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcicpparams.go +25 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkclipboard.go +32 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcolorstate.go +16 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentdeserializer.go +27 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentformats.go +31 -28 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentprovider.go +28 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcontentserializer.go +27 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkcursor.go +21 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevice.go +33 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicepad.go +22 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdevicetool.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplay.go +43 -51 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdisplaymanager.go +20 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexture.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdmabuftexturebuilder.go +41 -53 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrag.go +28 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurface.go +14 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdragsurfacesize.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrawcontext.go +18 -11 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkdrop.go +24 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkenums.go +1 -21 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkevents.go +118 -120 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkframeclock.go +24 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkframetimings.go +20 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkglcontext.go +36 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkgltexture.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkgltexturebuilder.go +35 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkkeys.go +22 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmemorytexture.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmemorytexturebuilder.go +35 -42 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkmonitor.go +27 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpaintable.go +33 -63 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpango.go +12 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpixbuf.go +12 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpopup.go +26 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkpopuplayout.go +32 -36 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkrgba.go +21 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkseat.go +20 -11 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdksnapshot.go +0 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdksurface.go +40 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktexture.go +31 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktoplevel.go +66 -157 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktoplevellayout.go +25 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktoplevelsize.go +16 -9 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdktypes.go +72 -95 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdk/gdkvulkancontext.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-animation.go +32 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-core.go +0 -9 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-io.go +23 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-loader.go +22 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-simple-anim.go +17 -8 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf-transform.go +1 -11 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/gdk-pixbuf.go +79 -102 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gdkpixbuf/main.go +17 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gaction.go +31 -59 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gactiongroup.go +39 -96 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gactionmap.go +21 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gappinfo.go +116 -244 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gapplication.go +55 -79 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gapplicationcommandline.go +27 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gasyncinitable.go +22 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gasyncresult.go +19 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gbufferedinputstream.go +29 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gbufferedoutputstream.go +18 -11 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gbytesicon.go +15 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcancellable.go +27 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcharsetconverter.go +17 -8 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcontenttype.go +26 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gconverter.go +20 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gconverterinputstream.go +14 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gconverteroutputstream.go +14 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gcredentials.go +21 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdatagrambased.go +30 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdatainputstream.go +35 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdataoutputstream.go +23 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusactiongroup.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusaddress.go +17 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusauthobserver.go +16 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusconnection.go +66 -77 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbuserror.go +18 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusinterface.go +19 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusinterfaceskeleton.go +24 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusintrospection.go +56 -54 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusmenumodel.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusmessage.go +64 -88 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusmethodinvocation.go +30 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusnameowning.go +15 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusnamewatching.go +15 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobject.go +17 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectmanager.go +19 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectmanagerclient.go +23 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectmanagerserver.go +20 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectproxy.go +15 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusobjectskeleton.go +18 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusproxy.go +38 -42 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusserver.go +20 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdbusutils.go +22 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdebugcontroller.go +16 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdebugcontrollerdbus.go +14 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdrive.go +82 -214 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdtlsclientconnection.go +24 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdtlsconnection.go +80 -207 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gdtlsserverconnection.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gemblem.go +17 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gemblemedicon.go +18 -9 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfile.go +450 -1148 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileattribute.go +19 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileenumerator.go +35 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileicon.go +15 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileinfo.go +84 -138 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileinputstream.go +23 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileiostream.go +27 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilemonitor.go +15 -9 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilenamecompleter.go +16 -8 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfileoutputstream.go +27 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilterinputstream.go +14 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gfilteroutputstream.go +14 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gicon.go +25 -32 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginetaddress.go +34 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginetaddressmask.go +21 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginetsocketaddress.go +19 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginitable.go +18 -11 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/ginputstream.go +48 -52 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gioenums.go +1 -90 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gioerror.go +13 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giomodule.go +29 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gioscheduler.go +12 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giostream.go +29 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giotypes.go +60 -70 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/giptosmessage.go +16 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gipv6tclassmessage.go +16 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/glistmodel.go +21 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gliststore.go +24 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gloadableicon.go +23 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmemoryinputstream.go +17 -8 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmemorymonitor.go +12 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmemoryoutputstream.go +19 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmenu.go +50 -62 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmenumodel.go +33 -31 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmount.go +86 -215 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gmountoperation.go +32 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnativesocketaddress.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnativevolumemonitor.go +0 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworkaddress.go +21 -11 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworking.go +14 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworkmonitor.go +31 -49 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnetworkservice.go +19 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gnotification.go +26 -26 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/goutputstream.go +72 -86 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpermission.go +33 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpollableinputstream.go +22 -30 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpollableoutputstream.go +27 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpollableutils.go +15 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpowerprofilemonitor.go +16 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gpropertyaction.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxy.go +27 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxyaddress.go +21 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxyaddressenumerator.go +0 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gproxyresolver.go +27 -35 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gremoteactiongroup.go +15 -12 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gresolver.go +67 -75 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gresource.go +23 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gseekable.go +27 -41 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsettings.go +67 -99 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsettingsbackend.go +24 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsettingsschema.go +43 -48 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleaction.go +18 -9 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleactiongroup.go +18 -9 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleasyncresult.go +40 -46 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleiostream.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimplepermission.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsimpleproxyresolver.go +16 -8 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocket.go +72 -87 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketaddress.go +19 -11 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketaddressenumerator.go +20 -13 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketclient.go +44 -54 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketconnectable.go +17 -19 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketconnection.go +21 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketcontrolmessage.go +17 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketlistener.go +25 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsocketservice.go +16 -8 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsrvtarget.go +11 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsubprocess.go +39 -40 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gsubprocesslauncher.go +31 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtask.go +52 -70 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtcpconnection.go +14 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtcpwrapperconnection.go +15 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtestdbus.go +22 -16 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gthemedicon.go +19 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gthreadedresolver.go +0 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gthreadedsocketservice.go +12 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtlsbackend.go +33 -69 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtlscertificate.go +29 -25 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtlsclientconnection.go +29 -55 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtlsconnection.go +46 -56 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtlsdatabase.go +48 -51 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtlsfiledatabase.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtlsinteraction.go +31 -27 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtlspassword.go +22 -20 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gtlsserverconnection.go +13 -2 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gunixconnection.go +20 -11 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gunixcredentialsmessage.go +17 -6 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gunixfdlist.go +19 -11 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/gio/gunixsocketaddress.go +22 -14 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gvfs.go +24 -18 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gvolume.go +58 -143 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gvolumemonitor.go +19 -11 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gzlibcompressor.go +18 -9 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/gzlibdecompressor.go +15 -3 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/gio/main.go +11 -2 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gallocator.go +28 -32 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/garray.go +59 -82 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gasyncqueue.go +39 -56 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gatomic.go +34 -43 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gbacktrace.go +15 -5 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gbase64.go +19 -13 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gbitlock.go +24 -23 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gbookmarkfile.go +61 -69 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gcache.go +15 -10 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gcharset.go +19 -13 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gchecksum.go +25 -23 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gcompletion.go +17 -14 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gconvert.go +28 -25 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gdataset.go +28 -36 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gdate.go +65 -103 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gdatetime.go +66 -107 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gdir.go +19 -12 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/genviron.go +21 -17 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gerror.go +29 -30 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gfileutils.go +38 -45 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/ggettext.go +19 -13 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/ghash.go +53 -81 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/ghmac.go +24 -21 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/ghook.go +26 -28 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/ghostutils.go +18 -11 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/giochannel.go +67 -83 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gkeyfile.go +62 -72 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/glib-types.go +12 -4 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/glist.go +11 -2 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gmain.go +117 -181 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gmappedfile.go +21 -15 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gmarkup.go +43 -51 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gmem.go +31 -44 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gmessages.go +45 -70 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gnode.go +35 -50 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/goption.go +43 -57 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gpathbuf.go +24 -26 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gpattern.go +23 -19 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gpoll.go +13 -3 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gprimes.go +14 -3 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gprintf.go +20 -15 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gqsort.go +15 -5 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gquark.go +19 -13 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gqueue.go +52 -84 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/grand.go +30 -33 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/grcbox.go +27 -29 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/grefcount.go +21 -17 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/grefstring.go +20 -15 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gregex.go +57 -72 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/grel.go +21 -20 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gscanner.go +30 -40 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gsequence.go +49 -74 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gshell.go +16 -5 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gslice.go +21 -17 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gslist.go +11 -2 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gspawn.go +23 -12 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gstdio.go +27 -33 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gstrfuncs.go +71 -115 collapsed to keep the page light
M vendor/github.com/bnema/puregotk/v4/glib/gstring.go +51 -77
| @@ -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/gobject/types" | |
| 10 | 11 | ) | |
| @@ -32,7 +33,6 @@ type String struct { | |||
| 32 | 33 | var xStringGLibType func() types.GType | |
| 33 | 34 | ||
| 34 | 35 | func StringGLibType() types.GType { | |
| 35 | - | core.LazyRegister(&xStringGLibType, "GLIB", "g_gstring_get_type", false) | |
| 36 | 36 | return xStringGLibType() | |
| 37 | 37 | } | |
| 38 | 38 | ||
| @@ -52,8 +52,6 @@ var xNewString func(uintptr) uintptr | |||
| 52 | 52 | ||
| 53 | 53 | // Creates a new #GString, initialized with the given string. | |
| 54 | 54 | func NewString(InitVar *string) *String { | |
| 55 | - | core.LazyRegister(&xNewString, "GLIB", "g_string_new", false) | |
| 56 | - | ||
| 57 | 55 | InitVarPtr := core.GStrdupNullable(InitVar) | |
| 58 | 56 | defer core.GFreeNullable(InitVarPtr) | |
| 59 | 57 | ||
| @@ -74,8 +72,6 @@ var xNewStringLen func(string, int) uintptr | |||
| 74 | 72 | // responsibility to ensure that @init has at least @len addressable | |
| 75 | 73 | // bytes. | |
| 76 | 74 | func NewStringLen(InitVar string, LenVar int) *String { | |
| 77 | - | core.LazyRegister(&xNewStringLen, "GLIB", "g_string_new_len", false) | |
| 78 | - | ||
| 79 | 75 | cret := xNewStringLen(InitVar, LenVar) | |
| 80 | 76 | if cret == 0 { | |
| 81 | 77 | return nil | |
| @@ -91,8 +87,6 @@ var xNewStringTake func(uintptr) uintptr | |||
| 91 | 87 | // modified by the caller. The memory of @init has to be dynamically | |
| 92 | 88 | // allocated and will eventually be freed with g_free(). | |
| 93 | 89 | func NewStringTake(InitVar *string) *String { | |
| 94 | - | core.LazyRegister(&xNewStringTake, "GLIB", "g_string_new_take", false) | |
| 95 | - | ||
| 96 | 90 | InitVarPtr := core.GStrdupNullable(InitVar) | |
| 97 | 91 | defer core.GFreeNullable(InitVarPtr) | |
| 98 | 92 | ||
| @@ -110,8 +104,6 @@ var xStringSizedNew func(uint) uintptr | |||
| 110 | 104 | // text to the string and don't want it to be reallocated | |
| 111 | 105 | // too often. | |
| 112 | 106 | func StringSizedNew(DflSizeVar uint) *String { | |
| 113 | - | core.LazyRegister(&xStringSizedNew, "GLIB", "g_string_sized_new", false) | |
| 114 | - | ||
| 115 | 107 | cret := xStringSizedNew(DflSizeVar) | |
| 116 | 108 | if cret == 0 { | |
| 117 | 109 | return nil | |
| @@ -124,8 +116,6 @@ var xStringAppend func(uintptr, string) uintptr | |||
| 124 | 116 | // Adds a string onto the end of a #GString, expanding | |
| 125 | 117 | // it if necessary. | |
| 126 | 118 | func (x *String) Append(ValVar string) *String { | |
| 127 | - | core.LazyRegister(&xStringAppend, "GLIB", "g_string_append", false) | |
| 128 | - | ||
| 129 | 119 | cret := xStringAppend(x.GoPointer(), ValVar) | |
| 130 | 120 | if cret == 0 { | |
| 131 | 121 | return nil | |
| @@ -138,8 +128,6 @@ var xStringAppendC func(uintptr, byte) uintptr | |||
| 138 | 128 | // Adds a byte onto the end of a #GString, expanding | |
| 139 | 129 | // it if necessary. | |
| 140 | 130 | func (x *String) AppendC(CVar byte) *String { | |
| 141 | - | core.LazyRegister(&xStringAppendC, "GLIB", "g_string_append_c", false) | |
| 142 | - | ||
| 143 | 131 | cret := xStringAppendC(x.GoPointer(), CVar) | |
| 144 | 132 | if cret == 0 { | |
| 145 | 133 | return nil | |
| @@ -159,8 +147,6 @@ var xStringAppendLen func(uintptr, string, int) uintptr | |||
| 159 | 147 | // is considered to request the entire string length. This | |
| 160 | 148 | // makes g_string_append_len() equivalent to g_string_append(). | |
| 161 | 149 | func (x *String) AppendLen(ValVar string, LenVar int) *String { | |
| 162 | - | core.LazyRegister(&xStringAppendLen, "GLIB", "g_string_append_len", false) | |
| 163 | - | ||
| 164 | 150 | cret := xStringAppendLen(x.GoPointer(), ValVar, LenVar) | |
| 165 | 151 | if cret == 0 { | |
| 166 | 152 | return nil | |
| @@ -174,8 +160,6 @@ var xStringAppendPrintf func(uintptr, string, ...interface{}) | |||
| 174 | 160 | // This function is similar to g_string_printf() except | |
| 175 | 161 | // that the text is appended to the #GString. | |
| 176 | 162 | func (x *String) AppendPrintf(FormatVar string, varArgs ...interface{}) { | |
| 177 | - | core.LazyRegister(&xStringAppendPrintf, "GLIB", "g_string_append_printf", false) | |
| 178 | - | ||
| 179 | 163 | xStringAppendPrintf(x.GoPointer(), FormatVar, varArgs...) | |
| 180 | 164 | } | |
| 181 | 165 | ||
| @@ -184,8 +168,6 @@ var xStringAppendUnichar func(uintptr, uint32) uintptr | |||
| 184 | 168 | // Converts a Unicode character into UTF-8, and appends it | |
| 185 | 169 | // to the string. | |
| 186 | 170 | func (x *String) AppendUnichar(WcVar uint32) *String { | |
| 187 | - | core.LazyRegister(&xStringAppendUnichar, "GLIB", "g_string_append_unichar", false) | |
| 188 | - | ||
| 189 | 171 | cret := xStringAppendUnichar(x.GoPointer(), WcVar) | |
| 190 | 172 | if cret == 0 { | |
| 191 | 173 | return nil | |
| @@ -198,8 +180,6 @@ var xStringAppendUriEscaped func(uintptr, string, string, bool) uintptr | |||
| 198 | 180 | // Appends @unescaped to @string, escaping any characters that | |
| 199 | 181 | // are reserved in URIs using URI-style escape sequences. | |
| 200 | 182 | func (x *String) AppendUriEscaped(UnescapedVar string, ReservedCharsAllowedVar string, AllowUtf8Var bool) *String { | |
| 201 | - | core.LazyRegister(&xStringAppendUriEscaped, "GLIB", "g_string_append_uri_escaped", false) | |
| 202 | - | ||
| 203 | 183 | cret := xStringAppendUriEscaped(x.GoPointer(), UnescapedVar, ReservedCharsAllowedVar, AllowUtf8Var) | |
| 204 | 184 | if cret == 0 { | |
| 205 | 185 | return nil | |
| @@ -214,8 +194,6 @@ var xStringAppendVprintf func(uintptr, string, []interface{}) | |||
| 214 | 194 | // except that the arguments to the format string are passed | |
| 215 | 195 | // as a va_list. | |
| 216 | 196 | func (x *String) AppendVprintf(FormatVar string, ArgsVar []interface{}) { | |
| 217 | - | core.LazyRegister(&xStringAppendVprintf, "GLIB", "g_string_append_vprintf", false) | |
| 218 | - | ||
| 219 | 197 | xStringAppendVprintf(x.GoPointer(), FormatVar, ArgsVar) | |
| 220 | 198 | } | |
| 221 | 199 | ||
| @@ -223,8 +201,6 @@ var xStringAsciiDown func(uintptr) uintptr | |||
| 223 | 201 | ||
| 224 | 202 | // Converts all uppercase ASCII letters to lowercase ASCII letters. | |
| 225 | 203 | func (x *String) AsciiDown() *String { | |
| 226 | - | core.LazyRegister(&xStringAsciiDown, "GLIB", "g_string_ascii_down", false) | |
| 227 | - | ||
| 228 | 204 | cret := xStringAsciiDown(x.GoPointer()) | |
| 229 | 205 | if cret == 0 { | |
| 230 | 206 | return nil | |
| @@ -236,8 +212,6 @@ var xStringAsciiUp func(uintptr) uintptr | |||
| 236 | 212 | ||
| 237 | 213 | // Converts all lowercase ASCII letters to uppercase ASCII letters. | |
| 238 | 214 | func (x *String) AsciiUp() *String { | |
| 239 | - | core.LazyRegister(&xStringAsciiUp, "GLIB", "g_string_ascii_up", false) | |
| 240 | - | ||
| 241 | 215 | cret := xStringAsciiUp(x.GoPointer()) | |
| 242 | 216 | if cret == 0 { | |
| 243 | 217 | return nil | |
| @@ -252,8 +226,6 @@ var xStringAssign func(uintptr, string) uintptr | |||
| 252 | 226 | // the standard strcpy() function, except that you do not | |
| 253 | 227 | // have to worry about having enough space to copy the string. | |
| 254 | 228 | func (x *String) Assign(RvalVar string) *String { | |
| 255 | - | core.LazyRegister(&xStringAssign, "GLIB", "g_string_assign", false) | |
| 256 | - | ||
| 257 | 229 | cret := xStringAssign(x.GoPointer(), RvalVar) | |
| 258 | 230 | if cret == 0 { | |
| 259 | 231 | return nil | |
| @@ -268,8 +240,6 @@ var xStringCopy func(uintptr) uintptr | |||
| 268 | 240 | // This will preserve the allocation length of the [struct@GLib.String] in the | |
| 269 | 241 | // copy. | |
| 270 | 242 | func (x *String) Copy() *String { | |
| 271 | - | core.LazyRegister(&xStringCopy, "GLIB", "g_string_copy", false) | |
| 272 | - | ||
| 273 | 243 | cret := xStringCopy(x.GoPointer()) | |
| 274 | 244 | if cret == 0 { | |
| 275 | 245 | return nil | |
| @@ -281,8 +251,6 @@ var xStringDown func(uintptr) uintptr | |||
| 281 | 251 | ||
| 282 | 252 | // Converts a #GString to lowercase. | |
| 283 | 253 | func (x *String) Down() *String { | |
| 284 | - | core.LazyRegister(&xStringDown, "GLIB", "g_string_down", false) | |
| 285 | - | ||
| 286 | 254 | cret := xStringDown(x.GoPointer()) | |
| 287 | 255 | if cret == 0 { | |
| 288 | 256 | return nil | |
| @@ -295,8 +263,6 @@ var xStringEqual func(uintptr, *String) bool | |||
| 295 | 263 | // Compares two strings for equality, returning %TRUE if they are equal. | |
| 296 | 264 | // For use with #GHashTable. | |
| 297 | 265 | func (x *String) Equal(V2Var *String) bool { | |
| 298 | - | core.LazyRegister(&xStringEqual, "GLIB", "g_string_equal", false) | |
| 299 | - | ||
| 300 | 266 | cret := xStringEqual(x.GoPointer(), V2Var) | |
| 301 | 267 | return cret | |
| 302 | 268 | } | |
| @@ -306,8 +272,6 @@ var xStringErase func(uintptr, int, int) uintptr | |||
| 306 | 272 | // Removes @len bytes from a #GString, starting at position @pos. | |
| 307 | 273 | // The rest of the #GString is shifted down to fill the gap. | |
| 308 | 274 | func (x *String) Erase(PosVar int, LenVar int) *String { | |
| 309 | - | core.LazyRegister(&xStringErase, "GLIB", "g_string_erase", false) | |
| 310 | - | ||
| 311 | 275 | cret := xStringErase(x.GoPointer(), PosVar, LenVar) | |
| 312 | 276 | if cret == 0 { | |
| 313 | 277 | return nil | |
| @@ -325,8 +289,6 @@ var xStringFree func(uintptr, bool) string | |||
| 325 | 289 | // Instead of passing %FALSE to this function, consider using | |
| 326 | 290 | // g_string_free_and_steal(). | |
| 327 | 291 | func (x *String) Free(FreeSegmentVar bool) string { | |
| 328 | - | core.LazyRegister(&xStringFree, "GLIB", "g_string_free", false) | |
| 329 | - | ||
| 330 | 292 | cret := xStringFree(x.GoPointer(), FreeSegmentVar) | |
| 331 | 293 | return cret | |
| 332 | 294 | } | |
| @@ -338,8 +300,6 @@ var xStringFreeAndSteal func(uintptr) string | |||
| 338 | 300 | // The caller gains ownership of the buffer and | |
| 339 | 301 | // must free it after use with g_free(). | |
| 340 | 302 | func (x *String) FreeAndSteal() string { | |
| 341 | - | core.LazyRegister(&xStringFreeAndSteal, "GLIB", "g_string_free_and_steal", false) | |
| 342 | - | ||
| 343 | 303 | cret := xStringFreeAndSteal(x.GoPointer()) | |
| 344 | 304 | return cret | |
| 345 | 305 | } | |
| @@ -355,8 +315,6 @@ var xStringFreeToBytes func(uintptr) uintptr | |||
| 355 | 315 | // #GBytes does not include this extra nul; i.e. it has length exactly | |
| 356 | 316 | // equal to the "len" member. | |
| 357 | 317 | func (x *String) FreeToBytes() *Bytes { | |
| 358 | - | core.LazyRegister(&xStringFreeToBytes, "GLIB", "g_string_free_to_bytes", false) | |
| 359 | - | ||
| 360 | 318 | cret := xStringFreeToBytes(x.GoPointer()) | |
| 361 | 319 | if cret == 0 { | |
| 362 | 320 | return nil | |
| @@ -368,8 +326,6 @@ var xStringHash func(uintptr) uint | |||
| 368 | 326 | ||
| 369 | 327 | // Creates a hash code for @str; for use with #GHashTable. | |
| 370 | 328 | func (x *String) Hash() uint { | |
| 371 | - | core.LazyRegister(&xStringHash, "GLIB", "g_string_hash", false) | |
| 372 | - | ||
| 373 | 329 | cret := xStringHash(x.GoPointer()) | |
| 374 | 330 | return cret | |
| 375 | 331 | } | |
| @@ -379,8 +335,6 @@ var xStringInsert func(uintptr, int, string) uintptr | |||
| 379 | 335 | // Inserts a copy of a string into a #GString, | |
| 380 | 336 | // expanding it if necessary. | |
| 381 | 337 | func (x *String) Insert(PosVar int, ValVar string) *String { | |
| 382 | - | core.LazyRegister(&xStringInsert, "GLIB", "g_string_insert", false) | |
| 383 | - | ||
| 384 | 338 | cret := xStringInsert(x.GoPointer(), PosVar, ValVar) | |
| 385 | 339 | if cret == 0 { | |
| 386 | 340 | return nil | |
| @@ -392,8 +346,6 @@ var xStringInsertC func(uintptr, int, byte) uintptr | |||
| 392 | 346 | ||
| 393 | 347 | // Inserts a byte into a #GString, expanding it if necessary. | |
| 394 | 348 | func (x *String) InsertC(PosVar int, CVar byte) *String { | |
| 395 | - | core.LazyRegister(&xStringInsertC, "GLIB", "g_string_insert_c", false) | |
| 396 | - | ||
| 397 | 349 | cret := xStringInsertC(x.GoPointer(), PosVar, CVar) | |
| 398 | 350 | if cret == 0 { | |
| 399 | 351 | return nil | |
| @@ -414,8 +366,6 @@ var xStringInsertLen func(uintptr, int, string, int) uintptr | |||
| 414 | 366 | // | |
| 415 | 367 | // If @pos is -1, bytes are inserted at the end of the string. | |
| 416 | 368 | func (x *String) InsertLen(PosVar int, ValVar string, LenVar int) *String { | |
| 417 | - | core.LazyRegister(&xStringInsertLen, "GLIB", "g_string_insert_len", false) | |
| 418 | - | ||
| 419 | 369 | cret := xStringInsertLen(x.GoPointer(), PosVar, ValVar, LenVar) | |
| 420 | 370 | if cret == 0 { | |
| 421 | 371 | return nil | |
| @@ -428,8 +378,6 @@ var xStringInsertUnichar func(uintptr, int, uint32) uintptr | |||
| 428 | 378 | // Converts a Unicode character into UTF-8, and insert it | |
| 429 | 379 | // into the string at the given position. | |
| 430 | 380 | func (x *String) InsertUnichar(PosVar int, WcVar uint32) *String { | |
| 431 | - | core.LazyRegister(&xStringInsertUnichar, "GLIB", "g_string_insert_unichar", false) | |
| 432 | - | ||
| 433 | 381 | cret := xStringInsertUnichar(x.GoPointer(), PosVar, WcVar) | |
| 434 | 382 | if cret == 0 { | |
| 435 | 383 | return nil | |
| @@ -441,8 +389,6 @@ var xStringOverwrite func(uintptr, uint, string) uintptr | |||
| 441 | 389 | ||
| 442 | 390 | // Overwrites part of a string, lengthening it if necessary. | |
| 443 | 391 | func (x *String) Overwrite(PosVar uint, ValVar string) *String { | |
| 444 | - | core.LazyRegister(&xStringOverwrite, "GLIB", "g_string_overwrite", false) | |
| 445 | - | ||
| 446 | 392 | cret := xStringOverwrite(x.GoPointer(), PosVar, ValVar) | |
| 447 | 393 | if cret == 0 { | |
| 448 | 394 | return nil | |
| @@ -455,8 +401,6 @@ var xStringOverwriteLen func(uintptr, uint, string, int) uintptr | |||
| 455 | 401 | // Overwrites part of a string, lengthening it if necessary. | |
| 456 | 402 | // This function will work with embedded nuls. | |
| 457 | 403 | func (x *String) OverwriteLen(PosVar uint, ValVar string, LenVar int) *String { | |
| 458 | - | core.LazyRegister(&xStringOverwriteLen, "GLIB", "g_string_overwrite_len", false) | |
| 459 | - | ||
| 460 | 404 | cret := xStringOverwriteLen(x.GoPointer(), PosVar, ValVar, LenVar) | |
| 461 | 405 | if cret == 0 { | |
| 462 | 406 | return nil | |
| @@ -469,8 +413,6 @@ var xStringPrepend func(uintptr, string) uintptr | |||
| 469 | 413 | // Adds a string on to the start of a #GString, | |
| 470 | 414 | // expanding it if necessary. | |
| 471 | 415 | func (x *String) Prepend(ValVar string) *String { | |
| 472 | - | core.LazyRegister(&xStringPrepend, "GLIB", "g_string_prepend", false) | |
| 473 | - | ||
| 474 | 416 | cret := xStringPrepend(x.GoPointer(), ValVar) | |
| 475 | 417 | if cret == 0 { | |
| 476 | 418 | return nil | |
| @@ -483,8 +425,6 @@ var xStringPrependC func(uintptr, byte) uintptr | |||
| 483 | 425 | // Adds a byte onto the start of a #GString, | |
| 484 | 426 | // expanding it if necessary. | |
| 485 | 427 | func (x *String) PrependC(CVar byte) *String { | |
| 486 | - | core.LazyRegister(&xStringPrependC, "GLIB", "g_string_prepend_c", false) | |
| 487 | - | ||
| 488 | 428 | cret := xStringPrependC(x.GoPointer(), CVar) | |
| 489 | 429 | if cret == 0 { | |
| 490 | 430 | return nil | |
| @@ -504,8 +444,6 @@ var xStringPrependLen func(uintptr, string, int) uintptr | |||
| 504 | 444 | // is considered to request the entire string length. This | |
| 505 | 445 | // makes g_string_prepend_len() equivalent to g_string_prepend(). | |
| 506 | 446 | func (x *String) PrependLen(ValVar string, LenVar int) *String { | |
| 507 | - | core.LazyRegister(&xStringPrependLen, "GLIB", "g_string_prepend_len", false) | |
| 508 | - | ||
| 509 | 447 | cret := xStringPrependLen(x.GoPointer(), ValVar, LenVar) | |
| 510 | 448 | if cret == 0 { | |
| 511 | 449 | return nil | |
| @@ -518,8 +456,6 @@ var xStringPrependUnichar func(uintptr, uint32) uintptr | |||
| 518 | 456 | // Converts a Unicode character into UTF-8, and prepends it | |
| 519 | 457 | // to the string. | |
| 520 | 458 | func (x *String) PrependUnichar(WcVar uint32) *String { | |
| 521 | - | core.LazyRegister(&xStringPrependUnichar, "GLIB", "g_string_prepend_unichar", false) | |
| 522 | - | ||
| 523 | 459 | cret := xStringPrependUnichar(x.GoPointer(), WcVar) | |
| 524 | 460 | if cret == 0 { | |
| 525 | 461 | return nil | |
| @@ -535,8 +471,6 @@ var xStringPrintf func(uintptr, string, ...interface{}) | |||
| 535 | 471 | // to contain the results. The previous contents of the | |
| 536 | 472 | // #GString are destroyed. | |
| 537 | 473 | func (x *String) Printf(FormatVar string, varArgs ...interface{}) { | |
| 538 | - | core.LazyRegister(&xStringPrintf, "GLIB", "g_string_printf", false) | |
| 539 | - | ||
| 540 | 474 | xStringPrintf(x.GoPointer(), FormatVar, varArgs...) | |
| 541 | 475 | } | |
| 542 | 476 | ||
| @@ -556,8 +490,6 @@ var xStringReplace func(uintptr, string, string, uint) uint | |||
| 556 | 490 | // the input string, they will all be replaced, but the return value will | |
| 557 | 491 | // be capped at `G_MAXUINT`. | |
| 558 | 492 | func (x *String) Replace(FindVar string, ReplaceVar string, LimitVar uint) uint { | |
| 559 | - | core.LazyRegister(&xStringReplace, "GLIB", "g_string_replace", false) | |
| 560 | - | ||
| 561 | 493 | cret := xStringReplace(x.GoPointer(), FindVar, ReplaceVar, LimitVar) | |
| 562 | 494 | return cret | |
| 563 | 495 | } | |
| @@ -570,8 +502,6 @@ var xStringSetSize func(uintptr, uint) uintptr | |||
| 570 | 502 | // of the newly added area are undefined. (However, as | |
| 571 | 503 | // always, string->str[string->len] will be a nul byte.) | |
| 572 | 504 | func (x *String) SetSize(LenVar uint) *String { | |
| 573 | - | core.LazyRegister(&xStringSetSize, "GLIB", "g_string_set_size", false) | |
| 574 | - | ||
| 575 | 505 | cret := xStringSetSize(x.GoPointer(), LenVar) | |
| 576 | 506 | if cret == 0 { | |
| 577 | 507 | return nil | |
| @@ -583,8 +513,6 @@ var xStringTruncate func(uintptr, uint) uintptr | |||
| 583 | 513 | ||
| 584 | 514 | // Cuts off the end of the GString, leaving the first @len bytes. | |
| 585 | 515 | func (x *String) Truncate(LenVar uint) *String { | |
| 586 | - | core.LazyRegister(&xStringTruncate, "GLIB", "g_string_truncate", false) | |
| 587 | - | ||
| 588 | 516 | cret := xStringTruncate(x.GoPointer(), LenVar) | |
| 589 | 517 | if cret == 0 { | |
| 590 | 518 | return nil | |
| @@ -596,8 +524,6 @@ var xStringUp func(uintptr) uintptr | |||
| 596 | 524 | ||
| 597 | 525 | // Converts a #GString to uppercase. | |
| 598 | 526 | func (x *String) Up() *String { | |
| 599 | - | core.LazyRegister(&xStringUp, "GLIB", "g_string_up", false) | |
| 600 | - | ||
| 601 | 527 | cret := xStringUp(x.GoPointer()) | |
| 602 | 528 | if cret == 0 { | |
| 603 | 529 | return nil | |
| @@ -611,12 +537,60 @@ var xStringVprintf func(uintptr, string, []interface{}) | |||
| 611 | 537 | // This function is similar to g_string_printf() except that | |
| 612 | 538 | // the arguments to the format string are passed as a va_list. | |
| 613 | 539 | func (x *String) Vprintf(FormatVar string, ArgsVar []interface{}) { | |
| 614 | - | core.LazyRegister(&xStringVprintf, "GLIB", "g_string_vprintf", false) | |
| 615 | - | ||
| 616 | 540 | xStringVprintf(x.GoPointer(), FormatVar, ArgsVar) | |
| 617 | 541 | } | |
| 618 | 542 | ||
| 619 | 543 | func init() { | |
| 620 | 544 | core.SetPackageName("GLIB", "glib-2.0") | |
| 621 | 545 | core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0", "libgobject-2.0.0.dylib", "libglib-2.0.0.dylib"}) | |
| 546 | + | var libs []uintptr | |
| 547 | + | for _, libPath := range core.GetPaths("GLIB") { | |
| 548 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 549 | + | if err != nil { | |
| 550 | + | panic(err) | |
| 551 | + | } | |
| 552 | + | libs = append(libs, lib) | |
| 553 | + | } | |
| 554 | + | ||
| 555 | + | core.PuregoSafeRegister(&xStringGLibType, libs, "g_gstring_get_type") | |
| 556 | + | ||
| 557 | + | core.PuregoSafeRegister(&xNewString, libs, "g_string_new") | |
| 558 | + | core.PuregoSafeRegister(&xNewStringLen, libs, "g_string_new_len") | |
| 559 | + | core.PuregoSafeRegister(&xNewStringTake, libs, "g_string_new_take") | |
| 560 | + | core.PuregoSafeRegister(&xStringSizedNew, libs, "g_string_sized_new") | |
| 561 | + | ||
| 562 | + | core.PuregoSafeRegister(&xStringAppend, libs, "g_string_append") | |
| 563 | + | core.PuregoSafeRegister(&xStringAppendC, libs, "g_string_append_c") | |
| 564 | + | core.PuregoSafeRegister(&xStringAppendLen, libs, "g_string_append_len") | |
| 565 | + | core.PuregoSafeRegister(&xStringAppendPrintf, libs, "g_string_append_printf") | |
| 566 | + | core.PuregoSafeRegister(&xStringAppendUnichar, libs, "g_string_append_unichar") | |
| 567 | + | core.PuregoSafeRegister(&xStringAppendUriEscaped, libs, "g_string_append_uri_escaped") | |
| 568 | + | core.PuregoSafeRegister(&xStringAppendVprintf, libs, "g_string_append_vprintf") | |
| 569 | + | core.PuregoSafeRegister(&xStringAsciiDown, libs, "g_string_ascii_down") | |
| 570 | + | core.PuregoSafeRegister(&xStringAsciiUp, libs, "g_string_ascii_up") | |
| 571 | + | core.PuregoSafeRegister(&xStringAssign, libs, "g_string_assign") | |
| 572 | + | core.PuregoSafeRegister(&xStringCopy, libs, "g_string_copy") | |
| 573 | + | core.PuregoSafeRegister(&xStringDown, libs, "g_string_down") | |
| 574 | + | core.PuregoSafeRegister(&xStringEqual, libs, "g_string_equal") | |
| 575 | + | core.PuregoSafeRegister(&xStringErase, libs, "g_string_erase") | |
| 576 | + | core.PuregoSafeRegister(&xStringFree, libs, "g_string_free") | |
| 577 | + | core.PuregoSafeRegister(&xStringFreeAndSteal, libs, "g_string_free_and_steal") | |
| 578 | + | core.PuregoSafeRegister(&xStringFreeToBytes, libs, "g_string_free_to_bytes") | |
| 579 | + | core.PuregoSafeRegister(&xStringHash, libs, "g_string_hash") | |
| 580 | + | core.PuregoSafeRegister(&xStringInsert, libs, "g_string_insert") | |
| 581 | + | core.PuregoSafeRegister(&xStringInsertC, libs, "g_string_insert_c") | |
| 582 | + | core.PuregoSafeRegister(&xStringInsertLen, libs, "g_string_insert_len") | |
| 583 | + | core.PuregoSafeRegister(&xStringInsertUnichar, libs, "g_string_insert_unichar") | |
| 584 | + | core.PuregoSafeRegister(&xStringOverwrite, libs, "g_string_overwrite") | |
| 585 | + | core.PuregoSafeRegister(&xStringOverwriteLen, libs, "g_string_overwrite_len") | |
| 586 | + | core.PuregoSafeRegister(&xStringPrepend, libs, "g_string_prepend") | |
| 587 | + | core.PuregoSafeRegister(&xStringPrependC, libs, "g_string_prepend_c") | |
| 588 | + | core.PuregoSafeRegister(&xStringPrependLen, libs, "g_string_prepend_len") | |
| 589 | + | core.PuregoSafeRegister(&xStringPrependUnichar, libs, "g_string_prepend_unichar") | |
| 590 | + | core.PuregoSafeRegister(&xStringPrintf, libs, "g_string_printf") | |
| 591 | + | core.PuregoSafeRegister(&xStringReplace, libs, "g_string_replace") | |
| 592 | + | core.PuregoSafeRegister(&xStringSetSize, libs, "g_string_set_size") | |
| 593 | + | core.PuregoSafeRegister(&xStringTruncate, libs, "g_string_truncate") | |
| 594 | + | core.PuregoSafeRegister(&xStringUp, libs, "g_string_up") | |
| 595 | + | core.PuregoSafeRegister(&xStringVprintf, libs, "g_string_vprintf") | |
| 622 | 596 | } | |
| @@ -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/gobject/types" | 10 | "github.com/bnema/puregotk/v4/gobject/types" | ||
| 10 | ) | 11 | ) | ||
| @@ -32,7 +33,6 @@ type String struct { | |||||
| 32 | var xStringGLibType func() types.GType | 33 | var xStringGLibType func() types.GType | ||
| 33 | 34 | ||||
| 34 | func StringGLibType() types.GType { | 35 | func StringGLibType() types.GType { | ||
| 35 | - | core.LazyRegister(&xStringGLibType, "GLIB", "g_gstring_get_type", false) | |||
| 36 | return xStringGLibType() | 36 | return xStringGLibType() | ||
| 37 | } | 37 | } | ||
| 38 | 38 | ||||
| @@ -52,8 +52,6 @@ var xNewString func(uintptr) uintptr | |||||
| 52 | 52 | ||||
| 53 | // Creates a new #GString, initialized with the given string. | 53 | // Creates a new #GString, initialized with the given string. | ||
| 54 | func NewString(InitVar *string) *String { | 54 | func NewString(InitVar *string) *String { | ||
| 55 | - | core.LazyRegister(&xNewString, "GLIB", "g_string_new", false) | |||
| 56 | - | ||||
| 57 | InitVarPtr := core.GStrdupNullable(InitVar) | 55 | InitVarPtr := core.GStrdupNullable(InitVar) | ||
| 58 | defer core.GFreeNullable(InitVarPtr) | 56 | defer core.GFreeNullable(InitVarPtr) | ||
| 59 | 57 | ||||
| @@ -74,8 +72,6 @@ var xNewStringLen func(string, int) uintptr | |||||
| 74 | // responsibility to ensure that @init has at least @len addressable | 72 | // responsibility to ensure that @init has at least @len addressable | ||
| 75 | // bytes. | 73 | // bytes. | ||
| 76 | func NewStringLen(InitVar string, LenVar int) *String { | 74 | func NewStringLen(InitVar string, LenVar int) *String { | ||
| 77 | - | core.LazyRegister(&xNewStringLen, "GLIB", "g_string_new_len", false) | |||
| 78 | - | ||||
| 79 | cret := xNewStringLen(InitVar, LenVar) | 75 | cret := xNewStringLen(InitVar, LenVar) | ||
| 80 | if cret == 0 { | 76 | if cret == 0 { | ||
| 81 | return nil | 77 | return nil | ||
| @@ -91,8 +87,6 @@ var xNewStringTake func(uintptr) uintptr | |||||
| 91 | // modified by the caller. The memory of @init has to be dynamically | 87 | // modified by the caller. The memory of @init has to be dynamically | ||
| 92 | // allocated and will eventually be freed with g_free(). | 88 | // allocated and will eventually be freed with g_free(). | ||
| 93 | func NewStringTake(InitVar *string) *String { | 89 | func NewStringTake(InitVar *string) *String { | ||
| 94 | - | core.LazyRegister(&xNewStringTake, "GLIB", "g_string_new_take", false) | |||
| 95 | - | ||||
| 96 | InitVarPtr := core.GStrdupNullable(InitVar) | 90 | InitVarPtr := core.GStrdupNullable(InitVar) | ||
| 97 | defer core.GFreeNullable(InitVarPtr) | 91 | defer core.GFreeNullable(InitVarPtr) | ||
| 98 | 92 | ||||
| @@ -110,8 +104,6 @@ var xStringSizedNew func(uint) uintptr | |||||
| 110 | // text to the string and don't want it to be reallocated | 104 | // text to the string and don't want it to be reallocated | ||
| 111 | // too often. | 105 | // too often. | ||
| 112 | func StringSizedNew(DflSizeVar uint) *String { | 106 | func StringSizedNew(DflSizeVar uint) *String { | ||
| 113 | - | core.LazyRegister(&xStringSizedNew, "GLIB", "g_string_sized_new", false) | |||
| 114 | - | ||||
| 115 | cret := xStringSizedNew(DflSizeVar) | 107 | cret := xStringSizedNew(DflSizeVar) | ||
| 116 | if cret == 0 { | 108 | if cret == 0 { | ||
| 117 | return nil | 109 | return nil | ||
| @@ -124,8 +116,6 @@ var xStringAppend func(uintptr, string) uintptr | |||||
| 124 | // Adds a string onto the end of a #GString, expanding | 116 | // Adds a string onto the end of a #GString, expanding | ||
| 125 | // it if necessary. | 117 | // it if necessary. | ||
| 126 | func (x *String) Append(ValVar string) *String { | 118 | func (x *String) Append(ValVar string) *String { | ||
| 127 | - | core.LazyRegister(&xStringAppend, "GLIB", "g_string_append", false) | |||
| 128 | - | ||||
| 129 | cret := xStringAppend(x.GoPointer(), ValVar) | 119 | cret := xStringAppend(x.GoPointer(), ValVar) | ||
| 130 | if cret == 0 { | 120 | if cret == 0 { | ||
| 131 | return nil | 121 | return nil | ||
| @@ -138,8 +128,6 @@ var xStringAppendC func(uintptr, byte) uintptr | |||||
| 138 | // Adds a byte onto the end of a #GString, expanding | 128 | // Adds a byte onto the end of a #GString, expanding | ||
| 139 | // it if necessary. | 129 | // it if necessary. | ||
| 140 | func (x *String) AppendC(CVar byte) *String { | 130 | func (x *String) AppendC(CVar byte) *String { | ||
| 141 | - | core.LazyRegister(&xStringAppendC, "GLIB", "g_string_append_c", false) | |||
| 142 | - | ||||
| 143 | cret := xStringAppendC(x.GoPointer(), CVar) | 131 | cret := xStringAppendC(x.GoPointer(), CVar) | ||
| 144 | if cret == 0 { | 132 | if cret == 0 { | ||
| 145 | return nil | 133 | return nil | ||
| @@ -159,8 +147,6 @@ var xStringAppendLen func(uintptr, string, int) uintptr | |||||
| 159 | // is considered to request the entire string length. This | 147 | // is considered to request the entire string length. This | ||
| 160 | // makes g_string_append_len() equivalent to g_string_append(). | 148 | // makes g_string_append_len() equivalent to g_string_append(). | ||
| 161 | func (x *String) AppendLen(ValVar string, LenVar int) *String { | 149 | func (x *String) AppendLen(ValVar string, LenVar int) *String { | ||
| 162 | - | core.LazyRegister(&xStringAppendLen, "GLIB", "g_string_append_len", false) | |||
| 163 | - | ||||
| 164 | cret := xStringAppendLen(x.GoPointer(), ValVar, LenVar) | 150 | cret := xStringAppendLen(x.GoPointer(), ValVar, LenVar) | ||
| 165 | if cret == 0 { | 151 | if cret == 0 { | ||
| 166 | return nil | 152 | return nil | ||
| @@ -174,8 +160,6 @@ var xStringAppendPrintf func(uintptr, string, ...interface{}) | |||||
| 174 | // This function is similar to g_string_printf() except | 160 | // This function is similar to g_string_printf() except | ||
| 175 | // that the text is appended to the #GString. | 161 | // that the text is appended to the #GString. | ||
| 176 | func (x *String) AppendPrintf(FormatVar string, varArgs ...interface{}) { | 162 | func (x *String) AppendPrintf(FormatVar string, varArgs ...interface{}) { | ||
| 177 | - | core.LazyRegister(&xStringAppendPrintf, "GLIB", "g_string_append_printf", false) | |||
| 178 | - | ||||
| 179 | xStringAppendPrintf(x.GoPointer(), FormatVar, varArgs...) | 163 | xStringAppendPrintf(x.GoPointer(), FormatVar, varArgs...) | ||
| 180 | } | 164 | } | ||
| 181 | 165 | ||||
| @@ -184,8 +168,6 @@ var xStringAppendUnichar func(uintptr, uint32) uintptr | |||||
| 184 | // Converts a Unicode character into UTF-8, and appends it | 168 | // Converts a Unicode character into UTF-8, and appends it | ||
| 185 | // to the string. | 169 | // to the string. | ||
| 186 | func (x *String) AppendUnichar(WcVar uint32) *String { | 170 | func (x *String) AppendUnichar(WcVar uint32) *String { | ||
| 187 | - | core.LazyRegister(&xStringAppendUnichar, "GLIB", "g_string_append_unichar", false) | |||
| 188 | - | ||||
| 189 | cret := xStringAppendUnichar(x.GoPointer(), WcVar) | 171 | cret := xStringAppendUnichar(x.GoPointer(), WcVar) | ||
| 190 | if cret == 0 { | 172 | if cret == 0 { | ||
| 191 | return nil | 173 | return nil | ||
| @@ -198,8 +180,6 @@ var xStringAppendUriEscaped func(uintptr, string, string, bool) uintptr | |||||
| 198 | // Appends @unescaped to @string, escaping any characters that | 180 | // Appends @unescaped to @string, escaping any characters that | ||
| 199 | // are reserved in URIs using URI-style escape sequences. | 181 | // are reserved in URIs using URI-style escape sequences. | ||
| 200 | func (x *String) AppendUriEscaped(UnescapedVar string, ReservedCharsAllowedVar string, AllowUtf8Var bool) *String { | 182 | func (x *String) AppendUriEscaped(UnescapedVar string, ReservedCharsAllowedVar string, AllowUtf8Var bool) *String { | ||
| 201 | - | core.LazyRegister(&xStringAppendUriEscaped, "GLIB", "g_string_append_uri_escaped", false) | |||
| 202 | - | ||||
| 203 | cret := xStringAppendUriEscaped(x.GoPointer(), UnescapedVar, ReservedCharsAllowedVar, AllowUtf8Var) | 183 | cret := xStringAppendUriEscaped(x.GoPointer(), UnescapedVar, ReservedCharsAllowedVar, AllowUtf8Var) | ||
| 204 | if cret == 0 { | 184 | if cret == 0 { | ||
| 205 | return nil | 185 | return nil | ||
| @@ -214,8 +194,6 @@ var xStringAppendVprintf func(uintptr, string, []interface{}) | |||||
| 214 | // except that the arguments to the format string are passed | 194 | // except that the arguments to the format string are passed | ||
| 215 | // as a va_list. | 195 | // as a va_list. | ||
| 216 | func (x *String) AppendVprintf(FormatVar string, ArgsVar []interface{}) { | 196 | func (x *String) AppendVprintf(FormatVar string, ArgsVar []interface{}) { | ||
| 217 | - | core.LazyRegister(&xStringAppendVprintf, "GLIB", "g_string_append_vprintf", false) | |||
| 218 | - | ||||
| 219 | xStringAppendVprintf(x.GoPointer(), FormatVar, ArgsVar) | 197 | xStringAppendVprintf(x.GoPointer(), FormatVar, ArgsVar) | ||
| 220 | } | 198 | } | ||
| 221 | 199 | ||||
| @@ -223,8 +201,6 @@ var xStringAsciiDown func(uintptr) uintptr | |||||
| 223 | 201 | ||||
| 224 | // Converts all uppercase ASCII letters to lowercase ASCII letters. | 202 | // Converts all uppercase ASCII letters to lowercase ASCII letters. | ||
| 225 | func (x *String) AsciiDown() *String { | 203 | func (x *String) AsciiDown() *String { | ||
| 226 | - | core.LazyRegister(&xStringAsciiDown, "GLIB", "g_string_ascii_down", false) | |||
| 227 | - | ||||
| 228 | cret := xStringAsciiDown(x.GoPointer()) | 204 | cret := xStringAsciiDown(x.GoPointer()) | ||
| 229 | if cret == 0 { | 205 | if cret == 0 { | ||
| 230 | return nil | 206 | return nil | ||
| @@ -236,8 +212,6 @@ var xStringAsciiUp func(uintptr) uintptr | |||||
| 236 | 212 | ||||
| 237 | // Converts all lowercase ASCII letters to uppercase ASCII letters. | 213 | // Converts all lowercase ASCII letters to uppercase ASCII letters. | ||
| 238 | func (x *String) AsciiUp() *String { | 214 | func (x *String) AsciiUp() *String { | ||
| 239 | - | core.LazyRegister(&xStringAsciiUp, "GLIB", "g_string_ascii_up", false) | |||
| 240 | - | ||||
| 241 | cret := xStringAsciiUp(x.GoPointer()) | 215 | cret := xStringAsciiUp(x.GoPointer()) | ||
| 242 | if cret == 0 { | 216 | if cret == 0 { | ||
| 243 | return nil | 217 | return nil | ||
| @@ -252,8 +226,6 @@ var xStringAssign func(uintptr, string) uintptr | |||||
| 252 | // the standard strcpy() function, except that you do not | 226 | // the standard strcpy() function, except that you do not | ||
| 253 | // have to worry about having enough space to copy the string. | 227 | // have to worry about having enough space to copy the string. | ||
| 254 | func (x *String) Assign(RvalVar string) *String { | 228 | func (x *String) Assign(RvalVar string) *String { | ||
| 255 | - | core.LazyRegister(&xStringAssign, "GLIB", "g_string_assign", false) | |||
| 256 | - | ||||
| 257 | cret := xStringAssign(x.GoPointer(), RvalVar) | 229 | cret := xStringAssign(x.GoPointer(), RvalVar) | ||
| 258 | if cret == 0 { | 230 | if cret == 0 { | ||
| 259 | return nil | 231 | return nil | ||
| @@ -268,8 +240,6 @@ var xStringCopy func(uintptr) uintptr | |||||
| 268 | // This will preserve the allocation length of the [struct@GLib.String] in the | 240 | // This will preserve the allocation length of the [struct@GLib.String] in the | ||
| 269 | // copy. | 241 | // copy. | ||
| 270 | func (x *String) Copy() *String { | 242 | func (x *String) Copy() *String { | ||
| 271 | - | core.LazyRegister(&xStringCopy, "GLIB", "g_string_copy", false) | |||
| 272 | - | ||||
| 273 | cret := xStringCopy(x.GoPointer()) | 243 | cret := xStringCopy(x.GoPointer()) | ||
| 274 | if cret == 0 { | 244 | if cret == 0 { | ||
| 275 | return nil | 245 | return nil | ||
| @@ -281,8 +251,6 @@ var xStringDown func(uintptr) uintptr | |||||
| 281 | 251 | ||||
| 282 | // Converts a #GString to lowercase. | 252 | // Converts a #GString to lowercase. | ||
| 283 | func (x *String) Down() *String { | 253 | func (x *String) Down() *String { | ||
| 284 | - | core.LazyRegister(&xStringDown, "GLIB", "g_string_down", false) | |||
| 285 | - | ||||
| 286 | cret := xStringDown(x.GoPointer()) | 254 | cret := xStringDown(x.GoPointer()) | ||
| 287 | if cret == 0 { | 255 | if cret == 0 { | ||
| 288 | return nil | 256 | return nil | ||
| @@ -295,8 +263,6 @@ var xStringEqual func(uintptr, *String) bool | |||||
| 295 | // Compares two strings for equality, returning %TRUE if they are equal. | 263 | // Compares two strings for equality, returning %TRUE if they are equal. | ||
| 296 | // For use with #GHashTable. | 264 | // For use with #GHashTable. | ||
| 297 | func (x *String) Equal(V2Var *String) bool { | 265 | func (x *String) Equal(V2Var *String) bool { | ||
| 298 | - | core.LazyRegister(&xStringEqual, "GLIB", "g_string_equal", false) | |||
| 299 | - | ||||
| 300 | cret := xStringEqual(x.GoPointer(), V2Var) | 266 | cret := xStringEqual(x.GoPointer(), V2Var) | ||
| 301 | return cret | 267 | return cret | ||
| 302 | } | 268 | } | ||
| @@ -306,8 +272,6 @@ var xStringErase func(uintptr, int, int) uintptr | |||||
| 306 | // Removes @len bytes from a #GString, starting at position @pos. | 272 | // Removes @len bytes from a #GString, starting at position @pos. | ||
| 307 | // The rest of the #GString is shifted down to fill the gap. | 273 | // The rest of the #GString is shifted down to fill the gap. | ||
| 308 | func (x *String) Erase(PosVar int, LenVar int) *String { | 274 | func (x *String) Erase(PosVar int, LenVar int) *String { | ||
| 309 | - | core.LazyRegister(&xStringErase, "GLIB", "g_string_erase", false) | |||
| 310 | - | ||||
| 311 | cret := xStringErase(x.GoPointer(), PosVar, LenVar) | 275 | cret := xStringErase(x.GoPointer(), PosVar, LenVar) | ||
| 312 | if cret == 0 { | 276 | if cret == 0 { | ||
| 313 | return nil | 277 | return nil | ||
| @@ -325,8 +289,6 @@ var xStringFree func(uintptr, bool) string | |||||
| 325 | // Instead of passing %FALSE to this function, consider using | 289 | // Instead of passing %FALSE to this function, consider using | ||
| 326 | // g_string_free_and_steal(). | 290 | // g_string_free_and_steal(). | ||
| 327 | func (x *String) Free(FreeSegmentVar bool) string { | 291 | func (x *String) Free(FreeSegmentVar bool) string { | ||
| 328 | - | core.LazyRegister(&xStringFree, "GLIB", "g_string_free", false) | |||
| 329 | - | ||||
| 330 | cret := xStringFree(x.GoPointer(), FreeSegmentVar) | 292 | cret := xStringFree(x.GoPointer(), FreeSegmentVar) | ||
| 331 | return cret | 293 | return cret | ||
| 332 | } | 294 | } | ||
| @@ -338,8 +300,6 @@ var xStringFreeAndSteal func(uintptr) string | |||||
| 338 | // The caller gains ownership of the buffer and | 300 | // The caller gains ownership of the buffer and | ||
| 339 | // must free it after use with g_free(). | 301 | // must free it after use with g_free(). | ||
| 340 | func (x *String) FreeAndSteal() string { | 302 | func (x *String) FreeAndSteal() string { | ||
| 341 | - | core.LazyRegister(&xStringFreeAndSteal, "GLIB", "g_string_free_and_steal", false) | |||
| 342 | - | ||||
| 343 | cret := xStringFreeAndSteal(x.GoPointer()) | 303 | cret := xStringFreeAndSteal(x.GoPointer()) | ||
| 344 | return cret | 304 | return cret | ||
| 345 | } | 305 | } | ||
| @@ -355,8 +315,6 @@ var xStringFreeToBytes func(uintptr) uintptr | |||||
| 355 | // #GBytes does not include this extra nul; i.e. it has length exactly | 315 | // #GBytes does not include this extra nul; i.e. it has length exactly | ||
| 356 | // equal to the "len" member. | 316 | // equal to the "len" member. | ||
| 357 | func (x *String) FreeToBytes() *Bytes { | 317 | func (x *String) FreeToBytes() *Bytes { | ||
| 358 | - | core.LazyRegister(&xStringFreeToBytes, "GLIB", "g_string_free_to_bytes", false) | |||
| 359 | - | ||||
| 360 | cret := xStringFreeToBytes(x.GoPointer()) | 318 | cret := xStringFreeToBytes(x.GoPointer()) | ||
| 361 | if cret == 0 { | 319 | if cret == 0 { | ||
| 362 | return nil | 320 | return nil | ||
| @@ -368,8 +326,6 @@ var xStringHash func(uintptr) uint | |||||
| 368 | 326 | ||||
| 369 | // Creates a hash code for @str; for use with #GHashTable. | 327 | // Creates a hash code for @str; for use with #GHashTable. | ||
| 370 | func (x *String) Hash() uint { | 328 | func (x *String) Hash() uint { | ||
| 371 | - | core.LazyRegister(&xStringHash, "GLIB", "g_string_hash", false) | |||
| 372 | - | ||||
| 373 | cret := xStringHash(x.GoPointer()) | 329 | cret := xStringHash(x.GoPointer()) | ||
| 374 | return cret | 330 | return cret | ||
| 375 | } | 331 | } | ||
| @@ -379,8 +335,6 @@ var xStringInsert func(uintptr, int, string) uintptr | |||||
| 379 | // Inserts a copy of a string into a #GString, | 335 | // Inserts a copy of a string into a #GString, | ||
| 380 | // expanding it if necessary. | 336 | // expanding it if necessary. | ||
| 381 | func (x *String) Insert(PosVar int, ValVar string) *String { | 337 | func (x *String) Insert(PosVar int, ValVar string) *String { | ||
| 382 | - | core.LazyRegister(&xStringInsert, "GLIB", "g_string_insert", false) | |||
| 383 | - | ||||
| 384 | cret := xStringInsert(x.GoPointer(), PosVar, ValVar) | 338 | cret := xStringInsert(x.GoPointer(), PosVar, ValVar) | ||
| 385 | if cret == 0 { | 339 | if cret == 0 { | ||
| 386 | return nil | 340 | return nil | ||
| @@ -392,8 +346,6 @@ var xStringInsertC func(uintptr, int, byte) uintptr | |||||
| 392 | 346 | ||||
| 393 | // Inserts a byte into a #GString, expanding it if necessary. | 347 | // Inserts a byte into a #GString, expanding it if necessary. | ||
| 394 | func (x *String) InsertC(PosVar int, CVar byte) *String { | 348 | func (x *String) InsertC(PosVar int, CVar byte) *String { | ||
| 395 | - | core.LazyRegister(&xStringInsertC, "GLIB", "g_string_insert_c", false) | |||
| 396 | - | ||||
| 397 | cret := xStringInsertC(x.GoPointer(), PosVar, CVar) | 349 | cret := xStringInsertC(x.GoPointer(), PosVar, CVar) | ||
| 398 | if cret == 0 { | 350 | if cret == 0 { | ||
| 399 | return nil | 351 | return nil | ||
| @@ -414,8 +366,6 @@ var xStringInsertLen func(uintptr, int, string, int) uintptr | |||||
| 414 | // | 366 | // | ||
| 415 | // If @pos is -1, bytes are inserted at the end of the string. | 367 | // If @pos is -1, bytes are inserted at the end of the string. | ||
| 416 | func (x *String) InsertLen(PosVar int, ValVar string, LenVar int) *String { | 368 | func (x *String) InsertLen(PosVar int, ValVar string, LenVar int) *String { | ||
| 417 | - | core.LazyRegister(&xStringInsertLen, "GLIB", "g_string_insert_len", false) | |||
| 418 | - | ||||
| 419 | cret := xStringInsertLen(x.GoPointer(), PosVar, ValVar, LenVar) | 369 | cret := xStringInsertLen(x.GoPointer(), PosVar, ValVar, LenVar) | ||
| 420 | if cret == 0 { | 370 | if cret == 0 { | ||
| 421 | return nil | 371 | return nil | ||
| @@ -428,8 +378,6 @@ var xStringInsertUnichar func(uintptr, int, uint32) uintptr | |||||
| 428 | // Converts a Unicode character into UTF-8, and insert it | 378 | // Converts a Unicode character into UTF-8, and insert it | ||
| 429 | // into the string at the given position. | 379 | // into the string at the given position. | ||
| 430 | func (x *String) InsertUnichar(PosVar int, WcVar uint32) *String { | 380 | func (x *String) InsertUnichar(PosVar int, WcVar uint32) *String { | ||
| 431 | - | core.LazyRegister(&xStringInsertUnichar, "GLIB", "g_string_insert_unichar", false) | |||
| 432 | - | ||||
| 433 | cret := xStringInsertUnichar(x.GoPointer(), PosVar, WcVar) | 381 | cret := xStringInsertUnichar(x.GoPointer(), PosVar, WcVar) | ||
| 434 | if cret == 0 { | 382 | if cret == 0 { | ||
| 435 | return nil | 383 | return nil | ||
| @@ -441,8 +389,6 @@ var xStringOverwrite func(uintptr, uint, string) uintptr | |||||
| 441 | 389 | ||||
| 442 | // Overwrites part of a string, lengthening it if necessary. | 390 | // Overwrites part of a string, lengthening it if necessary. | ||
| 443 | func (x *String) Overwrite(PosVar uint, ValVar string) *String { | 391 | func (x *String) Overwrite(PosVar uint, ValVar string) *String { | ||
| 444 | - | core.LazyRegister(&xStringOverwrite, "GLIB", "g_string_overwrite", false) | |||
| 445 | - | ||||
| 446 | cret := xStringOverwrite(x.GoPointer(), PosVar, ValVar) | 392 | cret := xStringOverwrite(x.GoPointer(), PosVar, ValVar) | ||
| 447 | if cret == 0 { | 393 | if cret == 0 { | ||
| 448 | return nil | 394 | return nil | ||
| @@ -455,8 +401,6 @@ var xStringOverwriteLen func(uintptr, uint, string, int) uintptr | |||||
| 455 | // Overwrites part of a string, lengthening it if necessary. | 401 | // Overwrites part of a string, lengthening it if necessary. | ||
| 456 | // This function will work with embedded nuls. | 402 | // This function will work with embedded nuls. | ||
| 457 | func (x *String) OverwriteLen(PosVar uint, ValVar string, LenVar int) *String { | 403 | func (x *String) OverwriteLen(PosVar uint, ValVar string, LenVar int) *String { | ||
| 458 | - | core.LazyRegister(&xStringOverwriteLen, "GLIB", "g_string_overwrite_len", false) | |||
| 459 | - | ||||
| 460 | cret := xStringOverwriteLen(x.GoPointer(), PosVar, ValVar, LenVar) | 404 | cret := xStringOverwriteLen(x.GoPointer(), PosVar, ValVar, LenVar) | ||
| 461 | if cret == 0 { | 405 | if cret == 0 { | ||
| 462 | return nil | 406 | return nil | ||
| @@ -469,8 +413,6 @@ var xStringPrepend func(uintptr, string) uintptr | |||||
| 469 | // Adds a string on to the start of a #GString, | 413 | // Adds a string on to the start of a #GString, | ||
| 470 | // expanding it if necessary. | 414 | // expanding it if necessary. | ||
| 471 | func (x *String) Prepend(ValVar string) *String { | 415 | func (x *String) Prepend(ValVar string) *String { | ||
| 472 | - | core.LazyRegister(&xStringPrepend, "GLIB", "g_string_prepend", false) | |||
| 473 | - | ||||
| 474 | cret := xStringPrepend(x.GoPointer(), ValVar) | 416 | cret := xStringPrepend(x.GoPointer(), ValVar) | ||
| 475 | if cret == 0 { | 417 | if cret == 0 { | ||
| 476 | return nil | 418 | return nil | ||
| @@ -483,8 +425,6 @@ var xStringPrependC func(uintptr, byte) uintptr | |||||
| 483 | // Adds a byte onto the start of a #GString, | 425 | // Adds a byte onto the start of a #GString, | ||
| 484 | // expanding it if necessary. | 426 | // expanding it if necessary. | ||
| 485 | func (x *String) PrependC(CVar byte) *String { | 427 | func (x *String) PrependC(CVar byte) *String { | ||
| 486 | - | core.LazyRegister(&xStringPrependC, "GLIB", "g_string_prepend_c", false) | |||
| 487 | - | ||||
| 488 | cret := xStringPrependC(x.GoPointer(), CVar) | 428 | cret := xStringPrependC(x.GoPointer(), CVar) | ||
| 489 | if cret == 0 { | 429 | if cret == 0 { | ||
| 490 | return nil | 430 | return nil | ||
| @@ -504,8 +444,6 @@ var xStringPrependLen func(uintptr, string, int) uintptr | |||||
| 504 | // is considered to request the entire string length. This | 444 | // is considered to request the entire string length. This | ||
| 505 | // makes g_string_prepend_len() equivalent to g_string_prepend(). | 445 | // makes g_string_prepend_len() equivalent to g_string_prepend(). | ||
| 506 | func (x *String) PrependLen(ValVar string, LenVar int) *String { | 446 | func (x *String) PrependLen(ValVar string, LenVar int) *String { | ||
| 507 | - | core.LazyRegister(&xStringPrependLen, "GLIB", "g_string_prepend_len", false) | |||
| 508 | - | ||||
| 509 | cret := xStringPrependLen(x.GoPointer(), ValVar, LenVar) | 447 | cret := xStringPrependLen(x.GoPointer(), ValVar, LenVar) | ||
| 510 | if cret == 0 { | 448 | if cret == 0 { | ||
| 511 | return nil | 449 | return nil | ||
| @@ -518,8 +456,6 @@ var xStringPrependUnichar func(uintptr, uint32) uintptr | |||||
| 518 | // Converts a Unicode character into UTF-8, and prepends it | 456 | // Converts a Unicode character into UTF-8, and prepends it | ||
| 519 | // to the string. | 457 | // to the string. | ||
| 520 | func (x *String) PrependUnichar(WcVar uint32) *String { | 458 | func (x *String) PrependUnichar(WcVar uint32) *String { | ||
| 521 | - | core.LazyRegister(&xStringPrependUnichar, "GLIB", "g_string_prepend_unichar", false) | |||
| 522 | - | ||||
| 523 | cret := xStringPrependUnichar(x.GoPointer(), WcVar) | 459 | cret := xStringPrependUnichar(x.GoPointer(), WcVar) | ||
| 524 | if cret == 0 { | 460 | if cret == 0 { | ||
| 525 | return nil | 461 | return nil | ||
| @@ -535,8 +471,6 @@ var xStringPrintf func(uintptr, string, ...interface{}) | |||||
| 535 | // to contain the results. The previous contents of the | 471 | // to contain the results. The previous contents of the | ||
| 536 | // #GString are destroyed. | 472 | // #GString are destroyed. | ||
| 537 | func (x *String) Printf(FormatVar string, varArgs ...interface{}) { | 473 | func (x *String) Printf(FormatVar string, varArgs ...interface{}) { | ||
| 538 | - | core.LazyRegister(&xStringPrintf, "GLIB", "g_string_printf", false) | |||
| 539 | - | ||||
| 540 | xStringPrintf(x.GoPointer(), FormatVar, varArgs...) | 474 | xStringPrintf(x.GoPointer(), FormatVar, varArgs...) | ||
| 541 | } | 475 | } | ||
| 542 | 476 | ||||
| @@ -556,8 +490,6 @@ var xStringReplace func(uintptr, string, string, uint) uint | |||||
| 556 | // the input string, they will all be replaced, but the return value will | 490 | // the input string, they will all be replaced, but the return value will | ||
| 557 | // be capped at `G_MAXUINT`. | 491 | // be capped at `G_MAXUINT`. | ||
| 558 | func (x *String) Replace(FindVar string, ReplaceVar string, LimitVar uint) uint { | 492 | func (x *String) Replace(FindVar string, ReplaceVar string, LimitVar uint) uint { | ||
| 559 | - | core.LazyRegister(&xStringReplace, "GLIB", "g_string_replace", false) | |||
| 560 | - | ||||
| 561 | cret := xStringReplace(x.GoPointer(), FindVar, ReplaceVar, LimitVar) | 493 | cret := xStringReplace(x.GoPointer(), FindVar, ReplaceVar, LimitVar) | ||
| 562 | return cret | 494 | return cret | ||
| 563 | } | 495 | } | ||
| @@ -570,8 +502,6 @@ var xStringSetSize func(uintptr, uint) uintptr | |||||
| 570 | // of the newly added area are undefined. (However, as | 502 | // of the newly added area are undefined. (However, as | ||
| 571 | // always, string->str[string->len] will be a nul byte.) | 503 | // always, string->str[string->len] will be a nul byte.) | ||
| 572 | func (x *String) SetSize(LenVar uint) *String { | 504 | func (x *String) SetSize(LenVar uint) *String { | ||
| 573 | - | core.LazyRegister(&xStringSetSize, "GLIB", "g_string_set_size", false) | |||
| 574 | - | ||||
| 575 | cret := xStringSetSize(x.GoPointer(), LenVar) | 505 | cret := xStringSetSize(x.GoPointer(), LenVar) | ||
| 576 | if cret == 0 { | 506 | if cret == 0 { | ||
| 577 | return nil | 507 | return nil | ||
| @@ -583,8 +513,6 @@ var xStringTruncate func(uintptr, uint) uintptr | |||||
| 583 | 513 | ||||
| 584 | // Cuts off the end of the GString, leaving the first @len bytes. | 514 | // Cuts off the end of the GString, leaving the first @len bytes. | ||
| 585 | func (x *String) Truncate(LenVar uint) *String { | 515 | func (x *String) Truncate(LenVar uint) *String { | ||
| 586 | - | core.LazyRegister(&xStringTruncate, "GLIB", "g_string_truncate", false) | |||
| 587 | - | ||||
| 588 | cret := xStringTruncate(x.GoPointer(), LenVar) | 516 | cret := xStringTruncate(x.GoPointer(), LenVar) | ||
| 589 | if cret == 0 { | 517 | if cret == 0 { | ||
| 590 | return nil | 518 | return nil | ||
| @@ -596,8 +524,6 @@ var xStringUp func(uintptr) uintptr | |||||
| 596 | 524 | ||||
| 597 | // Converts a #GString to uppercase. | 525 | // Converts a #GString to uppercase. | ||
| 598 | func (x *String) Up() *String { | 526 | func (x *String) Up() *String { | ||
| 599 | - | core.LazyRegister(&xStringUp, "GLIB", "g_string_up", false) | |||
| 600 | - | ||||
| 601 | cret := xStringUp(x.GoPointer()) | 527 | cret := xStringUp(x.GoPointer()) | ||
| 602 | if cret == 0 { | 528 | if cret == 0 { | ||
| 603 | return nil | 529 | return nil | ||
| @@ -611,12 +537,60 @@ var xStringVprintf func(uintptr, string, []interface{}) | |||||
| 611 | // This function is similar to g_string_printf() except that | 537 | // This function is similar to g_string_printf() except that | ||
| 612 | // the arguments to the format string are passed as a va_list. | 538 | // the arguments to the format string are passed as a va_list. | ||
| 613 | func (x *String) Vprintf(FormatVar string, ArgsVar []interface{}) { | 539 | func (x *String) Vprintf(FormatVar string, ArgsVar []interface{}) { | ||
| 614 | - | core.LazyRegister(&xStringVprintf, "GLIB", "g_string_vprintf", false) | |||
| 615 | - | ||||
| 616 | xStringVprintf(x.GoPointer(), FormatVar, ArgsVar) | 540 | xStringVprintf(x.GoPointer(), FormatVar, ArgsVar) | ||
| 617 | } | 541 | } | ||
| 618 | 542 | ||||
| 619 | func init() { | 543 | func init() { | ||
| 620 | core.SetPackageName("GLIB", "glib-2.0") | 544 | core.SetPackageName("GLIB", "glib-2.0") | ||
| 621 | core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0", "libgobject-2.0.0.dylib", "libglib-2.0.0.dylib"}) | 545 | core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0", "libgobject-2.0.0.dylib", "libglib-2.0.0.dylib"}) | ||
| 546 | + | var libs []uintptr | |||
| 547 | + | for _, libPath := range core.GetPaths("GLIB") { | |||
| 548 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 549 | + | if err != nil { | |||
| 550 | + | panic(err) | |||
| 551 | + | } | |||
| 552 | + | libs = append(libs, lib) | |||
| 553 | + | } | |||
| 554 | + | ||||
| 555 | + | core.PuregoSafeRegister(&xStringGLibType, libs, "g_gstring_get_type") | |||
| 556 | + | ||||
| 557 | + | core.PuregoSafeRegister(&xNewString, libs, "g_string_new") | |||
| 558 | + | core.PuregoSafeRegister(&xNewStringLen, libs, "g_string_new_len") | |||
| 559 | + | core.PuregoSafeRegister(&xNewStringTake, libs, "g_string_new_take") | |||
| 560 | + | core.PuregoSafeRegister(&xStringSizedNew, libs, "g_string_sized_new") | |||
| 561 | + | ||||
| 562 | + | core.PuregoSafeRegister(&xStringAppend, libs, "g_string_append") | |||
| 563 | + | core.PuregoSafeRegister(&xStringAppendC, libs, "g_string_append_c") | |||
| 564 | + | core.PuregoSafeRegister(&xStringAppendLen, libs, "g_string_append_len") | |||
| 565 | + | core.PuregoSafeRegister(&xStringAppendPrintf, libs, "g_string_append_printf") | |||
| 566 | + | core.PuregoSafeRegister(&xStringAppendUnichar, libs, "g_string_append_unichar") | |||
| 567 | + | core.PuregoSafeRegister(&xStringAppendUriEscaped, libs, "g_string_append_uri_escaped") | |||
| 568 | + | core.PuregoSafeRegister(&xStringAppendVprintf, libs, "g_string_append_vprintf") | |||
| 569 | + | core.PuregoSafeRegister(&xStringAsciiDown, libs, "g_string_ascii_down") | |||
| 570 | + | core.PuregoSafeRegister(&xStringAsciiUp, libs, "g_string_ascii_up") | |||
| 571 | + | core.PuregoSafeRegister(&xStringAssign, libs, "g_string_assign") | |||
| 572 | + | core.PuregoSafeRegister(&xStringCopy, libs, "g_string_copy") | |||
| 573 | + | core.PuregoSafeRegister(&xStringDown, libs, "g_string_down") | |||
| 574 | + | core.PuregoSafeRegister(&xStringEqual, libs, "g_string_equal") | |||
| 575 | + | core.PuregoSafeRegister(&xStringErase, libs, "g_string_erase") | |||
| 576 | + | core.PuregoSafeRegister(&xStringFree, libs, "g_string_free") | |||
| 577 | + | core.PuregoSafeRegister(&xStringFreeAndSteal, libs, "g_string_free_and_steal") | |||
| 578 | + | core.PuregoSafeRegister(&xStringFreeToBytes, libs, "g_string_free_to_bytes") | |||
| 579 | + | core.PuregoSafeRegister(&xStringHash, libs, "g_string_hash") | |||
| 580 | + | core.PuregoSafeRegister(&xStringInsert, libs, "g_string_insert") | |||
| 581 | + | core.PuregoSafeRegister(&xStringInsertC, libs, "g_string_insert_c") | |||
| 582 | + | core.PuregoSafeRegister(&xStringInsertLen, libs, "g_string_insert_len") | |||
| 583 | + | core.PuregoSafeRegister(&xStringInsertUnichar, libs, "g_string_insert_unichar") | |||
| 584 | + | core.PuregoSafeRegister(&xStringOverwrite, libs, "g_string_overwrite") | |||
| 585 | + | core.PuregoSafeRegister(&xStringOverwriteLen, libs, "g_string_overwrite_len") | |||
| 586 | + | core.PuregoSafeRegister(&xStringPrepend, libs, "g_string_prepend") | |||
| 587 | + | core.PuregoSafeRegister(&xStringPrependC, libs, "g_string_prepend_c") | |||
| 588 | + | core.PuregoSafeRegister(&xStringPrependLen, libs, "g_string_prepend_len") | |||
| 589 | + | core.PuregoSafeRegister(&xStringPrependUnichar, libs, "g_string_prepend_unichar") | |||
| 590 | + | core.PuregoSafeRegister(&xStringPrintf, libs, "g_string_printf") | |||
| 591 | + | core.PuregoSafeRegister(&xStringReplace, libs, "g_string_replace") | |||
| 592 | + | core.PuregoSafeRegister(&xStringSetSize, libs, "g_string_set_size") | |||
| 593 | + | core.PuregoSafeRegister(&xStringTruncate, libs, "g_string_truncate") | |||
| 594 | + | core.PuregoSafeRegister(&xStringUp, libs, "g_string_up") | |||
| 595 | + | core.PuregoSafeRegister(&xStringVprintf, libs, "g_string_vprintf") | |||
| 622 | } | 596 | } | ||