Hash :
dabf01ce
Author :
Thomas de Grivel
Date :
2024-12-11T16:39:42
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40
#!/usr/bin/env ikc3
defmodule Kmsg do
require Gtk4
def activate = fn (app) {
window = Gtk4.ApplicationWindow.new(app)
Gtk4.Window.set_title(window, "Kmsg")
Gtk4.Window.set_default_size(window, (Uw) 640, (Uw) 480)
#paned = Gtk4.Paned.new(:horizontal)
eb1 = Gtk4.EntryBuffer.new("Test 1")
text1 = Gtk4.Text.new_with_buffer(eb1)
##Gtk4.Widget.set_size_request(text1, -1, -1)
#Gtk4.Paned.set_start_child(paned, text1)
#Gtk4.Paned.set_resize_start_child(paned, false)
#Gtk4.Paned.set_shrink_start_child(paned, false)
#eb2 = Gtk4.EntryBuffer.new("Test 2")
#text2 = Gtk4.Text.new_with_buffer(eb2)
#Gtk4.Paned.set_end_child(paned, text2)
#Gtk4.Paned.set_resize_end_child(paned, false)
#Gtk4.Paned.set_shrink_end_child(paned, false)
Gtk4.Window.set_child(window, text1)
Gtk4.Window.present(window)
}
def main = fn () {
puts("Kmsg.main: starting, please wait...")
Gtk4.init()
app = Gtk4.Application.new("Kmsg", "io.kmx.kmsg")
Gtk4.signal_connect(app, "activate", Kmsg.activate)
status = Gtk4.Application.run(app)
puts("Kmsg.main: exiting: #{inspect(status)}")
Gtk4.Application.delete(app)
}
end
Kmsg.main()