예제 #1
0
func GetWindowGeometry(windowId WindowID) (left, top, right, bottom int) {
	C.XPLMGetWindowGeometry(
		C.XPLMWindowID(windowId),
		(*C.int)(unsafe.Pointer(&left)),
		(*C.int)(unsafe.Pointer(&top)),
		(*C.int)(unsafe.Pointer(&right)),
		(*C.int)(unsafe.Pointer(&bottom)))
	return
}
예제 #2
0
func IsWindowInFront(windowId WindowID) bool {
	return C.XPLMIsWindowInFront(C.XPLMWindowID(windowId)) == 1
}
예제 #3
0
func BringWindowToFront(windowId WindowID) {
	C.XPLMBringWindowToFront(C.XPLMWindowID(windowId))
}
예제 #4
0
func TakeKeyboardFocus(windowId WindowID) {
	C.XPLMTakeKeyboardFocus(C.XPLMWindowID(windowId))
}
예제 #5
0
func SetWindowRefCon(windowId WindowID, ref interface{}) {
	id := (*C.char)(C.XPLMGetWindowRefCon(C.XPLMWindowID(windowId)))
	windows[id].Ref = ref
}
예제 #6
0
func GetWindowRefCon(windowId WindowID) interface{} {
	id := (*C.char)(C.XPLMGetWindowRefCon(C.XPLMWindowID(windowId)))
	return windows[id].Ref
}
예제 #7
0
func SetWindowIsVisible(windowId WindowID, isVisible bool) {
	C.XPLMSetWindowIsVisible(C.XPLMWindowID(windowId), C.int(goplane.FromBoolToInt(isVisible)))
}
예제 #8
0
func GetWindowIsVisible(windowId WindowID) bool {
	return C.XPLMGetWindowIsVisible(C.XPLMWindowID(windowId)) == 1
}
예제 #9
0
func SetWindowGeometry(windowId WindowID, left, top, right, bottom int) {
	C.XPLMSetWindowGeometry(C.XPLMWindowID(windowId), C.int(left), C.int(top), C.int(right), C.int(bottom))
}
예제 #10
0
func DestroyWindow(windowId WindowID) {
	C.XPLMDestroyWindow(C.XPLMWindowID(windowId))
}