Ejemplo n.º 1
0
        public void GLWindowSetInputRegion()
        {
            tlog.Debug(tag, $"GLWindowSetInputRegion START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            a1.SetInputRegion(rectangle);

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowGetAuxiliaryHintId END (OK)");
        }
Ejemplo n.º 2
0
        public void GLWindowRegisterGlCallback()
        {
            tlog.Debug(tag, $"GLWindowRegisterGlCallback START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            a1.RegisterGlCallback(GLInit, GLRenderFrame, GLTerminate);

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowRegisterGlCallback END (OK)");
        }
Ejemplo n.º 3
0
        public void GLWindowSetOpaqueState()
        {
            tlog.Debug(tag, $"GLWindowSetOpaqueState START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            a1.SetOpaqueState(true);

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowSetOpaqueState END (OK)");
        }
Ejemplo n.º 4
0
        public void GLWindowConstructor()
        {
            tlog.Debug(tag, $"GLWindowConstructor START");

            var testingTarget = new GLWindow();

            Assert.IsNotNull(testingTarget, "should be not null");
            Assert.IsInstanceOf <GLWindow>(testingTarget, "should be an instance of testing target class!");

            testingTarget.Destroy();
            tlog.Debug(tag, $"GLWindowConstructor END (OK)");
        }
Ejemplo n.º 5
0
        public void GLWindowAddAuxiliaryHint()
        {
            tlog.Debug(tag, $"GLWindowAddAuxiliaryHint START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            a1.AddAuxiliaryHint("myHint", "myValue");

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowAddAuxiliaryHint END (OK)");
        }
Ejemplo n.º 6
0
        public void GLWindowShow()
        {
            tlog.Debug(tag, $"GLWindowShow START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            a1.Show();
            a1.Destroy();
            tlog.Debug(tag, $"GLWindowShow END (OK)");
            Assert.Pass("GLWindowShow");
        }
Ejemplo n.º 7
0
        public void GLWindowRenderOnce()
        {
            tlog.Debug(tag, $"GLWindowRenderOnce START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            a1.RenderOnce();

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowRenderOnce END (OK)");
        }
Ejemplo n.º 8
0
        public void GLWindowDisconnectNativeSignals()
        {
            tlog.Debug(tag, $"GLWindowDisconnectNativeSignals START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            a1.DisconnectNativeSignals();

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowDisconnectNativeSignals END (OK)");
            Assert.Pass("GLWindowDisconnectNativeSignals");
        }
Ejemplo n.º 9
0
        public void GLWindowFocusChangedSignal()
        {
            tlog.Debug(tag, $"GLWindowFocusChangedSignal START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            a1.FocusChangedSignal();

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowFocusChangedSignal END (OK)");
            Assert.Pass("GLWindowFocusChangedSignal");
        }
Ejemplo n.º 10
0
        public void GLWindowVisibiltyChangedSignalEmit()
        {
            tlog.Debug(tag, $"GLWindowVisibiltyChangedSignalEmit START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            a1.VisibiltyChangedSignalEmit(true);

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowVisibiltyChangedSignalEmit END (OK)");
            Assert.Pass("GLWindowVisibiltyChangedSignalEmit");
        }
Ejemplo n.º 11
0
        public void GLWindowSetPreferredOrientation()
        {
            tlog.Debug(tag, $"GLWindowSetPreferredOrientation START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            GLWindow.GLWindowOrientation o1 = new GLWindow.GLWindowOrientation();
            a1.SetPreferredOrientation(o1);

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowSetPreferredOrientation END (OK)");
        }
Ejemplo n.º 12
0
        public void GLWindowGetCurrentOrientation()
        {
            tlog.Debug(tag, $"GLWindowGetCurrentOrientation START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            var result = a1.GetCurrentOrientation();

            tlog.Debug(tag, "CurrentOrientation : " + result);

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowGetCurrentOrientation END (OK)");
        }
Ejemplo n.º 13
0
        public void GLWindowIsOpaqueState()
        {
            tlog.Debug(tag, $"GLWindowIsOpaqueState START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            var result = a1.IsOpaqueState();

            tlog.Debug(tag, "IsOpaqueState : " + result);

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowIsOpaqueState END (OK)");
        }
Ejemplo n.º 14
0
        public void GLWindowGetSupportedAuxiliaryHint()
        {
            tlog.Debug(tag, $"GLWindowGetSupportedAuxiliaryHint START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            var result = a1.GetSupportedAuxiliaryHint(1);

            tlog.Debug(tag, "GetSupportedAuxiliaryHint : " + result);

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowGetSupportedAuxiliaryHint END (OK)");
        }
Ejemplo n.º 15
0
        public void GLWindowSetEglConfig()
        {
            tlog.Debug(tag, $"GLWindowSetEglConfig START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            GLWindow.GLESVersion b1 = new GLWindow.GLESVersion();
            a1.SetEglConfig(true, true, 10, b1);

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowSetEglConfig END (OK)");
            Assert.Pass("GLWindowSetEglConfig");
        }
        public void GLWindowVisibilityChangedEventConstructor()
        {
            tlog.Debug(tag, $"GLWindowVisibilityChangedEventConstructor START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1.SwigCPtr.Handle, false);

            b1.Dispose();
            a1.Destroy();
            tlog.Debug(tag, $"GLWindowVisibilityChangedEventConstructor END (OK)");
            Assert.Pass("GLWindowVisibilityChangedEventConstructor");
        }
Ejemplo n.º 17
0
        public void GLWindowConstructorWithGLWindow()
        {
            tlog.Debug(tag, $"GLWindowConstructorWithGLWindow START");

            using (GLWindow glwindow = new GLWindow())
            {
                var testingTarget = new GLWindow(glwindow.SwigCPtr.Handle, false);
                Assert.IsNotNull(testingTarget, "should be not null");
                Assert.IsInstanceOf <GLWindow>(testingTarget, "should be an instance of testing target class!");

                testingTarget.Destroy();
            }

            tlog.Debug(tag, $"GLWindowConstructorWithGLWindow END (OK)");
        }
        public void GLWindowVisibilityChangedEventGetConnectionCount()
        {
            tlog.Debug(tag, $"GLWindowVisibilityChangedEventGetConnectionCount START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1);

            b1.GetConnectionCount();

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowVisibilityChangedEventGetConnectionCount END (OK)");
            Assert.Pass("GLWindowVisibilityChangedEventGetConnectionCount");
        }
Ejemplo n.º 19
0
        public void GLWindowRenderingMode()
        {
            tlog.Debug(tag, $"GLWindowRenderingMode START");

            var testingTarget = new GLWindow();

            Assert.IsNotNull(testingTarget, "Can't create success object GLWindow");
            Assert.IsInstanceOf <GLWindow>(testingTarget, "Should be an instance of GLWindow type.");

            testingTarget.RenderingMode = GLRenderingMode.Continuous;
            tlog.Debug(tag, "RenderingMode : " + testingTarget.RenderingMode);

            testingTarget.Destroy();
            tlog.Debug(tag, $"GLWindowRenderingMode END (OK)");
        }
Ejemplo n.º 20
0
        public void GLWindowTouchEvent()
        {
            tlog.Debug(tag, $"GLWindowTouchEvent START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            a1.TouchEvent += A1_TouchEvent;
            a1.TouchEvent -= A1_TouchEvent;

            GLWindow.TouchEventArgs e1 = new GLWindow.TouchEventArgs();
            A1_TouchEvent(null, e1);
            a1.Destroy();
            tlog.Debug(tag, $"GLWindowTouchEvent END (OK)");
            Assert.Pass("GLWindowTouchEvent");
        }
Ejemplo n.º 21
0
        public void GLWindowWindowPositionSize()
        {
            tlog.Debug(tag, $"GLWindowWindowPositionSize START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            a1.WindowPositionSize = new Rectangle(30, 40, 50, 60);
            Assert.AreEqual(30, a1.WindowPositionSize.X, "Should be equal!");
            Assert.AreEqual(40, a1.WindowPositionSize.Y, "Should be equal!");
            Assert.AreEqual(50, a1.WindowPositionSize.Width, "Should be equal!");
            Assert.AreEqual(60, a1.WindowPositionSize.Height, "Should be equal!");

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowWindowPositionSize END (OK)");
        }
        public void GLWindowVisibilityChangedEventEmpty()
        {
            tlog.Debug(tag, $"GLWindowVisibilityChangedEventEmpty START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            GLWindowVisibilityChangedEvent b1 = new GLWindowVisibilityChangedEvent(a1);

            b1.Empty();

            b1.Dispose();
            a1.Destroy();
            tlog.Debug(tag, $"GLWindowVisibilityChangedEventEmpty END (OK)");
            Assert.Pass("GLWindowVisibilityChangedEventEmpty");
        }
Ejemplo n.º 23
0
        public void GLWindowWindowSize()
        {
            tlog.Debug(tag, $"GLWindowWindowSize START");

            var testingTarget = new GLWindow();

            Assert.IsNotNull(testingTarget, "Can't create success object GLWindow");
            Assert.IsInstanceOf <GLWindow>(testingTarget, "Should be an instance of GLWindow type.");

            testingTarget.WindowSize = new Size2D(50, 30);
            Assert.AreEqual(50, testingTarget.WindowSize.Width, "Should be equal!");
            Assert.AreEqual(30, testingTarget.WindowSize.Height, "Should be equal!");

            testingTarget.Destroy();
            tlog.Debug(tag, $"GLWindowWindowSize END (OK)");
        }
Ejemplo n.º 24
0
        public void GLWindowResized()
        {
            tlog.Debug(tag, $"GLWindowResized START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            a1.Resized += A1_Resized;
            a1.Resized -= A1_Resized;

            GLWindow.ResizedEventArgs e1 = new GLWindow.ResizedEventArgs();
            A1_Resized(null, e1);
            a1.Destroy();
            tlog.Debug(tag, $"GLWindowResized END (OK)");
            Assert.Pass("GLWindowResized");
        }
Ejemplo n.º 25
0
        public void GLWindowWindowSize()
        {
            tlog.Debug(tag, $"GLWindowWindowSize START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            Size2D b1 = a1.WindowSize;

            a1.WindowSize = b1;
            a1.WindowSize = null;

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowWindowSize END (OK)");
            Assert.Pass("GLWindowWindowSize");
        }
Ejemplo n.º 26
0
        public void GLWindowConstructor()
        {
            tlog.Debug(tag, $"GLWindowConstructor START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            GLWindow a2 = new GLWindow();
            GLWindow a3 = new GLWindow(GLWindow.getCPtr(a1).Handle, true);

            a1.Destroy();
            a2.Destroy();
            a3.Destroy();
            tlog.Debug(tag, $"GLWindowConstructor END (OK)");
            Assert.Pass("GLWindowConstructor");
        }
Ejemplo n.º 27
0
        public void GLWindowSetAvailableOrientations()
        {
            tlog.Debug(tag, $"GLWindowSetAvailableOrientations START");
            string    name      = "myGLWindow";
            Rectangle rectangle = new Rectangle(20, 20, 100, 100);
            GLWindow  a1        = new GLWindow(name, rectangle, true);

            GLWindow.GLWindowOrientation        o1 = new GLWindow.GLWindowOrientation();
            List <GLWindow.GLWindowOrientation> l1 = new List <GLWindow.GLWindowOrientation>
            {
                o1
            };

            a1.SetAvailableOrientations(l1);

            a1.Destroy();
            tlog.Debug(tag, $"GLWindowSetAvailableOrientations END (OK)");
        }
        public void GLWindowVisibilityChangedEventConstructor()
        {
            tlog.Debug(tag, $"GLWindowVisibilityChangedEventConstructor START");

            string    name  = "myGLWindow";
            Rectangle rec   = new Rectangle(20, 20, 100, 100);
            GLWindow  glwin = new GLWindow(name, rec, true);

            var testingTarget = new GLWindowVisibilityChangedEvent(glwin.SwigCPtr.Handle, false);

            Assert.IsNotNull(testingTarget, "Can't create success object GLWindowVisibilityChangedEvent");
            Assert.IsInstanceOf <GLWindowVisibilityChangedEvent>(testingTarget, "Should be an instance of GLWindowVisibilityChangedEvent type.");

            rec.Dispose();
            glwin.Destroy();
            testingTarget.Dispose();
            tlog.Debug(tag, $"GLWindowVisibilityChangedEventConstructor END (OK)");
        }
Ejemplo n.º 29
0
        public void GLWindowSetAvailableOrientationsNullValue()
        {
            tlog.Debug(tag, $"GLWindowSetAvailableOrientationsNullValue START");

            string    name          = "myGLWindow";
            Rectangle rectangle     = new Rectangle(20, 20, 100, 100);
            var       testingTarget = new GLWindow(name, rectangle, true);

            try
            {
                List <GLWindow.GLWindowOrientation> list = null;
                testingTarget.SetAvailableOrientations(list);
            }
            catch (ArgumentNullException)
            {
                testingTarget.Destroy();
                tlog.Debug(tag, $"GLWindowSetAvailableOrientationsNullValue END (OK)");
                Assert.Pass("Caught ArgumentNullException :  Passed!");
            }
        }
Ejemplo n.º 30
0
        public void GLWindowWindowSizeNullValue()
        {
            tlog.Debug(tag, $"GLWindowWindowSizeNullValue START");

            var testingTarget = new GLWindow();

            Assert.IsNotNull(testingTarget, "Can't create success object GLWindow");
            Assert.IsInstanceOf <GLWindow>(testingTarget, "Should be an instance of GLWindow type.");

            try
            {
                Size2D size2d = null;
                testingTarget.WindowSize = size2d;
            }
            catch (ArgumentNullException)
            {
                testingTarget.Destroy();
                tlog.Debug(tag, $"GLWindowWindowSizeNullValue END (OK)");
                Assert.Pass("Caught ArgumentNullException : Passed!");
            }
        }