hotdog

package module
v0.0.0-...-beb2b4a Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2021 License: MIT Imports: 8 Imported by: 6

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Log

func Log(component, msg string)

Types

type Attribute

type Attribute struct {
	Name  string
	Value string
}

Attribute "Generic key:value attribute definition"

type BuildInfo

type BuildInfo struct {
	GitRevision string
	GitBranch   string

	HostInfo  string
	BuildTime string
}

type CachedImage

type CachedImage struct {
	Key   string
	Image []byte
}

type ColorRGBA

type ColorRGBA struct {
	R float64
	G float64
	B float64
	A float64
}

ColorRGBA "RGBA color model"

type Document

type Document struct {
	Title       string
	ContentType string
	URL         *url.URL

	RawDocument string
	DOM         *NodeDOM

	DebugFlag       bool
	DebugWindow     *mustard.Window
	DebugTree       *mustard.TreeWidget
	SelectedElement *NodeDOM

	OffsetY int
}

type History

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

func (*History) AllPages

func (history *History) AllPages() []*url.URL

func (*History) Last

func (history *History) Last() *url.URL

func (*History) NextPages

func (history *History) NextPages() []*url.URL

func (*History) PageCount

func (history *History) PageCount() int

func (*History) Pop

func (history *History) Pop()

func (*History) PopNext

func (history *History) PopNext()

func (*History) Push

func (history *History) Push(URL *url.URL)

type ImgCache

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

func (*ImgCache) AddImage

func (cache *ImgCache) AddImage(key string, value []byte)

func (*ImgCache) GetImage

func (cache *ImgCache) GetImage(imageKey string) *CachedImage

type NoSuchElementError

type NoSuchElementError string

func (NoSuchElementError) Error

func (e NoSuchElementError) Error() string

type NodeDOM

type NodeDOM struct {
	Element string `json:"element"`
	Content string `json:"content"`

	Children   []*NodeDOM   `json:"children"`
	Attributes []*Attribute `json:"attributes"`
	Style      *Stylesheet  `json:"style"`
	Parent     *NodeDOM     `json:"-"`
	RenderBox  *RenderBox   `json:"-"`

	NeedsReflow  bool `json:"-"`
	NeedsRepaint bool `json:"-"`

	Document *Document `json:"-"`
}

NodeDOM "DOM Node Struct definition"

func (*NodeDOM) Attr

func (node *NodeDOM) Attr(attrName string) string

func (*NodeDOM) CalcPointIntersection

func (node *NodeDOM) CalcPointIntersection(x, y float64) *NodeDOM

func (*NodeDOM) FindByXPath

func (node *NodeDOM) FindByXPath(xPath string) (*NodeDOM, error)

func (*NodeDOM) FindChildByName

func (node *NodeDOM) FindChildByName(childName string) (*NodeDOM, error)

func (*NodeDOM) GetXPath

func (node *NodeDOM) GetXPath() string

func (*NodeDOM) JSON

func (node *NodeDOM) JSON() string

func (*NodeDOM) Print

func (node *NodeDOM) Print(d int)

func (NodeDOM) RequestReflow

func (node NodeDOM) RequestReflow()

func (NodeDOM) RequestRepaint

func (node NodeDOM) RequestRepaint()

type RenderBox

type RenderBox struct {
	Node *NodeDOM

	Top  float64
	Left float64

	Width  float64
	Height float64

	MarginTop    float64
	MarginLeft   float64
	MarginRight  float64
	MarginBottom float64

	PaddingTop    float64
	PaddingLeft   float64
	PaddingRight  float64
	PaddingBottom float64
}

func (*RenderBox) GetRect

func (box *RenderBox) GetRect() (float64, float64, float64, float64)

type Resource

type Resource struct {
	Body        string
	ContentType string
	Code        int
	URL         *url.URL
	Key         string
}

Resource "HTTP resource struct definition"

type ResourceCache

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

func (*ResourceCache) AddResource

func (cache *ResourceCache) AddResource(resource *Resource)

func (*ResourceCache) GetResource

func (cache *ResourceCache) GetResource(resourceKey string) *Resource

type Settings

type Settings struct {
	Homepage string `json:"homepage"`

	WindowWidth  int `json:"windowWidth"`
	WindowHeight int `json:"windowHeight"`

	HiDPI bool `json:"hiDPI"`

	ExperimentalHTML   bool `json:"experimentalHTML"`   // golang stdlib spec compliant html5 parser
	ExperimentalLayout bool `json:"experimentalLayout"` // spec-ish compliant layout engine
}

func LoadSettings

func LoadSettings(path string) *Settings

type StyleElement

type StyleElement struct {
	Selector string
	Style    *Stylesheet
}

StyleElement "hmtl <style> element"

type Stylesheet

type Stylesheet struct {
	Color           *ColorRGBA
	BackgroundColor *ColorRGBA

	FontSize   float64
	FontWeight int

	Display  string
	Position string

	Width  float64
	Height float64
	Top    float64
	Left   float64
}

Stylesheet "Stylesheet definition for DOM Nodes"

type WebBrowser

type WebBrowser struct {
	ActiveDocument *Document
	Documents      []*Document

	Viewport    *mustard.CanvasWidget
	StatusLabel *mustard.LabelWidget
	History     *History
	Window      *mustard.Window
	Profiler    *profiler.Profiler
	BuildInfo   *BuildInfo
	Settings    *Settings
}

Jump to

Keyboard shortcuts

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