// Copyright (c) ppy Pty Ltd . Licensed under the MIT Licence. // See the LICENCE file in the repository root for full licence text. using osu.Framework.Audio.Sample; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Textures; using osu.Game.Audio; namespace osu.Game.Skinning { /// /// Provides access to various elements contained by a skin. /// public interface ISkin { /// /// Retrieve a component implementation. /// /// The requested component. /// A drawable representation for the requested component, or null if unavailable. Drawable? GetDrawableComponent(ISkinComponentLookup lookup); /// /// Retrieve a . /// /// The requested texture. /// A matching texture, or null if unavailable. Texture? GetTexture(string componentName) => GetTexture(componentName, default, default); /// /// Retrieve a . /// /// The requested texture. /// The texture wrap mode in horizontal direction. /// The texture wrap mode in vertical direction. /// A matching texture, or null if unavailable. Texture? GetTexture(string componentName, WrapMode wrapModeS, WrapMode wrapModeT); /// /// Retrieve a . /// /// The requested sample. /// A matching sample channel, or null if unavailable. ISample? GetSample(ISampleInfo sampleInfo); /// /// Retrieve a configuration value. /// /// /// Note that while this returns a bindable value, it is not actually updated. /// Until the API is fixed, just use the received bindable's immediately. /// The requested configuration value. /// A matching value boxed in an , or null if unavailable. IBindable? GetConfig(TLookup lookup) where TLookup : notnull where TValue : notnull; } }