summaryrefslogtreecommitdiff
path: root/mainObj2.hs
blob: 619595019a8b46fc97c016cfa3ea8dff5bba4a1c (plain)
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
{-# LANGUAGE OverloadedLabels #-}
{-# LANGUAGE OverloadedStrings #-}
module Main where

import GI.Gtk as Gtk hiding (main)
import qualified GI.Gtk as Gtk
import GI.GObject.Functions
import GI.GObject.Flags
import Data.GI.Base.GType

import Foreign.Ptr

import qualified MeshMaker


main = do
    _ <- Gtk.init Nothing

    let mkChild = MeshMaker.new

    window <- do
        w <- windowNew WindowTypeToplevel
        windowSetDefaultSize    w 720 720
        windowSetTitle          w "Mesh Maker"
        _ <- on w #deleteEvent $ \_ -> mainQuit >> return True
        child <- mkChild
        containerAdd w child
        return w

    widgetShowAll window
    Gtk.main