Search Results for

    Interface IWorkspace

    Represents a window-based workspace. A workspace directly contains top-level windows, each of which could belong to a virtual desktops. The workspace can span across multiple monitors.

    Inherited Members
    System.IDisposable.Dispose()
    Namespace: WinMan
    Assembly: WinMan.dll
    Syntax
    public interface IWorkspace : IDisposable

    Properties

    | Improve this Doc View Source

    CursorLocation

    Returns the current cursor location.

    Declaration
    Point CursorLocation { get; }
    Property Value
    Type Description
    Point
    | Improve this Doc View Source

    DisplayManager

    The IDisplayManager instance.

    Declaration
    IDisplayManager DisplayManager { get; }
    Property Value
    Type Description
    IDisplayManager
    | Improve this Doc View Source

    FocusedWindow

    A reference to the currently focused window or null, if no top-level visible window is focused.

    Declaration
    IWindow FocusedWindow { get; }
    Property Value
    Type Description
    IWindow
    | Improve this Doc View Source

    IsOpen

    Has Open() been called.

    Declaration
    bool IsOpen { get; }
    Property Value
    Type Description
    System.Boolean
    | Improve this Doc View Source

    VirtualDesktopManager

    The IVirtualDesktopManager instance.

    Declaration
    IVirtualDesktopManager VirtualDesktopManager { get; }
    Property Value
    Type Description
    IVirtualDesktopManager
    | Improve this Doc View Source

    WatchInterval

    Some workspace implementations might require dirty checking to detect changes. The higher this value is, the less system resources will be used.

    A value of System.TimeSpan.MaxValue disables automatic dirty checking.

    Alternatively, you may also call RefreshConfiguration(), to run a change-detection cycle manually.

    Declaration
    TimeSpan WatchInterval { get; set; }
    Property Value
    Type Description
    System.TimeSpan

    Methods

    | Improve this Doc View Source

    CreateSnapshotZOrderComparer()

    Creates a comparer that uses a snapshot of the current workspace to compare windows.

    Declaration
    IComparer<IWindow> CreateSnapshotZOrderComparer()
    Returns
    Type Description
    System.Collections.Generic.IComparer<IWindow>
    | Improve this Doc View Source

    FindWindow(IntPtr)

    Finds a window by its native window handle. This will be a window that has already been identified by the application, but might not necessarily be a top-level application window.

    Declaration
    IWindow FindWindow(IntPtr windowHandle)
    Parameters
    Type Name Description
    System.IntPtr windowHandle
    Returns
    Type Description
    IWindow
    | Improve this Doc View Source

    GetSnapshot()

    Returns a snapshot of the windows in the current workspace.

    Declaration
    IReadOnlyList<IWindow> GetSnapshot()
    Returns
    Type Description
    System.Collections.Generic.IReadOnlyList<IWindow>
    | Improve this Doc View Source

    Open()

    Attaches system hooks and creates required data structures. WindowManaging events will be emitted for windows currently present in the workspace before this call returns.

    Declaration
    void Open()
    | Improve this Doc View Source

    RefreshConfiguration()

    Manually instructs the underlying implementation to run an change-detection cycle on the workspace.

    Declaration
    void RefreshConfiguration()
    | Improve this Doc View Source

    UnsafeCreateFromHandle(IntPtr)

    Creates an IWindow instance for the corresponding handle. This instance may not compare equal to other IWindow references to the same OS window. Use this only for throaway instances where you need to read a certain property of the window. Events will not be raised on this instance, as it is not tied to the workspace backend.

    The window is not required to be a top-level or application window. This method is an escape hatch.

    Declaration
    IWindow UnsafeCreateFromHandle(IntPtr windowHandle)
    Parameters
    Type Name Description
    System.IntPtr windowHandle
    Returns
    Type Description
    IWindow

    Events

    | Improve this Doc View Source

    CursorLocationChanged

    The location of the cursor has changed. This event fires freqently and might now be ideal for doing heavy calculations.

    Declaration
    event EventHandler<CursorLocationChangedEventArgs> CursorLocationChanged
    Event Type
    Type Description
    System.EventHandler<CursorLocationChangedEventArgs>
    | Improve this Doc View Source

    FocusedWindowChanged

    The currently focused window has changed.

    Declaration
    event EventHandler<FocusedWindowChangedEventArgs> FocusedWindowChanged
    Event Type
    Type Description
    System.EventHandler<FocusedWindowChangedEventArgs>
    | Improve this Doc View Source

    UnhandledException

    An exception raised during event handling or in the OS-specific workspace implementation was thrown and uncaught.

    Declaration
    event UnhandledExceptionEventHandler UnhandledException
    Event Type
    Type Description
    System.UnhandledExceptionEventHandler
    | Improve this Doc View Source

    WindowAdded

    The window was just added to the workspace.

    Declaration
    event EventHandler<WindowChangedEventArgs> WindowAdded
    Event Type
    Type Description
    System.EventHandler<WindowChangedEventArgs>
    | Improve this Doc View Source

    WindowManaging

    The window was initially present when Open() was first called. WindowManaging + WindowAdded used together is better that looping on the current window list first, then attaching to WindowAdded, as it takes care of concurrency issues.

    Declaration
    event EventHandler<WindowChangedEventArgs> WindowManaging
    Event Type
    Type Description
    System.EventHandler<WindowChangedEventArgs>
    | Improve this Doc View Source

    WindowRemoved

    The window was just removed to the workspace. The window object will be practically useless, but you can use this event for cleanup.

    Declaration
    event EventHandler<WindowChangedEventArgs> WindowRemoved
    Event Type
    Type Description
    System.EventHandler<WindowChangedEventArgs>

    Extension Methods

    WorkspaceExtensions.GetCurrentDesktopSnapshot(IWorkspace)
    • Improve this Doc
    • View Source
    In This Article
    Back to top Generated by DocFX