62 lines
2.0 KiB
C#
62 lines
2.0 KiB
C#
using Dashboard.ImmediateDraw;
|
|
using Dashboard.Media;
|
|
using OpenTK.Mathematics;
|
|
using System;
|
|
|
|
namespace Dashboard.PAL
|
|
{
|
|
/// <summary>
|
|
/// An empty interface to statically type Quik port handles.
|
|
/// </summary>
|
|
public interface IDashHandle
|
|
{
|
|
}
|
|
|
|
/// <summary>
|
|
/// The primary primary platform abstraction interface for dashboard hosts.
|
|
/// </summary>
|
|
public interface IDbPlatform : IDisposable
|
|
{
|
|
/// <summary>
|
|
/// The title of the application.
|
|
/// </summary>
|
|
string? Title { get; set; }
|
|
|
|
/// <summary>
|
|
/// The default icon for the application.
|
|
/// </summary>
|
|
Image? 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>
|
|
IDashHandle CreatePort();
|
|
void DestroyPort(IDashHandle port);
|
|
string PortGetTitle(IDashHandle port);
|
|
void PortSetTitle(IDashHandle port, string title);
|
|
Vector2 PortGetSize(IDashHandle port);
|
|
void PortSetSize(IDashHandle port, Vector2 size);
|
|
Vector2 PortGetPosition(IDashHandle port);
|
|
void PortSetPosition(IDashHandle port, Vector2 position);
|
|
bool PortIsValid(IDashHandle port);
|
|
void PortSubscribeEvent(IDashHandle port, EventHandler handler);
|
|
void PortUnsubscribeEvent(IDashHandle port, EventHandler handler);
|
|
void PortFocus(IDashHandle port);
|
|
void PortShow(IDashHandle port, bool shown = true);
|
|
void PortPaint(IDashHandle port, DrawList commands);
|
|
void GetMaximumImage(out int width, out int height);
|
|
void GetMaximumImage(out int width, out int height, out int depth);
|
|
}
|
|
} |