util

package
v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2024 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const BOOKMARKS_DN string = "bookmarks"
View Source
const CBXS_DN string = "cbxv"
View Source
const DEBUG = false
View Source
const HELP_TXT = `` /* 1182-byte string literal not displayed */
View Source
const LAYOUTS_DN string = "layouts"
View Source
const RENDERERSTATE_FN string = "rendererstate.json"
View Source
const TMP_CBXS_PREFIX string = "cbxv-"

Variables

This section is empty.

Functions

func AppIconPath

func AppIconPath() *string

Get a string that points to an icon for our executables use at runtime Linux - find the icon in one of the standard directories Windows - find the icon relative to the executable

func CreateButton

func CreateButton(text string, cssClass string, toolTip *string) *gtk.Button

func CreateLabel

func CreateLabel(text string, cssClass string, toolTip *string) *gtk.Label

func CreateTmpDir

func CreateTmpDir() (string, error)

func ExportPage

func ExportPage(srcPath string, dstPath string) error

func FullscreenIcon

func FullscreenIcon() string

func GetImagePaths

func GetImagePaths(filePath string, tmpDir string) ([]string, error)

func HashFile

func HashFile(filePath string) (string, error)

func LoadTextFile

func LoadTextFile(filePath string) (*string, error)

func Log

func Log(format string, a ...any)

func ParseFileUrl

func ParseFileUrl(fileUrl string) *string

func ReadBookmarkList

func ReadBookmarkList(hash string) (*string, error)

func ReadLayout

func ReadLayout(hash string) (*string, error)

func ReadRendererState

func ReadRendererState() (string, error)

func ReadSeriesList

func ReadSeriesList(filePath string) ([]string, error)

func RestoreIcon

func RestoreIcon() string

func S

func S(str string) *string

func TrcEnd added in v0.5.0

func TrcEnd(s string, startTime time.Time)

func TrcStart added in v0.5.0

func TrcStart(s string) (string, time.Time)

func WriteBookmarkList

func WriteBookmarkList(hash string, data string) error

func WriteLayout

func WriteLayout(hash string, data string) error

func WriteRendererState

func WriteRendererState(data string) error

Types

type DirListItem

type DirListItem struct {
	Item_path string `json:"item_path"`
	Item_type string `json:"item_type"`
}

func ReadDirList

func ReadDirList(filePath string) ([]DirListItem, error)

type Img added in v0.4.7

type Img = gdk.Pixbuf

func ImgNewFromFile added in v0.4.7

func ImgNewFromFile(path string) (*Img, error)

type ImgFormat added in v0.4.7

type ImgFormat = gdk.PixbufFormat

func ImgGetFileInfo added in v0.4.7

func ImgGetFileInfo(path string) (*ImgFormat, int, int, error)

type Message

type Message struct {
	TypeName string
	Data     string
}

Stuff to handle messages - model -> app <- ui

type Messenger

type Messenger func(m Message)

Jump to

Keyboard shortcuts

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