1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-07 06:29:36 +08:00
osu-lazer/osu.Game/Skinning/ISkin.cs

51 lines
1.8 KiB
C#
Raw Normal View History

2019-04-25 16:36:17 +08:00
// 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.
2019-09-03 17:30:22 +08:00
using JetBrains.Annotations;
2019-04-25 16:36:17 +08:00
using osu.Framework.Audio.Sample;
using osu.Framework.Bindables;
2019-04-25 16:36:17 +08:00
using osu.Framework.Graphics;
using osu.Framework.Graphics.Textures;
2019-08-23 19:32:43 +08:00
using osu.Game.Audio;
2019-04-25 16:36:17 +08:00
namespace osu.Game.Skinning
{
/// <summary>
/// Provides access to skinnable elements.
/// </summary>
public interface ISkin
{
2019-09-03 17:30:22 +08:00
/// <summary>
/// Retrieve a <see cref="Drawable"/> component implementation.
/// </summary>
/// <param name="component">The requested component.</param>
/// <returns>A drawable representation for the requested component, or null if unavailable.</returns>
[CanBeNull]
Drawable GetDrawableComponent(ISkinComponent component);
2019-04-25 16:36:17 +08:00
2019-09-03 17:30:22 +08:00
/// <summary>
/// Retrieve a <see cref="Texture"/>.
/// </summary>
/// <param name="componentName">The requested texture.</param>
/// <returns>A matching texture, or null if unavailable.</returns>
[CanBeNull]
2019-04-25 16:36:17 +08:00
Texture GetTexture(string componentName);
2019-09-03 17:30:22 +08:00
/// <summary>
/// Retrieve a <see cref="SampleChannel"/>.
/// </summary>
/// <param name="sampleInfo">The requested sample.</param>
/// <returns>A matching sample channel, or null if unavailable.</returns>
[CanBeNull]
2019-08-23 19:32:43 +08:00
SampleChannel GetSample(ISampleInfo sampleInfo);
2019-04-25 16:36:17 +08:00
2019-09-03 17:30:22 +08:00
/// <summary>
/// Retrieve a configuration value.
/// </summary>
/// <param name="lookup">The requested configuration value.</param>
/// <returns>A matching value boxed in an <see cref="IBindable{TValue}"/>, or null if unavailable.</returns>
[CanBeNull]
IBindable<TValue> GetConfig<TLookup, TValue>(TLookup lookup);
2019-04-25 16:36:17 +08:00
}
}