Documentation ¶
Index ¶
- func BringWindowToFront(windowId WindowID)
- func CountHotKeys() int
- func DestroyWindow(windowId WindowID)
- func GetHotKeyInfo(hotkeyId HotKeyID) (virtualKey xplm.VirtualKeyCode, flags xplm.KeyFlags, description string, ...)
- func GetMouseLocation() (x, y int)
- func GetScreenSize() (width, height int)
- func GetWindowGeometry(windowId WindowID) (left, top, right, bottom int)
- func GetWindowIsVisible(windowId WindowID) bool
- func GetWindowRefCon(windowId WindowID) interface{}
- func IsWindowInFront(windowId WindowID) bool
- func RegisterDrawCallback(callback DrawCallback, phase DrawingPhase, wantsBefore bool, ref interface{}) bool
- func RegisterKeySniffer(callback KeySnifferCallback, beforeWindows bool, ref interface{}) bool
- func SetHotKeyCombination(hotkeyId HotKeyID, virtualKey xplm.VirtualKeyCode, flags xplm.KeyFlags)
- func SetWindowGeometry(windowId WindowID, left, top, right, bottom int)
- func SetWindowIsVisible(windowId WindowID, isVisible bool)
- func SetWindowRefCon(windowId WindowID, ref interface{})
- func TakeKeyboardFocus(windowId WindowID)
- func UnregisterDrawCallback(callback DrawCallback, phase DrawingPhase, wantsBefore bool, ref interface{}) bool
- func UnregisterKeySniffer(callback KeySnifferCallback, beforeWindows bool, ref interface{}) bool
- func XPLMUnregisterHotKey(hotkeyId HotKeyID)
- type CreateWindowData
- type CursorStatus
- type DrawCallback
- type DrawWindow
- type DrawingPhase
- type HandleCursorStatus
- type HandleKey
- type HandleMouseClick
- type HandleMouseWheel
- type HotKeyCallback
- type HotKeyID
- type KeySnifferCallback
- type MouseStatus
- type WindowID
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BringWindowToFront ¶
func BringWindowToFront(windowId WindowID)
func CountHotKeys ¶
func CountHotKeys() int
func DestroyWindow ¶
func DestroyWindow(windowId WindowID)
func GetHotKeyInfo ¶
func GetMouseLocation ¶
func GetMouseLocation() (x, y int)
func GetScreenSize ¶
func GetScreenSize() (width, height int)
func GetWindowGeometry ¶
func GetWindowIsVisible ¶
func GetWindowRefCon ¶
func GetWindowRefCon(windowId WindowID) interface{}
func IsWindowInFront ¶
func RegisterDrawCallback ¶
func RegisterDrawCallback(callback DrawCallback, phase DrawingPhase, wantsBefore bool, ref interface{}) bool
func RegisterKeySniffer ¶
func RegisterKeySniffer(callback KeySnifferCallback, beforeWindows bool, ref interface{}) bool
func SetHotKeyCombination ¶
func SetHotKeyCombination(hotkeyId HotKeyID, virtualKey xplm.VirtualKeyCode, flags xplm.KeyFlags)
func SetWindowGeometry ¶
func SetWindowIsVisible ¶
func SetWindowRefCon ¶
func SetWindowRefCon(windowId WindowID, ref interface{})
func TakeKeyboardFocus ¶
func TakeKeyboardFocus(windowId WindowID)
func UnregisterDrawCallback ¶
func UnregisterDrawCallback(callback DrawCallback, phase DrawingPhase, wantsBefore bool, ref interface{}) bool
func UnregisterKeySniffer ¶
func UnregisterKeySniffer(callback KeySnifferCallback, beforeWindows bool, ref interface{}) bool
func XPLMUnregisterHotKey ¶
func XPLMUnregisterHotKey(hotkeyId HotKeyID)
Types ¶
type CreateWindowData ¶
type CreateWindowData struct { Left int Top int Right int Bottom int Visible bool DrawWindowFunc DrawWindow HandleMouseClickFunc HandleMouseClick HandleKeyFunc HandleKey HandleCursorFunc HandleCursorStatus HandleMouseWheelFunc HandleMouseWheel Ref interface{} }
type CursorStatus ¶
type CursorStatus int
const ( CursorDefault CursorStatus = 0 CursorHidden CursorStatus = 1 CursorArrow CursorStatus = 2 CursorCustom CursorStatus = 3 )
type DrawCallback ¶
type DrawCallback func(phase DrawingPhase, isBefore bool, ref interface{}) int
type DrawWindow ¶
type DrawWindow func(id WindowID, ref interface{})
type DrawingPhase ¶
type DrawingPhase int
const ( Phase_FirstScene DrawingPhase = 0 Phase_Terrain DrawingPhase = 5 Phase_Airports DrawingPhase = 10 Phase_Vectors DrawingPhase = 15 Phase_Objects DrawingPhase = 20 Phase_Airplanes DrawingPhase = 25 Phase_LastScene DrawingPhase = 30 Phase_FirstCockpit DrawingPhase = 35 Phase_Panel DrawingPhase = 40 Phase_Gauges DrawingPhase = 45 Phase_Window DrawingPhase = 50 Phase_LastCockpit DrawingPhase = 55 Phase_LocalMap3D DrawingPhase = 100 Phase_LocalMap2D DrawingPhase = 101 Phase_LocalMapProfile DrawingPhase = 102 )
type HandleCursorStatus ¶
type HandleCursorStatus func(id WindowID, x, y int, ref interface{}) CursorStatus
type HandleMouseClick ¶
type HandleMouseClick func(id WindowID, x, y int, status MouseStatus, ref interface{}) int
type HandleMouseWheel ¶
type HotKeyCallback ¶
type HotKeyCallback func(ref interface{})
type HotKeyID ¶
func GetNthHotKey ¶
func RegisterHotKey ¶
func RegisterHotKey(key xplm.VirtualKeyCode, flags xplm.KeyFlags, description string, callback HotKeyCallback, ref interface{}) HotKeyID
type KeySnifferCallback ¶
type MouseStatus ¶
type MouseStatus int
const ( MouseDown MouseStatus = 1 MouseDrag MouseStatus = 2 MouseUp MouseStatus = 3 )
type WindowID ¶
func CreateWindow ¶
func CreateWindow(left, top, right, bottom int, isVisible bool, drawCallback DrawWindow, keyCallback HandleKey, mouseClickCallback HandleMouseClick, ref interface{}) WindowID
func CreateWindowEx ¶
func CreateWindowEx(params *CreateWindowData) WindowID
Click to show internal directories.
Click to hide internal directories.