interfaces

package
v1.1.3 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mural

type Mural interface {
	// GetLastByName returns the name last returned.
	GetLastByName() (string, error)

	// SetLastByName writes to cache the last file returned when sorted by Name
	SetLastByName(path string) error

	// GetImage converts a path to a file to an in-memory image.
	GetImage(path, kind string) (image.Image, error)

	// FitBlur fits image to detected monitors and fills the
	// background with blurred version of the image.
	FitBlur(path string, mons []ent.Monitor) ([]string, error)

	// FitAverage fits an image to detected monitors and fills the backgrounds
	// with an average color of the image.
	FitAverage(path string, mons []ent.Monitor) ([]string, error)

	// FitTile fits an image to detected monitors and fills the backgrounds
	// with provided tiles.
	FitTile(path, tilePath string, mons []ent.Monitor) ([]string, error)

	// FitRGB fits and image to detected monitors and fills the background with
	// a uniform color.
	FitRGB(path string, mons []ent.Monitor) ([]string, error)

	// MonitorRatio provides a ratio of monitor-width/monitory-hight.
	MonitorRatio(ent.Monitor) float64

	// ImageRatio provides a ratio of image-width/image-hight.
	ImageRatio(image.Image) float64
}

type Sys

type Sys interface {
	// Monitor finds connected monitors, their order and resolution.
	Monitors() ([]ent.Monitor, error)

	// ModDate returns the date-time when a file was modified.
	ModDate(path string) (string, error)

	// ImgPaths returns back all images located in a given path.
	ImgPaths(path string, recursive bool) ([]string, error)

	// DirExists returns true if a directory exists, and it is a directory.
	DirExists(path string) bool

	// FileExists returns true if path exists and points to a regular file.
	FileExists(path string) bool

	// MakeDir creates a directory unless it exists already.
	MakeDir(path string) error

	// ClearDir output is an empty directory for the path. If a directory exists
	// it will clean it from files, if it does not exist, it will create it.
	ClearDir(path string) error

	// SetWallpapers sends generated wallpapers to their corresponding
	// monitors.
	SetWallpapers(paths []string, fit ent.Fit) error
}

Jump to

Keyboard shortcuts

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