osu/osu.Game/Skinning/ISkinSource.cs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.2 KiB
C#
Raw Normal View History

// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
2018-04-13 09:19:50 +00:00
2022-06-17 07:37:17 +00:00
#nullable disable
2018-03-20 07:26:36 +00:00
using System;
using System.Collections.Generic;
2021-06-06 02:08:54 +00:00
using JetBrains.Annotations;
2018-04-13 09:19:50 +00:00
2018-03-20 07:26:36 +00:00
namespace osu.Game.Skinning
{
/// <summary>
/// Provides access to skinnable elements.
/// </summary>
2019-04-25 08:36:17 +00:00
public interface ISkinSource : ISkin
2018-03-20 07:26:36 +00:00
{
/// <summary>
/// Fired whenever a source change occurs, signalling that consumers should re-query as required.
/// </summary>
2018-03-20 07:26:36 +00:00
event Action SourceChanged;
2021-06-06 02:08:54 +00:00
/// <summary>
/// Find the first (if any) skin that can fulfill the lookup.
/// This should be used for cases where subsequent lookups (for related components) need to occur on the same skin.
/// </summary>
/// <returns>The skin to be used for subsequent lookups, or <c>null</c> if none is available.</returns>
[CanBeNull]
ISkin FindProvider(Func<ISkin, bool> lookupFunction);
/// <summary>
/// Retrieve all sources available for lookup, with highest priority source first.
/// </summary>
IEnumerable<ISkin> AllSources { get; }
2018-03-20 07:26:36 +00:00
}
}