// ----------------------------------------------------------------------- // // Copyright 2014 MIT Licence. See licence.md for more information. // // ----------------------------------------------------------------------- namespace Perspex.Platform { using System; /// /// Provides platform-specific services relating to threading. /// public interface IPlatformThreadingInterface { /// /// Checks whether there are messages waiting to be processed. /// /// True if there are messages waiting, otherwise false. bool HasMessages(); /// /// Process a single message from the windowing system, blocking until one is available. /// void ProcessMessage(); /// /// Starts a timer. /// /// The interval. /// The action to call on each tick. /// An used to stop the timer. IDisposable StartTimer(TimeSpan interval, Action tick); /// /// Sends a message that causes to exit. /// void Wake(); } }