#puregotk

2025-12-12

Another #puregotk #Go #GTK bindings fix: Callbacks that contain strings (think `Settings.ConnectChanged`, `AdwDialog.ConnectResponse`) now correctly convert them from C strings to Go strings: https://github.com/pojntfx/puregotk/tree/fix-c-to-go-calls Will cherry-pick & PR tomorrow.

GitHub - pojntfx/puregotk at f...

2025-12-12

Managed to get #WebKitGTK to work with #puregotk . Just needed to add a small tweak since it was mixing up `gio.Byte` with `[]byte`. I think that makes it one of the first full-featured, CGo-free WebView libraries for Go?

A WebView rendering Markdown in a GTK app, with the inspector to the right
Felicitas Pojtingerpojntfx
2025-12-12

Another bindings fix: Callbacks that contain strings (think `Settings.ConnectChanged`, `AdwDialog.ConnectResponse`) now correctly convert them from C strings to Go strings: github.com/pojntfx/puregotk/tr

Will cherry-pick & PR tomorrow.

Felicitas Pojtingerpojntfx
2025-12-12

Managed to get to work with . Just needed to add a small tweak since it was mixing up `gio.Byte` with `[]byte`. I think that makes it one of the first full-featured, CGo-free WebView libraries for Go?

A WebView rendering Markdown in a GTK app, with the inspector to the right
Felicitas Pojtingerpojntfx
2025-12-12

Ha, ran into a quirk today while extending the generator to work with it: bugs.webkit.org/show_bug.cgi?i

Workaround for now: github.com/pojntfx/ledger/comm

Funnily enough I ran into this exact problem with my own Go-based GObject library. Initialising them in `main` (yes, in a library!) fixed it there!

2025-12-10

https://github.com/jwijenbergh/puregotk/pull/34 Aaaand here we go! #puregotk #Go #GNOME binding examples, including subclassing and how to create a GObject library with Go (so you can distribute custom GTK widgets written in Go to C, JS, Vala, Python etc. apps)!

Add examples for subclassing, ...

Felicitas Pojtingerpojntfx
2025-12-10

github.com/jwijenbergh/puregot

Aaaand here we go! binding examples, including subclassing and how to create a GObject library with Go (so you can distribute custom GTK widgets written in Go to C, JS, Vala, Python etc. apps)!

2025-12-09

One or two days left until the next #puregotk #Go #GNOME upstreaming PR. I've imported my examples for how to do subclassing with Golang, creating a custom GObject introspection-compatible library and so on into the upstream repo, and I've started writing documentation.

Screenshot of https://github.com/pojntfx/puregotk/tree/add-examples/examples/mylib-gtk-meson; there is a lot of text, the URL contains a alt text for the embedded images etc.
Felicitas Pojtingerpojntfx
2025-12-09

One or two days left until the next upstreaming PR. I've imported my examples for how to do subclassing with Golang, creating a custom GObject introspection-compatible library and so on into the upstream repo, and I've started writing documentation. Since it is getting late I will probably finish it tomorrow, but it's getting easier and easier for people to try now I think :)

github.com/pojntfx/puregotk/tr

Screenshot of https://github.com/pojntfx/puregotk/tree/add-examples/examples/mylib-gtk-meson; there is a lot of text, the URL contains a alt text for the embedded images etc.
2025-11-30

New, soon-to-be upstreamed #puregotk #GNOME work today: A Meson-free/pure Go & Flatpak environment for building GNOME apps in Go as an alternative to the Meson one! Now I just have to rename them, git-subtree-split them out of the repo,

Felicitas Pojtingerpojntfx
2025-11-30

New, soon-to-be upstreamed work today: A Meson-free/pure Go & Flatpak environment for building GNOME apps in Go as an alternative to the Meson one! Now I just have to rename them, git-subtree-split them out of the repo, and upstream it to the bindings and then these can become Foundry/Builder templates :)

github.com/pojntfx/senbara/com

2025-11-28

New #gogettext (my #puregotk -based gettext bindings for Go) release! v0.2.0 now supports `BindI18n` and `dgettext` to allow scoping gettext translation domains in a more fine-grained way.

Felicitas Pojtingerpojntfx
2025-11-28

