[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_New_WithWindowData")]
public static extern global::System.IntPtr New(int argc, string argv, string styleSheet, bool uiThread, global::System.Runtime.InteropServices.HandleRef windowData);
+ [global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Application_FlushUpdateMessages")]
+ public static extern void FlushUpdateMessages(global::System.Runtime.InteropServices.HandleRef jarg1);
+
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_GetScreenSize")]
public static extern global::System.IntPtr GetScreenSize();
}
return ((NUICoreBackend)this.Backend).AddIdle(func);
}
+ /// <summary>
+ /// Flush render/update thread messages synchronously.
+ /// </summary>
+ /// <remarks>
+ /// This function will relayout forcibily.
+ /// This function is used for advanced developer. It will make main-thread overhead if you call this function frequencely.
+ /// </remarks>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void FlushUpdateMessages()
+ {
+ ApplicationHandle.FlushUpdateMessages();
+ }
+
/// <summary>
/// Sets the number of frames per render.
/// </summary>
base.Exit();
}
+ /// <summary>
+ /// Flush render/update thread messages synchronously.
+ /// </summary>
+ /// <remarks>
+ /// This function will relayout forcibily.
+ /// This function is used for advanced developer. It will make main-thread overhead if you call this function frequencely.
+ /// </remarks>
+ // This will be public opened after ACR done. (Before ACR, need to be hidden as Inhouse API)
+ [EditorBrowsable(EditorBrowsableState.Never)]
+ public void FlushUpdateMessages()
+ {
+ ApplicationHandle.FlushUpdateMessages();
+ }
+
/// <summary>
/// Overrides this method if want to handle OnLocaleChanged behavior.
/// </summary>
--- /dev/null
+using Tizen.NUI;
+using Tizen.NUI.BaseComponents;
+using Tizen.NUI.Components;
+using System.Threading;
+
+namespace Tizen.NUI.Samples
+{
+ public class FlushApplicationMessageSample : IExample
+ {
+ private View root;
+ private TextLabel textLabel;
+ private NUIApplication application;
+
+ public void SetCurrentApplication(Tizen.NUI.NUIApplication application)
+ {
+ Tizen.Log.Error("NUITEST", $"SetCurrentApplication {application}\n");
+ this.application = application;
+ }
+
+ public Tizen.NUI.NUIApplication GetCurrentApplication()
+ {
+ Tizen.Log.Error("NUITEST", $"GetCurrentApplication {application}\n");
+ return application;
+ }
+
+ public void Activate()
+ {
+ Window window = NUIApplication.GetDefaultWindow();
+
+ root = new View()
+ {
+ Size = window.Size,
+ BackgroundColor = new Color(0.8f, 0.8f, 0.8f, 0.6f),
+ ParentOrigin = ParentOrigin.Center,
+ PivotPoint = PivotPoint.Center,
+ PositionUsesPivotPoint = true,
+ };
+ window.Add(root);
+
+ textLabel = new TextLabel()
+ {
+ Text = "SceneOn",
+ };
+
+ root.Add(textLabel);
+ Tizen.Log.Error("NUITEST", "SceneOn\n");
+
+ textLabel.Text = "Sleep 5 seconds";
+
+ GetCurrentApplication()?.FlushUpdateMessages();
+ Tizen.Log.Error("NUITEST", "FlushUpdateMessages\n");
+
+ Tizen.Log.Error("NUITEST", "Sleep 5 seconds\n");
+ Thread.Sleep(5000); /// sleep 5 seconds
+ Tizen.Log.Error("NUITEST", "Sleep done\n");
+
+ textLabel.Text = "Sleep done!\n";
+ }
+
+ public void Deactivate()
+ {
+ if (root != null)
+ {
+ NUIApplication.GetDefaultWindow().Remove(root);
+ root.Dispose();
+ }
+ }
+ }
+}