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(x, y int, w, h uint, decorated bool, screens fynedesk.ScreenList) (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))
- 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 ¶ added in v0.2.0
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
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
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 (*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
SetMaximized updates the state of the border maximize indicators and refreshes
type Notification ¶ added in v0.2.0
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
ShortcutManager is an interface that we can use to check for the handler capabilities of a desktop