switched from fbink to gtk2

This commit is contained in:
2025-10-25 23:59:54 +02:00
parent 94ea81271a
commit ce1b6b1261
14 changed files with 77 additions and 3406 deletions

48
main.go Normal file
View File

@@ -0,0 +1,48 @@
package main
// #cgo pkg-config: gtk+-2.0
import "C"
import (
"github.com/mattn/go-gtk/gtk"
)
func main() {
gtk.Init(nil)
// Main window
win := gtk.NewWindow(gtk.WINDOW_TOPLEVEL)
win.SetTitle("L:A_N:application_PC:TS_ID:com.lab126.store")
win.SetDefaultSize(400, 200)
win.Connect("destroy", gtk.MainQuit)
// Vertical layout container
vbox := gtk.NewVBox(false, 10)
win.Add(vbox)
// Label
label := gtk.NewLabel("Hello Kindle!")
vbox.PackStart(label, false, false, 10)
// Horizontal box for buttons
hbox := gtk.NewHBox(true, 5)
vbox.PackStart(hbox, false, false, 10)
// Show button
btnShow := gtk.NewButtonWithLabel("Show Text")
btnShow.Clicked(func() {
label.Show()
})
// Hide button
btnHide := gtk.NewButtonWithLabel("Hide Text")
btnHide.Clicked(func() {
label.Hide()
})
hbox.PackStart(btnShow, true, true, 5)
hbox.PackStart(btnHide, true, true, 5)
win.ShowAll()
gtk.Main()
}