2020-10-23 03:54:50 +13:00
|
|
|
package types
|
|
|
|
|
2020-11-02 04:09:48 +13:00
|
|
|
type ScreenSize struct {
|
|
|
|
Width int `json:"width"`
|
|
|
|
Height int `json:"height"`
|
|
|
|
Rate int16 `json:"rate"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type ScreenConfiguration struct {
|
|
|
|
Width int `json:"width"`
|
|
|
|
Height int `json:"height"`
|
|
|
|
Rates map[int]int16 `json:"rates"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type DesktopManager interface {
|
2020-10-23 03:54:50 +13:00
|
|
|
Start()
|
|
|
|
Shutdown() error
|
2020-11-08 05:22:25 +13:00
|
|
|
OnBeforeScreenSizeChange(listener func())
|
|
|
|
OnAfterScreenSizeChange(listener func())
|
2020-11-02 04:09:48 +13:00
|
|
|
|
|
|
|
// xorg
|
|
|
|
ChangeScreenSize(width int, height int, rate int) error
|
2020-10-23 03:54:50 +13:00
|
|
|
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
|
2020-10-23 03:54:50 +13:00
|
|
|
SetKeyboardLayout(layout string)
|
|
|
|
SetKeyboardModifiers(NumLock int, CapsLock int, ScrollLock int)
|
2020-11-02 04:09:48 +13:00
|
|
|
|
|
|
|
// clipboard
|
|
|
|
ReadClipboard() string
|
|
|
|
WriteClipboard(data string)
|
2020-10-23 03:54:50 +13:00
|
|
|
}
|