Beispiel #1
0
        public void OnResizedEvent(object sender, GLWindow.ResizedEventArgs e)
        {
            Tizen.Log.Error("NUI", "OnResizedEvent w:" + e.WindowSize.Width);
            Tizen.Log.Error("NUI", "OnResizedEvent w:" + e.WindowSize.Height);

            GLWindow.GLWindowOrientation currentOrientation = mGLWindow.GetCurrentOrientation();
            Tizen.Log.Error("NUI", "OnResizedEvent currentOrientation:" + currentOrientation);

            if (currentOrientation == GLWindow.GLWindowOrientation.Portrait)
            {
                updateWindowRotationAngle(0);
            }
            else if (currentOrientation == GLWindow.GLWindowOrientation.LandscapeInverse)
            {
                updateWindowRotationAngle(270);
            }
            else if (currentOrientation == GLWindow.GLWindowOrientation.PortraitInverse)
            {
                updateWindowRotationAngle(180);
            }
            else
            {
                updateWindowRotationAngle(90);
            }
            updateWindowSize(e.WindowSize.Width, e.WindowSize.Height);
        }
Beispiel #2
0
 public void SetPreferredOrientation(GLWindow.GLWindowOrientation orientation)
 {
     Interop.GLWindow.GlWindowSetPreferredOrientation(SwigCPtr, (int)orientation);
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
 }
Beispiel #3
0
 public GLWindow.GLWindowOrientation GetCurrentOrientation()
 {
     GLWindow.GLWindowOrientation ret = (GLWindow.GLWindowOrientation)Interop.GLWindow.GlWindowGetCurrentOrientation(SwigCPtr);
     if (NDalicPINVOKE.SWIGPendingException.Pending)
     {
         throw NDalicPINVOKE.SWIGPendingException.Retrieve();
     }
     return(ret);
 }
Beispiel #4
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);
            tlog.Debug(tag, $"GLWindowSetPreferredOrientation END (OK)");
            Assert.Pass("GLWindowSetPreferredOrientation");
        }
Beispiel #5
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)");
        }