Fix some broken dependencies.

This commit is contained in:
H. Utku Maden 2024-07-18 20:34:39 +03:00
parent d06264e424
commit 6670667ff6
5 changed files with 22 additions and 27 deletions

@ -9,7 +9,7 @@ using Dashboard.PAL;
namespace Dashboard.OpenTK
{
public class OpenTKPlatform : IQuikPlatform
public class OpenTKPlatform : IDashboardPlatform
{
private readonly List<OpenTKPort> _ports = new List<OpenTKPort>();
@ -25,7 +25,7 @@ namespace Dashboard.OpenTK
private bool IsGLInitialized = false;
public IQuikPortHandle CreatePort()
public IDashHandle CreatePort()
{
NativeWindow window = new NativeWindow(DefaultSettings);
OpenTKPort port = new OpenTKPort(window);
@ -62,31 +62,31 @@ namespace Dashboard.OpenTK
NativeWindow.ProcessWindowEvents(block);
}
public void DestroyPort(IQuikPortHandle port) => ((OpenTKPort)port).Dispose();
public void DestroyPort(IDashHandle port) => ((OpenTKPort)port).Dispose();
public string PortGetTitle(IQuikPortHandle port) => ((OpenTKPort)port).Title;
public string PortGetTitle(IDashHandle port) => ((OpenTKPort)port).Title;
public void PortSetTitle(IQuikPortHandle port, string title) => ((OpenTKPort)port).Title = title;
public void PortSetTitle(IDashHandle port, string title) => ((OpenTKPort)port).Title = title;
public QVec2 PortGetSize(IQuikPortHandle port) => ((OpenTKPort)port).Size;
public QVec2 PortGetSize(IDashHandle port) => ((OpenTKPort)port).Size;
public void PortSetSize(IQuikPortHandle port, QVec2 size) => ((OpenTKPort)port).Size = size;
public void PortSetSize(IDashHandle port, QVec2 size) => ((OpenTKPort)port).Size = size;
public QVec2 PortGetPosition(IQuikPortHandle port) => ((OpenTKPort)port).Position;
public QVec2 PortGetPosition(IDashHandle port) => ((OpenTKPort)port).Position;
public void PortSetPosition(IQuikPortHandle port, QVec2 position) => ((OpenTKPort)port).Position = position;
public void PortSetPosition(IDashHandle port, QVec2 position) => ((OpenTKPort)port).Position = position;
public bool PortIsValid(IQuikPortHandle port) => ((OpenTKPort)port).IsValid;
public bool PortIsValid(IDashHandle port) => ((OpenTKPort)port).IsValid;
public void PortSubscribeEvent(IQuikPortHandle port, EventHandler handler) => ((OpenTKPort)port).EventRaised += handler;
public void PortSubscribeEvent(IDashHandle port, EventHandler handler) => ((OpenTKPort)port).EventRaised += handler;
public void PortUnsubscribeEvent(IQuikPortHandle port, EventHandler handler) => ((OpenTKPort)port).EventRaised -= handler;
public void PortUnsubscribeEvent(IDashHandle port, EventHandler handler) => ((OpenTKPort)port).EventRaised -= handler;
public void PortFocus(IQuikPortHandle port) => ((OpenTKPort)port).Focus();
public void PortFocus(IDashHandle port) => ((OpenTKPort)port).Focus();
public void PortShow(IQuikPortHandle port, bool shown = true) => ((OpenTKPort)port).Show(shown);
public void PortShow(IDashHandle port, bool shown = true) => ((OpenTKPort)port).Show(shown);
public void PortPaint(IQuikPortHandle port, CommandList commands) => ((OpenTKPort)port).Paint(commands);
public void PortPaint(IDashHandle port, CommandList commands) => ((OpenTKPort)port).Paint(commands);
public void GetMaximumImage(out int width, out int height)
{

@ -8,7 +8,7 @@ using Dashboard.VertexGenerator;
namespace Dashboard.OpenTK
{
public class OpenTKPort : IQuikPortHandle
public class OpenTKPort : IDashHandle
{
private readonly NativeWindow _window;
private readonly GL21Driver _glDriver;

@ -7,9 +7,7 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dashboard", "Dashboard\Dash
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dashboard.Media.Defaults", "Dashboard.Media.Defaults\Dashboard.Media.Defaults.csproj", "{3798F6DD-8F84-4B7D-A810-B0D4B5ACB672}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "tests", "tests", "{AE0F4030-F24D-47D0-ACDE-2E13340E617B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DashboardDemo", "tests\Dashboard.Demo\DashboardDemo.csproj", "{1D65CA5B-E6CA-43CA-B957-320BE5BCE77B}"
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Dashboard.OpenTK", "Dashboard.OpenTK\Dashboard.OpenTK.csproj", "{2013470A-915C-46F2-BDD3-FCAA39C845EE}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@ -28,12 +26,9 @@ Global
{3798F6DD-8F84-4B7D-A810-B0D4B5ACB672}.Debug|Any CPU.Build.0 = Debug|Any CPU
{3798F6DD-8F84-4B7D-A810-B0D4B5ACB672}.Release|Any CPU.ActiveCfg = Release|Any CPU
{3798F6DD-8F84-4B7D-A810-B0D4B5ACB672}.Release|Any CPU.Build.0 = Release|Any CPU
{1D65CA5B-E6CA-43CA-B957-320BE5BCE77B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1D65CA5B-E6CA-43CA-B957-320BE5BCE77B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1D65CA5B-E6CA-43CA-B957-320BE5BCE77B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1D65CA5B-E6CA-43CA-B957-320BE5BCE77B}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{1D65CA5B-E6CA-43CA-B957-320BE5BCE77B} = {AE0F4030-F24D-47D0-ACDE-2E13340E617B}
{2013470A-915C-46F2-BDD3-FCAA39C845EE}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{2013470A-915C-46F2-BDD3-FCAA39C845EE}.Debug|Any CPU.Build.0 = Debug|Any CPU
{2013470A-915C-46F2-BDD3-FCAA39C845EE}.Release|Any CPU.ActiveCfg = Release|Any CPU
{2013470A-915C-46F2-BDD3-FCAA39C845EE}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
EndGlobal

@ -10,7 +10,7 @@ namespace Dashboard.Demo
{
public static class Program
{
public static readonly DashboardApplication Application = new QuikApplication(new OpenTKPlatform());
public static readonly DashboardApplication Application = new DashboardApplication(new OpenTKPlatform());
public static void Main(string[] args)
{