Beispiel #1
0
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
}
Beispiel #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
}
Beispiel #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
}