wm

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: BSD-3-Clause Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CloseCursor is the mouse cursor that indicates a close action
	CloseCursor desktop.StandardCursor = iota + desktop.VResizeCursor // add to the end of the fyne list
)

Variables

This section is empty.

Functions

func CallMethod added in v0.2.0

func CallMethod(in []interface{}, path, iface, meth string) ([]interface{}, error)

CallMethod simplifies calling a function on the DBus message system. The name of the method and its interface and path are passed as strings. The in parameters must be in the correct number and type to match the requested method and the returned parameters will be returned from this method. If an error occurred the last return parameter will be set.

func FindObjectAtPixelPositionMatching added in v0.2.0

func FindObjectAtPixelPositionMatching(x, y int, c fyne.Canvas, fn func(fyne.CanvasObject) bool) fyne.CanvasObject

FindObjectAtPixelPositionMatching looks for objects in the given canvas that are under pixel position at x, y. Objects must match the criteria in 'fn' and the first match will be returned.

func PositionForNewWindow added in v0.2.0

func PositionForNewWindow(x, y int, w, h uint, decorated bool,
	screens fynedesk.ScreenList) (int, int, uint, uint)

PositionForNewWindow returns the suggested position for a new window of the given geometry. The screen list hints at available space, but normally list.Active() is the best.

func RegisterService added in v0.2.0

func RegisterService(obj interface{}, path, iface string) error

RegisterService allows an object to be exported to the DBus messaging system. Methods on the object exposed can add an additional error parameter to the return types, in which case a non-nil error will send an error message instead of the object response.

func ScaleToPixels added in v0.2.0

func ScaleToPixels(i float32, screen *fynedesk.Screen) int

ScaleToPixels calculates the pixels required to show a specified Fyne dimension on the given screen

func SendNotification added in v0.2.0

func SendNotification(n *Notification)

SendNotification posts a given notification into the user interface's notification area

func SetNotificationListener added in v0.2.0

func SetNotificationListener(listen func(*Notification))

SetNotificationListener connects the user interface to display notifications. Other developers should not use this call.

Types

type Border added in v0.2.0

type Border struct {
	widget.BaseWidget
	// contains filtered or unexported fields
}

Border represents a window border. It draws the title bar and provides functions to manipulate it.

func NewBorder added in v0.2.0

func NewBorder(win fynedesk.Window, icon fyne.Resource, canMaximize bool) *Border

NewBorder creates a new window border for the given window details

func (*Border) CreateRenderer added in v0.2.0

func (c *Border) CreateRenderer() fyne.WidgetRenderer

CreateRenderer creates a new renderer for this border

Implements: fyne.Widget

func (*Border) DoubleTapped added in v0.2.0

func (c *Border) DoubleTapped(*fyne.PointEvent)

DoubleTapped is called when the user double taps a frame, it toggles the maximised state.

func (*Border) SetIcon added in v0.3.0

func (c *Border) SetIcon(icon fyne.Resource)

SetIcon tells the border to change the icon that should be used

func (*Border) SetMaximized added in v0.2.0

func (c *Border) SetMaximized(isMax bool)

SetMaximized updates the state of the border maximize indicators and refreshes

func (*Border) SetTitle added in v0.2.0

func (c *Border) SetTitle(title string)

SetTitle updates the title portion of this border and refreshes.

type Notification added in v0.2.0

type Notification struct {
	ID          uint32
	Title, Body string
}

Notification is a simple struct representing message that can be displayed in the notification area

func NewNotification added in v0.2.0

func NewNotification(title, body string) *Notification

NewNotification creates a new message that can be passed to SendNotification

type ShortcutHandler added in v0.2.0

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

ShortcutHandler is a simple implementation for tracking registered shortcuts

func (*ShortcutHandler) AddShortcut added in v0.2.0

func (sh *ShortcutHandler) AddShortcut(shortcut *fynedesk.Shortcut, handler func())

AddShortcut register an handler to be executed when the shortcut action is triggered

func (*ShortcutHandler) Shortcuts added in v0.2.0

func (sh *ShortcutHandler) Shortcuts() []*fynedesk.Shortcut

Shortcuts returns the list of all registered shortcuts

func (*ShortcutHandler) TypedShortcut added in v0.2.0

func (sh *ShortcutHandler) TypedShortcut(shortcut fyne.Shortcut)

TypedShortcut handle the registered shortcut

type ShortcutManager added in v0.2.0

type ShortcutManager interface {
	Shortcuts() []*fynedesk.Shortcut
	TypedShortcut(fyne.Shortcut)
}

ShortcutManager is an interface that we can use to check for the handler capabilities of a desktop

Jump to

Keyboard shortcuts

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