Documentation ¶
Overview ¶
Package ctl implements the main controller used for all of the available resetting schemes (e.g. multi, wall.)
Index ¶
Constants ¶
const ( HookReset int = iota HookAltRes HookNormalRes HookFocusLost HookFocusGained )
Hook types
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Controller ¶
type Controller struct {
// contains filtered or unexported fields
}
Controller manages all of the components necessary for resetti to run and handles communication between them.
func (*Controller) FocusInstance ¶
func (c *Controller) FocusInstance()
FocusInstance switches focus to the given instance.
func (*Controller) ResetInstance ¶
func (c *Controller) ResetInstance() bool
ResetInstance attempts to reset the given instance and returns whether or not the reset was successful.
func (*Controller) RunHook ¶
func (c *Controller) RunHook(hook int, hookId int)
RunHook runs the hook of the given type if it exists.
func (*Controller) ToggleResolution ¶
func (c *Controller) ToggleResolution(resId int)
ToggleResolution switches the given instance between the normal (play) resolution and the given alternate resolution.
type Frontend ¶
type Frontend interface { // Input processes a single user input. Input(Input) // Setup takes in all of the potentially needed dependencies and prepares // the Frontend to handle user input. Setup(frontendDependencies) error // ProcessEvent processes a miscellanous event from the X server. ProcessEvent(x11.Event) }
A Frontend handles user-facing I/O (input handling, instance actions, OBS output) and communicates with a Controller.
type Single ¶ added in v0.7.0
type Single struct {
// contains filtered or unexported fields
}
Single implements a traditional Single-instance interface with extra support for resolution binds and hooks.
func (*Single) ProcessEvent ¶ added in v0.7.0
ProcessEvent implements Frontend.