Skip to content

Commit 8babe53

Browse files
committed
update README and fix an example
1 parent d9771de commit 8babe53

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

README.md

+5-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
[![](https://img.shields.io/badge/docs-stable-blue.svg)](https://juliahub.com/docs/Gtk4)
77

88

9-
GUI building using [GTK](https://www.gtk.org) version 4. For a mature Julia package that supports GTK version 3, see [Gtk.jl](https://github.com/JuliaGraphics/Gtk.jl). **Note that Gtk.jl and Gtk4.jl cannot be imported in the same Julia session.**
9+
GUI building using [GTK](https://www.gtk.org) version 4. See [Gtk.jl](https://github.com/JuliaGraphics/Gtk.jl) for a Julia package that supports GTK version 3. **Note that Gtk.jl and Gtk4.jl cannot be imported in the same Julia session.**
1010

1111
This package builds on Gtk.jl but uses GObject introspection to support more of the functionality of the GTK library and its dependencies. GObject introspection for Julia is implemented using [GI.jl](https://github.com/JuliaGtk/Gtk4.jl/tree/main/GI), which is also hosted in this repository.
1212

@@ -26,6 +26,10 @@ Other registered packages extend the functionality of Gtk4.jl:
2626
- [GtkObservables.jl](https://github.com/JuliaGizmos/GtkObservables.jl): provides integration with [Observables.jl](https://github.com/JuliaGizmos/Observables.jl). This package can simplify making interactive GUI's with Gtk4.jl.
2727
- [Gtk4Makie.jl](https://github.com/JuliaGtk/Gtk4Makie.jl): provides integration with the popular plotting package [Makie.jl](https://github.com/MakieOrg/Makie.jl), specifically its interactive, high performance GLMakie backend.
2828

29+
A port of [ProfileView](https://github.com/timholy/ProfileView.jl) based on Gtk4 is available.
30+
The registered version of ProfileView.jl uses Gtk.jl, which is incompatible with Gtk4.
31+
To use the Gtk4 port, enter `add https://github.com/jwahlstrand/ProfileView.jl#gtk4` in Julia's package mode.
32+
2933
## Current status
3034
For auto-generated code, Gtk4.jl relies on GObject introspection data generated on a Linux x86_64 machine, which may result in code that crashes on 32 bit computers. This seems to affect mostly obscure parts of GLib that are unlikely to be useful to Julia users, but 32 bit users should be aware of this.
3135

examples/font_dialog.jl

+7-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
using Gtk4
22

3-
cb(dlg, resobj) = println("you chose "*Gtk4.font(dlg, resobj))
3+
function cb(dlg, resobj)
4+
try
5+
println(Gtk4.font(dlg, resobj))
6+
catch e
7+
println(e)
8+
end
9+
end
410

511
dlg = GtkFontDialog()
612
Gtk4.choose_font(cb, dlg)

src/GLib/glist.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ function empty!(list::GList{L}) where L <: _GSList
132132
s = next_(list, s)[2]
133133
end
134134
end
135-
ccall((:g_slist_free, libglib), Nothing, (Ptr{L},), list)
135+
#ccall((:g_slist_free, libglib), Nothing, (Ptr{L},), list)
136136
list.handle = C_NULL
137137
end
138138
return list

0 commit comments

Comments
 (0)