A game framework written with osu! in mind.
at master 33 lines 1.1 kB view raw
1// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence. 2// See the LICENCE file in the repository root for full licence text. 3 4namespace osu.Framework.Bindables 5{ 6 /// <summary> 7 /// Interface for objects that support publicly unbinding events or <see cref="IBindable"/>s. 8 /// </summary> 9 public interface IUnbindable 10 { 11 /// <summary> 12 /// Unbinds all bound events. 13 /// </summary> 14 void UnbindEvents(); 15 16 /// <summary> 17 /// Unbinds all bound <see cref="IBindable"/>s. 18 /// </summary> 19 void UnbindBindings(); 20 21 /// <summary> 22 /// Calls <see cref="UnbindEvents"/> and <see cref="UnbindBindings"/> 23 /// </summary> 24 void UnbindAll(); 25 26 /// <summary> 27 /// Unbinds ourselves from another <see cref="IBindable"/> such that we stop receiving updates it. 28 /// The other <see cref="IBindable"/> will also stop receiving any events from us. 29 /// </summary> 30 /// <param name="them">The other bindable.</param> 31 void UnbindFrom(IUnbindable them); 32 } 33}