예제 #1
0
func (d *Display) GetPosition() (int, int) {
	var x, y C.int

	C.al_get_window_position((*C.ALLEGRO_DISPLAY)(d), &x, &y)

	return int(x), int(y)
}
예제 #2
0
func (d *Display) GetWindowPosition() (int32, int32) {
	var x, y C.int
	C.al_get_window_position((*C.ALLEGRO_DISPLAY)(unsafe.Pointer(d)), &x, &y)
	return int32(x), int32(y)
}
예제 #3
0
파일: display.go 프로젝트: beoran/algo
// Returns the current position of the windowed display
func (self *Display) WindowPosition() (x, y int) {
	var cx, cy C.int
	C.al_get_window_position(self.handle, &cx, &cy)
	return int(cx), int(cy)
}