Versions in this module Expand all Collapse all v0 v0.1.3 May 5, 2024 v0.1.2 May 1, 2024 v0.1.1 May 1, 2024 Changes in this version + var ReservedWebShortcuts = []string type Window + Events func() *events.Source v0.1.0 Apr 14, 2024 v0.0.10 Apr 14, 2024 Changes in this version + const FlipY + const MaxImageLayers + const MaxTexturesPerSet + const NoFlipY + var AppVersion = "dev" + var CaptureImage *image.RGBA + var CoreVersion = "dev" + var HandleRecover = func(r any) + var InitScreenLogicalDPIFunc func() + var LogicalDPIScale = float32(1) + var LogicalDPIScales map[string]float32 + var NeedsCapture bool + var OnSystemWindowCreated chan struct + var TheApp App + func AssertCapture(t imagex.TestingT, filename string) + func Capture() *image.RGBA + func CaptureAs(filename string) error + func CrashLogText(r any, stack string) string + func HandleRecoverBase(r any) + func HandleRecoverPanic(r any) + func LogicalFromPhysicalDPI(logScale, pdpi float32) float32 + func SetLogicalDPIScale(scrnName string, dpiScale float32) + func WindowFlagsToBool(flags WindowFlags) (dialog, modal, tool, fullscreen bool) + type App interface + AddQuitCleanFunc func(fun func()) + AppDataDir func() string + Clipboard func(win Window) Clipboard + CogentCoreDataDir func() string + ContextWindow func() Window + Cursor func(win Window) Cursor + DataDir func() string + GetScreens func() + HideVirtualKeyboard func() + IsDark func() bool + IsQuitting func() bool + MainLoop func() + NScreens func() int + NWindows func() int + Name func() string + NewWindow func(opts *NewWindowOptions) (Window, error) + OpenFiles func() []string + OpenURL func(url string) + Platform func() Platforms + Quit func() + QuitClean func() bool + QuitReq func() + RemoveWindow func(win Window) + RunOnMain func(f func()) + Screen func(n int) *Screen + ScreenByName func(name string) *Screen + SendEmptyEvent func() + SetName func(name string) + SetQuitReqFunc func(fun func()) + ShowVirtualKeyboard func(typ styles.VirtualKeyboards) + SystemPlatform func() Platforms + Window func(win int) Window + WindowByName func(name string) Window + WindowInFocus func() Window + type Clipboard interface + Clear func() + IsEmpty func() bool + Read func(types []string) mimedata.Mimes + Write func(data mimedata.Mimes) error + type ClipboardBase struct + func (bb *ClipboardBase) Clear() + func (bb *ClipboardBase) IsEmpty() bool + func (bb *ClipboardBase) Read(types []string) mimedata.Mimes + func (bb *ClipboardBase) Write(data mimedata.Mimes) error + type Cursor interface + Current func() enums.Enum + Hide func() + IsVisible func() bool + Set func(cursor enums.Enum) error + SetSize func(size int) + Show func() + type CursorBase struct + Cur enums.Enum + Size int + Vis bool + func (c *CursorBase) Current() enums.Enum + func (c *CursorBase) Hide() + func (c *CursorBase) IsVisible() bool + func (c *CursorBase) Set(cursor enums.Enum) error + func (c *CursorBase) SetSize(size int) + func (c *CursorBase) Show() + type Drawer interface + ConfigImageDefaultFormat func(idx int, width int, height int, layers int) + Copy func(idx, layer int, dp image.Point, sr image.Rectangle, op draw.Op, flipY bool) error + DestBounds func() image.Rectangle + EndDraw func() + EndFill func() + Fill func(clr color.Color, src2dst math32.Matrix3, reg image.Rectangle, op draw.Op) error + MaxTextures func() int + Scale func(idx, layer int, dr image.Rectangle, sr image.Rectangle, op draw.Op, flipY bool, ...) error + SetFrameImage func(idx int, fb any) + SetGoImage func(idx, layer int, img image.Image, flipY bool) + SetMaxTextures func(maxTextures int) + StartDraw func(descIndex int) bool + StartFill func() bool + Surface func() any + SyncImages func() + UseTextureSet func(descIndex int) + type DrawerBase struct + Image *image.RGBA + Images [][]*image.RGBA + MaxTxts int + func (dw *DrawerBase) ConfigImageDefaultFormat(idx int, width int, height int, layers int) + func (dw *DrawerBase) Copy(idx, layer int, dp image.Point, sr image.Rectangle, op draw.Op, flipY bool) error + func (dw *DrawerBase) EndFill() + func (dw *DrawerBase) Fill(clr color.Color, src2dst math32.Matrix3, reg image.Rectangle, op draw.Op) error + func (dw *DrawerBase) MaxTextures() int + func (dw *DrawerBase) Scale(idx, layer int, dr image.Rectangle, sr image.Rectangle, op draw.Op, flipY bool, ...) error + func (dw *DrawerBase) SetFrameImage(idx int, fb any) + func (dw *DrawerBase) SetGoImage(idx, layer int, img image.Image, flipY bool) + func (dw *DrawerBase) SetMaxTextures(maxTextures int) + func (dw *DrawerBase) StartDraw(descIndex int) bool + func (dw *DrawerBase) StartFill() bool + func (dw *DrawerBase) Surface() any + func (dw *DrawerBase) SyncImages() + func (dw *DrawerBase) UseTextureSet(descIndex int) + type NewWindowOptions struct + Flags WindowFlags + Icon []image.Image + Pos image.Point + Size image.Point + StdPixels bool + Title string + func (o *NewWindowOptions) Fixup() + func (o *NewWindowOptions) GetTitle() string + func (o *NewWindowOptions) SetDialog() + func (o *NewWindowOptions) SetFullscreen() + func (o *NewWindowOptions) SetModal() + func (o *NewWindowOptions) SetTool() + type Platforms int32 + const Android + const IOS + const Linux + const MacOS + const Offscreen + const PlatformsN + const Web + const Windows + func PlatformsValues() []Platforms + func (i *Platforms) SetInt64(in int64) + func (i *Platforms) SetString(s string) error + func (i *Platforms) UnmarshalText(text []byte) error + func (i Platforms) Desc() string + func (i Platforms) Int64() int64 + func (i Platforms) MarshalText() ([]byte, error) + func (i Platforms) String() string + func (i Platforms) Values() []enums.Enum + func (p Platforms) IsMobile() bool + type Screen struct + Depth int + DevicePixelRatio float32 + Geometry image.Rectangle + LogicalDPI float32 + Manufacturer string + Model string + Name string + NativeOrientation ScreenOrientation + Orientation ScreenOrientation + PhysicalDPI float32 + PhysicalSize image.Point + PixSize image.Point + PrimaryOrientation ScreenOrientation + RefreshRate float32 + ScreenNumber int + SerialNumber string + func (sc *Screen) ConstrainWinGeom(sz, pos image.Point) (csz, cpos image.Point) + func (sc *Screen) UpdateLogicalDPI() + func (sc *Screen) UpdatePhysicalDPI() + func (sc *Screen) WinSizeFromPix(sz image.Point) image.Point + func (sc *Screen) WinSizeToPix(sz image.Point) image.Point + type ScreenOrientation int32 + const Landscape + const OrientationUnknown + const Portrait + const ScreenOrientationN + func ScreenOrientationValues() []ScreenOrientation + func (i *ScreenOrientation) SetInt64(in int64) + func (i *ScreenOrientation) SetString(s string) error + func (i *ScreenOrientation) UnmarshalText(text []byte) error + func (i ScreenOrientation) Desc() string + func (i ScreenOrientation) Int64() int64 + func (i ScreenOrientation) MarshalText() ([]byte, error) + func (i ScreenOrientation) String() string + func (i ScreenOrientation) Values() []enums.Enum + type Window interface + Close func() + CloseClean func() + CloseReq func() + Drawer func() Drawer + EventMgr func() *events.Mgr + Flags func() WindowFlags + Handle func() any + Is func(flag WindowFlags) bool + IsClosed func() bool + IsCursorEnabled func() bool + IsVisible func() bool + Lock func() bool + LogicalDPI func() float32 + Minimize func() + Name func() string + PhysicalDPI func() float32 + Position func() image.Point + Raise func() + RenderGeom func() math32.Geom2DInt + Screen func() *Screen + SetCloseCleanFunc func(fun func(win Window)) + SetCloseReqFunc func(fun func(win Window)) + SetCursorEnabled func(enabled, raw bool) + SetDestroyGPUResourcesFunc func(f func()) + SetFPS func(fps int) + SetGeom func(pos image.Point, sz image.Point) + SetIcon func(images []image.Image) + SetLogicalDPI func(dpi float32) + SetMousePos func(x, y float64) + SetName func(name string) + SetPos func(pos image.Point) + SetSize func(sz image.Point) + SetTitle func(title string) + SetTitleBarIsDark func(isDark bool) + SetWinSize func(sz image.Point) + Size func() image.Point + Title func() string + Unlock func() + WinSize func() image.Point + type WindowFlags int64 + const Dialog + const Focused + const Fullscreen + const Minimized + const Modal + const Tool + const WindowFlagsN + func WindowFlagsValues() []WindowFlags + func (i *WindowFlags) SetFlag(on bool, f ...enums.BitFlag) + func (i *WindowFlags) SetInt64(in int64) + func (i *WindowFlags) SetString(s string) error + func (i *WindowFlags) SetStringOr(s string) error + func (i *WindowFlags) UnmarshalText(text []byte) error + func (i WindowFlags) BitIndexString() string + func (i WindowFlags) Desc() string + func (i WindowFlags) HasFlag(f enums.BitFlag) bool + func (i WindowFlags) Int64() int64 + func (i WindowFlags) MarshalText() ([]byte, error) + func (i WindowFlags) String() string + func (i WindowFlags) Values() []enums.Enum