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