grub2

package
v0.0.0-...-78e877d Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2021 License: GPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetOSNum

func GetOSNum() (uint32, error)

func PrepareGfxmodeDetect

func PrepareGfxmodeDetect() error

func RunAsDaemon

func RunAsDaemon()

func SetLogger

func SetLogger(v *log.Logger)

Types

type Entry

type Entry struct {
	// contains filtered or unexported fields
}

Entry is a struct to store each entry's data/

type EntryType

type EntryType int

EntryType is used to define entry's type in '/boot/grub/grub.cfg'.

const (
	MENUENTRY EntryType = iota
	SUBMENU
)

type Grub2

type Grub2 struct {
	PropsMu sync.RWMutex
	// props:
	ThemeFile    string
	DefaultEntry string
	EnableTheme  bool
	Gfxmode      string
	Timeout      uint32
	Updating     bool
	// contains filtered or unexported fields
}

func NewGrub2

func NewGrub2(service *dbusutil.Service) *Grub2

func (*Grub2) GetAvailableGfxmodes

func (g *Grub2) GetAvailableGfxmodes(sender dbus.Sender) (gfxModes []string, busErr *dbus.Error)

func (*Grub2) GetExportedMethods

func (v *Grub2) GetExportedMethods() dbusutil.ExportedMethods

func (*Grub2) GetInterfaceName

func (*Grub2) GetInterfaceName() string

func (*Grub2) GetSimpleEntryTitles

func (grub *Grub2) GetSimpleEntryTitles() (titles []string, busErr *dbus.Error)

GetSimpleEntryTitles return entry titles only in level one and will filter out some useless entries such as sub-menus and "memtest86+".

func (*Grub2) PrepareGfxmodeDetect

func (g *Grub2) PrepareGfxmodeDetect(sender dbus.Sender) *dbus.Error

func (*Grub2) Reset

func (g *Grub2) Reset(sender dbus.Sender) *dbus.Error

Reset reset all configuration.

func (*Grub2) SetDefaultEntry

func (g *Grub2) SetDefaultEntry(sender dbus.Sender, entry string) *dbus.Error

func (*Grub2) SetEnableTheme

func (g *Grub2) SetEnableTheme(sender dbus.Sender, enabled bool) *dbus.Error

func (*Grub2) SetGfxmode

func (g *Grub2) SetGfxmode(sender dbus.Sender, gfxmode string) *dbus.Error

func (*Grub2) SetTimeout

func (g *Grub2) SetTimeout(sender dbus.Sender, timeout uint32) *dbus.Error

type Log

type Log map[string]string

type Theme

type Theme struct {
	PropsMu sync.RWMutex
	// contains filtered or unexported fields
}

Theme is a dbus object which provide properties and methods to setup deepin grub2 theme.

func NewTheme

func NewTheme(g *Grub2) *Theme

NewTheme create Theme object.

func (*Theme) GetBackground

func (theme *Theme) GetBackground() (background string, busErr *dbus.Error)

func (*Theme) GetExportedMethods

func (v *Theme) GetExportedMethods() dbusutil.ExportedMethods

func (*Theme) GetInterfaceName

func (*Theme) GetInterfaceName() string

func (*Theme) SetBackgroundSourceFile

func (theme *Theme) SetBackgroundSourceFile(sender dbus.Sender, filename string) *dbus.Error

Jump to

Keyboard shortcuts

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