Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/ryzhpolsos/redeye/llms.txt

Use this file to discover all available pages before exploring further.

Every RedEye plugin is a class that extends RedEye.PluginAPI.Plugin. Before Main() is called, the runtime calls InitPlugin() which resolves and assigns all service properties from the component manager. You never call InitPlugin() yourself — it happens automatically during plugin loading.
using RedEye.PluginAPI;

public class MyPlugin : Plugin {
    public override void Main() {
        // All service properties are ready here
        Logger.LogInformation("Plugin started: " + Name);
    }
}

Properties

Name

Name
string
The plugin’s ID as declared in plugin.json. Set automatically by InitPlugin() before Main() runs. All ExportWidget and ExportFunction calls prefix the exported name with this value.

ComponentManager

ComponentManager
ComponentManager
The root component container. Use ComponentManager.GetComponent<T>() to retrieve any registered service by interface type. Prefer using the pre-injected service properties when available.

PluginManager

PluginManager
IPluginManager
Manages plugin loading and the registry of exported widgets and functions. Used internally by ExportWidget and ExportFunction. See IPluginManager API.

COMAPI

COMAPI
ICOMAPI
COM automation interface. Exposes shell functionality to COM-visible clients and scripting hosts.

Config

Config
IConfig
Access to the loaded RWML configuration. Use Config.GetAppDirectory() to resolve paths relative to the RedEye installation, Config.GetRootNode() to traverse the full config tree, and Config.GetLayoutNode() to reach the UI layout root. See IConfig API.

ElevatedService

ElevatedService
IElevatedService
Provides a communication channel to the elevated helper process. Use this to perform operations that require administrator privileges without running the entire shell elevated.

ExplorerIntegration

ExplorerIntegration
IExplorerIntegration
Integrates with Windows Explorer — for example, to suppress the default Explorer desktop and taskbar when RedEye is active.

ExpressionFunctions

ExpressionFunctions
IExpressionFunctions
The registry of built-in and plugin-exported expression functions. You can call existing functions programmatically or inspect what is registered. See Expression functions.

ExpressionParser

ExpressionParser
IExpressionParser
Evaluates RWML expression strings at runtime. Use this from plugin code when you need to evaluate a user-supplied expression outside of the normal widget attribute pipeline.

HotKeyManager

HotKeyManager
IHotKeyManager
Register global hotkeys and low-level keyboard handlers. Call HotKeyManager.RegisterHotKey(keys, callback) to bind a key combination, or HotKeyManager.RegisterKeyHandler(handler) for a raw key intercept callback. See IHotKeyManager.

LayoutLoader

LayoutLoader
ILayoutLoader
Parses and instantiates RWML layout files into live widget trees. Use this to load additional layout files from a plugin or to programmatically create widget subtrees.

Logger

Logger
ILogger
Structured logging service. Available log levels are Debug, Information, Warning, Error, and Fatal. Fatal-level messages indicate unrecoverable errors.
Logger.LogInformation("Widget registered");
Logger.LogError("Something went wrong: " + ex.Message);

MediaManager

MediaManager
IMediaManager
Controls system media playback. Exposes play, pause, next, and previous transport controls. See Media functions.

ResourceManager

ResourceManager
IResourceManager
Temporary object store used to pass rich objects (such as event args) into the expression evaluation context. Objects are stored by a string ID and removed after use.

ScriptEngine

ScriptEngine
IScriptEngine
The runtime C# compiler used to compile plugins and inline <script> blocks. You can use this from a plugin to compile and execute additional C# code dynamically.

ShellEventListener

ShellEventListener
IShellEventListener
Receives shell window lifecycle events (create, destroy, minimize, restore, activate, deactivate). Register a handler with ShellEventListener.RegisterEventHandler(handler) to react to window changes in the taskbar or other UI components.
ShellEventListener.RegisterEventHandler((evt, state) => {
    if (evt == ShellWindowEvent.Create) {
        Logger.LogDebug("New window: " + state.Title);
    }
    return false; // return true to suppress further handling
});

ShellWindowManager

ShellWindowManager
IShellWindowManager
Creates and manages RedEye shell windows (the WinForms windows that host widget layouts). Use ShellWindowManager.CreateWindow(config) to open additional windows from a plugin. See IShellWindow API.

SpecialFolderWrapper

SpecialFolderWrapper
ISpecialFolderWrapper
Resolves Windows special folder paths (Desktop, AppData, Documents, etc.) to absolute filesystem paths, accounting for the current user profile.

WindowManager

WindowManager
IWindowManager
Manages open application windows tracked by the shell. Provides access to window handles, titles, and icons used by taskbar-style components. See Window functions.

Methods

Main()

public virtual void Main()
The entry point for your plugin. Called once during startup, after all service properties have been injected. Override this method to register widgets and functions, subscribe to events, or perform any one-time setup. The default implementation does nothing.

ExportWidget<T>(string name)

protected void ExportWidget<T>(string name) where T : IShellWidget
Registers a widget type with the RWML renderer under the name <pluginId>.<name>. The type constraint requires T to implement IShellWidget.
name
string
required
The local widget name. The full registered name will be pluginId.name — for example, calling ExportWidget<ClockWidget>("clock") from a plugin with ID my-plugin registers the widget as my-plugin.clock.
public override void Main() {
    ExportWidget<ClockWidget>("clock");
    ExportWidget<WeatherWidget>("weather");
}
Users reference the widget in RWML as:
<my-plugin.clock x="0" y="0" width="80" height="30" />

ExportFunction(string name, Func<…> func)

protected void ExportFunction(
    string name,
    Func<IEnumerable<object>, IVariableStorage<string>, object> func
)
Registers an expression function under the name <pluginId>.<name>. The function receives the evaluated argument list and the current variable storage, and returns an object value.
name
string
required
The local function name. The full registered name is pluginId.name.
func
Func<IEnumerable<object>, IVariableStorage<string>, object>
required
The function implementation. The first parameter is the ordered list of evaluated arguments. The second is the variable storage context of the calling expression node.
ExportFunction("add", (args, vars) => {
    var a = int.Parse(args.ElementAt(0).ToString());
    var b = int.Parse(args.ElementAt(1).ToString());
    return (a + b).ToString();
});
See Exporting functions for detailed usage patterns.

Build docs developers (and LLMs) love