neko/internal/types/desktop.go

42 lines
831 B
Go
Raw Normal View History

package types
2020-11-02 04:09:48 +13:00
type ScreenSize struct {
2020-11-26 10:35:54 +13:00
Width int
Height int
Rate int16
2020-11-02 04:09:48 +13:00
}
type ScreenConfiguration struct {
2020-11-26 10:35:54 +13:00
Width int
Height int
Rates map[int]int16
2020-11-02 04:09:48 +13:00
}
type DesktopManager interface {
Start()
Shutdown() error
OnBeforeScreenSizeChange(listener func())
OnAfterScreenSizeChange(listener func())
2020-11-02 04:09:48 +13:00
// xorg
ChangeScreenSize(width int, height int, rate int) error
Move(x, y int)
Scroll(x, y int)
ButtonDown(code int) error
KeyDown(code uint64) error
ButtonUp(code int) error
KeyUp(code uint64) error
ResetKeys()
2020-11-02 04:09:48 +13:00
ScreenConfigurations() map[int]ScreenConfiguration
GetScreenSize() *ScreenSize
SetKeyboardLayout(layout string)
SetKeyboardModifiers(NumLock int, CapsLock int, ScrollLock int)
2020-11-02 04:09:48 +13:00
// clipboard
ReadClipboard() string
WriteClipboard(data string)
2021-01-07 06:57:50 +13:00
// drop
DropFiles(x int, y int, files []string)
}