golem

package
v0.0.0-...-b6ae310 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2015 License: GPL-3.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

View Source
const HintsChars = "FDSARTGBVECWXQZIOPMNHYULKJ"

Variables

View Source
var Errlog = log.New(os.Stderr, "(E) ", log.LstdFlags)

Errlog is a log pointed to stderr.

View Source
var PrintCommands = false

PrintCommands specifies whether all commands should be printed.

View Source
var PrintKeys = false

PrintKeys specifies whether each keypress should be printed.

Functions

This section is empty.

Types

type BlockQuery

type BlockQuery struct {
	Uri        string
	FirstParty string
	Flags      uint64
}

A BlockQuery encapsulates all the arguments for querying the blocked status of a website.

type Golem

type Golem struct {
	*RPCSession

	Quit chan bool

	DefaultSettings *webkit.Settings
	// contains filtered or unexported fields
}

Golem is golem's main instance.

func New

func New(session *RPCSession, profile string) (*Golem, error)

New creates a new instance of golem.

func (*Golem) Close

func (g *Golem) Close()

Close closes golem.

func (*Golem) NewWindow

func (g *Golem) NewWindow(uri string) (*Window, error)

NewWindow creates a new window, using particular webkit settings as a template.

A new web view is initialized and sent to a specified uri. If the URI is empty, the new tab page is used instead.

func (*Golem) OpenURI

func (g *Golem) OpenURI(args []string) string

OpenURI gets the uri to go to for a command of the "open" class.

func (*Golem) WebkitCleanup

func (g *Golem) WebkitCleanup()

WebkitCleanup removes the temporary webkit extension directory.

type HintCallRequest

type HintCallRequest struct {
	Id  uint64
	Uri string
}

A HintCallRequest is a request to call a particular hint from a given web view.

type InputFocusChange

type InputFocusChange struct {
	Id      uint64
	Focused bool
}

type Nothing

type Nothing struct{}

type RPCSession

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

A RPCSession manages listening on golems RPC socket, as well as serving as the exported RPC object for golem.

func NewRPCSession

func NewRPCSession(l net.Listener) *RPCSession

func (*RPCSession) Blocks

func (s *RPCSession) Blocks(bq BlockQuery, ret *bool) error

Blocks checks whether a uri is blocked by the adblocker or not.

func (*RPCSession) DomainElemHideCSS

func (s *RPCSession) DomainElemHideCSS(domain string, ret *string) error

DomainElemHideCSS retrieves the css string to hide the elements on a given domain.

func (*RPCSession) GetHintsLabels

func (s *RPCSession) GetHintsLabels(n int64, ret *[]string) error

GetHintsLabels gets n labels for hints.

func (*RPCSession) HintCall

func (g *RPCSession) HintCall(hcr HintCallRequest, ret *bool) error

HintCall is called if a hint was hit.

func (*RPCSession) InputFocusChanged

func (g *RPCSession) InputFocusChanged(
	ifc InputFocusChange, ret *Nothing) error

InputFocusChanged is called to signal a change in the input focus of a web page.

func (*RPCSession) NewTabs

func (s *RPCSession) NewTabs(uris []string, ret *Nothing) error

NewTabs opens a set of uris in new tabs.

func (*RPCSession) NewWindow

func (s *RPCSession) NewWindow(args *Nothing, ret *Nothing) error

NewWindow creates a new window in golem's main process.

func (*RPCSession) VerticalPositionChanged

func (g *RPCSession) VerticalPositionChanged(
	vpc VerticalPositionChange,
	ret *Nothing) error

VerticalPositionChanged is called to signal a change in the vertical position of a web page.

type VerticalPositionChange

type VerticalPositionChange struct {
	Id     uint64
	Top    int64
	Height int64
}

A VerticalPositionChange records the change in the vertical position of a particular web view.

type Window

type Window struct {
	*ui.Window
	cmd.State
	// contains filtered or unexported fields
}

A Window is one of golem's window.

func (*Window) NewTabs

func (w *Window) NewTabs(uris ...string) ([]*webView, error)

NewTabs opens several new tabs to the specified URIs.

If the URI is blank, the new tab page is used instead.

NewTabs is a glib atomic operation, i.e. it is executed in glibs main context.

func (*Window) TabGo

func (w *Window) TabGo(index int) error

TabGo goes to a specified tab.

TabGo is a glib atomic operation, that is, it is executed in glibs main context.

func (*Window) TabNext

func (w *Window) TabNext()

TabNext goes to the next tab.

TabNext is a glib atomic operation, that is, it is executed in glibs main context.

func (*Window) TabPrev

func (w *Window) TabPrev()

TabPrev goes to the previous tab.

TabPrev is a glib atomic operation, that is, it is executed in glibs main context.

Directories

Path Synopsis
Package states defines constants of the substates used in golem's state machine.
Package states defines constants of the substates used in golem's state machine.
Package ui contains golem's user-interface implementation.
Package ui contains golem's user-interface implementation.
Package version contains golem's version constants.
Package version contains golem's version constants.

Jump to

Keyboard shortcuts

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