Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { Exec(bin string, arg ...string) Terminate() PointerSetPosition(pos wlc.Point) KeyboardGetKeysymForKey(key uint32, mods *wlc.Modifiers) uint32 }
Backend is an inteface describing the functions of a backend like wlc. This is used instead of calling wlc functions directly making it easier to implement tests which mocks the functionality of wlc.
type Mock ¶
type Mock struct{}
Mock implements a mock interface satifying the Backend interface. Can be used for tests.
func (Mock) KeyboardGetKeysymForKey ¶
KeyboardGetKeysymForKey mocks getting keysym fro key.
func (Mock) PointerSetPosition ¶
PointerSetPosition mocks setting pointer position.
type Output ¶
type Output interface { Focus() GetMask() uint32 GetMutableViews() []wlc.View // TODO: abstract this further if needed. Name() string GetRenderer() wlc.Renderer GetResolution() *wlc.Size GetVirtualResolution() *wlc.Size SetResolution(resolution wlc.Size, scale uint32) GetScale() uint32 GetSleep() bool GetViews() []wlc.View ScheduleRender() SetMask(mask uint32) SetSleep(sleep bool) SetViews(views []wlc.View) bool }
Output is an interface for the wlc Output type. Its purpose is to make it easy to mock wlc in tests.
type View ¶
type View interface { BringAbove(other wlc.View) BringToFront() Close() Focus() GetAppID() string GetClass() string GetGeometry() *wlc.Geometry GetMask() uint32 GetOutput() wlc.Output GetParent() wlc.View // GetRole() *C.struct_wl_resource GetState() uint32 GetSurface() wlc.Resource Title() string GetType() uint32 GetVisibleGeometry() wlc.Geometry // GetWlClient() *C.struct_wl_client SendBelow(other wlc.View) SendToBack() SetGeometry(edges uint32, geometry wlc.Geometry) SetMask(mask uint32) SetOutput(output wlc.Output) SetParent(parent wlc.View) SetState(state wlc.ViewStateBit, toggle bool) SetType(typ wlc.ViewTypeBit, toggle bool) }
View is an interface for the wlc View type. Its purpose is to make it easy to mock wlc in tests.
type WLC ¶
type WLC struct{}
WLC is a wrapper around the wlc api which implement the Backend interface.
func (WLC) KeyboardGetKeysymForKey ¶
KeyboardGetKeysymForKey is an utility function to convert raw keycode to keysym. Passed modifiers may transform the key.
func (WLC) PointerSetPosition ¶
PointerSetPosition sets pointer position.