{
static Stage()
{
- ulong ret = Interop.Util.GetNanoSeconds();
- Tizen.Log.Error("NUI", "Stage : " + ret);
}
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_Stage_DEFAULT_BACKGROUND_COLOR_get")]
+++ /dev/null
-using System;
-using System.Collections.Generic;
-using System.Text;
-
-namespace Tizen.NUI
-{
-
- internal static partial class Interop
- {
- internal static partial class Util
- {
- internal static ulong GetNanoSeconds()
- {
- return 0;
- }
- }
- }
-}
\ No newline at end of file
static protected SWIGStringHelper swigStringHelper = new SWIGStringHelper();
static NDalicPINVOKE()
{
- Tizen.Log.Error("NUI", "Create NDalicPINVOKE");
}
[global::System.Runtime.InteropServices.DllImport(NDalicPINVOKE.Lib, EntryPoint = "CSharp_Dali_delete_BaseHandle")]
float b = color.B;
float a = color.A;
- if (r < 0.0f)
+ if (IsInvalidValue(ref r) | IsInvalidValue(ref g) | IsInvalidValue(ref b) | IsInvalidValue(ref a))
{
- r = 0.0f;
- NUILog.Error("The value of Result is invalid! Should be between [0, 1].");
- }
- else if (r > 1.0f)
- {
- r = 1.0f;
- NUILog.Error("The value of Result is invalid! Should be between [0, 1].");
- }
- if (g < 0.0f)
- {
- g = 0.0f;
- NUILog.Error("The value of Result is invalid! Should be between [0, 1].");
- }
- else if (g > 1.0f)
- {
- g = 1.0f;
- NUILog.Error("The value of Result is invalid! Should be between [0, 1].");
- }
- if (b < 0.0f)
- {
- b = 0.0f;
- NUILog.Error("The value of Result is invalid! Should be between [0, 1].");
- }
- else if (b > 1.0f)
- {
- b = 1.0f;
- NUILog.Error("The value of Result is invalid! Should be between [0, 1].");
- }
- if (a < 0.0f)
- {
- a = 0.0f;
- NUILog.Error("The value of Result is invalid! Should be between [0, 1].");
- }
- else if (a > 1.0f)
- {
- a = 1.0f;
- NUILog.Error("The value of Result is invalid! Should be between [0, 1].");
+ NUILog.Error($"The value of Result is invalid! Should be between [0, 1]. Color is {color.R}, {color.G}, {color.B}, {color.A}");
}
color = new Color(r, g, b, a);
return color;
internal static float ValueCheck(float value)
{
- if (value < 0.0f)
+ float refValue = value;
+ if (IsInvalidValue(ref refValue))
{
- value = 0.0f;
- NUILog.Error("The value of Parameters is invalid! Should be between [0, 1].");
+ NUILog.Error($"The value of Result is invalid! Should be between [0, 1]. float value is {value}");
}
- else if (value > 1.0f)
- {
- value = 1.0f;
- NUILog.Error("The value of Parameters is invalid! Should be between [0, 1].");
- }
- return value;
+ return refValue;
}
internal static float[] ValueCheck(float[] arr)
for (int i = 0; i < arr.Length; i++)
{
- if (arr[i] < 0.0f)
+ float refValue = arr[i];
+ if (IsInvalidValue(ref refValue))
{
- arr[i] = 0.0f;
- NUILog.Error("The value of Parameters is invalid! Should be between [0, 1].");
- }
- else if (arr[i] > 1.0f)
- {
- arr[i] = 1.0f;
- NUILog.Error("The value of Parameters is invalid! Should be between [0, 1].");
+ NUILog.Error($"The value of Result is invalid! Should be between [0, 1]. arr[] is {arr[i]}");
+ arr[i] = refValue;
}
}
return arr;
}
+ private static bool IsInvalidValue(ref float value)
+ {
+ if (value < 0.0f)
+ {
+ value = 0.0f;
+ return true;
+ }
+ else if (value > 1.0f)
+ {
+ value = 1.0f;
+ return true;
+ }
+ return false;
+ }
+
/// This will not be public opened.
[EditorBrowsable(EditorBrowsableState.Never)]
protected override void ReleaseSwigCPtr(System.Runtime.InteropServices.HandleRef swigCPtr)
[EditorBrowsable(EditorBrowsableState.Never)]
public void ChangeLayoutSiblingOrder(int order)
{
- if (Owner != null && Owner.Parent != null)
+ var ownerParent = Owner.GetParent() as View;
+ if (Owner != null && ownerParent != null)
{
- LayoutGroup parent = Owner.Parent.Layout as LayoutGroup;
+ var parent = ownerParent.Layout as LayoutGroup;
if (parent != null && parent.LayoutChildren.Count > order)
{
" right:" + _layoutPositionData.Right +
" bottom:" + _layoutPositionData.Bottom);
- if (Owner.Parent != null && Owner.Parent.Layout != null && Owner.Parent.Layout.LayoutWithTransition)
+ var ownerParent = Owner.GetParent() as View;
+ if (ownerParent != null && ownerParent.Layout != null && ownerParent.Layout.LayoutWithTransition)
{
NUIApplication.GetDefaultWindow().LayoutController.AddTransitionDataEntry(_layoutPositionData);
}
{
throw new global::System.InvalidOperationException("Unimplemented type for Property Value :" + type.Name);
}
- //NUILog.Debug(" got an property value of =" + type.Name);
return value;
}
private WindowTransitionEffectSignal TransitionEffectEventSignal()
{
- //Tizen.Log.Fatal("NUITEST", "TransitionEffectEventSignal()!");
if (transitionEffectSignal == null)
{
transitionEffectSignal = new WindowTransitionEffectSignal(this);
if (NDalicPINVOKE.SWIGPendingException.Pending)
throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- //Tizen.Log.Fatal("NUITEST", $"transitionEffectSignal is null, new here!");
}
return transitionEffectSignal;
}
private void OnTransitionEffect(IntPtr window, int state, int type)
{
- //Tizen.Log.Fatal("NUITEST", $"OnTransitionEffect() called");
if (window == global::System.IntPtr.Zero)
{
- //Tizen.Log.Error("NUI", $"OnTransitionEffect() IntPtr window is null!");
return;
}
TransitionEffectArgs e = new TransitionEffectArgs();
e.State = (EffectStates)state;
- //Tizen.Log.Error("NUITEST", $"e.State={e.State}");
e.Type = (EffectTypes)type;
- //Tizen.Log.Error("NUITEST", $"e.Type={e.Type}");
if (transitionEffectHandler != null)
{
- //Tizen.Log.Fatal("NUITEST", $"Execute transitionEffectHandler(this, e)!!!");
transitionEffectHandler(this, e);
}
return;