-
Notifications
You must be signed in to change notification settings - Fork 35
Open
Description
There are many great examples, but all of them use App.Simple
. I would like to use some other architecture for my application. A simple example of opening a window with some buttons would go a long way. So far I have this:
module Main where
import qualified Control.Concurrent.Async as Async
import qualified Data.GI.Base as Base
import qualified GI.Gtk as Gtk
import GI.Gtk.Declarative
main ∷ IO ( )
main = do
_ ← Gtk.init Nothing
main ← Async.async Gtk.main
win ← Base.new Gtk.Window [#title Base.:= ""]
#showAll win
-- Insert code here.
Gtk.mainQuit
Async.wait main
It works so far, but it took me something like 2 hours to get there! And it does not really use any features of gi-gtk-declarative
because I could not figure out how to open a window yet.
Metadata
Metadata
Assignees
Labels
No labels