Documentation ¶
Index ¶
- type Application
- type Client
- func (c *Client) CallResult(message string)
- func (c *Client) DarkModeEnabled(callbackID string)
- func (c *Client) MessageDialog(dialogOptions *options.MessageDialog, callbackID string)
- func (c *Client) NotifyEvent(message string)
- func (c *Client) OpenDialog(dialogOptions *options.OpenDialog, callbackID string)
- func (c *Client) Quit()
- func (c *Client) SaveDialog(dialogOptions *options.SaveDialog, callbackID string)
- func (c *Client) UpdateContextMenus(contextMenus *menu.ContextMenus)
- func (c *Client) UpdateMenu(menu *menu.Menu)
- func (c *Client) UpdateTray(menu *menu.Menu)
- func (c *Client) UpdateTrayIcon(name string)
- func (c *Client) UpdateTrayLabel(label string)
- func (c *Client) WindowCenter()
- func (c *Client) WindowFullscreen()
- func (c *Client) WindowHide()
- func (c *Client) WindowMaximise()
- func (c *Client) WindowMinimise()
- func (c *Client) WindowPosition(x int, y int)
- func (c *Client) WindowSetColour(colour int)
- func (c *Client) WindowSetTitle(title string)
- func (c *Client) WindowShow()
- func (c *Client) WindowSize(width int, height int)
- func (c *Client) WindowUnFullscreen()
- func (c *Client) WindowUnmaximise()
- func (c *Client) WindowUnminimise()
- type DispatchClient
- type Dispatcher
- type ProcessedMenu
- type RadioGroup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application is our main application object
func NewApplication ¶
func NewApplication(logger *logger.Logger) *Application
NewApplication creates a new Application with the default config
func NewApplicationWithConfig ¶
func NewApplicationWithConfig(config *options.App, logger *logger.Logger) *Application
NewApplicationWithConfig creates a new application based on the given config
func (*Application) Run ¶
func (a *Application) Run(incomingDispatcher Dispatcher, bindings string, debug bool) error
Run the application
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is our implentation of messageDispatcher.Client
func (*Client) CallResult ¶
CallResult contains the result of the call from JS
func (*Client) DarkModeEnabled ¶
func (*Client) MessageDialog ¶
func (c *Client) MessageDialog(dialogOptions *options.MessageDialog, callbackID string)
MessageDialog will open a message dialog with the given options
func (*Client) NotifyEvent ¶
NotifyEvent will pass on the event message to the frontend
func (*Client) OpenDialog ¶
func (c *Client) OpenDialog(dialogOptions *options.OpenDialog, callbackID string)
OpenDialog will open a dialog with the given title and filter
func (*Client) SaveDialog ¶
func (c *Client) SaveDialog(dialogOptions *options.SaveDialog, callbackID string)
SaveDialog will open a dialog with the given title and filter
func (*Client) UpdateContextMenus ¶
func (c *Client) UpdateContextMenus(contextMenus *menu.ContextMenus)
func (*Client) UpdateMenu ¶
func (*Client) UpdateTray ¶
func (*Client) UpdateTrayIcon ¶
func (*Client) UpdateTrayLabel ¶
func (*Client) WindowFullscreen ¶
func (c *Client) WindowFullscreen()
WindowFullscreen will set the window to be fullscreen
func (*Client) WindowMaximise ¶
func (c *Client) WindowMaximise()
WindowMaximise will maximise the window
func (*Client) WindowMinimise ¶
func (c *Client) WindowMinimise()
WindowMinimise will minimise the window
func (*Client) WindowPosition ¶
WindowPosition will position the window to x,y on the monitor that the window is mostly on
func (*Client) WindowSetColour ¶
WindowSetColour sets the window colour
func (*Client) WindowSetTitle ¶
WindowSetTitle sets the window title to the given string
func (*Client) WindowSize ¶
WindowSize will resize the window to the given width and height
func (*Client) WindowUnFullscreen ¶
func (c *Client) WindowUnFullscreen()
WindowUnFullscreen will unfullscreen the window
func (*Client) WindowUnmaximise ¶
func (c *Client) WindowUnmaximise()
WindowUnmaximise will unmaximise the window
func (*Client) WindowUnminimise ¶
func (c *Client) WindowUnminimise()
WindowUnminimise will unminimise the window
type DispatchClient ¶
type DispatchClient interface {
SendMessage(string)
}
DispatchClient is the means for passing messages to the backend
type Dispatcher ¶
type Dispatcher interface {
RegisterClient(client messagedispatcher.Client) *messagedispatcher.DispatchClient
}
Dispatcher is what we register out client with
type ProcessedMenu ¶
type ProcessedMenu struct { Menu *menu.Menu RadioGroups []*RadioGroup // contains filtered or unexported fields }
ProcessedMenu is the original menu with the addition of radio groups extracted from the menu data
func NewProcessedMenu ¶
func NewProcessedMenu(menu *menu.Menu) *ProcessedMenu
NewProcessedMenu processed the given menu and returns the original menu with the extracted radio groups
type RadioGroup ¶
RadioGroup holds all the members of the same radio group