示例#1
0
文件: gmdgo.go 项目: waxcorp/gmd
func (w *Window) Size() (width, height int) {
	var rw, rh C.int
	C.getWindowSize(w.cw, &rw, &rh)
	width = int(rw)
	height = int(rh)
	return
}
示例#2
0
func (w *Window) Size() (width, height int) {
	onMainThread(func() {
		var rw, rh _Ctype_int
		C.getWindowSize(w.cw, &rw, &rh)
		width = int(rw)
		height = int(rh)
	})
	return
}
示例#3
0
func (w *Window) Size() (width, height int) {
	w.oplock.Lock()
	defer w.oplock.Unlock()

	var rw, rh _Ctype_int
	C.getWindowSize(w.cw, &rw, &rh)
	width = int(rw)
	height = int(rh)
	return
}