2024-04-11 18:09:00 +02:00
|
|
|
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>
|
2024-06-09 21:54:33 +02:00
|
|
|
string? Title { get; set; }
|
2024-04-11 18:09:00 +02:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The default icon for the application.
|
|
|
|
/// </summary>
|
2024-06-09 21:54:33 +02:00
|
|
|
QImage? Icon { get; set; }
|
2024-04-11 18:09:00 +02:00
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The event raised when an event is received.
|
|
|
|
/// </summary>
|
2024-06-09 21:54:33 +02:00
|
|
|
event EventHandler? EventRaised;
|
2024-04-11 18:09:00 +02:00
|
|
|
|
|
|
|
/// <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);
|
2024-05-15 22:17:01 +02:00
|
|
|
void GetMaximumImage(out int width, out int height);
|
|
|
|
void GetMaximumImage(out int width, out int height, out int depth);
|
2024-04-11 18:09:00 +02:00
|
|
|
}
|
|
|
|
}
|