ffenestri

package
v2.0.0-beta.33 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2022 License: MIT Imports: 10 Imported by: 0

README

Windows

  • Left and Right Win keys act the same
  • Accelerators will automatically add appropriate text into the menu items. This can be prevented by adding a tab character to the menu label
  • Tooltips + styling with font currently unsupported

Documentation

Index

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 NewApplicationWithConfig

func NewApplicationWithConfig(config *options.App, logger *logger.Logger, menuManager *menumanager.Manager) *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 implementation of messageDispatcher.Client

func (*Client) CallResult

func (c *Client) CallResult(message string)

CallResult contains the result of the call from JS

func (*Client) DarkModeEnabled

func (c *Client) DarkModeEnabled(callbackID string)

func (*Client) DeleteTrayMenuByID

func (c *Client) DeleteTrayMenuByID(id string)

func (*Client) MessageDialog

func (c *Client) MessageDialog(dialogOptions runtime.MessageDialogOptions, callbackID string)

MessageDialog will open a message dialog with the given options

func (*Client) NotifyEvent

func (c *Client) NotifyEvent(message string)

NotifyEvent will pass on the event message to the frontend

func (*Client) OpenDirectoryDialog

func (c *Client) OpenDirectoryDialog(dialogOptions runtime.OpenDialogOptions, callbackID string)

OpenDirectoryDialog will open a dialog with the given title and filter

func (*Client) OpenFileDialog

func (c *Client) OpenFileDialog(dialogOptions runtime.OpenDialogOptions, callbackID string)

OpenFileDialog will open a dialog with the given title and filter

func (*Client) OpenMultipleFilesDialog

func (c *Client) OpenMultipleFilesDialog(dialogOptions runtime.OpenDialogOptions, callbackID string)

OpenMultipleFilesDialog will open a dialog with the given title and filter

func (*Client) Quit

func (c *Client) Quit()

Quit the application

func (*Client) SaveDialog

func (c *Client) SaveDialog(dialogOptions *runtime.SaveDialogOptions, callbackID string)

SaveDialog will open a dialog with the given title and filter

func (*Client) SetApplicationMenu

func (c *Client) SetApplicationMenu(applicationMenuJSON string)

func (*Client) SetTrayMenu

func (c *Client) SetTrayMenu(trayMenuJSON string)

func (*Client) UpdateContextMenu

func (c *Client) UpdateContextMenu(contextMenuJSON string)

func (*Client) UpdateTrayMenuLabel

func (c *Client) UpdateTrayMenuLabel(JSON string)

func (*Client) WindowCenter

func (c *Client) WindowCenter()

WindowCenter will hide the window

func (*Client) WindowFullscreen

func (c *Client) WindowFullscreen()

WindowFullscreen will set the window to be fullscreen

func (*Client) WindowHide

func (c *Client) WindowHide()

WindowHide will hide the window

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

func (c *Client) WindowPosition(x int, y int)

WindowPosition will position the window to x,y on the monitor that the window is mostly on

func (*Client) WindowSetColour

func (c *Client) WindowSetColour(colour int)

WindowSetColour sets the window colour

func (*Client) WindowSetMaxSize

func (c *Client) WindowSetMaxSize(width int, height int)

func (*Client) WindowSetMinSize

func (c *Client) WindowSetMinSize(width int, height int)

func (*Client) WindowSetTitle

func (c *Client) WindowSetTitle(title string)

WindowSetTitle sets the window title to the given string

func (*Client) WindowShow

func (c *Client) WindowShow()

WindowShow will show the window

func (*Client) WindowSize

func (c *Client) WindowSize(width int, height int)

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

Directories

Path Synopsis
windows
x64

Jump to

Keyboard shortcuts

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