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); }
public void SetPreferredOrientation(GLWindow.GLWindowOrientation orientation) { Interop.GLWindow.GlWindowSetPreferredOrientation(SwigCPtr, (int)orientation); if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } }
public GLWindow.GLWindowOrientation GetCurrentOrientation() { GLWindow.GLWindowOrientation ret = (GLWindow.GLWindowOrientation)Interop.GLWindow.GlWindowGetCurrentOrientation(SwigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } return(ret); }
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"); }
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)"); }