[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_ExcludeInputRegion")]
public static extern void ExcludeInputRegion(global::System.Runtime.InteropServices.HandleRef window, global::System.Runtime.InteropServices.HandleRef inputRegion);
+
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Window_IsWindowRotating")]
+ [return: global::System.Runtime.InteropServices.MarshalAs(global::System.Runtime.InteropServices.UnmanagedType.U1)]
+ public static extern bool IsWindowRotating(global::System.Runtime.InteropServices.HandleRef window);
}
}
}
}
/// <summary>
+ /// Query whether window is rotating or not.
+ /// </summary>
+ /// <returns>True if window is rotating, false otherwise.</returns>
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public bool IsWindowRotating()
+ {
+ bool ret = Interop.Window.IsWindowRotating(SwigCPtr);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+ /// <summary>
/// Add FrameUpdateCallback
/// </summary>
[EditorBrowsable(EditorBrowsableState.Never)]
using Tizen.NUI;
using Tizen.NUI.BaseComponents;
using Tizen.System;
+using System.Collections.Generic;
using NUnit.Framework;
namespace Tizen.NUI.Samples
int screenHeight;
int addingInput;
+ Timer tm;
void Initialize()
{
text.WidthResizePolicy = ResizePolicyType.FillToParent;
mainWin.Add(text);
+ List<Window.WindowOrientation> list = new List<Window.WindowOrientation>();
+
+ list.Add(Window.WindowOrientation.Landscape);
+ list.Add(Window.WindowOrientation.LandscapeInverse);
+ list.Add(Window.WindowOrientation.NoOrientationPreference);
+ list.Add(Window.WindowOrientation.Portrait);
+ list.Add(Window.WindowOrientation.PortraitInverse);
+
+ mainWin.SetAvailableOrientations(list);
+
Animation animation = new Animation(2000);
animation.AnimateTo(text, "Orientation", new Rotation(new Radian(new Degree(180.0f)), PositionAxis.X), 0, 500);
animation.AnimateTo(text, "Orientation", new Rotation(new Radian(new Degree(0.0f)), PositionAxis.X), 500, 1000);
animation.Looping = true;
animation.Play();
+
+ tm = new Timer(100);
+ tm.Tick += Tm_Tick;
+ tm.Start();
+ }
+
+ private bool Tm_Tick(object source, Timer.TickEventArgs e)
+ {
+ bool rotating = mainWin.IsWindowRotating();
+ log.Fatal(tag, $"window is Rotating: {rotating}");
+ return true;
}
private void WinTouchEvent(object sender, Window.TouchEventArgs e)