Skip to content

package windowing

import "kaiju/platform/windowing"

Variables

Functions

DPI2PX

func DPI2PX(pixels, mm, targetMM int) int

DPI2PXF

func DPI2PXF(pixels, mm, targetMM float64) float64

HasDragData

func HasDragData() bool

IsDragDataUsed

func IsDragDataUsed() bool

SetDragData

func SetDragData(data DragDataTarget)

UpdateDragData

func UpdateDragData(sender *Window, x, y int)

UpdateDragDrop

func UpdateDragDrop(sender *Window, x, y int)

Types

ControllerStateWindowEvent

struct

type ControllerStateWindowEvent struct {
    // Has unexported fields.
}

DragDataTarget

interface

type DragDataTarget interface {
    DragUpdate()
}

DragData

func DragData() DragDataTarget

UseDragData

func UseDragData() DragDataTarget

FileSearch

struct

type FileSearch struct {
    Title     string
    Extension string
}

KeyboardButtonWindowEvent

struct

type KeyboardButtonWindowEvent struct {
    // Has unexported fields.
}

MouseButtonWindowEvent

struct

type MouseButtonWindowEvent struct {
    // Has unexported fields.
}

MouseMoveWindowEvent

struct

type MouseMoveWindowEvent struct {
    // Has unexported fields.
}

MouseScrollWindowEvent

struct

type MouseScrollWindowEvent struct {
    // Has unexported fields.
}

SetHandleEvent

struct

type SetHandleEvent struct {
    // Has unexported fields.
}

Window

struct

type Window struct {
    Mouse      hid.Mouse
    Keyboard   hid.Keyboard
    Touch      hid.Touch
    Stylus     hid.Stylus
    Controller hid.Controller
    Cursor     hid.Cursor
    Renderer   rendering.Renderer
    OnResize   events.Event
    OnMove     events.Event

    // Has unexported fields.
}

FindWindowAtPoint

func FindWindowAtPoint(x, y int) (*Window, bool)

New

func New(windowName string, width, height, x, y int, assets *assets.Database) (*Window, error)

Window.AddBorder

func (w *Window) AddBorder()

Window.Center

func (w *Window) Center() (x int, y int)

Window.ClipboardContents

func (w *Window) ClipboardContents() string

Window.CopyToClipboard

func (w *Window) CopyToClipboard(text string)

Window.CursorIbeam

func (w *Window) CursorIbeam()

Window.CursorSizeAll

func (w *Window) CursorSizeAll()

Window.CursorSizeNS

func (w *Window) CursorSizeNS()

Window.CursorSizeWE

func (w *Window) CursorSizeWE()

Window.CursorStandard

func (w *Window) CursorStandard()

Window.Destroy

func (w *Window) Destroy()

Window.DisableRawMouseInput

func (w *Window) DisableRawMouseInput()

Window.DotsPerMillimeter

func (w *Window) DotsPerMillimeter() float64

Window.EnableRawMouseInput

func (w *Window) EnableRawMouseInput()

Window.EndUpdate

func (w *Window) EndUpdate()

Window.Focus

func (w *Window) Focus()

Window.GetDrawableSize

func (w *Window) GetDrawableSize() (int32, int32)

Window.GetInstanceExtensions

func (w *Window) GetInstanceExtensions() []string

Window.Height

func (w *Window) Height() int

Window.HideCursor

func (w *Window) HideCursor()

Window.IsClosed

func (w *Window) IsClosed() bool

Window.IsCrashed

func (w *Window) IsCrashed() bool

Window.IsFullScreen

func (w *Window) IsFullScreen() bool

Window.IsPCSize

func (w *Window) IsPCSize() bool

Window.IsPhoneSize

func (w *Window) IsPhoneSize() bool

Window.IsTabletSize

func (w *Window) IsTabletSize() bool

Window.OpenFileDialog

func (w *Window) OpenFileDialog(startPath string, extensions []filesystem.DialogExtension, ok func(path string), cancel func()) error

Window.PlatformInstance

func (w *Window) PlatformInstance() unsafe.Pointer

Window.PlatformWindow

func (w *Window) PlatformWindow() unsafe.Pointer

Window.Poll

func (w *Window) Poll()

Window.Position

func (w *Window) Position() (x int, y int)

Window.RemoveBorder

func (w *Window) RemoveBorder()

Window.SaveFileDialog

func (w *Window) SaveFileDialog(startPath string, fileName string, extensions []filesystem.DialogExtension, ok func(path string), cancel func()) error

Window.ScreenSizeMM

func (w *Window) ScreenSizeMM() (int, int, error)

Window.SetFullscreen

func (w *Window) SetFullscreen()

Window.SetPosition

func (w *Window) SetPosition(x, y int)

Window.SetSize

func (w *Window) SetSize(width, height int)

Window.SetWindowed

func (w *Window) SetWindowed(width, height int)

Window.ShowCursor

func (w *Window) ShowCursor()

Window.SizeMM

func (w *Window) SizeMM() (int, int, error)

Window.SwapBuffers

func (w *Window) SwapBuffers()

Window.ToLocalPosition

func (w *Window) ToLocalPosition(x, y int) (int, int)

Window.ToScreenPosition

func (w *Window) ToScreenPosition(x, y int) (int, int)

Window.Viewport

func (w *Window) Viewport() matrix.Vec4

Window.Width

func (w *Window) Width() int

Window.X

func (w *Window) X() int

Window.XY

func (w *Window) XY() (int, int)

Window.Y

func (w *Window) Y() int

WindowActivityEvent

struct

type WindowActivityEvent struct {
    // Has unexported fields.
}

WindowEventActivityType

uint32

type WindowEventActivityType = uint32

WindowEventButtonType

uint32

type WindowEventButtonType = uint32

WindowEventControllerConnectionType

uint32

type WindowEventControllerConnectionType = uint32

WindowEventType

uint8

type WindowEventType = uint8

WindowMoveEvent

struct

type WindowMoveEvent struct {
    // Has unexported fields.
}

WindowResizeEvent

struct

type WindowResizeEvent struct {
    // Has unexported fields.
}