summaryrefslogtreecommitdiff
path: root/mainObj2.hs
blob: 909af2cefdc2ec39f6f0edd8f05a12f450a76495 (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 MeshSketch


main = do
    _ <- Gtk.init Nothing

    let mkChild = MeshSketch.new

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

    widgetShowAll window
    Gtk.main