app

package
v0.0.0-...-993d856 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Package app holds the wails app and all emit aswell as export functions that can be used in TS

Package app holds the wails app and all emit aswell as export functions that can be used in TS

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	CTX context.Context

	SearchHandler *modules.SearchHandler
	// contains filtered or unexported fields
}

App holds all the main data and functions relevant to the front- and backend.

func NewApp

func NewApp(lg *logger.Logger, images embed.FS, icon embed.FS) (*App, error)

NewApp is the constructor for App

func (*App) GetImageData

func (a *App) GetImageData() map[string]string

GetImageData emits a map[name]base64 png data to the frotend to bind in the images

func (*App) HideWindow

func (a *App) HideWindow()

HideWindow is a wrapper around runtime.WindowHide that ensures our cache data doesn't unnecessarily stay in memory

func (*App) LaunchSearch

func (a *App) LaunchSearch(input string)

LaunchSearch starts a search on the SearchHandler of the app

func (*App) LogErrorTS

func (a *App) LogErrorTS(message string)

LogErrorTS will log a message received from TS

func (*App) LogEventTS

func (a *App) LogEventTS(event string, message string)

LogEventTS will log an event received from TS

func (*App) OpenFileExplorer

func (a *App) OpenFileExplorer(filePath string)

OpenFileExplorer allows you to open the file manager at any entry's location and select it (if the file manager is dolphin or nautilus)

func (*App) ShowWindow

func (a *App) ShowWindow()

ShowWindow is a wrapper around runtime.WindowShow that ensures we load our cache data into memory

func (*App) Startup

func (a *App) Startup(CTX context.Context)

Startup is called when the app starts. The context gets saved on the app. It's responsible for launching the main loop, containing all the emit functions.

Jump to

Keyboard shortcuts

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