package windowing
Functions
DPI2PX
DPI2PXF
HasDragData
SetDragData
UpdateDragData
UpdateDragDrop
Types
ControllerStateWindowEvent
struct
DragDataTarget
interface
var ( OnDragStop events.Event )
DragData
FileSearch
struct
KeyboardButtonWindowEvent
struct
MouseButtonWindowEvent
struct
MouseMoveWindowEvent
struct
MouseScrollWindowEvent
struct
SetHandleEvent
struct
StylusActionState
StylusStateWindowEvent
struct
TitleBarMode
const ( TitleBarModeSystem TitleBarMode = iota TitleBarModeLight TitleBarModeDark )
TitleBarMode.String
TouchActionState
TouchStateWindowEvent
struct
Window
struct
type Window struct {
Mouse hid.Mouse
Keyboard hid.Keyboard
Touch hid.Touch
Stylus hid.Stylus
Controller hid.Controller
Cursor hid.Cursor
GpuHost rendering.GPUApplication
GpuInstance *rendering.GPUApplicationInstance
OnResize events.Event
OnMove events.Event
OnActivate events.Event
OnDeactivate events.Event
// Has unexported fields.
}
FindWindowAtPoint
New
func New(windowName string, width, height, x, y int, adb assets.Database, platformState any) (*Window, error)
Window.AddBorder
Window.Center
Window.ClipboardContents
Window.CopyToClipboard
Window.CursorIbeam
Window.CursorSizeAll
Window.CursorSizeNS
Window.CursorSizeWE
Window.CursorStandard
Window.Destroy
Window.DestroyGPU
Window.DisableRawMouseInput
Window.DotsPerMillimeter
DotsPerMillimeter returns the window's DPI scaled to dots/mm. The underlying platform query is a cgo call (e.g. cocoa_get_backing_scale_factor on macOS) and was being invoked for every CSS length resolution during layout, which dominated CPU. The value only changes on resize / display change, so it is cached here and invalidated by the resize/move handlers. Cache is lock-free
Window.EnableRawMouseInput
Window.EndUpdate
Window.Focus
Window.GetDrawableSize
Window.GetInstanceExtensions
Window.Height
Window.HideCursor
Window.InitializeGPU
Window.IsClosed
Window.IsCrashed
Window.IsFullScreen
Window.IsMinimized
Window.IsPCSize
Window.IsPhoneSize
Window.IsTabletSize
Window.LockCursor
Window.MonitorCount
NOTE: currently only implemented on windows
Window.OpenFileDialog
func (w *Window) OpenFileDialog(startPath string, extensions []filesystem.DialogExtension, ok func(path string), cancel func()) error
Window.PlatformInstance
Window.PlatformWindow
Window.Poll
Window.Position
Window.ReadApplicationAsset
ReadApplicationAsset will read an asset bound to the application. This is typically only useful on mobile platforms like Android. Platforms like Linux, Windows, and Mac will return an error, use ReadFile instead
Window.RemoveBorder
Window.SaveFileDialog
func (w *Window) SaveFileDialog(startPath string, fileName string, extensions []filesystem.DialogExtension, ok func(path string), cancel func()) error
Window.ScreenSizeMM
Window.SetCursorPosition
Window.SetFullscreen
Window.SetIcon
Window.SetPosition
Window.SetSize
Window.SetTitle
Window.SetTitleBarMode
Window.SetWindowed
Window.ShowCursor
Window.SizeMM
Window.SwapBuffers
Window.SwapBuffersWithContainer
func (w *Window) SwapBuffersWithContainer(container rendering.RenderingContainer, width, height int32) bool
Window.TitleBarMode
Window.ToLocalPosition
Window.ToScreenPosition
Window.UnlockCursor
Window.Viewport
Window.Width
Window.X
Window.XY
Window.Y
WindowActivityEvent
struct
WindowEventActivityType
WindowEventButtonType
WindowEventControllerConnectionType
WindowEventType
WindowMoveEvent
struct
WindowResizeEvent
struct