-
Notifications
You must be signed in to change notification settings - Fork 5
Theme
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)
Check if a frame has already been themed.
Args:
-
frame- the frame to check (Frame)
Returns:
-
processed- whether the frame has been processed (boolean)
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)
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)
Process all frames in the pending queue.
Returns:
-
processed- number of frames successfully processed (number) -
failed- number of frames that failed processing (number)
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)
Process all regions (textures, font strings) of a parent frame.
Args:
-
parent- the parent frame (Frame)
Returns:
-
processed- number of regions processed (number)
Get theme engine processing statistics.
Returns:
-
stats- processing statistics table (table)
Reset theme engine processing statistics.
Clear the processed frames registry. Use with caution.
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)
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)
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)
Get the current global alpha value.
Returns:
-
alpha- the current alpha value (number)
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)
Unregister an alpha change callback.
Args:
-
id- the callback identifier (number)
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)
Unregister a frame from alpha updates.
Args:
-
frame- the frame to unregister (Frame)
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)
Update alpha for all processed frames.
Returns:
-
updated- number of frames updated (number)
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)
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)
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)
Unregister a skin module.
Args:
-
name- the module name (string)
Returns:
-
success- whether unregistration succeeded (boolean)
Initialize a skin module.
Args:
-
name- the module name (string)
Returns:
-
success- whether initialization succeeded (boolean) -
error- error message if failed (string|nil)
Enable a skin module.
Args:
-
name- the module name (string)
Returns:
-
success- whether enabling succeeded (boolean) -
error- error message if failed (string|nil)
Disable a skin module.
Args:
-
name- the module name (string)
Returns:
-
success- whether disabling succeeded (boolean) -
error- error message if failed (string|nil)
Check if a module is enabled.
Args:
-
name- the module name (string)
Returns:
-
enabled- whether the module is enabled (boolean)
Get the state of a module.
Args:
-
name- the module name (string)
Returns:
-
state- module state table or nil (table|nil)
Get all registered modules.
Returns:
-
modules- table of module names and states (table)
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)
Optimize frame processing for better performance.
Returns:
-
optimizations- number of optimizations applied (number)
Enable performance monitoring for frame processing.
Disable performance monitoring.
Get performance statistics.
Returns:
-
stats- performance statistics table (table)