%build
for ASM in %{Assemblies}; do
-%dotnet_build $ASM
+%dotnet_build $ASM /p:DefineConstants="DOT_NET_CORE","DEBUG_ON"
%dotnet_pack $ASM/$ASM.nuspec %{version}
done
+
%install
for ASM in %{Assemblies}; do
%dotnet_install $ASM
</FlavorProperties>\r
</VisualStudio>\r
</ProjectExtensions>\r
-</Project>
\ No newline at end of file
+</Project>\r
private static void LOG(string str)
{
- //Tizen.Log.Debug("NUI", str);
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", str);
+#endif
}
[UnmanagedFunctionPointer(CallingConvention.StdCall)]
internal void SetupDelegates()
{
InitDelegateInternal initializeCallback = new InitDelegateInternal(Initialize);
+#if DEBUG_ON
Tizen.Log.Debug("NUI", "InitSignal connection count");
-
+#endif
this.InitSignal().Connect(initializeCallback);
- //Tizen.Log.Debug("NUI", "InitSignal connection count = " + app.InitSignal().GetConnectionCount() );
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "InitSignal connection count = " + InitSignal().GetConnectionCount() );
+#endif
}
public static Application NewApplication()
Tizen.Log.Fatal("NUI", "Dali native version mismatch error! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease + " but native dali=" + ver1 + "." + ver2 + "." + ver3);
}
}
- catch (Exception e)
+ catch (Exception exc)
{
//throw new System.InvalidOperationException("Dali native version is very old! nui=" + Version.ver1 + "." + Version.ver2 + "." + Version.ver3);
Tizen.Log.Fatal("NUI", "Dali native version is very old! nui=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease);
+ Tizen.Log.Fatal("NUI", "exception occured! =" + exc.Message);
}
+ LOG(" Dali native version="+ver1 + "." + ver2 + "." + ver3 + " NUI version=" + Version.nuiVer1 + "." + Version.nuiVer2 + "." + Version.nuiVer3 + Version.nuiRelease);
}
-
LOG(" NewApplication(string stylesheet, Application.WindowMode windowMode) is called! ");
// register all Views with the type registry, so that can be created / styled via JSON
// the SWIG interface file instead.
//------------------------------------------------------------------------------
-#define DOT_NET_CORE
-#if (DOT_NET_CORE)
+//#define DOT_NET_CORE
+#if DOT_NET_CORE
using System.Reflection;
#endif
NDalicPINVOKE.CustomAlgorithmInterface_director_connect(swigCPtr, swigDelegate0);
}
-#if (DOT_NET_CORE)
+#if DOT_NET_CORE
private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, methodTypes);
bool hasDerivedMethod = this.GetType().GetTypeInfo().IsSubclassOf(typeof(CustomAlgorithmInterface));
// the SWIG interface file instead.
//------------------------------------------------------------------------------
-#define DOT_NET_CORE
+//#define DOT_NET_CORE
#if (DOT_NET_CORE)
using System.Reflection;
#endif
{
global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, methodTypes);
bool hasDerivedMethod = this.GetType().GetTypeInfo().IsSubclassOf(typeof(ItemFactory));
+#if DEBUG_ON
Tizen.Log.Debug("NUI-APP", "hasDerivedMethod=" + hasDerivedMethod);
+#endif
return hasDerivedMethod && (methodInfo != null);
}
#else
-#define DOT_NET_CORE
+//#define DOT_NET_CORE
#if (DOT_NET_CORE)
using System.Reflection;
#endif
// for every base class increase property start index
startEventPropertyIndex += (int)Tizen.NUI.PropertyRanges.DEFAULT_PROPERTY_MAX_COUNT_PER_DERIVATION; // DALi uses 10,000
startAnimatablePropertyIndex += maxCountPerDerivation;
-
- //Tizen.Log.Debug("NUI", "getStartPropertyIndex = " + viewType.Name +"current index " + startEventPropertyIndex);
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "getStartPropertyIndex = " + viewType.Name +"current index " + startEventPropertyIndex);
+#endif
#if (DOT_NET_CORE)
viewType = viewType.GetTypeInfo().BaseType;
#else
// the SWIG interface file instead.
//------------------------------------------------------------------------------
-#define DOT_NET_CORE
#if (DOT_NET_CORE)
using System.Reflection;
#endif
global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, methodTypes);
bool hasDerivedMethod = this.GetType().GetTypeInfo().IsSubclassOf(typeof(ViewImpl));
+#if DEBUG_ON
Tizen.Log.Debug("NUI-APP", "hasDerivedMethod=" + hasDerivedMethod);
+#endif
return hasDerivedMethod && (methodInfo != null);
}
#else
-#define DOT_NET_CORE
+//#define DOT_NET_CORE
#if (DOT_NET_CORE)
using System.Reflection;
#endif
Tizen.NUI.PropertyType daliType;
if (_daliPropertyTypeLookup.TryGetValue(cSharpTypeName, out daliType))
{
- //Tizen.Log.Debug("NUI", "mapped "+ cSharpTypeName + " to dAli type " +daliType );
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "mapped "+ cSharpTypeName + " to dAli type " +daliType );
+#endif
return daliType;
}
else
{
- // Tizen.Log.Debug("NUI", "Failed to find a mapping between C# property" + cSharpTypeName +" and DALi type");
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "Failed to find a mapping between C# property" + cSharpTypeName +" and DALi type");
+#endif
return PropertyType.None;
}
}
private static IntPtr CreateControl(IntPtr cPtrControlName)
{
string controlName = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(cPtrControlName);
- // Tizen.Log.Debug("NUI", "Create controlled called from C++ create a " + controlName);
-
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "Create controlled called from C++ create a " + controlName);
+#endif
Func<CustomView> controlConstructor;
// find the control constructor
RefObject refObj = view.GetObjectPtr();
IntPtr refCptr = (IntPtr)RefObject.getCPtr(refObj);
- //Tizen.Log.Debug("NUI", "________Storing ref object cptr in control map Hex: {0:X}", refCptr);
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "________Storing ref object cptr in control map Hex: {0:X}"+ refCptr);
+#endif
if (!Instance._controlMap.ContainsKey(refCptr))
{
Instance._controlMap.Add(refCptr, new WeakReference(view, false));
private static void SetProperty(IntPtr controlPtr, IntPtr propertyName, IntPtr propertyValue)
{
string name = System.Runtime.InteropServices.Marshal.PtrToStringAnsi(propertyName);
- //Tizen.Log.Debug("NUI", SetControlProperty called for:" + name );
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "SetControlProperty called for:" + name );
+#endif
Instance.SetPropertyValue(controlPtr, name, propertyValue);
}
// If the Scriptable attribute exists, then register it with the type registry.
if (attr is ScriptableProperty)
{
- //Tizen.Log.Debug("NUI", "Got a DALi JSON scriptable property = " + propertyInfo.Name +", of type " + propertyInfo.PropertyType.Name);
-
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "Got a DALi JSON scriptable property = " + propertyInfo.Name +", of type " + propertyInfo.PropertyType.Name);
+#endif
// first get the attribute type, ( default, or animatable)
ScriptableProperty scriptableProp = attr as ScriptableProperty;
TypeRegistration.RegisterProperty(viewType.Name, propertyInfo.Name, propertyIndex, propertyType, _setPropertyCallback, _getPropertyCallback);
}
}
- // Tizen.Log.Debug("NUI", "property name = " + propertyInfo.Name);
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "property name = " + propertyInfo.Name);
+#endif
}
}
}
private void SetPropertyValue(IntPtr controlPtr, string propertyName, IntPtr propertyValuePtr)
{
// Get the C# control that maps to the C++ control
-
- //Tizen.Log.Debug("NUI", "SetPropertyValue refObjectPtr = {0:X}", controlPtr);
-
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", "SetPropertyValue refObjectPtr = {0:X}"+ controlPtr);
+#endif
PropertyValue propValue = new PropertyValue(propertyValuePtr, false);
WeakReference viewReference;
string temp;
if (GetProperty(Actor.Property.COLOR_MODE).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "ColorMode get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "ColorMode get error!");
+#endif
}
switch (temp)
{
string temp;
if (GetProperty(Actor.Property.DRAW_MODE).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "DrawMode get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "DrawMode get error!");
+#endif
}
switch (temp)
{
string temp;
if (GetProperty(Actor.Property.WIDTH_RESIZE_POLICY).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "WidthResizePolicy get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "WidthResizePolicy get error!");
+#endif
}
switch (temp)
{
string temp;
if (GetProperty(Actor.Property.HEIGHT_RESIZE_POLICY).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "HeightResizePolicy get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "HeightResizePolicy get error!");
+#endif
}
switch (temp)
{
string temp;
if (GetProperty(Actor.Property.SIZE_SCALE_POLICY).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "SizeScalePolicy get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "SizeScalePolicy get error!");
+#endif
}
switch (temp)
{
string temp;
if (GetProperty(Actor.Property.CLIPPING_MODE).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "ClippingMode get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "ClippingMode get error!");
+#endif
}
switch (temp)
{
{
NDalicPINVOKE.Animation_Play(swigCPtr);
if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+#if DISABLE_ANIMATION
+ Stop(EndActions.StopFinal);
+#endif
}
/// <summary>
string temp;
if (GetProperty(CameraActor.Property.TYPE).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "CameraType get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "CameraType get error!");
+#endif
}
switch (temp)
{
string temp;
if (GetProperty(CameraActor.Property.PROJECTION_MODE).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "ProjectionMode get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "ProjectionMode get error!");
+#endif
}
switch(temp)
{
_tranformDictionary[visualIndex] = visualMap.OutputTransformMap;
RelayoutRequest();
-
+#if DEBUG_ON
Tizen.Log.Debug("NUI", "UpdateVisual() name=" + visualName);
+#endif
}
/// <summary>
{
private void LOG(string _str)
{
- //Tizen.Log.Debug("NUI", _str);
- //Tizen.Log.Debug("NUI", "[NUI]" + _str);
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", _str);
+#endif
}
/// <summary>
{
// Initialize DisposeQueue Singleton class.
DisposeQueue disposeQ = DisposeQueue.Instance;
+#if DEBUG_ON
Tizen.Log.Debug("NUI", "##### 1) DisposeQueue.Instance.Initialize()!");
-
+#endif
switch (_appMode)
{
case AppMode.Default:
// This is also required to create DisposeQueue on main thread.
disposeQ.Initialize();
+#if DEBUG_ON
Tizen.Log.Debug("NUI", "##### 2) DisposeQueue.Instance.Initialize()!");
-
+#endif
_stage = Stage.Instance;
_stage.SetBackgroundColor(Color.White);
LOG("OnPreCreate() is called!");
}
}
}
-}
\ No newline at end of file
+}
if (type.Equals(typeof(int)))
{
- Tizen.Log.Debug("NUI", " got an int property value ");
value = new PropertyValue((int)obj);
}
if (type.Equals(typeof(System.Int32)))
{
- Tizen.Log.Debug("NUI", " got an int property value ");
value = new PropertyValue((int)obj);
}
else if (type.Equals(typeof(bool)))
{
- Tizen.Log.Debug("NUI", " got an bool property value ");
value = new PropertyValue((bool)obj);
}
else if (type.Equals(typeof(float)))
{
- Tizen.Log.Debug("NUI", " got an float property value ");
value = new PropertyValue((float)obj);
}
else if (type.Equals(typeof(string)))
{
- Tizen.Log.Debug("NUI", " got a string property value ");
value = new PropertyValue((string)obj);
}
else if (type.Equals(typeof(Vector2)))
{
- Tizen.Log.Debug("NUI", " got an Vector2 property value ");
value = new PropertyValue((Vector2)obj);
}
else if (type.Equals(typeof(Vector3)))
{
- Tizen.Log.Debug("NUI", " got an Vector3 property value ");
value = new PropertyValue((Vector3)obj);
}
else if (type.Equals(typeof(Vector4)))
{
- Tizen.Log.Debug("NUI", " got an Vector4 property value ");
-
value = new PropertyValue((Vector4)obj);
}
else if (type.Equals(typeof(Position)))
{
- Tizen.Log.Debug("NUI", " got an Position property value ");
value = new PropertyValue((Position)obj);
}
else if (type.Equals(typeof(Position2D)))
{
- Tizen.Log.Debug("NUI", " got an Position2D property value ");
value = new PropertyValue((Position2D)obj);
}
else if (type.Equals(typeof(Size)))
{
- Tizen.Log.Debug("NUI", " got an Size property value ");
value = new PropertyValue((Size)obj);
}
else if (type.Equals(typeof(Size2D)))
{
- Tizen.Log.Debug("NUI", " got an Size2D property value ");
value = new PropertyValue((Size2D)obj);
}
else if (type.Equals(typeof(Color)))
{
- Tizen.Log.Debug("NUI", " got an Color property value ");
value = new PropertyValue((Color)obj);
}
else if (type.Equals(typeof(Rotation)))
{
- Tizen.Log.Debug("NUI", " got an Rotation property value ");
value = new PropertyValue((Rotation)obj);
}
else if (type.Equals(typeof(RelativeVector2)))
{
- Tizen.Log.Debug("NUI", " got an RelativeVector2 property value ");
value = new PropertyValue((RelativeVector2)obj);
}
else if (type.Equals(typeof(RelativeVector3)))
{
- Tizen.Log.Debug("NUI", " got an RelativeVector3 property value ");
value = new PropertyValue((RelativeVector3)obj);
}
else if (type.Equals(typeof(RelativeVector4)))
{
- Tizen.Log.Debug("NUI", " got an RelativeVector4 property value ");
value = new PropertyValue((RelativeVector4)obj);
}
else
{
throw new global::System.InvalidOperationException("Unimplemented type for Property Value :" + type.Name);
}
+#if DEBUG_ON
+ Tizen.Log.Debug("NUI", " got an property value of =" + type.Name);
+#endif
return value;
}
string temp;
if (GetProperty(Button.Property.LABEL_RELATIVE_ALIGNMENT).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "LabelRelativeAlignment get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "LabelRelativeAlignment get error!");
+#endif
}
switch (temp)
{
}
-}
\ No newline at end of file
+}
string temp;
if (GetProperty(Popup.Property.DISPLAY_STATE).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "DisplayState get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "DisplayState get error!");
+#endif
}
switch (temp)
{
string temp;
if (GetProperty(Popup.Property.CONTEXTUAL_MODE).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "ContextualMode get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "ContextualMode get error!");
+#endif
}
switch (temp)
{
string temp;
if (GetProperty(Popup.Property.ANIMATION_MODE).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "AnimationMode get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "AnimationMode get error!");
+#endif
}
switch (temp)
{
string temp;
if (GetProperty(PushButton.Property.ICON_ALIGNMENT).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "IconAlignment get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "IconAlignment get error!");
+#endif
}
switch (temp)
{
string temp;
if (GetProperty(ScrollBar.Property.SCROLL_DIRECTION).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "ScrollDirection get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "ScrollDirection get error!");
+#endif
}
switch (temp)
string temp;
if (GetProperty(ScrollBar.Property.INDICATOR_HEIGHT_POLICY).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "IndicatorHeightPolicy get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "IndicatorHeightPolicy get error!");
+#endif
}
switch (temp)
string temp;
if (GetProperty(TextEditor.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "HorizontalAlignment get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "HorizontalAlignment get error!");
+#endif
}
switch (temp)
string temp;
if (GetProperty(TextField.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "HorizontalAlignment get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "HorizontalAlignment get error!");
+#endif
}
switch (temp)
string temp;
if (GetProperty(TextField.Property.VERTICAL_ALIGNMENT).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "VerticalAlignment get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "VerticalAlignment get error!");
+#endif
}
switch (temp)
string temp;
if (GetProperty(TextLabel.Property.HORIZONTAL_ALIGNMENT).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "HorizontalAlignment get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "HorizontalAlignment get error!");
+#endif
}
switch (temp)
{
string temp;
if (GetProperty(TextLabel.Property.VERTICAL_ALIGNMENT).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "VerticalAlignment get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "VerticalAlignment get error!");
+#endif
}
switch (temp)
int temp = 0;
if (GetProperty(View.Property.STATE).Get(ref temp) == false)
{
- //Tizen.Log.Error("NUI", "State get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "State get error!");
+#endif
}
switch (temp)
{
string temp;
if (GetProperty(View.Property.SUB_STATE).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "subState get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "subState get error!");
+#endif
}
switch (temp)
{
string temp;
if (GetProperty(TableView.ChildProperty.CELL_HORIZONTAL_ALIGNMENT).Get(out temp) == false)
{
- //Tizen.Log.Error("NUI", "CellHorizontalAlignment get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "CellHorizontalAlignment get error!");
+#endif
}
switch (temp)
string temp;
GetProperty(TableView.ChildProperty.CELL_VERTICAL_ALIGNMENT).Get(out temp);
{
- //Tizen.Log.Error("NUI", "CellVerticalAlignment get error!");
+#if DEBUG_ON
+ Tizen.Log.Error("NUI", "CellVerticalAlignment get error!");
+#endif
}
switch (temp)
{
if (VisualIndex > 0)
{
+#if DEBUG_ON
Tizen.Log.Debug("NUI", "UpdateVisual()! VisualIndex=" + VisualIndex);
+#endif
Parent.UpdateVisual(VisualIndex, Name, this);
}
else
{
+#if DEBUG_ON
Tizen.Log.Debug("NUI", "VisualIndex was not set");
+#endif
}
}