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
| @@ -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 | ) | |
| 10 | 11 | ||
| @@ -37,8 +38,6 @@ var xQueueClear func(uintptr) | |||
| 37 | 38 | // Removes all the elements in @queue. If queue elements contain | |
| 38 | 39 | // dynamically-allocated memory, they should be freed first. | |
| 39 | 40 | func (x *Queue) Clear() { | |
| 40 | - | core.LazyRegister(&xQueueClear, "GLIB", "g_queue_clear", false) | |
| 41 | - | ||
| 42 | 41 | xQueueClear(x.GoPointer()) | |
| 43 | 42 | } | |
| 44 | 43 | ||
| @@ -47,8 +46,6 @@ var xQueueClearFull func(uintptr, uintptr) | |||
| 47 | 46 | // Convenience method, which frees all the memory used by a #GQueue, | |
| 48 | 47 | // and calls the provided @free_func on each item in the #GQueue. | |
| 49 | 48 | func (x *Queue) ClearFull(FreeFuncVar *DestroyNotify) { | |
| 50 | - | core.LazyRegister(&xQueueClearFull, "GLIB", "g_queue_clear_full", false) | |
| 51 | - | ||
| 52 | 49 | xQueueClearFull(x.GoPointer(), NewCallbackNullable(FreeFuncVar)) | |
| 53 | 50 | } | |
| 54 | 51 | ||
| @@ -58,8 +55,6 @@ var xQueueCopy func(uintptr) uintptr | |||
| 58 | 55 | // queue consist of pointers to data, the pointers are copied, but the | |
| 59 | 56 | // actual data is not. | |
| 60 | 57 | func (x *Queue) Copy() *Queue { | |
| 61 | - | core.LazyRegister(&xQueueCopy, "GLIB", "g_queue_copy", false) | |
| 62 | - | ||
| 63 | 58 | cret := xQueueCopy(x.GoPointer()) | |
| 64 | 59 | if cret == 0 { | |
| 65 | 60 | return nil | |
| @@ -73,8 +68,6 @@ var xQueueDeleteLink func(uintptr, *List) | |||
| 73 | 68 | // | |
| 74 | 69 | // @link_ must be part of @queue. | |
| 75 | 70 | func (x *Queue) DeleteLink(LinkVar *List) { | |
| 76 | - | core.LazyRegister(&xQueueDeleteLink, "GLIB", "g_queue_delete_link", false) | |
| 77 | - | ||
| 78 | 71 | xQueueDeleteLink(x.GoPointer(), LinkVar) | |
| 79 | 72 | } | |
| 80 | 73 | ||
| @@ -82,8 +75,6 @@ var xQueueFind func(uintptr, uintptr) uintptr | |||
| 82 | 75 | ||
| 83 | 76 | // Finds the first link in @queue which contains @data. | |
| 84 | 77 | func (x *Queue) Find(DataVar uintptr) *List { | |
| 85 | - | core.LazyRegister(&xQueueFind, "GLIB", "g_queue_find", false) | |
| 86 | - | ||
| 87 | 78 | cret := xQueueFind(x.GoPointer(), DataVar) | |
| 88 | 79 | if cret == 0 { | |
| 89 | 80 | return nil | |
| @@ -99,8 +90,6 @@ var xQueueFindCustom func(uintptr, uintptr, uintptr) uintptr | |||
| 99 | 90 | // takes two gconstpointer arguments, the #GQueue element's data as the | |
| 100 | 91 | // first argument and the given user data as the second argument. | |
| 101 | 92 | func (x *Queue) FindCustom(DataVar uintptr, FuncVar *CompareFunc) *List { | |
| 102 | - | core.LazyRegister(&xQueueFindCustom, "GLIB", "g_queue_find_custom", false) | |
| 103 | - | ||
| 104 | 93 | cret := xQueueFindCustom(x.GoPointer(), DataVar, NewCallback(FuncVar)) | |
| 105 | 94 | if cret == 0 { | |
| 106 | 95 | return nil | |
| @@ -116,8 +105,6 @@ var xQueueForeach func(uintptr, uintptr, uintptr) | |||
| 116 | 105 | // It is safe for @func to remove the element from @queue, but it must | |
| 117 | 106 | // not modify any part of the queue after that element. | |
| 118 | 107 | func (x *Queue) Foreach(FuncVar *Func, UserDataVar uintptr) { | |
| 119 | - | core.LazyRegister(&xQueueForeach, "GLIB", "g_queue_foreach", false) | |
| 120 | - | ||
| 121 | 108 | xQueueForeach(x.GoPointer(), NewCallback(FuncVar), UserDataVar) | |
| 122 | 109 | } | |
| 123 | 110 | ||
| @@ -130,8 +117,6 @@ var xQueueFree func(uintptr) | |||
| 130 | 117 | // If queue elements contain dynamically-allocated memory, you should | |
| 131 | 118 | // either use g_queue_free_full() or free them manually first. | |
| 132 | 119 | func (x *Queue) Free() { | |
| 133 | - | core.LazyRegister(&xQueueFree, "GLIB", "g_queue_free", false) | |
| 134 | - | ||
| 135 | 120 | xQueueFree(x.GoPointer()) | |
| 136 | 121 | } | |
| 137 | 122 | ||
| @@ -143,8 +128,6 @@ var xQueueFreeFull func(uintptr, uintptr) | |||
| 143 | 128 | // @free_func should not modify the queue (eg, by removing the freed | |
| 144 | 129 | // element from it). | |
| 145 | 130 | func (x *Queue) FreeFull(FreeFuncVar *DestroyNotify) { | |
| 146 | - | core.LazyRegister(&xQueueFreeFull, "GLIB", "g_queue_free_full", false) | |
| 147 | - | ||
| 148 | 131 | xQueueFreeFull(x.GoPointer(), NewCallback(FreeFuncVar)) | |
| 149 | 132 | } | |
| 150 | 133 | ||
| @@ -152,8 +135,6 @@ var xQueueGetLength func(uintptr) uint | |||
| 152 | 135 | ||
| 153 | 136 | // Returns the number of items in @queue. | |
| 154 | 137 | func (x *Queue) GetLength() uint { | |
| 155 | - | core.LazyRegister(&xQueueGetLength, "GLIB", "g_queue_get_length", false) | |
| 156 | - | ||
| 157 | 138 | cret := xQueueGetLength(x.GoPointer()) | |
| 158 | 139 | return cret | |
| 159 | 140 | } | |
| @@ -162,8 +143,6 @@ var xQueueIndex func(uintptr, uintptr) int | |||
| 162 | 143 | ||
| 163 | 144 | // Returns the position of the first element in @queue which contains @data. | |
| 164 | 145 | func (x *Queue) Index(DataVar uintptr) int { | |
| 165 | - | core.LazyRegister(&xQueueIndex, "GLIB", "g_queue_index", false) | |
| 166 | - | ||
| 167 | 146 | cret := xQueueIndex(x.GoPointer(), DataVar) | |
| 168 | 147 | return cret | |
| 169 | 148 | } | |
| @@ -175,8 +154,6 @@ var xQueueInit func(uintptr) | |||
| 175 | 154 | // %G_QUEUE_INIT. It is not necessary to initialize queues created with | |
| 176 | 155 | // g_queue_new(). | |
| 177 | 156 | func (x *Queue) Init() { | |
| 178 | - | core.LazyRegister(&xQueueInit, "GLIB", "g_queue_init", false) | |
| 179 | - | ||
| 180 | 157 | xQueueInit(x.GoPointer()) | |
| 181 | 158 | } | |
| 182 | 159 | ||
| @@ -187,8 +164,6 @@ var xQueueInsertAfter func(uintptr, *List, uintptr) | |||
| 187 | 164 | // @sibling must be part of @queue. Since GLib 2.44 a %NULL sibling pushes the | |
| 188 | 165 | // data at the head of the queue. | |
| 189 | 166 | func (x *Queue) InsertAfter(SiblingVar *List, DataVar uintptr) { | |
| 190 | - | core.LazyRegister(&xQueueInsertAfter, "GLIB", "g_queue_insert_after", false) | |
| 191 | - | ||
| 192 | 167 | xQueueInsertAfter(x.GoPointer(), SiblingVar, DataVar) | |
| 193 | 168 | } | |
| 194 | 169 | ||
| @@ -198,8 +173,6 @@ var xQueueInsertAfterLink func(uintptr, *List, *List) | |||
| 198 | 173 | // | |
| 199 | 174 | // @sibling must be part of @queue. | |
| 200 | 175 | func (x *Queue) InsertAfterLink(SiblingVar *List, LinkVar *List) { | |
| 201 | - | core.LazyRegister(&xQueueInsertAfterLink, "GLIB", "g_queue_insert_after_link", false) | |
| 202 | - | ||
| 203 | 176 | xQueueInsertAfterLink(x.GoPointer(), SiblingVar, LinkVar) | |
| 204 | 177 | } | |
| 205 | 178 | ||
| @@ -210,8 +183,6 @@ var xQueueInsertBefore func(uintptr, *List, uintptr) | |||
| 210 | 183 | // @sibling must be part of @queue. Since GLib 2.44 a %NULL sibling pushes the | |
| 211 | 184 | // data at the tail of the queue. | |
| 212 | 185 | func (x *Queue) InsertBefore(SiblingVar *List, DataVar uintptr) { | |
| 213 | - | core.LazyRegister(&xQueueInsertBefore, "GLIB", "g_queue_insert_before", false) | |
| 214 | - | ||
| 215 | 186 | xQueueInsertBefore(x.GoPointer(), SiblingVar, DataVar) | |
| 216 | 187 | } | |
| 217 | 188 | ||
| @@ -221,8 +192,6 @@ var xQueueInsertBeforeLink func(uintptr, *List, *List) | |||
| 221 | 192 | // | |
| 222 | 193 | // @sibling must be part of @queue. | |
| 223 | 194 | func (x *Queue) InsertBeforeLink(SiblingVar *List, LinkVar *List) { | |
| 224 | - | core.LazyRegister(&xQueueInsertBeforeLink, "GLIB", "g_queue_insert_before_link", false) | |
| 225 | - | ||
| 226 | 195 | xQueueInsertBeforeLink(x.GoPointer(), SiblingVar, LinkVar) | |
| 227 | 196 | } | |
| 228 | 197 | ||
| @@ -230,8 +199,6 @@ var xQueueInsertSorted func(uintptr, uintptr, uintptr, uintptr) | |||
| 230 | 199 | ||
| 231 | 200 | // Inserts @data into @queue using @func to determine the new position. | |
| 232 | 201 | func (x *Queue) InsertSorted(DataVar uintptr, FuncVar *CompareDataFunc, UserDataVar uintptr) { | |
| 233 | - | core.LazyRegister(&xQueueInsertSorted, "GLIB", "g_queue_insert_sorted", false) | |
| 234 | - | ||
| 235 | 202 | xQueueInsertSorted(x.GoPointer(), DataVar, NewCallback(FuncVar), UserDataVar) | |
| 236 | 203 | } | |
| 237 | 204 | ||
| @@ -239,8 +206,6 @@ var xQueueIsEmpty func(uintptr) bool | |||
| 239 | 206 | ||
| 240 | 207 | // Returns %TRUE if the queue is empty. | |
| 241 | 208 | func (x *Queue) IsEmpty() bool { | |
| 242 | - | core.LazyRegister(&xQueueIsEmpty, "GLIB", "g_queue_is_empty", false) | |
| 243 | - | ||
| 244 | 209 | cret := xQueueIsEmpty(x.GoPointer()) | |
| 245 | 210 | return cret | |
| 246 | 211 | } | |
| @@ -249,8 +214,6 @@ var xQueueLinkIndex func(uintptr, *List) int | |||
| 249 | 214 | ||
| 250 | 215 | // Returns the position of @link_ in @queue. | |
| 251 | 216 | func (x *Queue) LinkIndex(LinkVar *List) int { | |
| 252 | - | core.LazyRegister(&xQueueLinkIndex, "GLIB", "g_queue_link_index", false) | |
| 253 | - | ||
| 254 | 217 | cret := xQueueLinkIndex(x.GoPointer(), LinkVar) | |
| 255 | 218 | return cret | |
| 256 | 219 | } | |
| @@ -259,8 +222,6 @@ var xQueuePeekHead func(uintptr) uintptr | |||
| 259 | 222 | ||
| 260 | 223 | // Returns the first element of the queue. | |
| 261 | 224 | func (x *Queue) PeekHead() uintptr { | |
| 262 | - | core.LazyRegister(&xQueuePeekHead, "GLIB", "g_queue_peek_head", false) | |
| 263 | - | ||
| 264 | 225 | cret := xQueuePeekHead(x.GoPointer()) | |
| 265 | 226 | return cret | |
| 266 | 227 | } | |
| @@ -269,8 +230,6 @@ var xQueuePeekHeadLink func(uintptr) uintptr | |||
| 269 | 230 | ||
| 270 | 231 | // Returns the first link in @queue. | |
| 271 | 232 | func (x *Queue) PeekHeadLink() *List { | |
| 272 | - | core.LazyRegister(&xQueuePeekHeadLink, "GLIB", "g_queue_peek_head_link", false) | |
| 273 | - | ||
| 274 | 233 | cret := xQueuePeekHeadLink(x.GoPointer()) | |
| 275 | 234 | if cret == 0 { | |
| 276 | 235 | return nil | |
| @@ -282,8 +241,6 @@ var xQueuePeekNth func(uintptr, uint) uintptr | |||
| 282 | 241 | ||
| 283 | 242 | // Returns the @n'th element of @queue. | |
| 284 | 243 | func (x *Queue) PeekNth(NVar uint) uintptr { | |
| 285 | - | core.LazyRegister(&xQueuePeekNth, "GLIB", "g_queue_peek_nth", false) | |
| 286 | - | ||
| 287 | 244 | cret := xQueuePeekNth(x.GoPointer(), NVar) | |
| 288 | 245 | return cret | |
| 289 | 246 | } | |
| @@ -292,8 +249,6 @@ var xQueuePeekNthLink func(uintptr, uint) uintptr | |||
| 292 | 249 | ||
| 293 | 250 | // Returns the link at the given position | |
| 294 | 251 | func (x *Queue) PeekNthLink(NVar uint) *List { | |
| 295 | - | core.LazyRegister(&xQueuePeekNthLink, "GLIB", "g_queue_peek_nth_link", false) | |
| 296 | - | ||
| 297 | 252 | cret := xQueuePeekNthLink(x.GoPointer(), NVar) | |
| 298 | 253 | if cret == 0 { | |
| 299 | 254 | return nil | |
| @@ -305,8 +260,6 @@ var xQueuePeekTail func(uintptr) uintptr | |||
| 305 | 260 | ||
| 306 | 261 | // Returns the last element of the queue. | |
| 307 | 262 | func (x *Queue) PeekTail() uintptr { | |
| 308 | - | core.LazyRegister(&xQueuePeekTail, "GLIB", "g_queue_peek_tail", false) | |
| 309 | - | ||
| 310 | 263 | cret := xQueuePeekTail(x.GoPointer()) | |
| 311 | 264 | return cret | |
| 312 | 265 | } | |
| @@ -315,8 +268,6 @@ var xQueuePeekTailLink func(uintptr) uintptr | |||
| 315 | 268 | ||
| 316 | 269 | // Returns the last link in @queue. | |
| 317 | 270 | func (x *Queue) PeekTailLink() *List { | |
| 318 | - | core.LazyRegister(&xQueuePeekTailLink, "GLIB", "g_queue_peek_tail_link", false) | |
| 319 | - | ||
| 320 | 271 | cret := xQueuePeekTailLink(x.GoPointer()) | |
| 321 | 272 | if cret == 0 { | |
| 322 | 273 | return nil | |
| @@ -328,8 +279,6 @@ var xQueuePopHead func(uintptr) uintptr | |||
| 328 | 279 | ||
| 329 | 280 | // Removes the first element of the queue and returns its data. | |
| 330 | 281 | func (x *Queue) PopHead() uintptr { | |
| 331 | - | core.LazyRegister(&xQueuePopHead, "GLIB", "g_queue_pop_head", false) | |
| 332 | - | ||
| 333 | 282 | cret := xQueuePopHead(x.GoPointer()) | |
| 334 | 283 | return cret | |
| 335 | 284 | } | |
| @@ -338,8 +287,6 @@ var xQueuePopHeadLink func(uintptr) uintptr | |||
| 338 | 287 | ||
| 339 | 288 | // Removes and returns the first element of the queue. | |
| 340 | 289 | func (x *Queue) PopHeadLink() *List { | |
| 341 | - | core.LazyRegister(&xQueuePopHeadLink, "GLIB", "g_queue_pop_head_link", false) | |
| 342 | - | ||
| 343 | 290 | cret := xQueuePopHeadLink(x.GoPointer()) | |
| 344 | 291 | if cret == 0 { | |
| 345 | 292 | return nil | |
| @@ -351,8 +298,6 @@ var xQueuePopNth func(uintptr, uint) uintptr | |||
| 351 | 298 | ||
| 352 | 299 | // Removes the @n'th element of @queue and returns its data. | |
| 353 | 300 | func (x *Queue) PopNth(NVar uint) uintptr { | |
| 354 | - | core.LazyRegister(&xQueuePopNth, "GLIB", "g_queue_pop_nth", false) | |
| 355 | - | ||
| 356 | 301 | cret := xQueuePopNth(x.GoPointer(), NVar) | |
| 357 | 302 | return cret | |
| 358 | 303 | } | |
| @@ -361,8 +306,6 @@ var xQueuePopNthLink func(uintptr, uint) uintptr | |||
| 361 | 306 | ||
| 362 | 307 | // Removes and returns the link at the given position. | |
| 363 | 308 | func (x *Queue) PopNthLink(NVar uint) *List { | |
| 364 | - | core.LazyRegister(&xQueuePopNthLink, "GLIB", "g_queue_pop_nth_link", false) | |
| 365 | - | ||
| 366 | 309 | cret := xQueuePopNthLink(x.GoPointer(), NVar) | |
| 367 | 310 | if cret == 0 { | |
| 368 | 311 | return nil | |
| @@ -374,8 +317,6 @@ var xQueuePopTail func(uintptr) uintptr | |||
| 374 | 317 | ||
| 375 | 318 | // Removes the last element of the queue and returns its data. | |
| 376 | 319 | func (x *Queue) PopTail() uintptr { | |
| 377 | - | core.LazyRegister(&xQueuePopTail, "GLIB", "g_queue_pop_tail", false) | |
| 378 | - | ||
| 379 | 320 | cret := xQueuePopTail(x.GoPointer()) | |
| 380 | 321 | return cret | |
| 381 | 322 | } | |
| @@ -384,8 +325,6 @@ var xQueuePopTailLink func(uintptr) uintptr | |||
| 384 | 325 | ||
| 385 | 326 | // Removes and returns the last element of the queue. | |
| 386 | 327 | func (x *Queue) PopTailLink() *List { | |
| 387 | - | core.LazyRegister(&xQueuePopTailLink, "GLIB", "g_queue_pop_tail_link", false) | |
| 388 | - | ||
| 389 | 328 | cret := xQueuePopTailLink(x.GoPointer()) | |
| 390 | 329 | if cret == 0 { | |
| 391 | 330 | return nil | |
| @@ -397,8 +336,6 @@ var xQueuePushHead func(uintptr, uintptr) | |||
| 397 | 336 | ||
| 398 | 337 | // Adds a new element at the head of the queue. | |
| 399 | 338 | func (x *Queue) PushHead(DataVar uintptr) { | |
| 400 | - | core.LazyRegister(&xQueuePushHead, "GLIB", "g_queue_push_head", false) | |
| 401 | - | ||
| 402 | 339 | xQueuePushHead(x.GoPointer(), DataVar) | |
| 403 | 340 | } | |
| 404 | 341 | ||
| @@ -406,8 +343,6 @@ var xQueuePushHeadLink func(uintptr, *List) | |||
| 406 | 343 | ||
| 407 | 344 | // Adds a new element at the head of the queue. | |
| 408 | 345 | func (x *Queue) PushHeadLink(LinkVar *List) { | |
| 409 | - | core.LazyRegister(&xQueuePushHeadLink, "GLIB", "g_queue_push_head_link", false) | |
| 410 | - | ||
| 411 | 346 | xQueuePushHeadLink(x.GoPointer(), LinkVar) | |
| 412 | 347 | } | |
| 413 | 348 | ||
| @@ -415,8 +350,6 @@ var xQueuePushNth func(uintptr, uintptr, int) | |||
| 415 | 350 | ||
| 416 | 351 | // Inserts a new element into @queue at the given position. | |
| 417 | 352 | func (x *Queue) PushNth(DataVar uintptr, NVar int) { | |
| 418 | - | core.LazyRegister(&xQueuePushNth, "GLIB", "g_queue_push_nth", false) | |
| 419 | - | ||
| 420 | 353 | xQueuePushNth(x.GoPointer(), DataVar, NVar) | |
| 421 | 354 | } | |
| 422 | 355 | ||
| @@ -424,8 +357,6 @@ var xQueuePushNthLink func(uintptr, int, *List) | |||
| 424 | 357 | ||
| 425 | 358 | // Inserts @link into @queue at the given position. | |
| 426 | 359 | func (x *Queue) PushNthLink(NVar int, LinkVar *List) { | |
| 427 | - | core.LazyRegister(&xQueuePushNthLink, "GLIB", "g_queue_push_nth_link", false) | |
| 428 | - | ||
| 429 | 360 | xQueuePushNthLink(x.GoPointer(), NVar, LinkVar) | |
| 430 | 361 | } | |
| 431 | 362 | ||
| @@ -433,8 +364,6 @@ var xQueuePushTail func(uintptr, uintptr) | |||
| 433 | 364 | ||
| 434 | 365 | // Adds a new element at the tail of the queue. | |
| 435 | 366 | func (x *Queue) PushTail(DataVar uintptr) { | |
| 436 | - | core.LazyRegister(&xQueuePushTail, "GLIB", "g_queue_push_tail", false) | |
| 437 | - | ||
| 438 | 367 | xQueuePushTail(x.GoPointer(), DataVar) | |
| 439 | 368 | } | |
| 440 | 369 | ||
| @@ -442,8 +371,6 @@ var xQueuePushTailLink func(uintptr, *List) | |||
| 442 | 371 | ||
| 443 | 372 | // Adds a new element at the tail of the queue. | |
| 444 | 373 | func (x *Queue) PushTailLink(LinkVar *List) { | |
| 445 | - | core.LazyRegister(&xQueuePushTailLink, "GLIB", "g_queue_push_tail_link", false) | |
| 446 | - | ||
| 447 | 374 | xQueuePushTailLink(x.GoPointer(), LinkVar) | |
| 448 | 375 | } | |
| 449 | 376 | ||
| @@ -451,8 +378,6 @@ var xQueueRemove func(uintptr, uintptr) bool | |||
| 451 | 378 | ||
| 452 | 379 | // Removes the first element in @queue that contains @data. | |
| 453 | 380 | func (x *Queue) Remove(DataVar uintptr) bool { | |
| 454 | - | core.LazyRegister(&xQueueRemove, "GLIB", "g_queue_remove", false) | |
| 455 | - | ||
| 456 | 381 | cret := xQueueRemove(x.GoPointer(), DataVar) | |
| 457 | 382 | return cret | |
| 458 | 383 | } | |
| @@ -461,8 +386,6 @@ var xQueueRemoveAll func(uintptr, uintptr) uint | |||
| 461 | 386 | ||
| 462 | 387 | // Remove all elements whose data equals @data from @queue. | |
| 463 | 388 | func (x *Queue) RemoveAll(DataVar uintptr) uint { | |
| 464 | - | core.LazyRegister(&xQueueRemoveAll, "GLIB", "g_queue_remove_all", false) | |
| 465 | - | ||
| 466 | 389 | cret := xQueueRemoveAll(x.GoPointer(), DataVar) | |
| 467 | 390 | return cret | |
| 468 | 391 | } | |
| @@ -471,8 +394,6 @@ var xQueueReverse func(uintptr) | |||
| 471 | 394 | ||
| 472 | 395 | // Reverses the order of the items in @queue. | |
| 473 | 396 | func (x *Queue) Reverse() { | |
| 474 | - | core.LazyRegister(&xQueueReverse, "GLIB", "g_queue_reverse", false) | |
| 475 | - | ||
| 476 | 397 | xQueueReverse(x.GoPointer()) | |
| 477 | 398 | } | |
| 478 | 399 | ||
| @@ -480,8 +401,6 @@ var xQueueSort func(uintptr, uintptr, uintptr) | |||
| 480 | 401 | ||
| 481 | 402 | // Sorts @queue using @compare_func. | |
| 482 | 403 | func (x *Queue) Sort(CompareFuncVar *CompareDataFunc, UserDataVar uintptr) { | |
| 483 | - | core.LazyRegister(&xQueueSort, "GLIB", "g_queue_sort", false) | |
| 484 | - | ||
| 485 | 404 | xQueueSort(x.GoPointer(), NewCallback(CompareFuncVar), UserDataVar) | |
| 486 | 405 | } | |
| 487 | 406 | ||
| @@ -492,12 +411,61 @@ var xQueueUnlink func(uintptr, *List) | |||
| 492 | 411 | // | |
| 493 | 412 | // @link_ must be part of @queue. | |
| 494 | 413 | func (x *Queue) Unlink(LinkVar *List) { | |
| 495 | - | core.LazyRegister(&xQueueUnlink, "GLIB", "g_queue_unlink", false) | |
| 496 | - | ||
| 497 | 414 | xQueueUnlink(x.GoPointer(), LinkVar) | |
| 498 | 415 | } | |
| 499 | 416 | ||
| 500 | 417 | func init() { | |
| 501 | 418 | core.SetPackageName("GLIB", "glib-2.0") | |
| 502 | 419 | core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0", "libgobject-2.0.0.dylib", "libglib-2.0.0.dylib"}) | |
| 420 | + | var libs []uintptr | |
| 421 | + | for _, libPath := range core.GetPaths("GLIB") { | |
| 422 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 423 | + | if err != nil { | |
| 424 | + | panic(err) | |
| 425 | + | } | |
| 426 | + | libs = append(libs, lib) | |
| 427 | + | } | |
| 428 | + | ||
| 429 | + | core.PuregoSafeRegister(&xQueueClear, libs, "g_queue_clear") | |
| 430 | + | core.PuregoSafeRegister(&xQueueClearFull, libs, "g_queue_clear_full") | |
| 431 | + | core.PuregoSafeRegister(&xQueueCopy, libs, "g_queue_copy") | |
| 432 | + | core.PuregoSafeRegister(&xQueueDeleteLink, libs, "g_queue_delete_link") | |
| 433 | + | core.PuregoSafeRegister(&xQueueFind, libs, "g_queue_find") | |
| 434 | + | core.PuregoSafeRegister(&xQueueFindCustom, libs, "g_queue_find_custom") | |
| 435 | + | core.PuregoSafeRegister(&xQueueForeach, libs, "g_queue_foreach") | |
| 436 | + | core.PuregoSafeRegister(&xQueueFree, libs, "g_queue_free") | |
| 437 | + | core.PuregoSafeRegister(&xQueueFreeFull, libs, "g_queue_free_full") | |
| 438 | + | core.PuregoSafeRegister(&xQueueGetLength, libs, "g_queue_get_length") | |
| 439 | + | core.PuregoSafeRegister(&xQueueIndex, libs, "g_queue_index") | |
| 440 | + | core.PuregoSafeRegister(&xQueueInit, libs, "g_queue_init") | |
| 441 | + | core.PuregoSafeRegister(&xQueueInsertAfter, libs, "g_queue_insert_after") | |
| 442 | + | core.PuregoSafeRegister(&xQueueInsertAfterLink, libs, "g_queue_insert_after_link") | |
| 443 | + | core.PuregoSafeRegister(&xQueueInsertBefore, libs, "g_queue_insert_before") | |
| 444 | + | core.PuregoSafeRegister(&xQueueInsertBeforeLink, libs, "g_queue_insert_before_link") | |
| 445 | + | core.PuregoSafeRegister(&xQueueInsertSorted, libs, "g_queue_insert_sorted") | |
| 446 | + | core.PuregoSafeRegister(&xQueueIsEmpty, libs, "g_queue_is_empty") | |
| 447 | + | core.PuregoSafeRegister(&xQueueLinkIndex, libs, "g_queue_link_index") | |
| 448 | + | core.PuregoSafeRegister(&xQueuePeekHead, libs, "g_queue_peek_head") | |
| 449 | + | core.PuregoSafeRegister(&xQueuePeekHeadLink, libs, "g_queue_peek_head_link") | |
| 450 | + | core.PuregoSafeRegister(&xQueuePeekNth, libs, "g_queue_peek_nth") | |
| 451 | + | core.PuregoSafeRegister(&xQueuePeekNthLink, libs, "g_queue_peek_nth_link") | |
| 452 | + | core.PuregoSafeRegister(&xQueuePeekTail, libs, "g_queue_peek_tail") | |
| 453 | + | core.PuregoSafeRegister(&xQueuePeekTailLink, libs, "g_queue_peek_tail_link") | |
| 454 | + | core.PuregoSafeRegister(&xQueuePopHead, libs, "g_queue_pop_head") | |
| 455 | + | core.PuregoSafeRegister(&xQueuePopHeadLink, libs, "g_queue_pop_head_link") | |
| 456 | + | core.PuregoSafeRegister(&xQueuePopNth, libs, "g_queue_pop_nth") | |
| 457 | + | core.PuregoSafeRegister(&xQueuePopNthLink, libs, "g_queue_pop_nth_link") | |
| 458 | + | core.PuregoSafeRegister(&xQueuePopTail, libs, "g_queue_pop_tail") | |
| 459 | + | core.PuregoSafeRegister(&xQueuePopTailLink, libs, "g_queue_pop_tail_link") | |
| 460 | + | core.PuregoSafeRegister(&xQueuePushHead, libs, "g_queue_push_head") | |
| 461 | + | core.PuregoSafeRegister(&xQueuePushHeadLink, libs, "g_queue_push_head_link") | |
| 462 | + | core.PuregoSafeRegister(&xQueuePushNth, libs, "g_queue_push_nth") | |
| 463 | + | core.PuregoSafeRegister(&xQueuePushNthLink, libs, "g_queue_push_nth_link") | |
| 464 | + | core.PuregoSafeRegister(&xQueuePushTail, libs, "g_queue_push_tail") | |
| 465 | + | core.PuregoSafeRegister(&xQueuePushTailLink, libs, "g_queue_push_tail_link") | |
| 466 | + | core.PuregoSafeRegister(&xQueueRemove, libs, "g_queue_remove") | |
| 467 | + | core.PuregoSafeRegister(&xQueueRemoveAll, libs, "g_queue_remove_all") | |
| 468 | + | core.PuregoSafeRegister(&xQueueReverse, libs, "g_queue_reverse") | |
| 469 | + | core.PuregoSafeRegister(&xQueueSort, libs, "g_queue_sort") | |
| 470 | + | core.PuregoSafeRegister(&xQueueUnlink, libs, "g_queue_unlink") | |
| 503 | 471 | } | |
| @@ -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 | ) | 10 | ) | ||
| 10 | 11 | ||||
| @@ -37,8 +38,6 @@ var xQueueClear func(uintptr) | |||||
| 37 | // Removes all the elements in @queue. If queue elements contain | 38 | // Removes all the elements in @queue. If queue elements contain | ||
| 38 | // dynamically-allocated memory, they should be freed first. | 39 | // dynamically-allocated memory, they should be freed first. | ||
| 39 | func (x *Queue) Clear() { | 40 | func (x *Queue) Clear() { | ||
| 40 | - | core.LazyRegister(&xQueueClear, "GLIB", "g_queue_clear", false) | |||
| 41 | - | ||||
| 42 | xQueueClear(x.GoPointer()) | 41 | xQueueClear(x.GoPointer()) | ||
| 43 | } | 42 | } | ||
| 44 | 43 | ||||
| @@ -47,8 +46,6 @@ var xQueueClearFull func(uintptr, uintptr) | |||||
| 47 | // Convenience method, which frees all the memory used by a #GQueue, | 46 | // Convenience method, which frees all the memory used by a #GQueue, | ||
| 48 | // and calls the provided @free_func on each item in the #GQueue. | 47 | // and calls the provided @free_func on each item in the #GQueue. | ||
| 49 | func (x *Queue) ClearFull(FreeFuncVar *DestroyNotify) { | 48 | func (x *Queue) ClearFull(FreeFuncVar *DestroyNotify) { | ||
| 50 | - | core.LazyRegister(&xQueueClearFull, "GLIB", "g_queue_clear_full", false) | |||
| 51 | - | ||||
| 52 | xQueueClearFull(x.GoPointer(), NewCallbackNullable(FreeFuncVar)) | 49 | xQueueClearFull(x.GoPointer(), NewCallbackNullable(FreeFuncVar)) | ||
| 53 | } | 50 | } | ||
| 54 | 51 | ||||
| @@ -58,8 +55,6 @@ var xQueueCopy func(uintptr) uintptr | |||||
| 58 | // queue consist of pointers to data, the pointers are copied, but the | 55 | // queue consist of pointers to data, the pointers are copied, but the | ||
| 59 | // actual data is not. | 56 | // actual data is not. | ||
| 60 | func (x *Queue) Copy() *Queue { | 57 | func (x *Queue) Copy() *Queue { | ||
| 61 | - | core.LazyRegister(&xQueueCopy, "GLIB", "g_queue_copy", false) | |||
| 62 | - | ||||
| 63 | cret := xQueueCopy(x.GoPointer()) | 58 | cret := xQueueCopy(x.GoPointer()) | ||
| 64 | if cret == 0 { | 59 | if cret == 0 { | ||
| 65 | return nil | 60 | return nil | ||
| @@ -73,8 +68,6 @@ var xQueueDeleteLink func(uintptr, *List) | |||||
| 73 | // | 68 | // | ||
| 74 | // @link_ must be part of @queue. | 69 | // @link_ must be part of @queue. | ||
| 75 | func (x *Queue) DeleteLink(LinkVar *List) { | 70 | func (x *Queue) DeleteLink(LinkVar *List) { | ||
| 76 | - | core.LazyRegister(&xQueueDeleteLink, "GLIB", "g_queue_delete_link", false) | |||
| 77 | - | ||||
| 78 | xQueueDeleteLink(x.GoPointer(), LinkVar) | 71 | xQueueDeleteLink(x.GoPointer(), LinkVar) | ||
| 79 | } | 72 | } | ||
| 80 | 73 | ||||
| @@ -82,8 +75,6 @@ var xQueueFind func(uintptr, uintptr) uintptr | |||||
| 82 | 75 | ||||
| 83 | // Finds the first link in @queue which contains @data. | 76 | // Finds the first link in @queue which contains @data. | ||
| 84 | func (x *Queue) Find(DataVar uintptr) *List { | 77 | func (x *Queue) Find(DataVar uintptr) *List { | ||
| 85 | - | core.LazyRegister(&xQueueFind, "GLIB", "g_queue_find", false) | |||
| 86 | - | ||||
| 87 | cret := xQueueFind(x.GoPointer(), DataVar) | 78 | cret := xQueueFind(x.GoPointer(), DataVar) | ||
| 88 | if cret == 0 { | 79 | if cret == 0 { | ||
| 89 | return nil | 80 | return nil | ||
| @@ -99,8 +90,6 @@ var xQueueFindCustom func(uintptr, uintptr, uintptr) uintptr | |||||
| 99 | // takes two gconstpointer arguments, the #GQueue element's data as the | 90 | // takes two gconstpointer arguments, the #GQueue element's data as the | ||
| 100 | // first argument and the given user data as the second argument. | 91 | // first argument and the given user data as the second argument. | ||
| 101 | func (x *Queue) FindCustom(DataVar uintptr, FuncVar *CompareFunc) *List { | 92 | func (x *Queue) FindCustom(DataVar uintptr, FuncVar *CompareFunc) *List { | ||
| 102 | - | core.LazyRegister(&xQueueFindCustom, "GLIB", "g_queue_find_custom", false) | |||
| 103 | - | ||||
| 104 | cret := xQueueFindCustom(x.GoPointer(), DataVar, NewCallback(FuncVar)) | 93 | cret := xQueueFindCustom(x.GoPointer(), DataVar, NewCallback(FuncVar)) | ||
| 105 | if cret == 0 { | 94 | if cret == 0 { | ||
| 106 | return nil | 95 | return nil | ||
| @@ -116,8 +105,6 @@ var xQueueForeach func(uintptr, uintptr, uintptr) | |||||
| 116 | // It is safe for @func to remove the element from @queue, but it must | 105 | // It is safe for @func to remove the element from @queue, but it must | ||
| 117 | // not modify any part of the queue after that element. | 106 | // not modify any part of the queue after that element. | ||
| 118 | func (x *Queue) Foreach(FuncVar *Func, UserDataVar uintptr) { | 107 | func (x *Queue) Foreach(FuncVar *Func, UserDataVar uintptr) { | ||
| 119 | - | core.LazyRegister(&xQueueForeach, "GLIB", "g_queue_foreach", false) | |||
| 120 | - | ||||
| 121 | xQueueForeach(x.GoPointer(), NewCallback(FuncVar), UserDataVar) | 108 | xQueueForeach(x.GoPointer(), NewCallback(FuncVar), UserDataVar) | ||
| 122 | } | 109 | } | ||
| 123 | 110 | ||||
| @@ -130,8 +117,6 @@ var xQueueFree func(uintptr) | |||||
| 130 | // If queue elements contain dynamically-allocated memory, you should | 117 | // If queue elements contain dynamically-allocated memory, you should | ||
| 131 | // either use g_queue_free_full() or free them manually first. | 118 | // either use g_queue_free_full() or free them manually first. | ||
| 132 | func (x *Queue) Free() { | 119 | func (x *Queue) Free() { | ||
| 133 | - | core.LazyRegister(&xQueueFree, "GLIB", "g_queue_free", false) | |||
| 134 | - | ||||
| 135 | xQueueFree(x.GoPointer()) | 120 | xQueueFree(x.GoPointer()) | ||
| 136 | } | 121 | } | ||
| 137 | 122 | ||||
| @@ -143,8 +128,6 @@ var xQueueFreeFull func(uintptr, uintptr) | |||||
| 143 | // @free_func should not modify the queue (eg, by removing the freed | 128 | // @free_func should not modify the queue (eg, by removing the freed | ||
| 144 | // element from it). | 129 | // element from it). | ||
| 145 | func (x *Queue) FreeFull(FreeFuncVar *DestroyNotify) { | 130 | func (x *Queue) FreeFull(FreeFuncVar *DestroyNotify) { | ||
| 146 | - | core.LazyRegister(&xQueueFreeFull, "GLIB", "g_queue_free_full", false) | |||
| 147 | - | ||||
| 148 | xQueueFreeFull(x.GoPointer(), NewCallback(FreeFuncVar)) | 131 | xQueueFreeFull(x.GoPointer(), NewCallback(FreeFuncVar)) | ||
| 149 | } | 132 | } | ||
| 150 | 133 | ||||
| @@ -152,8 +135,6 @@ var xQueueGetLength func(uintptr) uint | |||||
| 152 | 135 | ||||
| 153 | // Returns the number of items in @queue. | 136 | // Returns the number of items in @queue. | ||
| 154 | func (x *Queue) GetLength() uint { | 137 | func (x *Queue) GetLength() uint { | ||
| 155 | - | core.LazyRegister(&xQueueGetLength, "GLIB", "g_queue_get_length", false) | |||
| 156 | - | ||||
| 157 | cret := xQueueGetLength(x.GoPointer()) | 138 | cret := xQueueGetLength(x.GoPointer()) | ||
| 158 | return cret | 139 | return cret | ||
| 159 | } | 140 | } | ||
| @@ -162,8 +143,6 @@ var xQueueIndex func(uintptr, uintptr) int | |||||
| 162 | 143 | ||||
| 163 | // Returns the position of the first element in @queue which contains @data. | 144 | // Returns the position of the first element in @queue which contains @data. | ||
| 164 | func (x *Queue) Index(DataVar uintptr) int { | 145 | func (x *Queue) Index(DataVar uintptr) int { | ||
| 165 | - | core.LazyRegister(&xQueueIndex, "GLIB", "g_queue_index", false) | |||
| 166 | - | ||||
| 167 | cret := xQueueIndex(x.GoPointer(), DataVar) | 146 | cret := xQueueIndex(x.GoPointer(), DataVar) | ||
| 168 | return cret | 147 | return cret | ||
| 169 | } | 148 | } | ||
| @@ -175,8 +154,6 @@ var xQueueInit func(uintptr) | |||||
| 175 | // %G_QUEUE_INIT. It is not necessary to initialize queues created with | 154 | // %G_QUEUE_INIT. It is not necessary to initialize queues created with | ||
| 176 | // g_queue_new(). | 155 | // g_queue_new(). | ||
| 177 | func (x *Queue) Init() { | 156 | func (x *Queue) Init() { | ||
| 178 | - | core.LazyRegister(&xQueueInit, "GLIB", "g_queue_init", false) | |||
| 179 | - | ||||
| 180 | xQueueInit(x.GoPointer()) | 157 | xQueueInit(x.GoPointer()) | ||
| 181 | } | 158 | } | ||
| 182 | 159 | ||||
| @@ -187,8 +164,6 @@ var xQueueInsertAfter func(uintptr, *List, uintptr) | |||||
| 187 | // @sibling must be part of @queue. Since GLib 2.44 a %NULL sibling pushes the | 164 | // @sibling must be part of @queue. Since GLib 2.44 a %NULL sibling pushes the | ||
| 188 | // data at the head of the queue. | 165 | // data at the head of the queue. | ||
| 189 | func (x *Queue) InsertAfter(SiblingVar *List, DataVar uintptr) { | 166 | func (x *Queue) InsertAfter(SiblingVar *List, DataVar uintptr) { | ||
| 190 | - | core.LazyRegister(&xQueueInsertAfter, "GLIB", "g_queue_insert_after", false) | |||
| 191 | - | ||||
| 192 | xQueueInsertAfter(x.GoPointer(), SiblingVar, DataVar) | 167 | xQueueInsertAfter(x.GoPointer(), SiblingVar, DataVar) | ||
| 193 | } | 168 | } | ||
| 194 | 169 | ||||
| @@ -198,8 +173,6 @@ var xQueueInsertAfterLink func(uintptr, *List, *List) | |||||
| 198 | // | 173 | // | ||
| 199 | // @sibling must be part of @queue. | 174 | // @sibling must be part of @queue. | ||
| 200 | func (x *Queue) InsertAfterLink(SiblingVar *List, LinkVar *List) { | 175 | func (x *Queue) InsertAfterLink(SiblingVar *List, LinkVar *List) { | ||
| 201 | - | core.LazyRegister(&xQueueInsertAfterLink, "GLIB", "g_queue_insert_after_link", false) | |||
| 202 | - | ||||
| 203 | xQueueInsertAfterLink(x.GoPointer(), SiblingVar, LinkVar) | 176 | xQueueInsertAfterLink(x.GoPointer(), SiblingVar, LinkVar) | ||
| 204 | } | 177 | } | ||
| 205 | 178 | ||||
| @@ -210,8 +183,6 @@ var xQueueInsertBefore func(uintptr, *List, uintptr) | |||||
| 210 | // @sibling must be part of @queue. Since GLib 2.44 a %NULL sibling pushes the | 183 | // @sibling must be part of @queue. Since GLib 2.44 a %NULL sibling pushes the | ||
| 211 | // data at the tail of the queue. | 184 | // data at the tail of the queue. | ||
| 212 | func (x *Queue) InsertBefore(SiblingVar *List, DataVar uintptr) { | 185 | func (x *Queue) InsertBefore(SiblingVar *List, DataVar uintptr) { | ||
| 213 | - | core.LazyRegister(&xQueueInsertBefore, "GLIB", "g_queue_insert_before", false) | |||
| 214 | - | ||||
| 215 | xQueueInsertBefore(x.GoPointer(), SiblingVar, DataVar) | 186 | xQueueInsertBefore(x.GoPointer(), SiblingVar, DataVar) | ||
| 216 | } | 187 | } | ||
| 217 | 188 | ||||
| @@ -221,8 +192,6 @@ var xQueueInsertBeforeLink func(uintptr, *List, *List) | |||||
| 221 | // | 192 | // | ||
| 222 | // @sibling must be part of @queue. | 193 | // @sibling must be part of @queue. | ||
| 223 | func (x *Queue) InsertBeforeLink(SiblingVar *List, LinkVar *List) { | 194 | func (x *Queue) InsertBeforeLink(SiblingVar *List, LinkVar *List) { | ||
| 224 | - | core.LazyRegister(&xQueueInsertBeforeLink, "GLIB", "g_queue_insert_before_link", false) | |||
| 225 | - | ||||
| 226 | xQueueInsertBeforeLink(x.GoPointer(), SiblingVar, LinkVar) | 195 | xQueueInsertBeforeLink(x.GoPointer(), SiblingVar, LinkVar) | ||
| 227 | } | 196 | } | ||
| 228 | 197 | ||||
| @@ -230,8 +199,6 @@ var xQueueInsertSorted func(uintptr, uintptr, uintptr, uintptr) | |||||
| 230 | 199 | ||||
| 231 | // Inserts @data into @queue using @func to determine the new position. | 200 | // Inserts @data into @queue using @func to determine the new position. | ||
| 232 | func (x *Queue) InsertSorted(DataVar uintptr, FuncVar *CompareDataFunc, UserDataVar uintptr) { | 201 | func (x *Queue) InsertSorted(DataVar uintptr, FuncVar *CompareDataFunc, UserDataVar uintptr) { | ||
| 233 | - | core.LazyRegister(&xQueueInsertSorted, "GLIB", "g_queue_insert_sorted", false) | |||
| 234 | - | ||||
| 235 | xQueueInsertSorted(x.GoPointer(), DataVar, NewCallback(FuncVar), UserDataVar) | 202 | xQueueInsertSorted(x.GoPointer(), DataVar, NewCallback(FuncVar), UserDataVar) | ||
| 236 | } | 203 | } | ||
| 237 | 204 | ||||
| @@ -239,8 +206,6 @@ var xQueueIsEmpty func(uintptr) bool | |||||
| 239 | 206 | ||||
| 240 | // Returns %TRUE if the queue is empty. | 207 | // Returns %TRUE if the queue is empty. | ||
| 241 | func (x *Queue) IsEmpty() bool { | 208 | func (x *Queue) IsEmpty() bool { | ||
| 242 | - | core.LazyRegister(&xQueueIsEmpty, "GLIB", "g_queue_is_empty", false) | |||
| 243 | - | ||||
| 244 | cret := xQueueIsEmpty(x.GoPointer()) | 209 | cret := xQueueIsEmpty(x.GoPointer()) | ||
| 245 | return cret | 210 | return cret | ||
| 246 | } | 211 | } | ||
| @@ -249,8 +214,6 @@ var xQueueLinkIndex func(uintptr, *List) int | |||||
| 249 | 214 | ||||
| 250 | // Returns the position of @link_ in @queue. | 215 | // Returns the position of @link_ in @queue. | ||
| 251 | func (x *Queue) LinkIndex(LinkVar *List) int { | 216 | func (x *Queue) LinkIndex(LinkVar *List) int { | ||
| 252 | - | core.LazyRegister(&xQueueLinkIndex, "GLIB", "g_queue_link_index", false) | |||
| 253 | - | ||||
| 254 | cret := xQueueLinkIndex(x.GoPointer(), LinkVar) | 217 | cret := xQueueLinkIndex(x.GoPointer(), LinkVar) | ||
| 255 | return cret | 218 | return cret | ||
| 256 | } | 219 | } | ||
| @@ -259,8 +222,6 @@ var xQueuePeekHead func(uintptr) uintptr | |||||
| 259 | 222 | ||||
| 260 | // Returns the first element of the queue. | 223 | // Returns the first element of the queue. | ||
| 261 | func (x *Queue) PeekHead() uintptr { | 224 | func (x *Queue) PeekHead() uintptr { | ||
| 262 | - | core.LazyRegister(&xQueuePeekHead, "GLIB", "g_queue_peek_head", false) | |||
| 263 | - | ||||
| 264 | cret := xQueuePeekHead(x.GoPointer()) | 225 | cret := xQueuePeekHead(x.GoPointer()) | ||
| 265 | return cret | 226 | return cret | ||
| 266 | } | 227 | } | ||
| @@ -269,8 +230,6 @@ var xQueuePeekHeadLink func(uintptr) uintptr | |||||
| 269 | 230 | ||||
| 270 | // Returns the first link in @queue. | 231 | // Returns the first link in @queue. | ||
| 271 | func (x *Queue) PeekHeadLink() *List { | 232 | func (x *Queue) PeekHeadLink() *List { | ||
| 272 | - | core.LazyRegister(&xQueuePeekHeadLink, "GLIB", "g_queue_peek_head_link", false) | |||
| 273 | - | ||||
| 274 | cret := xQueuePeekHeadLink(x.GoPointer()) | 233 | cret := xQueuePeekHeadLink(x.GoPointer()) | ||
| 275 | if cret == 0 { | 234 | if cret == 0 { | ||
| 276 | return nil | 235 | return nil | ||
| @@ -282,8 +241,6 @@ var xQueuePeekNth func(uintptr, uint) uintptr | |||||
| 282 | 241 | ||||
| 283 | // Returns the @n'th element of @queue. | 242 | // Returns the @n'th element of @queue. | ||
| 284 | func (x *Queue) PeekNth(NVar uint) uintptr { | 243 | func (x *Queue) PeekNth(NVar uint) uintptr { | ||
| 285 | - | core.LazyRegister(&xQueuePeekNth, "GLIB", "g_queue_peek_nth", false) | |||
| 286 | - | ||||
| 287 | cret := xQueuePeekNth(x.GoPointer(), NVar) | 244 | cret := xQueuePeekNth(x.GoPointer(), NVar) | ||
| 288 | return cret | 245 | return cret | ||
| 289 | } | 246 | } | ||
| @@ -292,8 +249,6 @@ var xQueuePeekNthLink func(uintptr, uint) uintptr | |||||
| 292 | 249 | ||||
| 293 | // Returns the link at the given position | 250 | // Returns the link at the given position | ||
| 294 | func (x *Queue) PeekNthLink(NVar uint) *List { | 251 | func (x *Queue) PeekNthLink(NVar uint) *List { | ||
| 295 | - | core.LazyRegister(&xQueuePeekNthLink, "GLIB", "g_queue_peek_nth_link", false) | |||
| 296 | - | ||||
| 297 | cret := xQueuePeekNthLink(x.GoPointer(), NVar) | 252 | cret := xQueuePeekNthLink(x.GoPointer(), NVar) | ||
| 298 | if cret == 0 { | 253 | if cret == 0 { | ||
| 299 | return nil | 254 | return nil | ||
| @@ -305,8 +260,6 @@ var xQueuePeekTail func(uintptr) uintptr | |||||
| 305 | 260 | ||||
| 306 | // Returns the last element of the queue. | 261 | // Returns the last element of the queue. | ||
| 307 | func (x *Queue) PeekTail() uintptr { | 262 | func (x *Queue) PeekTail() uintptr { | ||
| 308 | - | core.LazyRegister(&xQueuePeekTail, "GLIB", "g_queue_peek_tail", false) | |||
| 309 | - | ||||
| 310 | cret := xQueuePeekTail(x.GoPointer()) | 263 | cret := xQueuePeekTail(x.GoPointer()) | ||
| 311 | return cret | 264 | return cret | ||
| 312 | } | 265 | } | ||
| @@ -315,8 +268,6 @@ var xQueuePeekTailLink func(uintptr) uintptr | |||||
| 315 | 268 | ||||
| 316 | // Returns the last link in @queue. | 269 | // Returns the last link in @queue. | ||
| 317 | func (x *Queue) PeekTailLink() *List { | 270 | func (x *Queue) PeekTailLink() *List { | ||
| 318 | - | core.LazyRegister(&xQueuePeekTailLink, "GLIB", "g_queue_peek_tail_link", false) | |||
| 319 | - | ||||
| 320 | cret := xQueuePeekTailLink(x.GoPointer()) | 271 | cret := xQueuePeekTailLink(x.GoPointer()) | ||
| 321 | if cret == 0 { | 272 | if cret == 0 { | ||
| 322 | return nil | 273 | return nil | ||
| @@ -328,8 +279,6 @@ var xQueuePopHead func(uintptr) uintptr | |||||
| 328 | 279 | ||||
| 329 | // Removes the first element of the queue and returns its data. | 280 | // Removes the first element of the queue and returns its data. | ||
| 330 | func (x *Queue) PopHead() uintptr { | 281 | func (x *Queue) PopHead() uintptr { | ||
| 331 | - | core.LazyRegister(&xQueuePopHead, "GLIB", "g_queue_pop_head", false) | |||
| 332 | - | ||||
| 333 | cret := xQueuePopHead(x.GoPointer()) | 282 | cret := xQueuePopHead(x.GoPointer()) | ||
| 334 | return cret | 283 | return cret | ||
| 335 | } | 284 | } | ||
| @@ -338,8 +287,6 @@ var xQueuePopHeadLink func(uintptr) uintptr | |||||
| 338 | 287 | ||||
| 339 | // Removes and returns the first element of the queue. | 288 | // Removes and returns the first element of the queue. | ||
| 340 | func (x *Queue) PopHeadLink() *List { | 289 | func (x *Queue) PopHeadLink() *List { | ||
| 341 | - | core.LazyRegister(&xQueuePopHeadLink, "GLIB", "g_queue_pop_head_link", false) | |||
| 342 | - | ||||
| 343 | cret := xQueuePopHeadLink(x.GoPointer()) | 290 | cret := xQueuePopHeadLink(x.GoPointer()) | ||
| 344 | if cret == 0 { | 291 | if cret == 0 { | ||
| 345 | return nil | 292 | return nil | ||
| @@ -351,8 +298,6 @@ var xQueuePopNth func(uintptr, uint) uintptr | |||||
| 351 | 298 | ||||
| 352 | // Removes the @n'th element of @queue and returns its data. | 299 | // Removes the @n'th element of @queue and returns its data. | ||
| 353 | func (x *Queue) PopNth(NVar uint) uintptr { | 300 | func (x *Queue) PopNth(NVar uint) uintptr { | ||
| 354 | - | core.LazyRegister(&xQueuePopNth, "GLIB", "g_queue_pop_nth", false) | |||
| 355 | - | ||||
| 356 | cret := xQueuePopNth(x.GoPointer(), NVar) | 301 | cret := xQueuePopNth(x.GoPointer(), NVar) | ||
| 357 | return cret | 302 | return cret | ||
| 358 | } | 303 | } | ||
| @@ -361,8 +306,6 @@ var xQueuePopNthLink func(uintptr, uint) uintptr | |||||
| 361 | 306 | ||||
| 362 | // Removes and returns the link at the given position. | 307 | // Removes and returns the link at the given position. | ||
| 363 | func (x *Queue) PopNthLink(NVar uint) *List { | 308 | func (x *Queue) PopNthLink(NVar uint) *List { | ||
| 364 | - | core.LazyRegister(&xQueuePopNthLink, "GLIB", "g_queue_pop_nth_link", false) | |||
| 365 | - | ||||
| 366 | cret := xQueuePopNthLink(x.GoPointer(), NVar) | 309 | cret := xQueuePopNthLink(x.GoPointer(), NVar) | ||
| 367 | if cret == 0 { | 310 | if cret == 0 { | ||
| 368 | return nil | 311 | return nil | ||
| @@ -374,8 +317,6 @@ var xQueuePopTail func(uintptr) uintptr | |||||
| 374 | 317 | ||||
| 375 | // Removes the last element of the queue and returns its data. | 318 | // Removes the last element of the queue and returns its data. | ||
| 376 | func (x *Queue) PopTail() uintptr { | 319 | func (x *Queue) PopTail() uintptr { | ||
| 377 | - | core.LazyRegister(&xQueuePopTail, "GLIB", "g_queue_pop_tail", false) | |||
| 378 | - | ||||
| 379 | cret := xQueuePopTail(x.GoPointer()) | 320 | cret := xQueuePopTail(x.GoPointer()) | ||
| 380 | return cret | 321 | return cret | ||
| 381 | } | 322 | } | ||
| @@ -384,8 +325,6 @@ var xQueuePopTailLink func(uintptr) uintptr | |||||
| 384 | 325 | ||||
| 385 | // Removes and returns the last element of the queue. | 326 | // Removes and returns the last element of the queue. | ||
| 386 | func (x *Queue) PopTailLink() *List { | 327 | func (x *Queue) PopTailLink() *List { | ||
| 387 | - | core.LazyRegister(&xQueuePopTailLink, "GLIB", "g_queue_pop_tail_link", false) | |||
| 388 | - | ||||
| 389 | cret := xQueuePopTailLink(x.GoPointer()) | 328 | cret := xQueuePopTailLink(x.GoPointer()) | ||
| 390 | if cret == 0 { | 329 | if cret == 0 { | ||
| 391 | return nil | 330 | return nil | ||
| @@ -397,8 +336,6 @@ var xQueuePushHead func(uintptr, uintptr) | |||||
| 397 | 336 | ||||
| 398 | // Adds a new element at the head of the queue. | 337 | // Adds a new element at the head of the queue. | ||
| 399 | func (x *Queue) PushHead(DataVar uintptr) { | 338 | func (x *Queue) PushHead(DataVar uintptr) { | ||
| 400 | - | core.LazyRegister(&xQueuePushHead, "GLIB", "g_queue_push_head", false) | |||
| 401 | - | ||||
| 402 | xQueuePushHead(x.GoPointer(), DataVar) | 339 | xQueuePushHead(x.GoPointer(), DataVar) | ||
| 403 | } | 340 | } | ||
| 404 | 341 | ||||
| @@ -406,8 +343,6 @@ var xQueuePushHeadLink func(uintptr, *List) | |||||
| 406 | 343 | ||||
| 407 | // Adds a new element at the head of the queue. | 344 | // Adds a new element at the head of the queue. | ||
| 408 | func (x *Queue) PushHeadLink(LinkVar *List) { | 345 | func (x *Queue) PushHeadLink(LinkVar *List) { | ||
| 409 | - | core.LazyRegister(&xQueuePushHeadLink, "GLIB", "g_queue_push_head_link", false) | |||
| 410 | - | ||||
| 411 | xQueuePushHeadLink(x.GoPointer(), LinkVar) | 346 | xQueuePushHeadLink(x.GoPointer(), LinkVar) | ||
| 412 | } | 347 | } | ||
| 413 | 348 | ||||
| @@ -415,8 +350,6 @@ var xQueuePushNth func(uintptr, uintptr, int) | |||||
| 415 | 350 | ||||
| 416 | // Inserts a new element into @queue at the given position. | 351 | // Inserts a new element into @queue at the given position. | ||
| 417 | func (x *Queue) PushNth(DataVar uintptr, NVar int) { | 352 | func (x *Queue) PushNth(DataVar uintptr, NVar int) { | ||
| 418 | - | core.LazyRegister(&xQueuePushNth, "GLIB", "g_queue_push_nth", false) | |||
| 419 | - | ||||
| 420 | xQueuePushNth(x.GoPointer(), DataVar, NVar) | 353 | xQueuePushNth(x.GoPointer(), DataVar, NVar) | ||
| 421 | } | 354 | } | ||
| 422 | 355 | ||||
| @@ -424,8 +357,6 @@ var xQueuePushNthLink func(uintptr, int, *List) | |||||
| 424 | 357 | ||||
| 425 | // Inserts @link into @queue at the given position. | 358 | // Inserts @link into @queue at the given position. | ||
| 426 | func (x *Queue) PushNthLink(NVar int, LinkVar *List) { | 359 | func (x *Queue) PushNthLink(NVar int, LinkVar *List) { | ||
| 427 | - | core.LazyRegister(&xQueuePushNthLink, "GLIB", "g_queue_push_nth_link", false) | |||
| 428 | - | ||||
| 429 | xQueuePushNthLink(x.GoPointer(), NVar, LinkVar) | 360 | xQueuePushNthLink(x.GoPointer(), NVar, LinkVar) | ||
| 430 | } | 361 | } | ||
| 431 | 362 | ||||
| @@ -433,8 +364,6 @@ var xQueuePushTail func(uintptr, uintptr) | |||||
| 433 | 364 | ||||
| 434 | // Adds a new element at the tail of the queue. | 365 | // Adds a new element at the tail of the queue. | ||
| 435 | func (x *Queue) PushTail(DataVar uintptr) { | 366 | func (x *Queue) PushTail(DataVar uintptr) { | ||
| 436 | - | core.LazyRegister(&xQueuePushTail, "GLIB", "g_queue_push_tail", false) | |||
| 437 | - | ||||
| 438 | xQueuePushTail(x.GoPointer(), DataVar) | 367 | xQueuePushTail(x.GoPointer(), DataVar) | ||
| 439 | } | 368 | } | ||
| 440 | 369 | ||||
| @@ -442,8 +371,6 @@ var xQueuePushTailLink func(uintptr, *List) | |||||
| 442 | 371 | ||||
| 443 | // Adds a new element at the tail of the queue. | 372 | // Adds a new element at the tail of the queue. | ||
| 444 | func (x *Queue) PushTailLink(LinkVar *List) { | 373 | func (x *Queue) PushTailLink(LinkVar *List) { | ||
| 445 | - | core.LazyRegister(&xQueuePushTailLink, "GLIB", "g_queue_push_tail_link", false) | |||
| 446 | - | ||||
| 447 | xQueuePushTailLink(x.GoPointer(), LinkVar) | 374 | xQueuePushTailLink(x.GoPointer(), LinkVar) | ||
| 448 | } | 375 | } | ||
| 449 | 376 | ||||
| @@ -451,8 +378,6 @@ var xQueueRemove func(uintptr, uintptr) bool | |||||
| 451 | 378 | ||||
| 452 | // Removes the first element in @queue that contains @data. | 379 | // Removes the first element in @queue that contains @data. | ||
| 453 | func (x *Queue) Remove(DataVar uintptr) bool { | 380 | func (x *Queue) Remove(DataVar uintptr) bool { | ||
| 454 | - | core.LazyRegister(&xQueueRemove, "GLIB", "g_queue_remove", false) | |||
| 455 | - | ||||
| 456 | cret := xQueueRemove(x.GoPointer(), DataVar) | 381 | cret := xQueueRemove(x.GoPointer(), DataVar) | ||
| 457 | return cret | 382 | return cret | ||
| 458 | } | 383 | } | ||
| @@ -461,8 +386,6 @@ var xQueueRemoveAll func(uintptr, uintptr) uint | |||||
| 461 | 386 | ||||
| 462 | // Remove all elements whose data equals @data from @queue. | 387 | // Remove all elements whose data equals @data from @queue. | ||
| 463 | func (x *Queue) RemoveAll(DataVar uintptr) uint { | 388 | func (x *Queue) RemoveAll(DataVar uintptr) uint { | ||
| 464 | - | core.LazyRegister(&xQueueRemoveAll, "GLIB", "g_queue_remove_all", false) | |||
| 465 | - | ||||
| 466 | cret := xQueueRemoveAll(x.GoPointer(), DataVar) | 389 | cret := xQueueRemoveAll(x.GoPointer(), DataVar) | ||
| 467 | return cret | 390 | return cret | ||
| 468 | } | 391 | } | ||
| @@ -471,8 +394,6 @@ var xQueueReverse func(uintptr) | |||||
| 471 | 394 | ||||
| 472 | // Reverses the order of the items in @queue. | 395 | // Reverses the order of the items in @queue. | ||
| 473 | func (x *Queue) Reverse() { | 396 | func (x *Queue) Reverse() { | ||
| 474 | - | core.LazyRegister(&xQueueReverse, "GLIB", "g_queue_reverse", false) | |||
| 475 | - | ||||
| 476 | xQueueReverse(x.GoPointer()) | 397 | xQueueReverse(x.GoPointer()) | ||
| 477 | } | 398 | } | ||
| 478 | 399 | ||||
| @@ -480,8 +401,6 @@ var xQueueSort func(uintptr, uintptr, uintptr) | |||||
| 480 | 401 | ||||
| 481 | // Sorts @queue using @compare_func. | 402 | // Sorts @queue using @compare_func. | ||
| 482 | func (x *Queue) Sort(CompareFuncVar *CompareDataFunc, UserDataVar uintptr) { | 403 | func (x *Queue) Sort(CompareFuncVar *CompareDataFunc, UserDataVar uintptr) { | ||
| 483 | - | core.LazyRegister(&xQueueSort, "GLIB", "g_queue_sort", false) | |||
| 484 | - | ||||
| 485 | xQueueSort(x.GoPointer(), NewCallback(CompareFuncVar), UserDataVar) | 404 | xQueueSort(x.GoPointer(), NewCallback(CompareFuncVar), UserDataVar) | ||
| 486 | } | 405 | } | ||
| 487 | 406 | ||||
| @@ -492,12 +411,61 @@ var xQueueUnlink func(uintptr, *List) | |||||
| 492 | // | 411 | // | ||
| 493 | // @link_ must be part of @queue. | 412 | // @link_ must be part of @queue. | ||
| 494 | func (x *Queue) Unlink(LinkVar *List) { | 413 | func (x *Queue) Unlink(LinkVar *List) { | ||
| 495 | - | core.LazyRegister(&xQueueUnlink, "GLIB", "g_queue_unlink", false) | |||
| 496 | - | ||||
| 497 | xQueueUnlink(x.GoPointer(), LinkVar) | 414 | xQueueUnlink(x.GoPointer(), LinkVar) | ||
| 498 | } | 415 | } | ||
| 499 | 416 | ||||
| 500 | func init() { | 417 | func init() { | ||
| 501 | core.SetPackageName("GLIB", "glib-2.0") | 418 | core.SetPackageName("GLIB", "glib-2.0") | ||
| 502 | core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0", "libgobject-2.0.0.dylib", "libglib-2.0.0.dylib"}) | 419 | core.SetSharedLibraries("GLIB", []string{"libgobject-2.0.so.0", "libglib-2.0.so.0", "libgobject-2.0.0.dylib", "libglib-2.0.0.dylib"}) | ||
| 420 | + | var libs []uintptr | |||
| 421 | + | for _, libPath := range core.GetPaths("GLIB") { | |||
| 422 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 423 | + | if err != nil { | |||
| 424 | + | panic(err) | |||
| 425 | + | } | |||
| 426 | + | libs = append(libs, lib) | |||
| 427 | + | } | |||
| 428 | + | ||||
| 429 | + | core.PuregoSafeRegister(&xQueueClear, libs, "g_queue_clear") | |||
| 430 | + | core.PuregoSafeRegister(&xQueueClearFull, libs, "g_queue_clear_full") | |||
| 431 | + | core.PuregoSafeRegister(&xQueueCopy, libs, "g_queue_copy") | |||
| 432 | + | core.PuregoSafeRegister(&xQueueDeleteLink, libs, "g_queue_delete_link") | |||
| 433 | + | core.PuregoSafeRegister(&xQueueFind, libs, "g_queue_find") | |||
| 434 | + | core.PuregoSafeRegister(&xQueueFindCustom, libs, "g_queue_find_custom") | |||
| 435 | + | core.PuregoSafeRegister(&xQueueForeach, libs, "g_queue_foreach") | |||
| 436 | + | core.PuregoSafeRegister(&xQueueFree, libs, "g_queue_free") | |||
| 437 | + | core.PuregoSafeRegister(&xQueueFreeFull, libs, "g_queue_free_full") | |||
| 438 | + | core.PuregoSafeRegister(&xQueueGetLength, libs, "g_queue_get_length") | |||
| 439 | + | core.PuregoSafeRegister(&xQueueIndex, libs, "g_queue_index") | |||
| 440 | + | core.PuregoSafeRegister(&xQueueInit, libs, "g_queue_init") | |||
| 441 | + | core.PuregoSafeRegister(&xQueueInsertAfter, libs, "g_queue_insert_after") | |||
| 442 | + | core.PuregoSafeRegister(&xQueueInsertAfterLink, libs, "g_queue_insert_after_link") | |||
| 443 | + | core.PuregoSafeRegister(&xQueueInsertBefore, libs, "g_queue_insert_before") | |||
| 444 | + | core.PuregoSafeRegister(&xQueueInsertBeforeLink, libs, "g_queue_insert_before_link") | |||
| 445 | + | core.PuregoSafeRegister(&xQueueInsertSorted, libs, "g_queue_insert_sorted") | |||
| 446 | + | core.PuregoSafeRegister(&xQueueIsEmpty, libs, "g_queue_is_empty") | |||
| 447 | + | core.PuregoSafeRegister(&xQueueLinkIndex, libs, "g_queue_link_index") | |||
| 448 | + | core.PuregoSafeRegister(&xQueuePeekHead, libs, "g_queue_peek_head") | |||
| 449 | + | core.PuregoSafeRegister(&xQueuePeekHeadLink, libs, "g_queue_peek_head_link") | |||
| 450 | + | core.PuregoSafeRegister(&xQueuePeekNth, libs, "g_queue_peek_nth") | |||
| 451 | + | core.PuregoSafeRegister(&xQueuePeekNthLink, libs, "g_queue_peek_nth_link") | |||
| 452 | + | core.PuregoSafeRegister(&xQueuePeekTail, libs, "g_queue_peek_tail") | |||
| 453 | + | core.PuregoSafeRegister(&xQueuePeekTailLink, libs, "g_queue_peek_tail_link") | |||
| 454 | + | core.PuregoSafeRegister(&xQueuePopHead, libs, "g_queue_pop_head") | |||
| 455 | + | core.PuregoSafeRegister(&xQueuePopHeadLink, libs, "g_queue_pop_head_link") | |||
| 456 | + | core.PuregoSafeRegister(&xQueuePopNth, libs, "g_queue_pop_nth") | |||
| 457 | + | core.PuregoSafeRegister(&xQueuePopNthLink, libs, "g_queue_pop_nth_link") | |||
| 458 | + | core.PuregoSafeRegister(&xQueuePopTail, libs, "g_queue_pop_tail") | |||
| 459 | + | core.PuregoSafeRegister(&xQueuePopTailLink, libs, "g_queue_pop_tail_link") | |||
| 460 | + | core.PuregoSafeRegister(&xQueuePushHead, libs, "g_queue_push_head") | |||
| 461 | + | core.PuregoSafeRegister(&xQueuePushHeadLink, libs, "g_queue_push_head_link") | |||
| 462 | + | core.PuregoSafeRegister(&xQueuePushNth, libs, "g_queue_push_nth") | |||
| 463 | + | core.PuregoSafeRegister(&xQueuePushNthLink, libs, "g_queue_push_nth_link") | |||
| 464 | + | core.PuregoSafeRegister(&xQueuePushTail, libs, "g_queue_push_tail") | |||
| 465 | + | core.PuregoSafeRegister(&xQueuePushTailLink, libs, "g_queue_push_tail_link") | |||
| 466 | + | core.PuregoSafeRegister(&xQueueRemove, libs, "g_queue_remove") | |||
| 467 | + | core.PuregoSafeRegister(&xQueueRemoveAll, libs, "g_queue_remove_all") | |||
| 468 | + | core.PuregoSafeRegister(&xQueueReverse, libs, "g_queue_reverse") | |||
| 469 | + | core.PuregoSafeRegister(&xQueueSort, libs, "g_queue_sort") | |||
| 470 | + | core.PuregoSafeRegister(&xQueueUnlink, libs, "g_queue_unlink") | |||
| 503 | } | 471 | } | ||