diff --git a/gtk4/application.c b/gtk4/application.c
index 9ef419b..b177b7b 100644
--- a/gtk4/application.c
+++ b/gtk4/application.c
@@ -18,6 +18,12 @@ void kc3_gtk4_application_delete (GtkApplication **app)
g_object_unref(*app);
}
+s32 kc3_gtk4_application_run (GtkApplication **app)
+{
+ return g_application_run(G_APPLICATION(*app), g_kc3_env->argc,
+ g_kc3_env->argv);
+}
+
GtkApplication ** kc3_gtk4_application_new (const s_str *name,
const s_str *id,
GtkApplication **dest)
diff --git a/kmsg/Makefile b/kmsg/Makefile
new file mode 100644
index 0000000..24e4dcb
--- /dev/null
+++ b/kmsg/Makefile
@@ -0,0 +1,3 @@
+
+run:
+ ./kmsg
diff --git a/kmsg/kmsg b/kmsg/kmsg
index 699d4d6..1939fec 100755
--- a/kmsg/kmsg
+++ b/kmsg/kmsg
@@ -4,21 +4,23 @@ defmodule Kmsg do
require Gtk4
- def activate (app) {
+ def activate = fn (app) {
window = Gtk4.ApplicationWindow.new(app)
Gtk4.Window.set_title(window, "Kmsg")
Gtk4.Window.set_default_size(window, (Uw) 1080, (Uw) 720)
Gtk4.Window.present(window)
}
- def main () {
+ def main = fn () {
+ puts("Kmsg.main: starting, please wait...")
Gtk4.init()
app = Gtk4.Application.new("Kmsg", "io.kmx.kmsg")
Gtk4.signal_connect(app, "activate", activate)
status = Gtk4.Application.run(app)
+ puts("Kmsg.main: exiting: #{inspect(status)}")
Gtk4.Application.delete(app)
}
end
-main()
+Kmsg.main()