Restore AddIdle function for NUIApplication.
Change-Id: Ia1047c9982ea63dd810cb513652c0d992697624f
Signed-off-by: minho.sun <minho.sun@samsung.com>
return _instance;
}
- //Removed from v0.2.33
- /*public bool AddIdle(System.Delegate func)
+ /// <summary>
+ /// Ensures that the function passed in is called from the main loop when it is idle.
+ /// </summary>
+ /// <param name="func">The function to call</param>
+ /// <returns>true if added successfully, false otherwise</returns>
+ public bool AddIdle(System.Delegate func)
{
System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func);
System.IntPtr ip2 = NDalicManualPINVOKE.MakeCallback(new System.Runtime.InteropServices.HandleRef(this, ip));
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
return ret;
- }*/
-
-
+ }
/**
* Outer::outer_method(int)
[global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint="CSharp_Dali_delete_AdaptorSignalType")]
public static extern void delete_AdaptorSignalType(global::System.Runtime.InteropServices.HandleRef jarg1);
+ [global::System.Runtime.InteropServices.DllImport("libdali-csharp-binder.so", EntryPoint = "CSharp_Dali_MakeCallback")]
+ public static extern global::System.IntPtr MakeCallback(global::System.Runtime.InteropServices.HandleRef jarg1);
+
}
}
}
/// <summary>
+ /// Ensures that the function passed in is called from the main loop when it is idle.
+ /// </summary>
+ /// <param name="func">The function to call</param>
+ /// <returns>true if added successfully, false otherwise</returns>
+ public bool AddIdle(System.Delegate func)
+ {
+ return _application.AddIdle(func);
+ }
+
+ /// <summary>
/// Run Application.
/// </summary>
/// <param name="args">Arguments from commandline.</param>
private void OnAppControl(object source, NUIApplicationAppControlEventArgs e)
{
Log.Debug("NUI", "NUICorebackend OnAppControl Called");
- var handler = Handlers[EventType.AppControlReceived] as Action<AppControlReceivedEventArgs>;\r
- SafeAppControlHandle handle = new SafeAppControlHandle(e.VoidP,false);\r
+ var handler = Handlers[EventType.AppControlReceived] as Action<AppControlReceivedEventArgs>;
+ SafeAppControlHandle handle = new SafeAppControlHandle(e.VoidP,false);
handler?.Invoke( new AppControlReceivedEventArgs(new ReceivedAppControl(handle)) );
}
}
/// <summary>
+ /// Ensures that the function passed in is called from the main loop when it is idle.
+ /// </summary>
+ /// <param name="func">The function to call</param>
+ /// <returns>true if added successfully, false otherwise</returns>
+ public bool AddIdle(System.Delegate func)
+ {
+ return ((NUICoreBackend)this.Backend).AddIdle(func);
+ }
+
+ /// <summary>
/// Enumeration for deciding whether a NUI application window is opaque or transparent.
/// </summary>
public enum WindowMode