Table of Contents

Interface IButlerPantry

Namespace
Whim
Assembly
Whim.dll
The Butler's pantry is responsible for mapping IWindows to IWorkspaces to IMonitors.
public interface IButlerPantry

Methods

GetAdjacentWorkspace(IWorkspace, bool, bool)

Gets the adjacent workspace to the given workspace.
IWorkspace? GetAdjacentWorkspace(IWorkspace workspace, bool reverse = false, bool skipActive = false)

Parameters

workspace IWorkspace
The workspace to get the adjacent workspace for.
reverse bool
When true, gets the previous workspace, otherwise gets the next workspace. Defaults to false.
skipActive bool
When true, skips all workspaces that are active on any other monitor. Defaults to false.

Returns

IWorkspace

GetAllActiveWorkspaces()

Gets all the workspaces which are active on any monitor.
IEnumerable<IWorkspace> GetAllActiveWorkspaces()

Returns

IEnumerable<IWorkspace>

GetMonitorForWindow(IWindow)

Retrieves the monitor for the given window.
IMonitor? GetMonitorForWindow(IWindow window)

Parameters

window IWindow

Returns

IMonitor
null if the window is not in a workspace.

GetMonitorForWorkspace(IWorkspace)

Retrieves the monitor for the active workspace.
IMonitor? GetMonitorForWorkspace(IWorkspace workspace)

Parameters

workspace IWorkspace

Returns

IMonitor
null if the workspace is not active.

GetWorkspaceForMonitor(IMonitor)

Retrieves the active workspace for the given monitor.
IWorkspace? GetWorkspaceForMonitor(IMonitor monitor)

Parameters

monitor IMonitor

Returns

IWorkspace
null if the monitor is not active.

GetWorkspaceForWindow(IWindow)

Retrieves the workspace for the given window.
IWorkspace? GetWorkspaceForWindow(IWindow window)

Parameters

window IWindow

Returns

IWorkspace
null if the window is not in a workspace.