using System;
using System.Runtime.InteropServices;
+ //This version should be updated and synced for every Dali native release
+ internal static class Version
+ {
+ public const int ver1 = 1;
+ public const int ver2 = 2;
+ public const int ver3 = 46;
+ public const int nuiVer1 = 0;
+ public const int nuiVer2 = 2;
+ public const int nuiVer3 = 47;
+ public const string nuiRelease = "";
+ }
+
/**
* @brief Event arguments that passed via NUIApplicationInit signal
*
public static Application NewApplication(string stylesheet, Application.WindowMode windowMode)
{
+ {
+ int ver1 = -1;
+ int ver2 = -1;
+ int ver3 = -1;
+
+ try
+ {
+ if (NDalicManualPINVOKE.NativeVersionCheck(ref ver1, ref ver2, ref ver3))
+ {
+ if (ver1 != Version.ver1 || ver2 != Version.ver2 || ver3 != Version.ver3)
+ {
+ //throw new System.InvalidOperationException("Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3);
+ NUILog.Error("Dali native version mismatch error! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease + " but native dali=" + ver1 + "." + ver2 + "." + ver3);
+ }
+ }
+ else
+ {
+ //throw new System.InvalidOperationException("Dali native version mismatch error! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3 + " but dali=" + ver1 + "." + ver2 + "." + ver3);
+ NUILog.Error("Dali native version mismatch error! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease + " but native dali=" + ver1 + "." + ver2 + "." + ver3);
+ }
+ }
+ catch (Exception exc)
+ {
+ //throw new System.InvalidOperationException("Dali native version is very old! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3);
+ NUILog.Error("Dali native version is very old! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease);
+ NUILog.Error("exception occured! =" + exc.Message);
+ }
+ NUILog.Debug(" Dali native version=" + ver1 + "." + ver2 + "." + ver3 + " NUI version=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease);
+ }
+ NUILog.Debug(" NewApplication(string stylesheet, Application.WindowMode windowMode) is called! ");
+
// register all Views with the type registry, so that can be created / styled via JSON
//ViewRegistryHelper.Initialize(); //moved to Application side.
//Called by User
//Release your own managed resources here.
//You should release all of your own disposable objects here.
-
+ NUILog.Debug("Animation.Dispose(Explicit)! GetState=" + this.GetState());
+ if(this.GetState() != States.Stopped)
+ {
+ this.Clear();
+ this.Reset();
+ NUILog.Error("Now Animation is playing! Clear and Reset here!");
+ }
}
else if(type == DisposeTypes.Implicit)
{
-
- }
-
- if(this)
- {
- this.Clear();
- this.Reset();
- NUILog.Error("Now Animation is playing! Clear and Reset here!");
- //throw new System.InvalidOperationException("Animation Instance should not be disposed until getting Finished event. Should be a global variable");
+ NUILog.Debug("Animation.Dispose(Implicit)! GetState=" + this.GetState());
+ if(this.GetState() != States.Stopped)
+ {
+ this.Clear();
+ this.Reset();
+ NUILog.Error("Now Animation is playing! Clear and Reset here!");
+ //throw new System.InvalidOperationException("Animation Instance should not be disposed until getting Finished event. Should be a global variable");
+ }
}
-
//Release your own unmanaged resources here.
//You should not access any managed member here except static instance.
//because the execution order of Finalizes is non-deterministic.
{
if (_animationFinishedEventHandler == null)
{
- NUILog.Debug("[add before]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "con1) FinishedSignal().Empty = " + FinishedSignal().Empty());
+ Tizen.Log.Debug("NUI", "con2) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
+#endif
_animationFinishedEventCallback = OnFinished;
FinishedSignal().Connect(_animationFinishedEventCallback);
- NUILog.Debug("[add after]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "con3) FinishedSignal().Empty = " + FinishedSignal().Empty());
+ Tizen.Log.Debug("NUI", "con4) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
+#endif
}
+
_animationFinishedEventHandler += value;
}
remove
if (_animationFinishedEventHandler == null && FinishedSignal().Empty() == false)
{
- NUILog.Debug("[remove before]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "discon1) FinishedSignal().Empty = " + FinishedSignal().Empty());
+ Tizen.Log.Debug("NUI", "discon2) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
+#endif
FinishedSignal().Disconnect(_animationFinishedEventCallback);
- NUILog.Debug("[remove after]FinishedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "discon3) FinishedSignal().Empty = " + FinishedSignal().Empty());
+ Tizen.Log.Debug("NUI", "discon4) FinishedSignal().GetConnectionCount = " + FinishedSignal().GetConnectionCount());
+#endif
}
}
}
{
if (_animationProgressReachedEventHandler == null)
{
- NUILog.Debug("[add before]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "con1) ProgressReachedSignal().Empty = " + ProgressReachedSignal().Empty());
+ Tizen.Log.Debug("NUI", "con2) ProgressReachedSignal().GetConnectionCount = " + ProgressReachedSignal().GetConnectionCount());
+#endif
_animationProgressReachedEventCallback = OnProgressReached;
ProgressReachedSignal().Connect(_animationProgressReachedEventCallback);
- NUILog.Debug("[add after]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "con3) ProgressReachedSignal().Empty = " + ProgressReachedSignal().Empty());
+ Tizen.Log.Debug("NUI", "con4) ProgressReachedSignal().GetConnectionCount = " + ProgressReachedSignal().GetConnectionCount());
+#endif
}
_animationProgressReachedEventHandler += value;
if (_animationProgressReachedEventHandler == null && ProgressReachedSignal().Empty() == false)
{
- NUILog.Debug("[remove before]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "discon1) ProgressReachedSignal().Empty = " + ProgressReachedSignal().Empty());
+ Tizen.Log.Debug("NUI", "discon2) ProgressReachedSignal().GetConnectionCount = " + ProgressReachedSignal().GetConnectionCount());
+#endif
ProgressReachedSignal().Disconnect(_animationProgressReachedEventHandler);
- NUILog.Debug("[remove after]ProgressReachedSignal().Empty=" + FinishedSignal().Empty() + " GetConnectionCount=" + FinishedSignal().GetConnectionCount());
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "discon3) ProgressReachedSignal().Empty = " + ProgressReachedSignal().Empty());
+ Tizen.Log.Debug("NUI", "discon4) ProgressReachedSignal().GetConnectionCount = " + ProgressReachedSignal().GetConnectionCount());
+#endif
}
}
}
return ret;
}
- /// <summary>
- /// Sets whether window accepts focus or not.
- /// </summary>
- /// <param name="accept">If focus is accepted or not. Default is true.</param>
+ [Obsolete("Please do not use! this will be internal method")]
public void SetAcceptFocus(bool accept)
{
NDalicPINVOKE.SetAcceptFocus(swigCPtr, accept);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
}
- /// <summary>
- /// Returns whether window accepts focus or not.
- /// </summary>
- /// <returns>True if the window accept focus, false otherwise</returns>
+ [Obsolete("Please do not use! this will be internal method")]
public bool IsFocusAcceptable()
{
return NDalicPINVOKE.IsFocusAcceptable(swigCPtr);
private delegate void WindowFocusChangedEventCallbackType2(bool focusGained);
private event EventHandler<WindowFocusChangedEventArgs> _windowFocusChangedEventHandler2;
- [Obsolete("Please do not use! this will be deprecated. Please use 'FocusChanged' event instead")]
+ [Obsolete("Please do not use! this will be deprecated")]
public event EventHandler<WindowFocusChangedEventArgs> WindowFocusChanged
{
add