New (my -based gettext bindings for Go) release! v0.2.0 now supports `BindI18n` and `dgettext` to allow scoping gettext translation domains in a more fine-grained way. This allows using two different translation domains in more complex scenarios, such as a Go GObject library and a Go app where both vendor their own translations.

New library docs: github.com/pojntfx/go-gettext?

How you can use it for GObject libs and GNOME apps written in Go: github.com/pojntfx/senbara/com

2025-11-27

New #puregotk #Go #GNOME PR for today: Support for importing GTK GObject libraries built in Go via Meson from Go GTK applications, out of the box! https://github.com/jwijenbergh/puregotk/pull/33

Add Flatpak application librar...

Felicitas Pojtingerpojntfx
2025-11-27

New PR for today: Support for importing GTK GObject libraries built in Go via Meson from Go GTK applications, out of the box!

github.com/jwijenbergh/puregot

2025-11-25

New #puregotk #GNOME hacking milestone: A GObject library built with Go can now be installed as a simple Meson module in Flatpak (fully offline/with tracked dependencies, so this should work for Flatpak too), and then be used by any GIR-compatible language (Go, JS, Python etc.).

This code:

{
  "id": "com.pojtinger.felicitas.SenbaraGtkExample",
  "runtime": "org.gnome.Platform",
  "runtime-version": "49",
  "sdk": "org.gnome.Sdk",
  "sdk-extensions": ["org.freedesktop.Sdk.Extension.golang"],
  "command": "example.js",
  "build-options": {
    "append-path": "/usr/lib/sdk/golang/bin"
  },
  "finish-args": [
    "--socket=wayland",
    "--socket=fallback-x11",
    "--share=ipc",
    "--device=dri"
  ],
  "modules": [
    {
      "name": "senbaragtk",
      "buildsystem": "meson",
      "sources": [{ "type": "dir", "path": "." }, "go.mod.json"]
    },
    {
      "name": "senbaragtkexample",
      "buildsystem": "simple",
      "build-commands": ["install -Dm755 example.js /app/bin/example.js"],
      "sources": [{ "type": "file", "path": "example.js" }]
    }
  ]
}

The app is running to the right as an overlay. The text is in German.
Felicitas Pojtingerpojntfx
2025-11-25

New hacking milestone: A GObject library built with Go can now be installed as a simple Meson module in Flatpak (fully offline/with tracked dependencies, so this should work for Flathub too), and then be used by any GIR-compatible language (Go, JS, Python etc.). Even i18n with `gettext` (with translations vendored via the library) works!

This code:

{
  "id": "com.pojtinger.felicitas.SenbaraGtkExample",
  "runtime": "org.gnome.Platform",
  "runtime-version": "49",
  "sdk": "org.gnome.Sdk",
  "sdk-extensions": ["org.freedesktop.Sdk.Extension.golang"],
  "command": "example.js",
  "build-options": {
    "append-path": "/usr/lib/sdk/golang/bin"
  },
  "finish-args": [
    "--socket=wayland",
    "--socket=fallback-x11",
    "--share=ipc",
    "--device=dri"
  ],
  "modules": [
    {
      "name": "senbaragtk",
      "buildsystem": "meson",
      "sources": [{ "type": "dir", "path": "." }, "go.mod.json"]
    },
    {
      "name": "senbaragtkexample",
      "buildsystem": "simple",
      "build-commands": ["install -Dm755 example.js /app/bin/example.js"],
      "sources": [{ "type": "file", "path": "example.js" }]
    }
  ]
}

The app is running to the right as an overlay. The text is in German.
2025-11-04

https://github.com/pojntfx/multiplex/commit/942c6c513ad4f6620cb5ac967496e1a0a10b825f And another Go GTK app is ported to #puregotk ! Not with subclassing yet, but it will get there eventually. Build time is down from ~25 minutes to 20s 🤯

feat: Port from `gotk4` to `pu...

Felicitas Pojtingerpojntfx
2025-11-04

github.com/pojntfx/multiplex/c

And another Go GTK app is ported to ! Not with subclassing yet, but it will get there eventually. Build time is down from ~25 minutes to 20s 🤯

Client Info

Server: https://mastodon.social
Version: 2025.07
Repository: https://github.com/cyevgeniy/lmst