-
-
Notifications
You must be signed in to change notification settings - Fork 46
/
window.go
50 lines (43 loc) · 1.98 KB
/
window.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
package fynedesk
import (
"image"
"fyne.io/fyne/v2"
)
// Window represents a single managed window within a window manager.
// There may be borders or not depending on configuration.
type Window interface {
Focused() bool // Is this the currently focused window?
Fullscreened() bool // Is the window Fullscreen?
Iconic() bool // Is the window Iconified?
Maximized() bool // Is the window Maximized?
TopWindow() bool // Is this the window on top?
Capture() image.Image // Capture the contents of this window to an image
Close() // Close this window and possibly the application running it
Focus() // Ask this window to get input focus
Fullscreen() // Request to fullscreen this window
Iconify() // Request to iconify this window
Maximize() // Request to resize this window to it's largest possible size
RaiseAbove(Window) // Raise this window above a given other window
RaiseToTop() // Raise this window to the top of the stack
Unfullscreen() // Request to unfullscreen this window
Uniconify() // Request to restore this window and possibly children of this window from being minimized
Unmaximize() // Request to restore this window to its size before being maximized
Parent() Window
Properties() WindowProperties // Request the properties set on this window
Position() fyne.Position
Size() fyne.Size
Move(position fyne.Position)
Resize(fyne.Size)
Desktop() int
SetDesktop(int)
}
// WindowProperties encapsulates the metadata that a window can provide.
type WindowProperties interface {
Class() []string // The class of this window
Command() string // The command of this window
Decorated() bool // Should this window have borders drawn?
Icon() fyne.Resource // The icon of this window
IconName() string // The icon name of this window
SkipTaskbar() bool // Should this window be added to the taskbar?
Title() string // The name of this window
}