Raxol.UI.Theming.ThemeBehaviour behaviour (Raxol v0.5.0)
View SourceDefines the behaviour for Theme services.
Summary
Callbacks
Applies a theme to an element tree.
Gets a color from a theme.
Gets a component style from a theme.
Gets the current theme system version as a string.
Gets the dark theme.
Gets the default theme.
Gets a theme by ID.
Gets a color value considering the theme and an optional variant.
Initializes the theme system.
Lists all registered themes.
Registers a theme.
Types
Callbacks
Applies a theme to an element tree.
Gets a color from a theme.
Gets a component style from a theme.
@callback current_version() :: String.t()
Gets the current theme system version as a string.
@callback dark_theme() :: theme_t()
Gets the dark theme.
@callback default_theme() :: theme_t()
Gets the default theme.
Gets a theme by ID.
@callback get_color( theme :: theme_t(), color_name :: atom(), variant_id :: atom() | nil ) :: any()
Gets a color value considering the theme and an optional variant.
@callback init() :: :ok
Initializes the theme system.
@callback list() :: [theme_t()]
Lists all registered themes.
@callback register(theme :: theme_t()) :: :ok
Registers a theme.