summaryrefslogtreecommitdiff
path: root/smartwindow/new.go
blob: 35e9df536d0e7426b6bb6f8a41a94dca53f6b762 (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
package smartwindow

import 	(
	"go.wit.com/log"
)

func New() *SmartWindow {
	sw := SmartWindow {
		hidden: true,
		ready: false,
	}
	
	return &sw
}

func (sw *SmartWindow) InitWindow() {
	if sw == nil {
		log.Log(WARN, "not initalized yet (no parent for the window?)")
		return
	}
	if sw.window != nil {
		log.Log(WARN, "You already have a SmartWindow")
		sw.ready = true
		return
	}
}