using System; using Quik.CommandMachine; using Quik.Media; namespace Quik.PAL { /// /// An empty interface to statically type Quik port handles. /// public interface IQuikPortHandle { } /// /// The primary primary platform abstraction interface for Quik hosts. /// public interface IQuikPlatform : IDisposable { /// /// The title of the application. /// string Title { get; set; } /// /// The default icon for the application. /// QImage Icon { get; set; } /// /// The event raised when an event is received. /// event EventHandler EventRaised; /// /// Raise the events that have been enqueued. /// /// True to block until a new event arrives. void ProcessEvents(bool block); /// /// Create a window. /// /// The window instance. IQuikPortHandle CreatePort(); void DestroyPort(IQuikPortHandle port); string PortGetTitle(IQuikPortHandle port); void PortSetTitle(IQuikPortHandle port, string title); QVec2 PortGetSize(IQuikPortHandle port); void PortSetSize(IQuikPortHandle port, QVec2 size); QVec2 PortGetPosition(IQuikPortHandle port); void PortSetPosition(IQuikPortHandle port, QVec2 position); bool PortIsValid(IQuikPortHandle port); void PortSubscribeEvent(IQuikPortHandle port, EventHandler handler); void PortUnsubscribeEvent(IQuikPortHandle port, EventHandler handler); void PortFocus(IQuikPortHandle port); void PortShow(IQuikPortHandle port, bool shown = true); void PortPaint(IQuikPortHandle port, CommandList commands); void GetMaximumImage(out int width, out int height); void GetMaximumImage(out int width, out int height, out int depth); } }