From 0bc28f3e2423cfb5d7b594ec2bc55cf14a47c13d Mon Sep 17 00:00:00 2001 From: "Eunki, Hong" Date: Thu, 20 Oct 2022 19:21:46 +0900 Subject: [PATCH] [NUI][API10] Change property get/set not to use PropertyValue (patch set5) Signed-off-by: Eunki, Hong --- src/Tizen.NUI/Tizen.NUI.csproj | 2 +- src/Tizen.NUI/src/internal/Interop/Interop.View.cs | 25 +++++ .../src/public/BaseComponents/ImageView.cs | 33 +++++++ src/Tizen.NUI/src/public/BaseComponents/View.cs | 77 ++++++++++++++-- .../public/BaseComponents/ViewBindableProperty.cs | 14 ++- .../src/public/BaseComponents/ViewInternal.cs | 101 ++++++++++++++++++--- .../src/public/BaseComponents/ViewPublicMethods.cs | 9 ++ .../src/public/Visuals/VisualConstants.cs | 6 ++ 8 files changed, 243 insertions(+), 24 deletions(-) diff --git a/src/Tizen.NUI/Tizen.NUI.csproj b/src/Tizen.NUI/Tizen.NUI.csproj index 35761fe..93e8196 100755 --- a/src/Tizen.NUI/Tizen.NUI.csproj +++ b/src/Tizen.NUI/Tizen.NUI.csproj @@ -5,7 +5,7 @@ 8.0 - NUI_DEBUG_OFF;NUI_PROPERTY_CHANGE_1;NUI_PROPERTY_CHANGE_2;NUI_PROPERTY_CHANGE_3; + NUI_DEBUG_OFF;NUI_PROPERTY_CHANGE_1;NUI_PROPERTY_CHANGE_2;NUI_PROPERTY_CHANGE_3;NUI_VISUAL_PROPERTY_CHANGE_1; @@ -683,9 +687,13 @@ PixelAreaSetter++; // Sync as current properties UpdateImage(); +#if NUI_VISUAL_PROPERTY_CHANGE_1 + Interop.View.DoActionWithEmptyAttributes(this.SwigCPtr, ImageView.Property.IMAGE, ActionPlay); +#else PropertyValue attributes = new PropertyValue(0); this.DoAction(ImageView.Property.IMAGE, ActionPlay, attributes); attributes?.Dispose(); +#endif } /// @@ -697,9 +705,13 @@ PixelAreaSetter++; // Sync as current properties UpdateImage(); +#if NUI_VISUAL_PROPERTY_CHANGE_1 + Interop.View.DoActionWithEmptyAttributes(this.SwigCPtr, ImageView.Property.IMAGE, ActionPause); +#else PropertyValue attributes = new PropertyValue(0); this.DoAction(ImageView.Property.IMAGE, ActionPause, attributes); attributes?.Dispose(); +#endif } /// @@ -711,9 +723,14 @@ PixelAreaSetter++; // Sync as current properties UpdateImage(); + +#if NUI_VISUAL_PROPERTY_CHANGE_1 + Interop.View.DoActionWithEmptyAttributes(this.SwigCPtr, ImageView.Property.IMAGE, ActionStop); +#else PropertyValue attributes = new PropertyValue(0); this.DoAction(ImageView.Property.IMAGE, ActionStop, attributes); attributes?.Dispose(); +#endif } /// @@ -1208,6 +1225,14 @@ PixelAreaSetter++; if (backgroundExtraData == null) return; +#if NUI_VISUAL_PROPERTY_CHANGE_1 + // Update corner radius properties to image by ActionUpdateProperty + if (backgroundExtraData.CornerRadius != null) + { + Interop.View.InternalUpdateVisualPropertyVector4(this.SwigCPtr, ImageView.Property.IMAGE, Visual.Property.CornerRadius, Vector4.getCPtr(backgroundExtraData.CornerRadius)); + } + Interop.View.InternalUpdateVisualPropertyInt(this.SwigCPtr, ImageView.Property.IMAGE, Visual.Property.CornerRadiusPolicy, (int)backgroundExtraData.CornerRadiusPolicy); +#else // Apply corner radius to IMAGE. var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius); var cornerRadiusPolicyValue = new PropertyValue((int)backgroundExtraData.CornerRadiusPolicy); @@ -1225,6 +1250,7 @@ PixelAreaSetter++; currentPropertyMap.Dispose(); cornerRadiusValue.Dispose(); cornerRadiusPolicyValue.Dispose(); +#endif } internal override void ApplyBorderline() @@ -1233,6 +1259,12 @@ PixelAreaSetter++; if (backgroundExtraData == null) return; +#if NUI_VISUAL_PROPERTY_CHANGE_1 + // Update borderline properties to image by ActionUpdateProperty + Interop.View.InternalUpdateVisualPropertyFloat(this.SwigCPtr, ImageView.Property.IMAGE, Visual.Property.BorderlineWidth, backgroundExtraData.BorderlineWidth); + Interop.View.InternalUpdateVisualPropertyVector4(this.SwigCPtr, ImageView.Property.IMAGE, Visual.Property.BorderlineColor, Vector4.getCPtr(backgroundExtraData.BorderlineColor ?? Color.Black)); + Interop.View.InternalUpdateVisualPropertyFloat(this.SwigCPtr, ImageView.Property.IMAGE, Visual.Property.BorderlineOffset, backgroundExtraData.BorderlineOffset); +#else // Apply borderline to IMAGE. var borderlineWidthValue = new PropertyValue(backgroundExtraData.BorderlineWidth); var borderlineColorValue = backgroundExtraData.BorderlineColor == null ? new PropertyValue(Color.Black) : new PropertyValue(backgroundExtraData.BorderlineColor); @@ -1253,6 +1285,7 @@ PixelAreaSetter++; borderlineWidthValue.Dispose(); borderlineColorValue.Dispose(); borderlineOffsetValue.Dispose(); +#endif } internal ResourceLoadingStatusType GetResourceStatus() diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index 77ab5ad..143fa91 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -87,8 +87,8 @@ namespace Tizen.NUI.BaseComponents private string internalName = string.Empty; #endif #if NUI_PROPERTY_CHANGE_3 - private Vector3 internalCurrentParentOrigin = null; - private Vector3 internalCurrentAnchorPoint = null; + private Position internalCurrentParentOrigin = null; + private Position internalCurrentAnchorPoint = null; private Vector3 internalTargetSize = null; private Size2D internalCurrentSize = null; private Vector3 internalNaturalSize = null; @@ -99,6 +99,9 @@ namespace Tizen.NUI.BaseComponents private Vector4 internalCurrentColor = null; private Vector4 internalCurrentWorldColor = null; #endif +#if NUI_VISUAL_PROPERTY_CHANGE_1 + private Vector2 internalCurrentScreenPosition = null; +#endif static View() { @@ -1348,11 +1351,7 @@ namespace Tizen.NUI.BaseComponents { get { - Vector2 temp = new Vector2(0.0f, 0.0f); - var pValue = GetProperty(View.Property.ScreenPosition); - pValue.Get(temp); - pValue.Dispose(); - return temp; + return GetCurrentScreenPosition(); } } @@ -1404,17 +1403,25 @@ namespace Tizen.NUI.BaseComponents { get { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + return Object.InternalGetPropertyBool(SwigCPtr, View.Property.PositionUsesAnchorPoint); +#else bool temp = false; var pValue = GetProperty(View.Property.PositionUsesAnchorPoint); pValue.Get(out temp); pValue.Dispose(); return temp; +#endif } set { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + Object.InternalSetPropertyBool(SwigCPtr, View.Property.PositionUsesAnchorPoint, value); +#else var temp = new Tizen.NUI.PropertyValue(value); SetProperty(View.Property.PositionUsesAnchorPoint, temp); temp.Dispose(); +#endif NotifyPropertyChanged(); } } @@ -1736,11 +1743,15 @@ namespace Tizen.NUI.BaseComponents { get { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + return GetCurrentWorldPosition(); +#else Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f); var pValue = GetProperty(View.Property.WorldPosition); pValue.Get(temp); pValue.Dispose(); return temp; +#endif } } @@ -1909,11 +1920,15 @@ namespace Tizen.NUI.BaseComponents { get { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + return GetCurrentWorldScale(); +#else Vector3 temp = new Vector3(0.0f, 0.0f, 0.0f); var pValue = GetProperty(View.Property.WorldScale); pValue.Get(temp); pValue.Dispose(); return temp; +#endif } } @@ -1937,11 +1952,15 @@ namespace Tizen.NUI.BaseComponents { get { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + return Object.InternalGetPropertyBool(SwigCPtr, View.Property.VISIBLE); +#else bool temp = false; var pValue = GetProperty(View.Property.VISIBLE); pValue.Get(out temp); pValue.Dispose(); return temp; +#endif } } @@ -1953,11 +1972,15 @@ namespace Tizen.NUI.BaseComponents { get { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + return GetCurrentWorldColor(); +#else Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f); var pValue = GetProperty(View.Property.WorldColor); pValue.Get(temp); pValue.Dispose(); return temp; +#endif } } @@ -2418,6 +2441,9 @@ namespace Tizen.NUI.BaseComponents { get { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + return GetCurrentAnchorPoint(); +#else Position temp = new Position(0.0f, 0.0f, 0.0f); var pValue = GetProperty(View.Property.AnchorPoint); pValue.Get(temp); @@ -2425,12 +2451,17 @@ namespace Tizen.NUI.BaseComponents Position ret = new Position(OnAnchorPointChanged, temp.X, temp.Y, temp.Z); temp.Dispose(); return ret; +#endif } set { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + SetAnchorPoint(value); +#else var temp = new Tizen.NUI.PropertyValue(value); SetProperty(View.Property.AnchorPoint, temp); temp.Dispose(); +#endif NotifyPropertyChanged(); } } @@ -3095,12 +3126,16 @@ namespace Tizen.NUI.BaseComponents { backgroundImageSynchronousLoading = value; +#if NUI_VISUAL_PROPERTY_CHANGE_1 + if (!string.IsNullOrEmpty(BackgroundImage)) +#else string bgUrl = null; var pValue = Background.Find(ImageVisualProperty.URL); pValue?.Get(out bgUrl); pValue?.Dispose(); if (!string.IsNullOrEmpty(bgUrl)) +#endif { PropertyMap bgMap = this.Background; var temp = new PropertyValue(backgroundImageSynchronousLoading); @@ -3229,17 +3264,25 @@ namespace Tizen.NUI.BaseComponents { get { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + return Object.InternalGetPropertyBool(SwigCPtr, View.Property.CaptureAllTouchAfterStart); +#else bool temp = false; var pValue = GetProperty(View.Property.CaptureAllTouchAfterStart); pValue.Get(out temp); pValue.Dispose(); return temp; +#endif } set { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + Object.InternalSetPropertyBool(SwigCPtr, View.Property.CaptureAllTouchAfterStart, value); +#else var temp = new Tizen.NUI.PropertyValue(value); SetProperty(View.Property.CaptureAllTouchAfterStart, temp); temp.Dispose(); +#endif NotifyPropertyChanged(); } } @@ -3265,17 +3308,25 @@ namespace Tizen.NUI.BaseComponents { get { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + return Object.InternalGetPropertyBool(SwigCPtr, View.Property.AllowOnlyOwnTouch); +#else bool temp = false; var pValue = GetProperty(View.Property.AllowOnlyOwnTouch); pValue.Get(out temp); pValue.Dispose(); return temp; +#endif } set { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + Object.InternalSetPropertyBool(SwigCPtr, View.Property.AllowOnlyOwnTouch, value); +#else var temp = new Tizen.NUI.PropertyValue(value); SetProperty(View.Property.AllowOnlyOwnTouch, temp); temp.Dispose(); +#endif NotifyPropertyChanged(); } } @@ -3302,17 +3353,25 @@ namespace Tizen.NUI.BaseComponents { get { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + return (BlendEquationType)Object.InternalGetPropertyInt(SwigCPtr, View.Property.BlendEquation); +#else int temp = 0; var pValue = GetProperty(View.Property.BlendEquation); pValue.Get(out temp); pValue.Dispose(); return (BlendEquationType)temp; +#endif } set { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + Object.InternalSetPropertyInt(SwigCPtr, View.Property.BlendEquation, (int)value); +#else var temp = new Tizen.NUI.PropertyValue((int)value); SetProperty(View.Property.BlendEquation, temp); temp.Dispose(); +#endif NotifyPropertyChanged(); } } @@ -3422,11 +3481,15 @@ namespace Tizen.NUI.BaseComponents { get { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + return Object.InternalGetPropertyBool(SwigCPtr, View.Property.Culled); +#else bool temp = false; var pValue = GetProperty(View.Property.Culled); pValue.Get(out temp); pValue.Dispose(); return temp; +#endif } } diff --git a/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs b/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs index 22a51eb..753c85e 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ViewBindableProperty.cs @@ -130,6 +130,14 @@ namespace Tizen.NUI.BaseComponents view.internalBackgroundColor = new Color(view.OnBackgroundColorChanged, 0, 0, 0, 0); } +#if NUI_VISUAL_PROPERTY_CHANGE_1 + int visualType = (int)Visual.Type.Invalid; + Interop.View.InternalRetrievingVisualPropertyInt(view.SwigCPtr, Property.BACKGROUND, Visual.Property.Type, out visualType); + if (visualType == (int)Visual.Type.Color) + { + Interop.View.InternalRetrievingVisualPropertyVector4(view.SwigCPtr, Property.BACKGROUND, ColorVisualProperty.MixColor, Color.getCPtr(view.internalBackgroundColor)); + } +#else PropertyMap background = view.Background; int visualType = 0; background.Find(Visual.Property.Type)?.Get(out visualType); @@ -140,7 +148,7 @@ namespace Tizen.NUI.BaseComponents background?.Dispose(); background = null; - +#endif return view.internalBackgroundColor; } ); @@ -287,11 +295,15 @@ namespace Tizen.NUI.BaseComponents var view = (View)bindable; string backgroundImage = ""; +#if NUI_VISUAL_PROPERTY_CHANGE_1 + Interop.View.InternalRetrievingVisualPropertyString(view.SwigCPtr, Property.BACKGROUND, ImageVisualProperty.URL, out backgroundImage); +#else PropertyMap background = view.Background; background.Find(ImageVisualProperty.URL)?.Get(out backgroundImage); background.Dispose(); background = null; +#endif return backgroundImage; } diff --git a/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs b/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs index 7cffd69..6eb7273 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ViewInternal.cs @@ -629,30 +629,30 @@ namespace Tizen.NUI.BaseComponents return FindChildById(id); } - internal void SetParentOrigin(Vector3 origin) + internal void SetParentOrigin(Position origin) { - Interop.ActorInternal.SetParentOrigin(SwigCPtr, Vector3.getCPtr(origin)); + Interop.ActorInternal.SetParentOrigin(SwigCPtr, Position.getCPtr(origin)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - internal Vector3 GetCurrentParentOrigin() + internal Position GetCurrentParentOrigin() { #if NUI_PROPERTY_CHANGE_3 if(internalCurrentParentOrigin == null) { - internalCurrentParentOrigin = new Vector3(0, 0, 0); + internalCurrentParentOrigin = new Position(0, 0, 0); } - + Interop.ActorInternal.RetrieveCurrentPropertyVector3(SwigCPtr, View.Property.ParentOrigin, internalCurrentParentOrigin.SwigCPtr); - + if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } return internalCurrentParentOrigin; #else - Vector3 ret = new Vector3(Interop.ActorInternal.GetCurrentParentOrigin(SwigCPtr), true); + Position ret = new Position(Interop.ActorInternal.GetCurrentParentOrigin(SwigCPtr), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); @@ -660,30 +660,30 @@ namespace Tizen.NUI.BaseComponents #endif } - internal void SetAnchorPoint(Vector3 anchorPoint) + internal void SetAnchorPoint(Position anchorPoint) { - Interop.Actor.SetAnchorPoint(SwigCPtr, Vector3.getCPtr(anchorPoint)); + Interop.Actor.SetAnchorPoint(SwigCPtr, Position.getCPtr(anchorPoint)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - internal Vector3 GetCurrentAnchorPoint() + internal Position GetCurrentAnchorPoint() { #if NUI_PROPERTY_CHANGE_3 if(internalCurrentAnchorPoint == null) { - internalCurrentAnchorPoint = new Vector3(0, 0, 0); + internalCurrentAnchorPoint = new Position(0, 0, 0); } - + Interop.ActorInternal.RetrieveCurrentPropertyVector3(SwigCPtr, View.Property.AnchorPoint, internalCurrentAnchorPoint.SwigCPtr); - + if (NDalicPINVOKE.SWIGPendingException.Pending) { throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } return internalCurrentAnchorPoint; #else - Vector3 ret = new Vector3(Interop.ActorInternal.GetCurrentAnchorPoint(SwigCPtr), true); + Position ret = new Position(Interop.ActorInternal.GetCurrentAnchorPoint(SwigCPtr), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; @@ -837,7 +837,6 @@ namespace Tizen.NUI.BaseComponents return ret; #endif } - internal Vector3 GetCurrentWorldPosition() { #if NUI_PROPERTY_CHANGE_3 @@ -861,6 +860,30 @@ namespace Tizen.NUI.BaseComponents #endif } + internal Vector2 GetCurrentScreenPosition() + { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + if(internalCurrentScreenPosition == null) + { + internalCurrentScreenPosition = new Vector2(0, 0); + } + + Object.InternalRetrievingPropertyVector2(SwigCPtr, View.Property.ScreenPosition, internalCurrentScreenPosition.SwigCPtr); + + if (NDalicPINVOKE.SWIGPendingException.Pending) + { + throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + return internalCurrentScreenPosition; +#else + Vector2 temp = new Vector2(0.0f, 0.0f); + var pValue = GetProperty(View.Property.ScreenPosition); + pValue.Get(temp); + pValue.Dispose(); + return temp; +#endif + } + internal void SetInheritPosition(bool inherit) { Interop.ActorInternal.SetInheritPosition(SwigCPtr, inherit); @@ -1284,6 +1307,21 @@ namespace Tizen.NUI.BaseComponents return false; } + /// + /// Check whether Current view don't has BackgroundVisual or not. + /// Some API (like Animation, Borderline) required non-empty backgrounds. + /// + internal bool IsBackgroundEmpty() + { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + int visualType = (int)Visual.Type.Invalid; + Interop.View.InternalRetrievingVisualPropertyInt(this.SwigCPtr, Property.BACKGROUND, Visual.Property.Type, out visualType); + return visualType == (int)Visual.Type.Invalid; +#else + return Background.Empty(); +#endif + } + internal void SetKeyInputFocus() { Interop.ViewInternal.SetKeyInputFocus(SwigCPtr); @@ -1376,6 +1414,16 @@ namespace Tizen.NUI.BaseComponents { if (backgroundExtraData == null) return; +#if NUI_VISUAL_PROPERTY_CHANGE_1 + // Update corner radius properties to background and shadow by ActionUpdateProperty + if (backgroundExtraData.CornerRadius != null) + { + Interop.View.InternalUpdateVisualPropertyVector4(this.SwigCPtr, View.Property.BACKGROUND, Visual.Property.CornerRadius, Vector4.getCPtr(backgroundExtraData.CornerRadius)); + Interop.View.InternalUpdateVisualPropertyVector4(this.SwigCPtr, View.Property.SHADOW, Visual.Property.CornerRadius, Vector4.getCPtr(backgroundExtraData.CornerRadius)); + } + Interop.View.InternalUpdateVisualPropertyInt(this.SwigCPtr, View.Property.BACKGROUND, Visual.Property.CornerRadiusPolicy, (int)backgroundExtraData.CornerRadiusPolicy); + Interop.View.InternalUpdateVisualPropertyInt(this.SwigCPtr, View.Property.SHADOW, Visual.Property.CornerRadiusPolicy, (int)backgroundExtraData.CornerRadiusPolicy); +#else var cornerRadiusValue = backgroundExtraData.CornerRadius == null ? new PropertyValue() : new PropertyValue(backgroundExtraData.CornerRadius); var cornerRadiusPolicyValue = new PropertyValue((int)backgroundExtraData.CornerRadiusPolicy); @@ -1393,6 +1441,7 @@ namespace Tizen.NUI.BaseComponents currentPropertyMap.Dispose(); cornerRadiusValue.Dispose(); cornerRadiusPolicyValue.Dispose(); +#endif } /// TODO open as a protected level @@ -1400,6 +1449,23 @@ namespace Tizen.NUI.BaseComponents { if (backgroundExtraData == null) return; +#if NUI_VISUAL_PROPERTY_CHANGE_1 + // ActionUpdateProperty works well only if BACKGROUND visual setup before. + // If view don't have BACKGROUND visual, we set transparent background color in default. + if (IsBackgroundEmpty()) + { + // BACKGROUND visual doesn't exist. + SetBackgroundColor(Color.Transparent); + // SetBackgroundColor function apply borderline internally. + // So we can just return now. + return; + } + + // Update borderline properties to background by ActionUpdateProperty + Interop.View.InternalUpdateVisualPropertyFloat(this.SwigCPtr, View.Property.BACKGROUND, Visual.Property.BorderlineWidth, backgroundExtraData.BorderlineWidth); + Interop.View.InternalUpdateVisualPropertyVector4(this.SwigCPtr, View.Property.BACKGROUND, Visual.Property.BorderlineColor, Vector4.getCPtr(backgroundExtraData.BorderlineColor ?? Color.Black)); + Interop.View.InternalUpdateVisualPropertyFloat(this.SwigCPtr, View.Property.BACKGROUND, Visual.Property.BorderlineOffset, backgroundExtraData.BorderlineOffset); +#else // ActionUpdateProperty works well only if BACKGROUND visual setup before. // If view don't have BACKGROUND visual, we set transparent background color in default. using (PropertyMap backgroundPropertyMap = new PropertyMap()) @@ -1437,6 +1503,7 @@ namespace Tizen.NUI.BaseComponents borderlineWidthValue.Dispose(); borderlineColorValue.Dispose(); borderlineOffsetValue.Dispose(); +#endif } /// @@ -1548,6 +1615,10 @@ namespace Tizen.NUI.BaseComponents internalSizeModeFactor?.Dispose(); internalSizeModeFactor = null; #endif +#if NUI_VISUAL_PROPERTY_CHANGE_1 + internalCurrentScreenPosition?.Dispose(); + internalCurrentScreenPosition = null; +#endif if (type == DisposeTypes.Explicit) { diff --git a/src/Tizen.NUI/src/public/BaseComponents/ViewPublicMethods.cs b/src/Tizen.NUI/src/public/BaseComponents/ViewPublicMethods.cs index 50724b9..d595446 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ViewPublicMethods.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ViewPublicMethods.cs @@ -54,6 +54,14 @@ namespace Tizen.NUI.BaseComponents AlphaFunction.BuiltinFunctions? alphaFunction = null, object initialValue = null) { +#if NUI_VISUAL_PROPERTY_CHANGE_1 + if (IsBackgroundEmpty()) + { + // If there is no background yet, ensure there is a transparent + // color visual + BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f); + } +#else Tizen.NUI.PropertyMap background = Background; if (background.Empty()) @@ -63,6 +71,7 @@ namespace Tizen.NUI.BaseComponents BackgroundColor = new Color(0.0f, 0.0f, 0.0f, 0.0f); background = Background; } +#endif return AnimateColor("background", destinationValue, startTime, endTime, alphaFunction, initialValue); } diff --git a/src/Tizen.NUI/src/public/Visuals/VisualConstants.cs b/src/Tizen.NUI/src/public/Visuals/VisualConstants.cs index 595fce7..23df9ca 100755 --- a/src/Tizen.NUI/src/public/Visuals/VisualConstants.cs +++ b/src/Tizen.NUI/src/public/Visuals/VisualConstants.cs @@ -445,6 +445,12 @@ namespace Tizen.NUI /// [EditorBrowsable(EditorBrowsableState.Never)] Arc = AnimatedImage + 3, + + /// + /// Keyword for invalid visual type. (NUI only) + /// + [EditorBrowsable(EditorBrowsableState.Never)] + Invalid = Border - 1, } /// -- 2.7.4