Skip to content
CI edited this page Feb 17, 2026 · 1 revision

Theme.RegisterFrame(frame, handler)

Register a frame for theming with a specific handler.

Args:

  • frame - the frame to register (Frame)
  • handler - the skin handler function name or function (string|function)

Theme.IsFrameProcessed(frame)

Check if a frame has already been themed.

Args:

  • frame - the frame to check (Frame)

Returns:

  • processed - whether the frame has been processed (boolean)

Theme.DetectFrameType(frame)

Automatically detect the appropriate handler for a frame based on its type.

Args:

  • frame - the frame to detect (Frame)

Returns:

  • handler - the handler function name or nil (string|nil)

Theme.ProcessFrame(frame[, handler])

Process a single frame and apply theming.

Args:

  • frame - the frame to process (Frame)
  • handler - optional handler function name or function (string|function)

Returns:

  • success - whether processing succeeded (boolean)
  • error - error message if failed (string|nil)

Theme.ProcessQueue()

Process all frames in the pending queue.

Returns:

  • processed - number of frames successfully processed (number)
  • failed - number of frames that failed processing (number)

Theme.ProcessChildren(parent[, recursive])

Process all children of a parent frame.

Args:

  • parent - the parent frame (Frame)
  • recursive - whether to process children recursively (boolean)

Returns:

  • processed - number of frames processed (number)

Theme.ProcessRegions(parent)

Process all regions (textures, font strings) of a parent frame.

Args:

  • parent - the parent frame (Frame)

Returns:

  • processed - number of regions processed (number)

Theme.GetStats()

Get theme engine processing statistics.

Returns:

  • stats - processing statistics table (table)

Theme.ResetStats()

Reset theme engine processing statistics.


Theme.ClearProcessedFrames()

Clear the processed frames registry. Use with caution.


Theme.RegisterDynamicHandler(pattern, handler)

Register a handler for dynamically created frames matching a pattern.

Args:

  • pattern - lua pattern to match frame names (string)
  • handler - the skin handler function name or function (string|function)

Theme.CheckDynamicFrame(frame)

Check if a frame matches any dynamic handler patterns and process it.

Args:

  • frame - the frame to check (Frame)

Returns:

  • handled - whether the frame was handled (boolean)

Theme.SetGlobalAlpha(alpha)

Set the global alpha value for all themed elements.

Args:

  • alpha - the alpha value (0-1) (number)

Returns:

  • success - whether the alpha was set successfully (boolean)

Theme.GetGlobalAlpha()

Get the current global alpha value.

Returns:

  • alpha - the current alpha value (number)

Theme.RegisterAlphaCallback(callback)

Register a callback to be called when alpha changes.

Args:

  • callback - function to call on alpha change (function)

Returns:

  • id - callback identifier for unregistering (number)

Theme.UnregisterAlphaCallback(id)

Unregister an alpha change callback.

Args:

  • id - the callback identifier (number)

Theme.RegisterFrameAlpha(frame, alphaFunc)

Register a frame for alpha updates with a custom update function.

Args:

  • frame - the frame to register (Frame)
  • alphaFunc - function to call to update frame alpha (function)

Theme.UnregisterFrameAlpha(frame)

Unregister a frame from alpha updates.

Args:

  • frame - the frame to unregister (Frame)

Theme.UpdateFrameAlpha(frame[, alpha])

Update a specific frame's alpha value.

Args:

  • frame - the frame to update (Frame)
  • alpha - optional alpha value, uses global if not provided (number)

Returns:

  • success - whether the update succeeded (boolean)

Theme.UpdateAllFrameAlpha()

Update alpha for all processed frames.

Returns:

  • updated - number of frames updated (number)

Theme.EnsureTextReadability(frame)

Ensure text elements in a frame remain readable at current alpha.

Args:

  • frame - the frame to check (Frame)

Returns:

  • adjusted - whether adjustments were made (boolean)

Theme.ApplyAlphaToFrame(frame[, alpha])

Apply alpha to a frame and ensure text readability.

Args:

  • frame - the frame to apply alpha to (Frame)
  • alpha - optional alpha value, uses global if not provided (number)

Returns:

  • success - whether the application succeeded (boolean)

Theme.RegisterModule(name, config)

Register a skin module with the theme engine.

Args:

  • name - the module name (string)
  • config - module configuration table (table)
    • init - initialization function (function)
    • enable - enable function (function)
    • disable - disable function (function)
    • priority - load priority (lower = earlier) (number)
    • dependencies - array of module names this depends on (table)

Returns:

  • success - whether registration succeeded (boolean)

Theme.UnregisterModule(name)

Unregister a skin module.

Args:

  • name - the module name (string)

Returns:

  • success - whether unregistration succeeded (boolean)

Theme.InitializeModule(name)

Initialize a skin module.

Args:

  • name - the module name (string)

Returns:

  • success - whether initialization succeeded (boolean)
  • error - error message if failed (string|nil)

Theme.EnableModule(name)

Enable a skin module.

Args:

  • name - the module name (string)

Returns:

  • success - whether enabling succeeded (boolean)
  • error - error message if failed (string|nil)

Theme.DisableModule(name)

Disable a skin module.

Args:

  • name - the module name (string)

Returns:

  • success - whether disabling succeeded (boolean)
  • error - error message if failed (string|nil)

Theme.IsModuleEnabled(name)

Check if a module is enabled.

Args:

  • name - the module name (string)

Returns:

  • enabled - whether the module is enabled (boolean)

Theme.GetModuleState(name)

Get the state of a module.

Args:

  • name - the module name (string)

Returns:

  • state - module state table or nil (table|nil)

Theme.GetAllModules()

Get all registered modules.

Returns:

  • modules - table of module names and states (table)

Theme.LoadModulesFromConfig(config)

Load and configure modules based on configuration.

Args:

  • config - configuration table with module enable/disable flags (table)

Returns:

  • loaded - number of modules loaded (number)
  • failed - number of modules that failed to load (number)

Theme.OptimizeFrameProcessing()

Optimize frame processing for better performance.

Returns:

  • optimizations - number of optimizations applied (number)

Theme.EnablePerformanceMonitoring()

Enable performance monitoring for frame processing.


Theme.DisablePerformanceMonitoring()

Disable performance monitoring.


Theme.GetPerformanceStats()

Get performance statistics.

Returns:

  • stats - performance statistics table (table)

Clone this wiki locally