Dashboard/Quik/PAL/IQuikPlatform.cs

61 lines
2.0 KiB
C#

using System;
using Quik.CommandMachine;
using Quik.Media;
namespace Quik.PAL
{
/// <summary>
/// An empty interface to statically type Quik port handles.
/// </summary>
public interface IQuikPortHandle
{
}
/// <summary>
/// The primary primary platform abstraction interface for Quik hosts.
/// </summary>
public interface IQuikPlatform : IDisposable
{
/// <summary>
/// The title of the application.
/// </summary>
string Title { get; set; }
/// <summary>
/// The default icon for the application.
/// </summary>
QImage Icon { get; set; }
/// <summary>
/// The event raised when an event is received.
/// </summary>
event EventHandler EventRaised;
/// <summary>
/// Raise the events that have been enqueued.
/// </summary>
/// <param name="block">True to block until a new event arrives.</param>
void ProcessEvents(bool block);
/// <summary>
/// Create a window.
/// </summary>
/// <returns>The window instance.</returns>
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);
}
}