display

package
v0.0.0-...-3257b51 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 30, 2018 License: MIT Imports: 8 Imported by: 1

Documentation

Index

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 GetHotKeyInfo(hotkeyId HotKeyID) (virtualKey xplm.VirtualKeyCode, flags xplm.KeyFlags, description string, pluginId plugins.PluginId)

func GetMouseLocation

func GetMouseLocation() (x, y int)

func GetScreenSize

func GetScreenSize() (width, height int)

func GetWindowGeometry

func GetWindowGeometry(windowId WindowID) (left, top, right, bottom int)

func GetWindowIsVisible

func GetWindowIsVisible(windowId WindowID) bool

func GetWindowRefCon

func GetWindowRefCon(windowId WindowID) interface{}

func IsWindowInFront

func IsWindowInFront(windowId WindowID) bool

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 SetWindowGeometry(windowId WindowID, left, top, right, bottom int)

func SetWindowIsVisible

func SetWindowIsVisible(windowId WindowID, isVisible bool)

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 HandleKey

type HandleKey func(id WindowID, keyCode xplm.KeyCode, flags xplm.KeyFlags, virtualKeyCode xplm.VirtualKeyCode, ref interface{}, losingFocus bool) int

type HandleMouseClick

type HandleMouseClick func(id WindowID, x, y int, status MouseStatus, ref interface{}) int

type HandleMouseWheel

type HandleMouseWheel func(id WindowID, x, y, wheel, clicks int, ref interface{}) int

type HotKeyCallback

type HotKeyCallback func(ref interface{})

type HotKeyID

type HotKeyID unsafe.Pointer

func GetNthHotKey

func GetNthHotKey(index int) HotKeyID

func RegisterHotKey

func RegisterHotKey(key xplm.VirtualKeyCode, flags xplm.KeyFlags, description string, callback HotKeyCallback, ref interface{}) HotKeyID

type KeySnifferCallback

type KeySnifferCallback func(keyCode xplm.KeyCode, flags xplm.KeyFlags, virtualKeyCode xplm.VirtualKeyCode, ref interface{}) int

type MouseStatus

type MouseStatus int
const (
	MouseDown MouseStatus = 1
	MouseDrag MouseStatus = 2
	MouseUp   MouseStatus = 3
)

type WindowID

type WindowID unsafe.Pointer

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL