Documentation ¶
Index ¶
- Constants
- func CallMethod(in []interface{}, path, iface, meth string) ([]interface{}, error)
- func FindObjectAtPixelPositionMatching(x, y int, c fyne.Canvas, fn func(fyne.CanvasObject) bool) fyne.CanvasObject
- func PositionForNewWindow(win fynedesk.Window, x, y int, w, h uint, decorated bool, ...) (int, int, uint, uint)
- func RegisterService(obj interface{}, path, iface string) error
- func ScaleToPixels(i float32, screen *fynedesk.Screen) int
- func SendNotification(n *Notification)
- func SetNotificationListener(listen func(*Notification))
- func StartAuthAgent()
- type Border
- type Notification
- type ShortcutHandler
- type ShortcutManager
Constants ¶
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 ¶
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 ¶
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 ¶
func PositionForNewWindow(win fynedesk.Window, 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 ¶
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 ¶
ScaleToPixels calculates the pixels required to show a specified Fyne dimension on the given screen
func SendNotification ¶
func SendNotification(n *Notification)
SendNotification posts a given notification into the user interface's notification area
func SetNotificationListener ¶
func SetNotificationListener(listen func(*Notification))
SetNotificationListener connects the user interface to display notifications. Other developers should not use this call.
func StartAuthAgent ¶
func StartAuthAgent()
StartAuthAgent asks our policy kit agent to start listening for auth requests.
Types ¶
type Border ¶
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 (*Border) CreateRenderer ¶
func (c *Border) CreateRenderer() fyne.WidgetRenderer
CreateRenderer creates a new renderer for this border
Implements: fyne.Widget
func (*Border) DoubleTapped ¶
func (c *Border) DoubleTapped(*fyne.PointEvent)
DoubleTapped is called when the user double taps a frame, it toggles the maximised state.
func (*Border) SetIcon ¶
func (c *Border) SetIcon(icon fyne.Resource)
SetIcon tells the border to change the icon that should be used
func (*Border) SetMaximized ¶
SetMaximized updates the state of the border maximize indicators and refreshes
type Notification ¶
Notification is a simple struct representing message that can be displayed in the notification area
func NewNotification ¶
func NewNotification(title, body string) *Notification
NewNotification creates a new message that can be passed to SendNotification
type ShortcutHandler ¶
type ShortcutHandler struct {
// contains filtered or unexported fields
}
ShortcutHandler is a simple implementation for tracking registered shortcuts
func (*ShortcutHandler) AddShortcut ¶
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 ¶
func (sh *ShortcutHandler) Shortcuts() []*fynedesk.Shortcut
Shortcuts returns the list of all registered shortcuts
func (*ShortcutHandler) TypedShortcut ¶
func (sh *ShortcutHandler) TypedShortcut(shortcut fyne.Shortcut)
TypedShortcut handle the registered shortcut
type ShortcutManager ¶
ShortcutManager is an interface that we can use to check for the handler capabilities of a desktop