diff options
| author | Jean-Philippe Bruyère <jp_bruyere@hotmail.com> | 2020-04-07 08:55:10 +0200 |
|---|---|---|
| committer | j-p <jp_bruyere@hotmail.com> | 2020-05-10 00:50:02 +0200 |
| commit | e7ab497982ca228ea715652c9763bac604182ea6 (patch) | |
| tree | 45402890144c52f93e62809e7fc14b3fef3f3681 /unitTests/TestBackend.cs | |
| parent | 33fda3d0638abcf75a5b6e20918658982cac425a (diff) | |
use glfw for window manager
Diffstat (limited to 'unitTests/TestBackend.cs')
| -rw-r--r-- | unitTests/TestBackend.cs | 44 |
1 files changed, 10 insertions, 34 deletions
diff --git a/unitTests/TestBackend.cs b/unitTests/TestBackend.cs index b4b21645..5b9afeb1 100644 --- a/unitTests/TestBackend.cs +++ b/unitTests/TestBackend.cs @@ -10,24 +10,26 @@ namespace unitTests { public class TestInterface : Interface { - public TestInterface (int width = 800, int height = 600, IBackend _backend = null) - : base (width, height, _backend, false) { - backend.Init (this); - } + public TestInterface (int width = 800, int height = 600) + : base (width, height, false) {} public bool IsRunning { - get => running; - set { running = value; } + get => Running; + set => Running = value; + } + protected override void InitSurface () + { + surf = new Crow.Cairo.ImageSurface (Crow.Cairo.Format.Argb32, ClientRectangle.Width, ClientRectangle.Height); } } [TestFixture] - public class TestBackend : IBackend + public class TestBackend { TestInterface iFace; [OneTimeSetUp] public void Init () { - iFace = new TestInterface (800, 600, this); + iFace = new TestInterface (800, 600); iFace.Init (); iFace.IsRunning = true; } @@ -57,31 +59,5 @@ namespace unitTests => Assert.DoesNotThrow (() => { iFace.LoadIMLFragment (@"<CheckBox IsChecked='true'/>"); iFace.Update (); } , "iFace load IML fragment failed"); - - #region IBackend implementation - public MouseCursor Cursor { set { } } - - public bool Shift => false; - - public bool Ctrl => false; - - public bool Alt => false; - - public void CleanUp () {} - - public void Flush () {} - - public void Init (Interface iFace) - { - iFace.surf = new Crow.Cairo.ImageSurface (Crow.Cairo.Format.Argb32, iFace.ClientRectangle.Width, iFace.ClientRectangle.Height); - } - - public bool IsDown (Key key) => false; - - public void ProcessEvents () - { - - } - #endregion } } |