Revert "chore(deps): pin puregotk nil-signal fix"
This reverts commit a161e348e2093172038390b0906448f0ae979a0d.
- commit
- 40378d5e4fd2372d054e49168ab2a6f67aedd0fd
- author
- brice · · 2026-07-14 17:59 UTC
- parent
- 8d647bb
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
905 files · +25263 -27842
M go.mod +1 -1
| @@ -11,7 +11,7 @@ require ( | |||
| 11 | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | |
| 12 | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | |
| 13 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | |
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | |
| 14 | + | github.com/bnema/puregotk v0.7.0 | |
| 15 | 15 | github.com/charmbracelet/bubbles v1.0.0 | |
| 16 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 17 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | |
| @@ -11,7 +11,7 @@ require ( | |||||
| 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | 11 | github.com/bnema/purego-pipewire v0.1.5-0.20260714124450-6504b9cdf02a | ||
| 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | 12 | github.com/bnema/purego-sqlite v0.1.4-0.20260714131321-3614fe683b9c | ||
| 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | 13 | github.com/bnema/purego-webp v0.2.1-0.20260714152238-7bc9c402fdf6 | ||
| 14 | - | github.com/bnema/puregotk v0.7.1-0.20260714170452-0b6b9b901234 | 14 | + | github.com/bnema/puregotk v0.7.0 |
| 15 | github.com/charmbracelet/bubbles v1.0.0 | 15 | github.com/charmbracelet/bubbles v1.0.0 | ||
| 16 | github.com/charmbracelet/bubbletea v1.3.10 | 16 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 17 | github.com/charmbracelet/lipgloss v1.1.0 | 17 | github.com/charmbracelet/lipgloss v1.1.0 | ||
M go.sum +0 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/internal/core/core.go +4 -197 generated file: collapsed
M vendor/github.com/bnema/puregotk/pkg/core/core.go +0 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-dialog.go +64 -99 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-about-window.go +62 -95 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-accent-color.go +15 -7 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-action-row.go +29 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-alert-dialog.go +47 -66 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-target.go +27 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation-util.go +12 -4 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-animation.go +26 -24 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application-window.go +22 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-application.go +15 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-avatar.go +25 -22 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-banner.go +26 -23 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bin.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-bottom-sheet.go +38 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint-bin.go +19 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-breakpoint.go +37 -33 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-content.go +22 -18 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-button-row.go +18 -10 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-dots.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel-indicator-lines.go +16 -5 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-carousel.go +37 -47 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-layout.go +20 -14 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp-scrollable.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-clamp.go +22 -17 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-combo-row.go +33 -34 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-dialog.go +38 -45 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-easing.go +13 -3 generated file: collapsed
M vendor/github.com/bnema/puregotk/v4/adw/adw-entry-row.go +33 -40 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
| @@ -4,6 +4,7 @@ package gio | |||
| 4 | 4 | import ( | |
| 5 | 5 | "unsafe" | |
| 6 | 6 | ||
| 7 | + | "github.com/bnema/purego" | |
| 7 | 8 | "github.com/bnema/puregotk/pkg/core" | |
| 8 | 9 | "github.com/bnema/puregotk/v4/glib" | |
| 9 | 10 | ) | |
| @@ -13,8 +14,6 @@ var xContentTypeCanBeExecutable func(string) bool | |||
| 13 | 14 | // Checks if a content type can be executable. Note that for instance | |
| 14 | 15 | // things like text files can be executables (i.e. scripts and batch files). | |
| 15 | 16 | func ContentTypeCanBeExecutable(TypeVar string) bool { | |
| 16 | - | core.LazyRegister(&xContentTypeCanBeExecutable, "GIO", "g_content_type_can_be_executable", false) | |
| 17 | - | ||
| 18 | 17 | cret := xContentTypeCanBeExecutable(TypeVar) | |
| 19 | 18 | return cret | |
| 20 | 19 | } | |
| @@ -23,8 +22,6 @@ var xContentTypeEquals func(string, string) bool | |||
| 23 | 22 | ||
| 24 | 23 | // Compares two content types for equality. | |
| 25 | 24 | func ContentTypeEquals(Type1Var string, Type2Var string) bool { | |
| 26 | - | core.LazyRegister(&xContentTypeEquals, "GIO", "g_content_type_equals", false) | |
| 27 | - | ||
| 28 | 25 | cret := xContentTypeEquals(Type1Var, Type2Var) | |
| 29 | 26 | return cret | |
| 30 | 27 | } | |
| @@ -33,8 +30,6 @@ var xContentTypeFromMimeType func(string) string | |||
| 33 | 30 | ||
| 34 | 31 | // Tries to find a content type based on the mime type name. | |
| 35 | 32 | func ContentTypeFromMimeType(MimeTypeVar string) string { | |
| 36 | - | core.LazyRegister(&xContentTypeFromMimeType, "GIO", "g_content_type_from_mime_type", false) | |
| 37 | - | ||
| 38 | 33 | cret := xContentTypeFromMimeType(MimeTypeVar) | |
| 39 | 34 | return cret | |
| 40 | 35 | } | |
| @@ -43,8 +38,6 @@ var xContentTypeGetDescription func(string) string | |||
| 43 | 38 | ||
| 44 | 39 | // Gets the human readable description of the content type. | |
| 45 | 40 | func ContentTypeGetDescription(TypeVar string) string { | |
| 46 | - | core.LazyRegister(&xContentTypeGetDescription, "GIO", "g_content_type_get_description", false) | |
| 47 | - | ||
| 48 | 41 | cret := xContentTypeGetDescription(TypeVar) | |
| 49 | 42 | return cret | |
| 50 | 43 | } | |
| @@ -57,8 +50,6 @@ var xContentTypeGetGenericIconName func(string) string | |||
| 57 | 50 | // [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) | |
| 58 | 51 | // specification for more on the generic icon name. | |
| 59 | 52 | func ContentTypeGetGenericIconName(TypeVar string) string { | |
| 60 | - | core.LazyRegister(&xContentTypeGetGenericIconName, "GIO", "g_content_type_get_generic_icon_name", false) | |
| 61 | - | ||
| 62 | 53 | cret := xContentTypeGetGenericIconName(TypeVar) | |
| 63 | 54 | return cret | |
| 64 | 55 | } | |
| @@ -67,7 +58,6 @@ var xContentTypeGetIcon func(string) uintptr | |||
| 67 | 58 | ||
| 68 | 59 | // Gets the icon for a content type. | |
| 69 | 60 | func ContentTypeGetIcon(TypeVar string) *IconBase { | |
| 70 | - | core.LazyRegister(&xContentTypeGetIcon, "GIO", "g_content_type_get_icon", false) | |
| 71 | 61 | var cls *IconBase | |
| 72 | 62 | ||
| 73 | 63 | cret := xContentTypeGetIcon(TypeVar) | |
| @@ -85,8 +75,6 @@ var xContentTypeGetMimeDirs func() []string | |||
| 85 | 75 | // Get the list of directories which MIME data is loaded from. See | |
| 86 | 76 | // g_content_type_set_mime_dirs() for details. | |
| 87 | 77 | func ContentTypeGetMimeDirs() []string { | |
| 88 | - | core.LazyRegister(&xContentTypeGetMimeDirs, "GIO", "g_content_type_get_mime_dirs", false) | |
| 89 | - | ||
| 90 | 78 | cret := xContentTypeGetMimeDirs() | |
| 91 | 79 | return cret | |
| 92 | 80 | } | |
| @@ -95,8 +83,6 @@ var xContentTypeGetMimeType func(string) string | |||
| 95 | 83 | ||
| 96 | 84 | // Gets the mime type for the content type, if one is registered. | |
| 97 | 85 | func ContentTypeGetMimeType(TypeVar string) string { | |
| 98 | - | core.LazyRegister(&xContentTypeGetMimeType, "GIO", "g_content_type_get_mime_type", false) | |
| 99 | - | ||
| 100 | 86 | cret := xContentTypeGetMimeType(TypeVar) | |
| 101 | 87 | return cret | |
| 102 | 88 | } | |
| @@ -105,7 +91,6 @@ var xContentTypeGetSymbolicIcon func(string) uintptr | |||
| 105 | 91 | ||
| 106 | 92 | // Gets the symbolic icon for a content type. | |
| 107 | 93 | func ContentTypeGetSymbolicIcon(TypeVar string) *IconBase { | |
| 108 | - | core.LazyRegister(&xContentTypeGetSymbolicIcon, "GIO", "g_content_type_get_symbolic_icon", false) | |
| 109 | 94 | var cls *IconBase | |
| 110 | 95 | ||
| 111 | 96 | cret := xContentTypeGetSymbolicIcon(TypeVar) | |
| @@ -125,8 +110,6 @@ var xContentTypeGuess func(uintptr, []byte, uint, *bool) string | |||
| 125 | 110 | // or @data may be %NULL, in which case the guess will be based solely | |
| 126 | 111 | // on the other argument. | |
| 127 | 112 | func ContentTypeGuess(FilenameVar *string, DataVar []byte, DataSizeVar uint, ResultUncertainVar *bool) string { | |
| 128 | - | core.LazyRegister(&xContentTypeGuess, "GIO", "g_content_type_guess", false) | |
| 129 | - | ||
| 130 | 113 | FilenameVarPtr := core.GStrdupNullable(FilenameVar) | |
| 131 | 114 | defer core.GFreeNullable(FilenameVarPtr) | |
| 132 | 115 | ||
| @@ -149,8 +132,6 @@ var xContentTypeGuessForTree func(uintptr) []string | |||
| 149 | 132 | // This function is useful in the implementation of | |
| 150 | 133 | // g_mount_guess_content_type(). | |
| 151 | 134 | func ContentTypeGuessForTree(RootVar File) []string { | |
| 152 | - | core.LazyRegister(&xContentTypeGuessForTree, "GIO", "g_content_type_guess_for_tree", false) | |
| 153 | - | ||
| 154 | 135 | cret := xContentTypeGuessForTree(RootVar.GoPointer()) | |
| 155 | 136 | return cret | |
| 156 | 137 | } | |
| @@ -159,8 +140,6 @@ var xContentTypeIsA func(string, string) bool | |||
| 159 | 140 | ||
| 160 | 141 | // Determines if @type is a subset of @supertype. | |
| 161 | 142 | func ContentTypeIsA(TypeVar string, SupertypeVar string) bool { | |
| 162 | - | core.LazyRegister(&xContentTypeIsA, "GIO", "g_content_type_is_a", false) | |
| 163 | - | ||
| 164 | 143 | cret := xContentTypeIsA(TypeVar, SupertypeVar) | |
| 165 | 144 | return cret | |
| 166 | 145 | } | |
| @@ -170,8 +149,6 @@ var xContentTypeIsMimeType func(string, string) bool | |||
| 170 | 149 | // Determines if @type is a subset of @mime_type. | |
| 171 | 150 | // Convenience wrapper around g_content_type_is_a(). | |
| 172 | 151 | func ContentTypeIsMimeType(TypeVar string, MimeTypeVar string) bool { | |
| 173 | - | core.LazyRegister(&xContentTypeIsMimeType, "GIO", "g_content_type_is_mime_type", false) | |
| 174 | - | ||
| 175 | 152 | cret := xContentTypeIsMimeType(TypeVar, MimeTypeVar) | |
| 176 | 153 | return cret | |
| 177 | 154 | } | |
| @@ -183,8 +160,6 @@ var xContentTypeIsUnknown func(string) bool | |||
| 183 | 160 | // while on win32 it is "*" and on OSX it is a dynamic type | |
| 184 | 161 | // or octet-stream. | |
| 185 | 162 | func ContentTypeIsUnknown(TypeVar string) bool { | |
| 186 | - | core.LazyRegister(&xContentTypeIsUnknown, "GIO", "g_content_type_is_unknown", false) | |
| 187 | - | ||
| 188 | 163 | cret := xContentTypeIsUnknown(TypeVar) | |
| 189 | 164 | return cret | |
| 190 | 165 | } | |
| @@ -217,8 +192,6 @@ var xContentTypeSetMimeDirs func([]string) | |||
| 217 | 192 | // | |
| 218 | 193 | // ]| | |
| 219 | 194 | func ContentTypeSetMimeDirs(DirsVar []string) { | |
| 220 | - | core.LazyRegister(&xContentTypeSetMimeDirs, "GIO", "g_content_type_set_mime_dirs", false) | |
| 221 | - | ||
| 222 | 195 | xContentTypeSetMimeDirs(DirsVar) | |
| 223 | 196 | } | |
| 224 | 197 | ||
| @@ -228,8 +201,6 @@ var xContentTypesGetRegistered func() uintptr | |||
| 228 | 201 | // known to the system. The list and its data should be freed using | |
| 229 | 202 | // `g_list_free_full (list, g_free)`. | |
| 230 | 203 | func ContentTypesGetRegistered() *glib.List { | |
| 231 | - | core.LazyRegister(&xContentTypesGetRegistered, "GIO", "g_content_types_get_registered", false) | |
| 232 | - | ||
| 233 | 204 | cret := xContentTypesGetRegistered() | |
| 234 | 205 | if cret == 0 { | |
| 235 | 206 | return nil | |
| @@ -240,4 +211,29 @@ func ContentTypesGetRegistered() *glib.List { | |||
| 240 | 211 | func init() { | |
| 241 | 212 | core.SetPackageName("GIO", "gio-2.0") | |
| 242 | 213 | core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0", "libgio-2.0.0.dylib"}) | |
| 214 | + | var libs []uintptr | |
| 215 | + | for _, libPath := range core.GetPaths("GIO") { | |
| 216 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |
| 217 | + | if err != nil { | |
| 218 | + | panic(err) | |
| 219 | + | } | |
| 220 | + | libs = append(libs, lib) | |
| 221 | + | } | |
| 222 | + | ||
| 223 | + | core.PuregoSafeRegister(&xContentTypeCanBeExecutable, libs, "g_content_type_can_be_executable") | |
| 224 | + | core.PuregoSafeRegister(&xContentTypeEquals, libs, "g_content_type_equals") | |
| 225 | + | core.PuregoSafeRegister(&xContentTypeFromMimeType, libs, "g_content_type_from_mime_type") | |
| 226 | + | core.PuregoSafeRegister(&xContentTypeGetDescription, libs, "g_content_type_get_description") | |
| 227 | + | core.PuregoSafeRegister(&xContentTypeGetGenericIconName, libs, "g_content_type_get_generic_icon_name") | |
| 228 | + | core.PuregoSafeRegister(&xContentTypeGetIcon, libs, "g_content_type_get_icon") | |
| 229 | + | core.PuregoSafeRegister(&xContentTypeGetMimeDirs, libs, "g_content_type_get_mime_dirs") | |
| 230 | + | core.PuregoSafeRegister(&xContentTypeGetMimeType, libs, "g_content_type_get_mime_type") | |
| 231 | + | core.PuregoSafeRegister(&xContentTypeGetSymbolicIcon, libs, "g_content_type_get_symbolic_icon") | |
| 232 | + | core.PuregoSafeRegister(&xContentTypeGuess, libs, "g_content_type_guess") | |
| 233 | + | core.PuregoSafeRegister(&xContentTypeGuessForTree, libs, "g_content_type_guess_for_tree") | |
| 234 | + | core.PuregoSafeRegister(&xContentTypeIsA, libs, "g_content_type_is_a") | |
| 235 | + | core.PuregoSafeRegister(&xContentTypeIsMimeType, libs, "g_content_type_is_mime_type") | |
| 236 | + | core.PuregoSafeRegister(&xContentTypeIsUnknown, libs, "g_content_type_is_unknown") | |
| 237 | + | core.PuregoSafeRegister(&xContentTypeSetMimeDirs, libs, "g_content_type_set_mime_dirs") | |
| 238 | + | core.PuregoSafeRegister(&xContentTypesGetRegistered, libs, "g_content_types_get_registered") | |
| 243 | 239 | } | |
| @@ -4,6 +4,7 @@ package gio | |||||
| 4 | import ( | 4 | import ( | ||
| 5 | "unsafe" | 5 | "unsafe" | ||
| 6 | 6 | ||||
| 7 | + | "github.com/bnema/purego" | |||
| 7 | "github.com/bnema/puregotk/pkg/core" | 8 | "github.com/bnema/puregotk/pkg/core" | ||
| 8 | "github.com/bnema/puregotk/v4/glib" | 9 | "github.com/bnema/puregotk/v4/glib" | ||
| 9 | ) | 10 | ) | ||
| @@ -13,8 +14,6 @@ var xContentTypeCanBeExecutable func(string) bool | |||||
| 13 | // Checks if a content type can be executable. Note that for instance | 14 | // Checks if a content type can be executable. Note that for instance | ||
| 14 | // things like text files can be executables (i.e. scripts and batch files). | 15 | // things like text files can be executables (i.e. scripts and batch files). | ||
| 15 | func ContentTypeCanBeExecutable(TypeVar string) bool { | 16 | func ContentTypeCanBeExecutable(TypeVar string) bool { | ||
| 16 | - | core.LazyRegister(&xContentTypeCanBeExecutable, "GIO", "g_content_type_can_be_executable", false) | |||
| 17 | - | ||||
| 18 | cret := xContentTypeCanBeExecutable(TypeVar) | 17 | cret := xContentTypeCanBeExecutable(TypeVar) | ||
| 19 | return cret | 18 | return cret | ||
| 20 | } | 19 | } | ||
| @@ -23,8 +22,6 @@ var xContentTypeEquals func(string, string) bool | |||||
| 23 | 22 | ||||
| 24 | // Compares two content types for equality. | 23 | // Compares two content types for equality. | ||
| 25 | func ContentTypeEquals(Type1Var string, Type2Var string) bool { | 24 | func ContentTypeEquals(Type1Var string, Type2Var string) bool { | ||
| 26 | - | core.LazyRegister(&xContentTypeEquals, "GIO", "g_content_type_equals", false) | |||
| 27 | - | ||||
| 28 | cret := xContentTypeEquals(Type1Var, Type2Var) | 25 | cret := xContentTypeEquals(Type1Var, Type2Var) | ||
| 29 | return cret | 26 | return cret | ||
| 30 | } | 27 | } | ||
| @@ -33,8 +30,6 @@ var xContentTypeFromMimeType func(string) string | |||||
| 33 | 30 | ||||
| 34 | // Tries to find a content type based on the mime type name. | 31 | // Tries to find a content type based on the mime type name. | ||
| 35 | func ContentTypeFromMimeType(MimeTypeVar string) string { | 32 | func ContentTypeFromMimeType(MimeTypeVar string) string { | ||
| 36 | - | core.LazyRegister(&xContentTypeFromMimeType, "GIO", "g_content_type_from_mime_type", false) | |||
| 37 | - | ||||
| 38 | cret := xContentTypeFromMimeType(MimeTypeVar) | 33 | cret := xContentTypeFromMimeType(MimeTypeVar) | ||
| 39 | return cret | 34 | return cret | ||
| 40 | } | 35 | } | ||
| @@ -43,8 +38,6 @@ var xContentTypeGetDescription func(string) string | |||||
| 43 | 38 | ||||
| 44 | // Gets the human readable description of the content type. | 39 | // Gets the human readable description of the content type. | ||
| 45 | func ContentTypeGetDescription(TypeVar string) string { | 40 | func ContentTypeGetDescription(TypeVar string) string { | ||
| 46 | - | core.LazyRegister(&xContentTypeGetDescription, "GIO", "g_content_type_get_description", false) | |||
| 47 | - | ||||
| 48 | cret := xContentTypeGetDescription(TypeVar) | 41 | cret := xContentTypeGetDescription(TypeVar) | ||
| 49 | return cret | 42 | return cret | ||
| 50 | } | 43 | } | ||
| @@ -57,8 +50,6 @@ var xContentTypeGetGenericIconName func(string) string | |||||
| 57 | // [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) | 50 | // [shared-mime-info](http://www.freedesktop.org/wiki/Specifications/shared-mime-info-spec) | ||
| 58 | // specification for more on the generic icon name. | 51 | // specification for more on the generic icon name. | ||
| 59 | func ContentTypeGetGenericIconName(TypeVar string) string { | 52 | func ContentTypeGetGenericIconName(TypeVar string) string { | ||
| 60 | - | core.LazyRegister(&xContentTypeGetGenericIconName, "GIO", "g_content_type_get_generic_icon_name", false) | |||
| 61 | - | ||||
| 62 | cret := xContentTypeGetGenericIconName(TypeVar) | 53 | cret := xContentTypeGetGenericIconName(TypeVar) | ||
| 63 | return cret | 54 | return cret | ||
| 64 | } | 55 | } | ||
| @@ -67,7 +58,6 @@ var xContentTypeGetIcon func(string) uintptr | |||||
| 67 | 58 | ||||
| 68 | // Gets the icon for a content type. | 59 | // Gets the icon for a content type. | ||
| 69 | func ContentTypeGetIcon(TypeVar string) *IconBase { | 60 | func ContentTypeGetIcon(TypeVar string) *IconBase { | ||
| 70 | - | core.LazyRegister(&xContentTypeGetIcon, "GIO", "g_content_type_get_icon", false) | |||
| 71 | var cls *IconBase | 61 | var cls *IconBase | ||
| 72 | 62 | ||||
| 73 | cret := xContentTypeGetIcon(TypeVar) | 63 | cret := xContentTypeGetIcon(TypeVar) | ||
| @@ -85,8 +75,6 @@ var xContentTypeGetMimeDirs func() []string | |||||
| 85 | // Get the list of directories which MIME data is loaded from. See | 75 | // Get the list of directories which MIME data is loaded from. See | ||
| 86 | // g_content_type_set_mime_dirs() for details. | 76 | // g_content_type_set_mime_dirs() for details. | ||
| 87 | func ContentTypeGetMimeDirs() []string { | 77 | func ContentTypeGetMimeDirs() []string { | ||
| 88 | - | core.LazyRegister(&xContentTypeGetMimeDirs, "GIO", "g_content_type_get_mime_dirs", false) | |||
| 89 | - | ||||
| 90 | cret := xContentTypeGetMimeDirs() | 78 | cret := xContentTypeGetMimeDirs() | ||
| 91 | return cret | 79 | return cret | ||
| 92 | } | 80 | } | ||
| @@ -95,8 +83,6 @@ var xContentTypeGetMimeType func(string) string | |||||
| 95 | 83 | ||||
| 96 | // Gets the mime type for the content type, if one is registered. | 84 | // Gets the mime type for the content type, if one is registered. | ||
| 97 | func ContentTypeGetMimeType(TypeVar string) string { | 85 | func ContentTypeGetMimeType(TypeVar string) string { | ||
| 98 | - | core.LazyRegister(&xContentTypeGetMimeType, "GIO", "g_content_type_get_mime_type", false) | |||
| 99 | - | ||||
| 100 | cret := xContentTypeGetMimeType(TypeVar) | 86 | cret := xContentTypeGetMimeType(TypeVar) | ||
| 101 | return cret | 87 | return cret | ||
| 102 | } | 88 | } | ||
| @@ -105,7 +91,6 @@ var xContentTypeGetSymbolicIcon func(string) uintptr | |||||
| 105 | 91 | ||||
| 106 | // Gets the symbolic icon for a content type. | 92 | // Gets the symbolic icon for a content type. | ||
| 107 | func ContentTypeGetSymbolicIcon(TypeVar string) *IconBase { | 93 | func ContentTypeGetSymbolicIcon(TypeVar string) *IconBase { | ||
| 108 | - | core.LazyRegister(&xContentTypeGetSymbolicIcon, "GIO", "g_content_type_get_symbolic_icon", false) | |||
| 109 | var cls *IconBase | 94 | var cls *IconBase | ||
| 110 | 95 | ||||
| 111 | cret := xContentTypeGetSymbolicIcon(TypeVar) | 96 | cret := xContentTypeGetSymbolicIcon(TypeVar) | ||
| @@ -125,8 +110,6 @@ var xContentTypeGuess func(uintptr, []byte, uint, *bool) string | |||||
| 125 | // or @data may be %NULL, in which case the guess will be based solely | 110 | // or @data may be %NULL, in which case the guess will be based solely | ||
| 126 | // on the other argument. | 111 | // on the other argument. | ||
| 127 | func ContentTypeGuess(FilenameVar *string, DataVar []byte, DataSizeVar uint, ResultUncertainVar *bool) string { | 112 | func ContentTypeGuess(FilenameVar *string, DataVar []byte, DataSizeVar uint, ResultUncertainVar *bool) string { | ||
| 128 | - | core.LazyRegister(&xContentTypeGuess, "GIO", "g_content_type_guess", false) | |||
| 129 | - | ||||
| 130 | FilenameVarPtr := core.GStrdupNullable(FilenameVar) | 113 | FilenameVarPtr := core.GStrdupNullable(FilenameVar) | ||
| 131 | defer core.GFreeNullable(FilenameVarPtr) | 114 | defer core.GFreeNullable(FilenameVarPtr) | ||
| 132 | 115 | ||||
| @@ -149,8 +132,6 @@ var xContentTypeGuessForTree func(uintptr) []string | |||||
| 149 | // This function is useful in the implementation of | 132 | // This function is useful in the implementation of | ||
| 150 | // g_mount_guess_content_type(). | 133 | // g_mount_guess_content_type(). | ||
| 151 | func ContentTypeGuessForTree(RootVar File) []string { | 134 | func ContentTypeGuessForTree(RootVar File) []string { | ||
| 152 | - | core.LazyRegister(&xContentTypeGuessForTree, "GIO", "g_content_type_guess_for_tree", false) | |||
| 153 | - | ||||
| 154 | cret := xContentTypeGuessForTree(RootVar.GoPointer()) | 135 | cret := xContentTypeGuessForTree(RootVar.GoPointer()) | ||
| 155 | return cret | 136 | return cret | ||
| 156 | } | 137 | } | ||
| @@ -159,8 +140,6 @@ var xContentTypeIsA func(string, string) bool | |||||
| 159 | 140 | ||||
| 160 | // Determines if @type is a subset of @supertype. | 141 | // Determines if @type is a subset of @supertype. | ||
| 161 | func ContentTypeIsA(TypeVar string, SupertypeVar string) bool { | 142 | func ContentTypeIsA(TypeVar string, SupertypeVar string) bool { | ||
| 162 | - | core.LazyRegister(&xContentTypeIsA, "GIO", "g_content_type_is_a", false) | |||
| 163 | - | ||||
| 164 | cret := xContentTypeIsA(TypeVar, SupertypeVar) | 143 | cret := xContentTypeIsA(TypeVar, SupertypeVar) | ||
| 165 | return cret | 144 | return cret | ||
| 166 | } | 145 | } | ||
| @@ -170,8 +149,6 @@ var xContentTypeIsMimeType func(string, string) bool | |||||
| 170 | // Determines if @type is a subset of @mime_type. | 149 | // Determines if @type is a subset of @mime_type. | ||
| 171 | // Convenience wrapper around g_content_type_is_a(). | 150 | // Convenience wrapper around g_content_type_is_a(). | ||
| 172 | func ContentTypeIsMimeType(TypeVar string, MimeTypeVar string) bool { | 151 | func ContentTypeIsMimeType(TypeVar string, MimeTypeVar string) bool { | ||
| 173 | - | core.LazyRegister(&xContentTypeIsMimeType, "GIO", "g_content_type_is_mime_type", false) | |||
| 174 | - | ||||
| 175 | cret := xContentTypeIsMimeType(TypeVar, MimeTypeVar) | 152 | cret := xContentTypeIsMimeType(TypeVar, MimeTypeVar) | ||
| 176 | return cret | 153 | return cret | ||
| 177 | } | 154 | } | ||
| @@ -183,8 +160,6 @@ var xContentTypeIsUnknown func(string) bool | |||||
| 183 | // while on win32 it is "*" and on OSX it is a dynamic type | 160 | // while on win32 it is "*" and on OSX it is a dynamic type | ||
| 184 | // or octet-stream. | 161 | // or octet-stream. | ||
| 185 | func ContentTypeIsUnknown(TypeVar string) bool { | 162 | func ContentTypeIsUnknown(TypeVar string) bool { | ||
| 186 | - | core.LazyRegister(&xContentTypeIsUnknown, "GIO", "g_content_type_is_unknown", false) | |||
| 187 | - | ||||
| 188 | cret := xContentTypeIsUnknown(TypeVar) | 163 | cret := xContentTypeIsUnknown(TypeVar) | ||
| 189 | return cret | 164 | return cret | ||
| 190 | } | 165 | } | ||
| @@ -217,8 +192,6 @@ var xContentTypeSetMimeDirs func([]string) | |||||
| 217 | // | 192 | // | ||
| 218 | // ]| | 193 | // ]| | ||
| 219 | func ContentTypeSetMimeDirs(DirsVar []string) { | 194 | func ContentTypeSetMimeDirs(DirsVar []string) { | ||
| 220 | - | core.LazyRegister(&xContentTypeSetMimeDirs, "GIO", "g_content_type_set_mime_dirs", false) | |||
| 221 | - | ||||
| 222 | xContentTypeSetMimeDirs(DirsVar) | 195 | xContentTypeSetMimeDirs(DirsVar) | ||
| 223 | } | 196 | } | ||
| 224 | 197 | ||||
| @@ -228,8 +201,6 @@ var xContentTypesGetRegistered func() uintptr | |||||
| 228 | // known to the system. The list and its data should be freed using | 201 | // known to the system. The list and its data should be freed using | ||
| 229 | // `g_list_free_full (list, g_free)`. | 202 | // `g_list_free_full (list, g_free)`. | ||
| 230 | func ContentTypesGetRegistered() *glib.List { | 203 | func ContentTypesGetRegistered() *glib.List { | ||
| 231 | - | core.LazyRegister(&xContentTypesGetRegistered, "GIO", "g_content_types_get_registered", false) | |||
| 232 | - | ||||
| 233 | cret := xContentTypesGetRegistered() | 204 | cret := xContentTypesGetRegistered() | ||
| 234 | if cret == 0 { | 205 | if cret == 0 { | ||
| 235 | return nil | 206 | return nil | ||
| @@ -240,4 +211,29 @@ func ContentTypesGetRegistered() *glib.List { | |||||
| 240 | func init() { | 211 | func init() { | ||
| 241 | core.SetPackageName("GIO", "gio-2.0") | 212 | core.SetPackageName("GIO", "gio-2.0") | ||
| 242 | core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0", "libgio-2.0.0.dylib"}) | 213 | core.SetSharedLibraries("GIO", []string{"libgio-2.0.so.0", "libgio-2.0.0.dylib"}) | ||
| 214 | + | var libs []uintptr | |||
| 215 | + | for _, libPath := range core.GetPaths("GIO") { | |||
| 216 | + | lib, err := purego.Dlopen(libPath, purego.RTLD_NOW|purego.RTLD_GLOBAL) | |||
| 217 | + | if err != nil { | |||
| 218 | + | panic(err) | |||
| 219 | + | } | |||
| 220 | + | libs = append(libs, lib) | |||
| 221 | + | } | |||
| 222 | + | ||||
| 223 | + | core.PuregoSafeRegister(&xContentTypeCanBeExecutable, libs, "g_content_type_can_be_executable") | |||
| 224 | + | core.PuregoSafeRegister(&xContentTypeEquals, libs, "g_content_type_equals") | |||
| 225 | + | core.PuregoSafeRegister(&xContentTypeFromMimeType, libs, "g_content_type_from_mime_type") | |||
| 226 | + | core.PuregoSafeRegister(&xContentTypeGetDescription, libs, "g_content_type_get_description") | |||
| 227 | + | core.PuregoSafeRegister(&xContentTypeGetGenericIconName, libs, "g_content_type_get_generic_icon_name") | |||
| 228 | + | core.PuregoSafeRegister(&xContentTypeGetIcon, libs, "g_content_type_get_icon") | |||
| 229 | + | core.PuregoSafeRegister(&xContentTypeGetMimeDirs, libs, "g_content_type_get_mime_dirs") | |||
| 230 | + | core.PuregoSafeRegister(&xContentTypeGetMimeType, libs, "g_content_type_get_mime_type") | |||
| 231 | + | core.PuregoSafeRegister(&xContentTypeGetSymbolicIcon, libs, "g_content_type_get_symbolic_icon") | |||
| 232 | + | core.PuregoSafeRegister(&xContentTypeGuess, libs, "g_content_type_guess") | |||
| 233 | + | core.PuregoSafeRegister(&xContentTypeGuessForTree, libs, "g_content_type_guess_for_tree") | |||
| 234 | + | core.PuregoSafeRegister(&xContentTypeIsA, libs, "g_content_type_is_a") | |||
| 235 | + | core.PuregoSafeRegister(&xContentTypeIsMimeType, libs, "g_content_type_is_mime_type") | |||
| 236 | + | core.PuregoSafeRegister(&xContentTypeIsUnknown, libs, "g_content_type_is_unknown") | |||
| 237 | + | core.PuregoSafeRegister(&xContentTypeSetMimeDirs, libs, "g_content_type_set_mime_dirs") | |||
| 238 | + | core.PuregoSafeRegister(&xContentTypesGetRegistered, libs, "g_content_types_get_registered") | |||
| 243 | } | 239 | } | ||