hello_world_gtk.lua 255 B

123456789101112
  1. #!/usr/bin/lua
  2. lgi = require 'lgi'
  3. gtk = lgi.require('Gtk')
  4. gtk.init()
  5. Hello=gtk.MessageDialog { message_type = gtk.MessageType.INFO,
  6. buttons = gtk.ButtonsType.OK,
  7. text = "Hello World",
  8. secondary_text = "This is an example."
  9. }
  10. Hello:run()