Example #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
}
Example #2
0
func IsWindowInFront(windowId WindowID) bool {
	return C.XPLMIsWindowInFront(C.XPLMWindowID(windowId)) == 1
}
Example #3
0
func BringWindowToFront(windowId WindowID) {
	C.XPLMBringWindowToFront(C.XPLMWindowID(windowId))
}
Example #4
0
func TakeKeyboardFocus(windowId WindowID) {
	C.XPLMTakeKeyboardFocus(C.XPLMWindowID(windowId))
}
Example #5
0
func SetWindowRefCon(windowId WindowID, ref interface{}) {
	id := (*C.char)(C.XPLMGetWindowRefCon(C.XPLMWindowID(windowId)))
	windows[id].Ref = ref
}
Example #6
0
func GetWindowRefCon(windowId WindowID) interface{} {
	id := (*C.char)(C.XPLMGetWindowRefCon(C.XPLMWindowID(windowId)))
	return windows[id].Ref
}
Example #7
0
func SetWindowIsVisible(windowId WindowID, isVisible bool) {
	C.XPLMSetWindowIsVisible(C.XPLMWindowID(windowId), C.int(goplane.FromBoolToInt(isVisible)))
}
Example #8
0
func GetWindowIsVisible(windowId WindowID) bool {
	return C.XPLMGetWindowIsVisible(C.XPLMWindowID(windowId)) == 1
}
Example #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))
}
Example #10
0
func DestroyWindow(windowId WindowID) {
	C.XPLMDestroyWindow(C.XPLMWindowID(windowId))
}