application

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2025 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrMaximumNumberOfRelaunches = eh.Errorf("maximum number of re-launches reached")
View Source
var ErrNeedsToBeLaunchedBeforeRun = eh.Errorf("application needs to be launched before run")

Functions

This section is empty.

Types

type Application

type Application struct {
	FffiEstablishedHandler      func(fffi *runtime.Fffi2) error
	BeforeFirstFrameInitHandler func() error
	RenderLoopHandler           func(marshaller *runtime.Marshaller) error
	Config                      *Config

	IconFont imgui.ImFontPtr

	PerFrameValues PerFrameValues
	// contains filtered or unexported fields
}
var CurrentApplication *Application

func NewApplication

func NewApplication(cfg *Config) (app *Application, err error)

func (*Application) Launch

func (inst *Application) Launch() (err error)

func (*Application) Run

func (inst *Application) Run() (err error)

type Config

type Config struct {
	ImZeroSkiaClientConfig *ImZeroSkiaClientConfig

	MainFontTTF      string
	ClientBinary     string
	ImZeroCmdOutFile string
	ImZeroCmdInFile  string
	MaxRelaunches    int

	MainFontSizeInPixels float32
	UseWasm              bool
	// contains filtered or unexported fields
}

func (*Config) FromContext

func (inst *Config) FromContext(nameTransf config.NameTransformFunc, ctx *cli.Context) (nMessages int)

func (*Config) ToCliFlags

func (inst *Config) ToCliFlags(nameTransf config.NameTransformFunc, envVarNameTransf config.NameTransformFunc) []cli.Flag

func (*Config) Validate

func (inst *Config) Validate(force bool) (nMessages int)

type ImZeroSkiaClientConfig

type ImZeroSkiaClientConfig struct {
	AppTitle                string `json:"appTitle"`
	Fullscreen              string `json:"fullscreen"`
	InitialMainWindowWidth  string `json:"initialMainWindowWidth"`
	InitialMainWindowHeight string `json:"initialMainWindowHeight"`
	AllowMainWindowResize   string `json:"allowMainWindowResize"`
	ExportBasePath          string `json:"exportBasePath"`
	Vsync                   string `json:"vsync"`
	BackgroundColorRGBA     string `json:"backgroundColorRGBA"`
	BackdropFilter          string `json:"backdropFilter"`
	SketchFilter            string `json:"sketchFilter"`
	VectorCmd               string `json:"vectorCmd"`
	ImguiNavKeyboard        string `json:"imguiNavKeyboard"`
	ImguiNavGamepad         string `json:"imguiNavGamepad"`
	ImguiDocking            string `json:"imguiDocking"`
	FontDyFudge             string `json:"fontDyFudge"`
	FontScaleOverride       string `json:"fontScaleOverride"`
	FontManager             string `json:"fontManager"`
	FontManagerArg          string `json:"fontManagerArg"`
	CoreDump                string `json:"coreDump"`
	// contains filtered or unexported fields
}

func (*ImZeroSkiaClientConfig) FromContext

func (inst *ImZeroSkiaClientConfig) FromContext(nameTransf config.NameTransformFunc, ctx *cli.Context) (nMessages int)

func (*ImZeroSkiaClientConfig) PassthroughArgs

func (inst *ImZeroSkiaClientConfig) PassthroughArgs(args []string) (argsOut []string)

func (*ImZeroSkiaClientConfig) ToCliFlags

func (inst *ImZeroSkiaClientConfig) ToCliFlags(nameTransf config.NameTransformFunc, envVarNameTransf config.NameTransformFunc) []cli.Flag

func (*ImZeroSkiaClientConfig) Validate

func (inst *ImZeroSkiaClientConfig) Validate(force bool) (nMessages int)

type PerFrameValues

type PerFrameValues struct {
	DyFontFudge   float32
	LastActiveId  imgui.ImGuiID
	LastHoveredId imgui.ImGuiID
}

Jump to

Keyboard shortcuts

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