From: huiyueun <35286162+huiyueun@users.noreply.github.com> Date: Tue, 15 Jan 2019 08:59:05 +0000 (+0900) Subject: [NUI] sync with dalihub (#651) X-Git-Tag: submit/tizen/20190116.000725~1^2~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d51a7242c3ee7e9a4e57bbd5f8644df391253b81;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git [NUI] sync with dalihub (#651) * Disable layouting until set Layout Added a (static) flag that is set once a Layout is set on any View. Until this flag is set automatic Layout setting will not occur Change-Id: Ieff5ed12df75a062a899831681f138c5aa3b6e1f Signed-off-by: huiyu.eun * [NUI] sync with dalihub - Merge "[NUI] Add comment" int devel/master Signed-off-by: huiyu.eun * All Views in a tree can be layouts Prior to this fix a View with children within a View would not become a layout if the parent View did not have SetLayout explicitly called on it. Change-Id: Ibf9b214f907a0ea8df30f54269626747c50499ca * [NUI] Set LayoutItem Width/Height specification Change-Id: Idec264329f6dc20db4692fba84ac8ee1f95067aa Signed-off-by: huiyu.eun * [NUI] Fix build error Change-Id: Ib1ff4dcb142ce09539dbef3b567f649e40459527 Signed-off-by: huiyu.eun * LayoutGroup to layout children Change-Id: Idff81189013e4cb0e85a8bbf13e268170b8aad31 * [NUI] Public some apis for TCT and fix an issue Here are some changes: 1. public ScrollViewPagePathEffect class 2. public TypeRegistry class 3. public PinchGesture constructor 4. public SetScrollPropertySource api 5. Fix ScrollInterval event issue Change-Id: I649f0fc464a5af0453475b7ef0dcf4df614eb34e * Disable layouting until set Layout Added a (static) flag that is set once a Layout is set on any View. Until this flag is set automatic Layout setting will not occur Change-Id: Ieff5ed12df75a062a899831681f138c5aa3b6e1f * Remove build warnings Change-Id: I8744e8f690a4e93b199dc762c14607bd8b191718 * VisualFactory Instance to retreive from native VisualFactory.Get() is deprecated whilst Instance just gets the C# class. Added call to native to return the native VisualFactory when Instance used. Change-Id: I3be36e8f6cb70a2a1b2128c7d934fa45fe5bf570 * Map non dependant ResizePolicies to Specs. Maps NaturalSize, FillToParent and FitToChildren to the new layouting specifications. NaturalSize is mapped to a fixed value. Parent relative mappings not done here, need to be done in the measure once parent sizes known. Change-Id: I1f11a9dca126541cd534a386583fc36f97646ed4 * [NUI] Modify since_tizen tag Change-Id: Ib9ee882177d2372b8f132542cb235a3fcae5e734 * [NUI] Add reverse support for parse Change-Id: Ia6f55508e34cf5adbf23d0f9acd4f69da7b6d3c5 * [NUI] Fix ParentOrigin doesn't work when using XAML Change-Id: I53e4b18b6c24db79c16c75b758613113152c5b25 * [NUI] Fix State issue of View Change-Id: Ide87c43406e55b9399f191dd76f8fb0b68b0cae9 * [NUI] Add EnvironmentVariable interface (internal API) (#533) Signed-off-by: Jiyun Yang Signed-off-by: huiyu.eun * [NUI] Remove version check Signed-off-by: huiyu.eun * Modify codecay Signed-off-by: huiyu.eun * Update Position2D.cs --- diff --git a/src/Tizen.NUI/src/internal/ActivatedSignalType.cs b/src/Tizen.NUI/src/internal/ActivatedSignalType.cs index 941e6e51d..13d24eceb 100755 --- a/src/Tizen.NUI/src/internal/ActivatedSignalType.cs +++ b/src/Tizen.NUI/src/internal/ActivatedSignalType.cs @@ -176,7 +176,7 @@ namespace Tizen.NUI /// Emits the signal. /// /// The first value to pass to callbacks - /// 4 + /// 5 public void Emit(InputMethodContext arg) { NDalicManualPINVOKE.ActivatedSignalType_Emit(swigCPtr, InputMethodContext.getCPtr(arg)); diff --git a/src/Tizen.NUI/src/internal/Application.cs b/src/Tizen.NUI/src/internal/Application.cs index e16fbf032..dc868c80c 100755 --- a/src/Tizen.NUI/src/internal/Application.cs +++ b/src/Tizen.NUI/src/internal/Application.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -309,8 +309,14 @@ namespace Tizen.NUI } } + /// + /// A class to get resources in current application. + /// public class GetResourcesProvider { + /// + /// Get resources in current application. + /// static public IResourcesProvider Get() { return Tizen.NUI.Application.Current; @@ -408,7 +414,7 @@ namespace Tizen.NUI } [EditorBrowsable(EditorBrowsableState.Never)] - public NavigationProxy NavigationProxy { get; } + public new NavigationProxy NavigationProxy { get; } [EditorBrowsable(EditorBrowsableState.Never)] public int PanGestureId { get; set; } @@ -426,7 +432,7 @@ namespace Tizen.NUI ResourceDictionary _resources; public bool IsResourcesCreated => _resources != null; - public delegate void resChangeCb(object sender, ResourcesChangedEventArgs e); + public delegate void resChangeCb (object sender, ResourcesChangedEventArgs e); static private Dictionary> resourceChangeCallbackDict = new Dictionary>(); static public void AddResourceChangedCallback(object handle, resChangeCb cb) @@ -950,12 +956,17 @@ namespace Tizen.NUI // Initialize DisposeQueue Singleton class. This is also required to create DisposeQueue on main thread. DisposeQueue.Instance.Initialize(); - if (_applicationInitEventHandler != null) + NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs(); + // Populate all members of "e" (NUIApplicationInitEventArgs) with real data + using (e.Application = Application.GetApplicationFromPtr(data)) { - NUIApplicationInitEventArgs e = new NUIApplicationInitEventArgs(); - e.Application = this; - _applicationInitEventHandler.Invoke(this, e); + if (_applicationInitEventHandler != null) + { + //here we send all data to user event handlers + _applicationInitEventHandler(this, e); + } } + } /** @@ -996,14 +1007,17 @@ namespace Tizen.NUI // Callback for Application TerminateSignal private void OnNUIApplicationTerminate(IntPtr data) { - if (_applicationTerminateEventHandler != null) + NUIApplicationTerminatingEventArgs e = new NUIApplicationTerminatingEventArgs(); + + // Populate all members of "e" (NUIApplicationTerminateEventArgs) with real data + using (e.Application = Application.GetApplicationFromPtr(data)) { - NUIApplicationTerminatingEventArgs e = new NUIApplicationTerminatingEventArgs(); - e.Application = this; - _applicationTerminateEventHandler.Invoke(this, e); + if (_applicationTerminateEventHandler != null) + { + //here we send all data to user event handlers + _applicationTerminateEventHandler(this, e); + } } - - Window.Instance.DisconnectNativeSignals(); } /** @@ -1044,11 +1058,16 @@ namespace Tizen.NUI // Callback for Application PauseSignal private void OnNUIApplicationPause(IntPtr data) { - if (_applicationPauseEventHandler != null) + NUIApplicationPausedEventArgs e = new NUIApplicationPausedEventArgs(); + + // Populate all members of "e" (NUIApplicationPauseEventArgs) with real data + using (e.Application = Application.GetApplicationFromPtr(data)) { - NUIApplicationPausedEventArgs e = new NUIApplicationPausedEventArgs(); - e.Application = this; - _applicationPauseEventHandler.Invoke(this, e); + if (_applicationPauseEventHandler != null) + { + //here we send all data to user event handlers + _applicationPauseEventHandler(this, e); + } } } @@ -1090,11 +1109,16 @@ namespace Tizen.NUI // Callback for Application ResumeSignal private void OnNUIApplicationResume(IntPtr data) { - if (_applicationResumeEventHandler != null) + NUIApplicationResumedEventArgs e = new NUIApplicationResumedEventArgs(); + + // Populate all members of "e" (NUIApplicationResumeEventArgs) with real data + using (e.Application = Application.GetApplicationFromPtr(data)) { - NUIApplicationResumedEventArgs e = new NUIApplicationResumedEventArgs(); - e.Application = this; - _applicationResumeEventHandler.Invoke(this, e); + if (_applicationResumeEventHandler != null) + { + //here we send all data to user event handlers + _applicationResumeEventHandler(this, e); + } } } @@ -1136,11 +1160,16 @@ namespace Tizen.NUI // Callback for Application ResetSignal private void OnNUIApplicationReset(IntPtr data) { - if (_applicationResetEventHandler != null) + NUIApplicationResetEventArgs e = new NUIApplicationResetEventArgs(); + + // Populate all members of "e" (NUIApplicationResetEventArgs) with real data + using (e.Application = Application.GetApplicationFromPtr(data)) { - NUIApplicationResetEventArgs e = new NUIApplicationResetEventArgs(); - e.Application = this; - _applicationResetEventHandler.Invoke(this, e); + if (_applicationResetEventHandler != null) + { + //here we send all data to user event handlers + _applicationResetEventHandler(this, e); + } } } @@ -1182,11 +1211,16 @@ namespace Tizen.NUI // Callback for Application ResizeSignal private void OnNUIApplicationResize(IntPtr data) { - if (_applicationResizeEventHandler != null) + NUIApplicationResizedEventArgs e = new NUIApplicationResizedEventArgs(); + + // Populate all members of "e" (NUIApplicationResizeEventArgs) with real data + using (e.Application = Application.GetApplicationFromPtr(data)) { - NUIApplicationResizedEventArgs e = new NUIApplicationResizedEventArgs(); - e.Application = this; - _applicationResizeEventHandler.Invoke(this, e); + if (_applicationResizeEventHandler != null) + { + //here we send all data to user event handlers + _applicationResizeEventHandler(this, e); + } } } @@ -1228,11 +1262,16 @@ namespace Tizen.NUI // Callback for Application LanguageChangedSignal private void OnNUIApplicationLanguageChanged(IntPtr data) { - if (_applicationLanguageChangedEventHandler != null) + NUIApplicationLanguageChangedEventArgs e = new NUIApplicationLanguageChangedEventArgs(); + + // Populate all members of "e" (NUIApplicationLanguageChangedEventArgs) with real data + using (e.Application = Application.GetApplicationFromPtr(data)) { - NUIApplicationLanguageChangedEventArgs e = new NUIApplicationLanguageChangedEventArgs(); - e.Application = this; - _applicationLanguageChangedEventHandler.Invoke(this, e); + if (_applicationLanguageChangedEventHandler != null) + { + //here we send all data to user event handlers + _applicationLanguageChangedEventHandler(this, e); + } } } @@ -1274,11 +1313,16 @@ namespace Tizen.NUI // Callback for Application RegionChangedSignal private void OnNUIApplicationRegionChanged(IntPtr data) { - if (_applicationRegionChangedEventHandler != null) + NUIApplicationRegionChangedEventArgs e = new NUIApplicationRegionChangedEventArgs(); + + // Populate all members of "e" (NUIApplicationRegionChangedEventArgs) with real data + using (e.Application = Application.GetApplicationFromPtr(data)) { - NUIApplicationRegionChangedEventArgs e = new NUIApplicationRegionChangedEventArgs(); - e.Application = this; - _applicationRegionChangedEventHandler.Invoke(this, e); + if (_applicationRegionChangedEventHandler != null) + { + //here we send all data to user event handlers + _applicationRegionChangedEventHandler(this, e); + } } } @@ -1324,7 +1368,12 @@ namespace Tizen.NUI // Populate all members of "e" (NUIApplicationBatteryLowEventArgs) with real data e.BatteryStatus = status; - _applicationBatteryLowEventHandler?.Invoke(this, e); + + if (_applicationBatteryLowEventHandler != null) + { + //here we send all data to user event handlers + _applicationBatteryLowEventHandler(this, e); + } } /** @@ -1369,7 +1418,12 @@ namespace Tizen.NUI // Populate all members of "e" (NUIApplicationMemoryLowEventArgs) with real data e.MemoryStatus = status; - _applicationMemoryLowEventHandler?.Invoke(this, e); + + if (_applicationMemoryLowEventHandler != null) + { + //here we send all data to user event handlers + _applicationMemoryLowEventHandler(this, e); + } } /** @@ -1410,12 +1464,17 @@ namespace Tizen.NUI // Callback for Application AppControlSignal private void OnNUIApplicationAppControl(IntPtr application, IntPtr voidp) { - if (_applicationAppControlEventHandler != null) + NUIApplicationAppControlEventArgs e = new NUIApplicationAppControlEventArgs(); + e.VoidP = voidp; + + // Populate all members of "e" (NUIApplicationAppControlEventArgs) with real data + using (e.Application = Application.GetApplicationFromPtr(application)) { - NUIApplicationAppControlEventArgs e = new NUIApplicationAppControlEventArgs(); - e.VoidP = voidp; - e.Application = this; - _applicationAppControlEventHandler.Invoke(this, e); + if (_applicationAppControlEventHandler != null) + { + //here we send all data to user event handlers + _applicationAppControlEventHandler(this, e); + } } } @@ -1431,12 +1490,7 @@ namespace Tizen.NUI public static Application GetApplicationFromPtr(global::System.IntPtr cPtr) { - if (cPtr == global::System.IntPtr.Zero) - { - return null; - } - - Application ret = Registry.GetManagedBaseHandleFromNativePtr(cPtr) as Application; + Application ret = new Application(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } diff --git a/src/Tizen.NUI/src/internal/DisposeQueue.cs b/src/Tizen.NUI/src/internal/DisposeQueue.cs index cde10b21e..dc75e9c2e 100755 --- a/src/Tizen.NUI/src/internal/DisposeQueue.cs +++ b/src/Tizen.NUI/src/internal/DisposeQueue.cs @@ -58,7 +58,7 @@ namespace Tizen.NUI } } - internal void ProcessDisposables() + private void ProcessDisposables() { lock (_listLock) { diff --git a/src/Tizen.NUI/src/internal/ItemView.cs b/src/Tizen.NUI/src/internal/ItemView.cs index 49f158fd5..eb5a76d68 100755 --- a/src/Tizen.NUI/src/internal/ItemView.cs +++ b/src/Tizen.NUI/src/internal/ItemView.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -70,7 +70,7 @@ namespace Tizen.NUI base.Dispose(type); } - public Tizen.NUI.PropertyArray Layout + public new Tizen.NUI.PropertyArray Layout { get { diff --git a/src/Tizen.NUI/src/internal/KeyboardEventSignalType.cs b/src/Tizen.NUI/src/internal/KeyboardEventSignalType.cs index 771246a60..820fac802 100755 --- a/src/Tizen.NUI/src/internal/KeyboardEventSignalType.cs +++ b/src/Tizen.NUI/src/internal/KeyboardEventSignalType.cs @@ -178,7 +178,7 @@ namespace Tizen.NUI /// The first value to pass to callbacks /// The second value to pass to callbacks /// The value returned by the last callback, or a default constructed value if no callbacks are connected - /// 4 + /// 5 public InputMethodContext.CallbackData Emit(InputMethodContext arg1, InputMethodContext.EventData arg2) { InputMethodContext.CallbackData ret = new InputMethodContext.CallbackData(NDalicManualPINVOKE.KeyboardEventSignalType_Emit(swigCPtr, InputMethodContext.getCPtr(arg1), InputMethodContext.EventData.getCPtr(arg2)), true); diff --git a/src/Tizen.NUI/src/internal/KeyboardTypeSignalType.cs b/src/Tizen.NUI/src/internal/KeyboardTypeSignalType.cs index 784ffaf19..050d26a26 100755 --- a/src/Tizen.NUI/src/internal/KeyboardTypeSignalType.cs +++ b/src/Tizen.NUI/src/internal/KeyboardTypeSignalType.cs @@ -178,7 +178,7 @@ namespace Tizen.NUI /// Connects a member function. /// /// The member function to connect - /// 4 + /// 5 public void Emit(InputMethodContext.KeyboardType arg) { NDalicManualPINVOKE.KeyboardTypeSignalType_Emit(swigCPtr, (int)arg); diff --git a/src/Tizen.NUI/src/internal/Layouting/AbsoluteLayout.cs b/src/Tizen.NUI/src/internal/Layouting/AbsoluteLayout.cs index ae8fcd339..7fae23435 100755 --- a/src/Tizen.NUI/src/internal/Layouting/AbsoluteLayout.cs +++ b/src/Tizen.NUI/src/internal/Layouting/AbsoluteLayout.cs @@ -1,18 +1,18 @@ -/** Copyright (c) 2018 Samsung Electronics Co., Ltd. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ +/* Copyright (c) 2018 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ using System.ComponentModel; namespace Tizen.NUI @@ -35,7 +35,7 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { diff --git a/src/Tizen.NUI/src/internal/Layouting/FlexLayout.cs b/src/Tizen.NUI/src/internal/Layouting/FlexLayout.cs index 904c2379c..42355a7cc 100755 --- a/src/Tizen.NUI/src/internal/Layouting/FlexLayout.cs +++ b/src/Tizen.NUI/src/internal/Layouting/FlexLayout.cs @@ -1,18 +1,18 @@ -/** Copyright (c) 2018 Samsung Electronics Co., Ltd. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ +/* Copyright (c) 2018 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ using System.ComponentModel; namespace Tizen.NUI @@ -37,7 +37,7 @@ namespace Tizen.NUI return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } - protected virtual void Dispose(DisposeTypes type) + protected override void Dispose(DisposeTypes type) { if (disposed) { @@ -165,7 +165,7 @@ namespace Tizen.NUI CHILD_PROPERTY_END_INDEX = PropertyRanges.CHILD_PROPERTY_REGISTRATION_START_INDEX + 1000 } - internal class ChildProperty + internal new class ChildProperty { internal static readonly int FLEX = LayoutPINVOKE.FlexLayout_ChildProperty_FLEX_get(); internal static readonly int ALIGN_SELF = LayoutPINVOKE.FlexLayout_ChildProperty_ALIGN_SELF_get(); diff --git a/src/Tizen.NUI/src/internal/Layouting/GridLayout.cs b/src/Tizen.NUI/src/internal/Layouting/GridLayout.cs index 67a637526..fee9c62b7 100755 --- a/src/Tizen.NUI/src/internal/Layouting/GridLayout.cs +++ b/src/Tizen.NUI/src/internal/Layouting/GridLayout.cs @@ -1,18 +1,18 @@ -/** Copyright (c) 2018 Samsung Electronics Co., Ltd. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ +/* Copyright (c) 2018 Samsung Electronics Co., Ltd. +.* +.* Licensed under the Apache License, Version 2.0 (the "License"); +.* you may not use this file except in compliance with the License. +.* You may obtain a copy of the License at +.* +.* http://www.apache.org/licenses/LICENSE-2.0 +.* +.* Unless required by applicable law or agreed to in writing, software +.* distributed under the License is distributed on an "AS IS" BASIS, +.* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +.* See the License for the specific language governing permissions and +.* limitations under the License. +.* +.*/ using System.ComponentModel; diff --git a/src/Tizen.NUI/src/internal/Layouting/LayoutGroup.cs b/src/Tizen.NUI/src/internal/Layouting/LayoutGroup.cs index a30d7d07f..f96af9ddc 100755 --- a/src/Tizen.NUI/src/internal/Layouting/LayoutGroup.cs +++ b/src/Tizen.NUI/src/internal/Layouting/LayoutGroup.cs @@ -85,36 +85,36 @@ namespace Tizen.NUI protected override void OnMeasure(LayoutMeasureSpec widthMeasureSpec, LayoutMeasureSpec heightMeasureSpec) { Log.Info("NUI", "OnMeasure\n"); - LayoutLength childWidth = new LayoutLength(0); - LayoutLength childHeight = new LayoutLength(0); + LayoutLength childWidth = new LayoutLength( 0 ); + LayoutLength childHeight = new LayoutLength( 0 ); LayoutLength measuredWidth = childWidth; LayoutLength measuredHeight = childHeight; - for (uint i = 0; i < ChildCount; ++i) + for( uint i = 0; i < ChildCount; ++i ) { - var childLayout = GetChildAt(i); + var childLayout = GetChildAt( i ); - if (childLayout) + if( childLayout ) { - MeasureChild(childLayout, widthMeasureSpec, heightMeasureSpec); + MeasureChild( childLayout, widthMeasureSpec, heightMeasureSpec ); childWidth = childLayout.MeasuredWidth; childHeight = childLayout.MeasuredHeight; // Layout takes size of largest width and height dimension of children - measuredWidth.Value = System.Math.Max(measuredWidth.Value, childWidth.Value); - measuredHeight.Value = System.Math.Max(measuredHeight.Value, childHeight.Value); + measuredWidth.Value = System.Math.Max( measuredWidth.Value, childWidth.Value ); + measuredHeight.Value = System.Math.Max( measuredHeight.Value, childHeight.Value ); } } - if (0 == ChildCount) + if( 0 == ChildCount ) { // Must be a leaf as has no children - measuredWidth = GetDefaultSize(SuggestedMinimumWidth, widthMeasureSpec); - measuredHeight = GetDefaultSize(SuggestedMinimumHeight, heightMeasureSpec); + measuredWidth = GetDefaultSize( SuggestedMinimumWidth, widthMeasureSpec ); + measuredHeight = GetDefaultSize( SuggestedMinimumHeight, heightMeasureSpec ); } - SetMeasuredDimensions(new MeasuredSize(measuredWidth), - new MeasuredSize(measuredHeight)); + SetMeasuredDimensions( new MeasuredSize( measuredWidth ), + new MeasuredSize( measuredHeight ) ); } /// @@ -130,29 +130,29 @@ namespace Tizen.NUI { Log.Info("NUI", "OnLayout\n"); - for (uint i = 0; i < ChildCount; ++i) + for( uint i = 0; i < ChildCount; ++i ) { - var childLayout = GetChildAt(i); - if (childLayout) + var childLayout = GetChildAt( i ); + if( childLayout ) { View childOwner = childLayout.GetOwner(); // Use position if explicitly set to child otherwise will be top left. - var childLeft = new LayoutLength(childOwner.Position2D.X); - var childTop = new LayoutLength(childOwner.Position2D.Y); + var childLeft = new LayoutLength( childOwner.Position2D.X ); + var childTop = new LayoutLength( childOwner.Position2D.Y ); View owner = GetOwner(); - if (owner) + if ( owner ) { // Margin and Padding only supported when child anchor point is TOP_LEFT. - if (owner.PivotPoint == PivotPoint.TopLeft || (owner.PositionUsesPivotPoint == false)) + if ( owner.PivotPoint == PivotPoint.TopLeft || ( owner.PositionUsesPivotPoint == false ) ) { - childLeft = childLeft + owner.Padding.Start + childOwner.Margin.Start; - childTop = childTop + owner.Padding.Top + childOwner.Margin.Top; + childLeft = childLeft + owner.Padding.Start + childOwner.Margin.Start; + childTop = childTop + owner.Padding.Top + childOwner.Margin.Top; } } - childLayout.Layout(childLeft, childTop, childLeft + childLayout.MeasuredWidth, childTop + childLayout.MeasuredHeight); + childLayout.Layout( childLeft, childTop, childLeft + childLayout.MeasuredWidth, childTop + childLayout.MeasuredHeight ); } } } @@ -162,9 +162,9 @@ namespace Tizen.NUI /// /// The new size of the layout. /// The old size of the layout. - protected virtual void OnSizeChanged(LayoutSize newSize, LayoutSize oldSize) + protected override void OnSizeChanged(LayoutSize newSize, LayoutSize oldSize) { - + //Do nothing } /// diff --git a/src/Tizen.NUI/src/internal/Layouting/LayoutGroupWrapper.cs b/src/Tizen.NUI/src/internal/Layouting/LayoutGroupWrapper.cs index 288723f70..6ee5a09ef 100755 --- a/src/Tizen.NUI/src/internal/Layouting/LayoutGroupWrapper.cs +++ b/src/Tizen.NUI/src/internal/Layouting/LayoutGroupWrapper.cs @@ -68,7 +68,7 @@ namespace Tizen.NUI base.Dispose(type); } - public class ChildProperty + public new class ChildProperty { public static readonly int MARGIN_SPECIFICATION = LayoutPINVOKE.LayoutGroupWrapper_ChildProperty_MARGIN_SPECIFICATION_get(); } diff --git a/src/Tizen.NUI/src/internal/Layouting/LayoutGroupWrapperImpl.cs b/src/Tizen.NUI/src/internal/Layouting/LayoutGroupWrapperImpl.cs old mode 100644 new mode 100755 index 37bb101ba..cc869ace4 --- a/src/Tizen.NUI/src/internal/Layouting/LayoutGroupWrapperImpl.cs +++ b/src/Tizen.NUI/src/internal/Layouting/LayoutGroupWrapperImpl.cs @@ -28,9 +28,9 @@ namespace Tizen.NUI { private global::System.Runtime.InteropServices.HandleRef swigCPtr; - public delegate void OnMeasureDelegate(LayoutMeasureSpec widthMeasureSpec, LayoutMeasureSpec heightMeasureSpec); - public delegate void OnLayoutDelegate(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom); - public delegate void OnSizeChangedDelegate(LayoutSize newSize, LayoutSize oldSize); + public new delegate void OnMeasureDelegate(LayoutMeasureSpec widthMeasureSpec, LayoutMeasureSpec heightMeasureSpec); + public new delegate void OnLayoutDelegate(bool changed, LayoutLength left, LayoutLength top, LayoutLength right, LayoutLength bottom); + public new delegate void OnSizeChangedDelegate(LayoutSize newSize, LayoutSize oldSize); public delegate void OnChildAddDelegate(LayoutItemWrapperImpl child); public delegate void OnChildRemoveDelegate(LayoutItemWrapperImpl child); public delegate void DoInitializeDelegate(); @@ -39,9 +39,9 @@ namespace Tizen.NUI public delegate void MeasureChildDelegate(LayoutItem child, LayoutMeasureSpec parentWidthMeasureSpec, LayoutMeasureSpec parentHeightMeasureSpec); public delegate void MeasureChildWithMarginsDelegate(LayoutItem child, LayoutMeasureSpec parentWidthMeasureSpec, LayoutLength widthUsed, LayoutMeasureSpec parentHeightMeasureSpec, LayoutLength heightUsed); - public OnMeasureDelegate OnMeasure; - public OnLayoutDelegate OnLayout; - public OnSizeChangedDelegate OnSizeChanged; + public new OnMeasureDelegate OnMeasure; + public new OnLayoutDelegate OnLayout; + public new OnSizeChangedDelegate OnSizeChanged; public OnChildAddDelegate OnChildAdd; public OnChildRemoveDelegate OnChildRemove; public DoInitializeDelegate DoInitialize; @@ -191,18 +191,21 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - private void SwigDirectorConnect() + private new void SwigDirectorConnect() { base.SwigDirectorConnect(); //swigDelegate0 = new SwigDelegateLayoutGroupWrapperImpl_0(SwigDirectorGetParent); + swigDelegate0 = null; swigDelegate3 = new SwigDelegateLayoutGroupWrapperImpl_3(SwigDirectorOnMeasure); swigDelegate4 = new SwigDelegateLayoutGroupWrapperImpl_4(SwigDirectorOnLayout); swigDelegate5 = new SwigDelegateLayoutGroupWrapperImpl_5(SwigDirectorOnSizeChanged); + swigDelegate6 = null; swigDelegate7 = new SwigDelegateLayoutGroupWrapperImpl_7(SwigDirectorOnChildAdd); swigDelegate8 = new SwigDelegateLayoutGroupWrapperImpl_8(SwigDirectorOnChildRemove); swigDelegate9 = new SwigDelegateLayoutGroupWrapperImpl_9(SwigDirectorDoInitialize); swigDelegate10 = new SwigDelegateLayoutGroupWrapperImpl_10(SwigDirectorDoRegisterChildProperties); + swigDelegate11 = null; swigDelegate12 = new SwigDelegateLayoutGroupWrapperImpl_12(SwigDirectorMeasureChildren); swigDelegate13 = new SwigDelegateLayoutGroupWrapperImpl_13(SwigDirectorMeasureChild); swigDelegate14 = new SwigDelegateLayoutGroupWrapperImpl_14(SwigDirectorMeasureChildWithMargins); diff --git a/src/Tizen.NUI/src/internal/Layouting/LayoutItemWrapperImpl.cs b/src/Tizen.NUI/src/internal/Layouting/LayoutItemWrapperImpl.cs old mode 100644 new mode 100755 index 29c4f68db..e347ef468 --- a/src/Tizen.NUI/src/internal/Layouting/LayoutItemWrapperImpl.cs +++ b/src/Tizen.NUI/src/internal/Layouting/LayoutItemWrapperImpl.cs @@ -258,9 +258,13 @@ namespace Tizen.NUI protected void SwigDirectorConnect() { //swigDelegate0 = new SwigDelegateLayoutItemWrapperImpl_0(SwigDirectorGetParent); + swigDelegate0 = null; + swigDelegate1 = null; + swigDelegate2 = null; swigDelegate3 = new SwigDelegateLayoutItemWrapperImpl_3(SwigDirectorOnMeasure); swigDelegate4 = new SwigDelegateLayoutItemWrapperImpl_4(SwigDirectorOnLayout); swigDelegate5 = new SwigDelegateLayoutItemWrapperImpl_5(SwigDirectorOnSizeChanged); + swigDelegate6 = null; LayoutPINVOKE.LayoutItemWrapperImpl_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6); } diff --git a/src/Tizen.NUI/src/internal/Layouting/LayoutLength.cs b/src/Tizen.NUI/src/internal/Layouting/LayoutLength.cs index 422aa43c3..91567b82d 100755 --- a/src/Tizen.NUI/src/internal/Layouting/LayoutLength.cs +++ b/src/Tizen.NUI/src/internal/Layouting/LayoutLength.cs @@ -169,6 +169,32 @@ namespace Tizen.NUI return !r1.EqualTo(r2); } + /// + /// Determines whether the specified object is equal to the current object. + /// + /// The object to compare with the current object. + /// true if the specified object is equal to the current object; otherwise, false. + public override bool Equals(System.Object obj) + { + LayoutLength layoutLength = obj as LayoutLength; + bool equal = false; + if (Value == layoutLength?.Value) + { + equal = true; + } + return equal; + } + + /// + /// Gets the the hash code of this LayoutLength. + /// + /// The Hash Code. + /// 5 + public override int GetHashCode() + { + return Value.GetHashCode(); + } + private bool EqualTo(LayoutLength rhs) { bool ret = LayoutPINVOKE.LayoutLength_EqualTo__SWIG_0(swigCPtr, LayoutLength.getCPtr(rhs)); diff --git a/src/Tizen.NUI/src/internal/Layouting/LayoutMeasureSpec.cs b/src/Tizen.NUI/src/internal/Layouting/LayoutMeasureSpec.cs index 9b9408ad4..fdecacf05 100755 --- a/src/Tizen.NUI/src/internal/Layouting/LayoutMeasureSpec.cs +++ b/src/Tizen.NUI/src/internal/Layouting/LayoutMeasureSpec.cs @@ -81,6 +81,32 @@ namespace Tizen.NUI return !r1.EqualTo(r2); } + /// + /// Determines whether the specified object is equal to the current object. + /// + /// The object to compare with the current object. + /// true if the specified object is equal to the current object; otherwise, false. + public override bool Equals(object obj) + { + LayoutMeasureSpec layoutMeasureSpec = obj as LayoutMeasureSpec; + bool equal = false; + if (Size == layoutMeasureSpec?.Size && Mode == layoutMeasureSpec?.Mode) + { + equal = true; + } + return equal; + } + + /// + /// Gets the the hash code of this LayoutMeasureSpec. + /// + /// The Hash Code. + /// 5 + public override int GetHashCode() + { + return Mode.GetHashCode(); + } + private bool EqualTo(LayoutMeasureSpec value) { bool ret = LayoutPINVOKE.MeasureSpec_EqualTo(swigCPtr, LayoutMeasureSpec.getCPtr(value)); diff --git a/src/Tizen.NUI/src/internal/Layouting/LinearLayout.cs b/src/Tizen.NUI/src/internal/Layouting/LinearLayout.cs index 3930f1a93..5f33344db 100755 --- a/src/Tizen.NUI/src/internal/Layouting/LinearLayout.cs +++ b/src/Tizen.NUI/src/internal/Layouting/LinearLayout.cs @@ -1,18 +1,18 @@ -/** Copyright (c) 2018 Samsung Electronics Co., Ltd. -* -* Licensed under the Apache License, Version 2.0 (the "License"); -* you may not use this file except in compliance with the License. -* You may obtain a copy of the License at -* -* http://www.apache.org/licenses/LICENSE-2.0 -* -* Unless required by applicable law or agreed to in writing, software -* distributed under the License is distributed on an "AS IS" BASIS, -* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -* See the License for the specific language governing permissions and -* limitations under the License. -* -*/ +/* Copyright (c) 2018 Samsung Electronics Co., Ltd. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * + */ using System.ComponentModel; namespace Tizen.NUI @@ -64,7 +64,7 @@ namespace Tizen.NUI base.Dispose(type); } - internal static class ChildProperty + internal static new class ChildProperty { internal static readonly int WEIGHT = LayoutPINVOKE.LinearLayout_ChildProperty_WEIGHT_get(); } @@ -73,7 +73,7 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - public new static LinearLayout DownCast(BaseHandle handle) + public static LinearLayout DownCast(BaseHandle handle) { LinearLayout ret = new LinearLayout(LayoutPINVOKE.LinearLayout_DownCast(BaseHandle.getCPtr(handle)), true); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); diff --git a/src/Tizen.NUI/src/internal/Layouting/MeasuredSize.cs b/src/Tizen.NUI/src/internal/Layouting/MeasuredSize.cs index f3bebb09e..58db9a9e3 100755 --- a/src/Tizen.NUI/src/internal/Layouting/MeasuredSize.cs +++ b/src/Tizen.NUI/src/internal/Layouting/MeasuredSize.cs @@ -128,6 +128,35 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Determines whether the specified object is equal to the current object. + /// + /// The object to compare with the current object. + /// true if the specified object is equal to the current object; otherwise, false. + public override bool Equals(object obj) + { + MeasuredSize measuredSize = obj as MeasuredSize; + bool equal = false; + if ( measuredSize != null ) + { + if ( Size == measuredSize.Size && State == measuredSize.State) + { + equal = true; + } + } + return equal; + } + + /// + /// Gets the the hash code of this MeasuredSize. + /// + /// The Hash Code. + /// 5 + public override int GetHashCode() + { + return State.GetHashCode(); + } + private bool EqualTo(MeasuredSize value) { bool ret = LayoutPINVOKE.MeasuredSize_EqualTo(swigCPtr, MeasuredSize.getCPtr(value)); @@ -142,16 +171,6 @@ namespace Tizen.NUI return ret; } - public static bool operator ==(MeasuredSize r1, MeasuredSize r2) - { - return r1.EqualTo(r2); - } - - public static bool operator !=(MeasuredSize r1, MeasuredSize r2) - { - return r1.NotEqualTo(r2); - } - public MeasuredSize.StateType State { get diff --git a/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs b/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs index 8e47d7de2..3f9b2a915 100755 --- a/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs +++ b/src/Tizen.NUI/src/internal/NDalicPINVOKE.cs @@ -36828,24 +36828,6 @@ namespace Tizen.NUI } } - [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_Window_SetPositionSize")] - public static extern void Window_SetPositionSize_gl(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_Window_SetPositionSize")] - public static extern void Window_SetPositionSize_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - - public static void Window_SetPositionSize(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2) - { - if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) - { - Window_SetPositionSize_vulkan(jarg1, jarg2); - } - else - { - Window_SetPositionSize_gl(jarg1, jarg2); - } - } - [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_Application_New__SWIG_0")] public static extern global::System.IntPtr Application_New__SWIG_0_gl(); @@ -67239,93 +67221,453 @@ namespace Tizen.NUI } } - [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_new_WebViewSignalProxy_PageLoadStarted")] - public static extern global::System.IntPtr new_WebViewSignalProxy_PageLoadStarted_gl(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewSignal_Empty")] + public static extern bool WebViewSignal_Empty_gl(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewSignal_Empty")] + public static extern bool WebViewSignal_Empty_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1); + + public static bool WebViewSignal_Empty(global::System.Runtime.InteropServices.HandleRef jarg1) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + return WebViewSignal_Empty_vulkan(jarg1); + } + else + { + return WebViewSignal_Empty_gl(jarg1); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewSignal_GetConnectionCount")] + public static extern uint WebViewSignal_GetConnectionCount_gl(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewSignal_GetConnectionCount")] + public static extern uint WebViewSignal_GetConnectionCount_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1); + + public static uint WebViewSignal_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + return WebViewSignal_GetConnectionCount_vulkan(jarg1); + } + else + { + return WebViewSignal_GetConnectionCount_gl(jarg1); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewSignal_Connect")] + public static extern void WebViewSignal_Connect_gl(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewSignal_Connect")] + public static extern void WebViewSignal_Connect_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + public static void WebViewSignal_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + WebViewSignal_Connect_vulkan(jarg1, jarg2); + } + else + { + WebViewSignal_Connect_gl(jarg1, jarg2); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewSignal_Disconnect")] + public static extern void WebViewSignal_Disconnect_gl(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewSignal_Disconnect")] + public static extern void WebViewSignal_Disconnect_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + public static void WebViewSignal_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + WebViewSignal_Disconnect_vulkan(jarg1, jarg2); + } + else + { + WebViewSignal_Disconnect_gl(jarg1, jarg2); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewSignal_Emit")] + public static extern void WebViewSignal_Emit_gl(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_new_WebViewSignalProxy_PageLoadStarted")] - public static extern global::System.IntPtr new_WebViewSignalProxy_PageLoadStarted_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewSignal_Emit")] + public static extern void WebViewSignal_Emit_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); - public static global::System.IntPtr new_WebViewSignalProxy_PageLoadStarted(global::System.Runtime.InteropServices.HandleRef jarg1) + public static void WebViewSignal_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2) { if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) { - return new_WebViewSignalProxy_PageLoadStarted_vulkan(jarg1); + WebViewSignal_Emit_vulkan(jarg1, jarg2); } else { - return new_WebViewSignalProxy_PageLoadStarted_gl(jarg1); + WebViewSignal_Emit_gl(jarg1, jarg2); } } - [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_new_WebViewSignalProxy_PageLoadFinished")] - public static extern global::System.IntPtr new_WebViewSignalProxy_PageLoadFinished_gl(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_new_WebViewSignal")] + public static extern global::System.IntPtr new_WebViewSignal_gl(); - [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_new_WebViewSignalProxy_PageLoadFinished")] - public static extern global::System.IntPtr new_WebViewSignalProxy_PageLoadFinished_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_new_WebViewSignal")] + public static extern global::System.IntPtr new_WebViewSignal_vulkan(); - public static global::System.IntPtr new_WebViewSignalProxy_PageLoadFinished(global::System.Runtime.InteropServices.HandleRef jarg1) + public static global::System.IntPtr new_WebViewSignal() { if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) { - return new_WebViewSignalProxy_PageLoadFinished_vulkan(jarg1); + return new_WebViewSignal_vulkan(); } else { - return new_WebViewSignalProxy_PageLoadFinished_gl(jarg1); + return new_WebViewSignal_gl(); } } - [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_delete_WebViewSignalProxy")] - public static extern void delete_WebViewSignalProxy_gl(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_delete_WebViewSignal")] + public static extern void delete_WebViewSignal_gl(global::System.Runtime.InteropServices.HandleRef jarg1); - [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_delete_WebViewSignalProxy")] - public static extern void delete_WebViewSignalProxy_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1); + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_delete_WebViewSignal")] + public static extern void delete_WebViewSignal_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1); - public static void delete_WebViewSignalProxy(global::System.Runtime.InteropServices.HandleRef jarg1) + public static void delete_WebViewSignal(global::System.Runtime.InteropServices.HandleRef jarg1) { if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) { - delete_WebViewSignalProxy_vulkan(jarg1); + delete_WebViewSignal_vulkan(jarg1); } else { - delete_WebViewSignalProxy_gl(jarg1); + delete_WebViewSignal_gl(jarg1); } } - [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewSignalProxy_Connect")] - public static extern void WebViewSignalProxy_Connect_gl(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_New")] + public static extern global::System.IntPtr WebViewLite_New_gl(); - [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewSignalProxy_Connect")] - public static extern void WebViewSignalProxy_Connect_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_New")] + public static extern global::System.IntPtr WebViewLite_New_vulkan(); - public static void WebViewSignalProxy_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2) + public static global::System.IntPtr WebViewLite_New() { if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) { - WebViewSignalProxy_Connect_vulkan(jarg1, jarg2); + return WebViewLite_New_vulkan(); } else { - WebViewSignalProxy_Connect_gl(jarg1, jarg2); + return WebViewLite_New_gl(); } } - [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewSignalProxy_Disconnect")] - public static extern void WebViewSignalProxy_Disconnect_gl(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_new_WebViewLite__SWIG_0")] + public static extern global::System.IntPtr new_WebViewLite__SWIG_0_gl(); - [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewSignalProxy_Disconnect")] - public static extern void WebViewSignalProxy_Disconnect_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_new_WebViewLite__SWIG_0")] + public static extern global::System.IntPtr new_WebViewLite__SWIG_0_vulkan(); - public static void WebViewSignalProxy_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2) + public static global::System.IntPtr new_WebViewLite__SWIG_0() { if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) { - WebViewSignalProxy_Disconnect_vulkan(jarg1, jarg2); + return new_WebViewLite__SWIG_0_vulkan(); } else { - WebViewSignalProxy_Disconnect_gl(jarg1, jarg2); + return new_WebViewLite__SWIG_0_gl(); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_delete_WebViewLite")] + public static extern void delete_WebViewLite_gl(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_delete_WebViewLite")] + public static extern void delete_WebViewLite_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1); + + public static void delete_WebViewLite(global::System.Runtime.InteropServices.HandleRef jarg1) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + delete_WebViewLite_vulkan(jarg1); + } + else + { + delete_WebViewLite_gl(jarg1); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_new_WebViewLite__SWIG_1")] + public static extern global::System.IntPtr new_WebViewLite__SWIG_1_gl(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_new_WebViewLite__SWIG_1")] + public static extern global::System.IntPtr new_WebViewLite__SWIG_1_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1); + + public static global::System.IntPtr new_WebViewLite__SWIG_1(global::System.Runtime.InteropServices.HandleRef jarg1) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + return new_WebViewLite__SWIG_1_vulkan(jarg1); + } + else + { + return new_WebViewLite__SWIG_1_gl(jarg1); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_Assign")] + public static extern global::System.IntPtr WebViewLite_Assign_gl(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_Assign")] + public static extern global::System.IntPtr WebViewLite_Assign_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + public static global::System.IntPtr WebViewLite_Assign(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + return WebViewLite_Assign_vulkan(jarg1, jarg2); + } + else + { + return WebViewLite_Assign_gl(jarg1, jarg2); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_DownCast")] + public static extern global::System.IntPtr WebViewLite_DownCast_gl(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_DownCast")] + public static extern global::System.IntPtr WebViewLite_DownCast_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1); + + public static global::System.IntPtr WebViewLite_DownCast(global::System.Runtime.InteropServices.HandleRef jarg1) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + return WebViewLite_DownCast_vulkan(jarg1); + } + else + { + return WebViewLite_DownCast_gl(jarg1); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_CreateInstance")] + public static extern void WebViewLite_CreateInstance_gl(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3, int jarg4, int jarg5, string jarg6, string jarg7); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_CreateInstance")] + public static extern void WebViewLite_CreateInstance_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3, int jarg4, int jarg5, string jarg6, string jarg7); + + public static void WebViewLite_CreateInstance(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2, int jarg3, int jarg4, int jarg5, string jarg6, string jarg7) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + WebViewLite_CreateInstance_vulkan(jarg1, jarg2, jarg3, jarg4, jarg5, jarg6, jarg7); + } + else + { + WebViewLite_CreateInstance_gl(jarg1, jarg2, jarg3, jarg4, jarg5, jarg6, jarg7); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_DestroyInstance")] + public static extern void WebViewLite_DestroyInstance_gl(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_DestroyInstance")] + public static extern void WebViewLite_DestroyInstance_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1); + + public static void WebViewLite_DestroyInstance(global::System.Runtime.InteropServices.HandleRef jarg1) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + WebViewLite_DestroyInstance_vulkan(jarg1); + } + else + { + WebViewLite_DestroyInstance_gl(jarg1); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_LoadHtml")] + public static extern void WebViewLite_LoadHtml_gl(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_LoadHtml")] + public static extern void WebViewLite_LoadHtml_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2); + + public static void WebViewLite_LoadHtml(global::System.Runtime.InteropServices.HandleRef jarg1, string jarg2) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + WebViewLite_LoadHtml_vulkan(jarg1, jarg2); + } + else + { + WebViewLite_LoadHtml_gl(jarg1, jarg2); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_FinishedSignal")] + public static extern global::System.IntPtr WebViewLite_FinishedSignal_gl(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_FinishedSignal")] + public static extern global::System.IntPtr WebViewLite_FinishedSignal_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1); + + public static global::System.IntPtr WebViewLite_FinishedSignal(global::System.Runtime.InteropServices.HandleRef jarg1) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + return WebViewLite_FinishedSignal_vulkan(jarg1); + } + else + { + return WebViewLite_FinishedSignal_gl(jarg1); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLiteSignal_Empty")] + public static extern bool WebViewLiteSignal_Empty_gl(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLiteSignal_Empty")] + public static extern bool WebViewLiteSignal_Empty_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1); + + public static bool WebViewLiteSignal_Empty(global::System.Runtime.InteropServices.HandleRef jarg1) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + return WebViewLiteSignal_Empty_vulkan(jarg1); + } + else + { + return WebViewLiteSignal_Empty_gl(jarg1); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLiteSignal_GetConnectionCount")] + public static extern uint WebViewLiteSignal_GetConnectionCount_gl(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLiteSignal_GetConnectionCount")] + public static extern uint WebViewLiteSignal_GetConnectionCount_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1); + + public static uint WebViewLiteSignal_GetConnectionCount(global::System.Runtime.InteropServices.HandleRef jarg1) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + return WebViewLiteSignal_GetConnectionCount_vulkan(jarg1); + } + else + { + return WebViewLiteSignal_GetConnectionCount_gl(jarg1); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLiteSignal_Connect")] + public static extern void WebViewLiteSignal_Connect_gl(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLiteSignal_Connect")] + public static extern void WebViewLiteSignal_Connect_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + public static void WebViewLiteSignal_Connect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + WebViewLiteSignal_Connect_vulkan(jarg1, jarg2); + } + else + { + WebViewLiteSignal_Connect_gl(jarg1, jarg2); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLiteSignal_Disconnect")] + public static extern void WebViewLiteSignal_Disconnect_gl(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLiteSignal_Disconnect")] + public static extern void WebViewLiteSignal_Disconnect_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + public static void WebViewLiteSignal_Disconnect(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + WebViewLiteSignal_Disconnect_vulkan(jarg1, jarg2); + } + else + { + WebViewLiteSignal_Disconnect_gl(jarg1, jarg2); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLiteSignal_Emit")] + public static extern void WebViewLiteSignal_Emit_gl(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLiteSignal_Emit")] + public static extern void WebViewLiteSignal_Emit_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2); + + public static void WebViewLiteSignal_Emit(global::System.Runtime.InteropServices.HandleRef jarg1, global::System.Runtime.InteropServices.HandleRef jarg2) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + WebViewLiteSignal_Emit_vulkan(jarg1, jarg2); + } + else + { + WebViewLiteSignal_Emit_gl(jarg1, jarg2); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_new_WebViewLiteSignal")] + public static extern global::System.IntPtr new_WebViewLiteSignal_gl(); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_new_WebViewLiteSignal")] + public static extern global::System.IntPtr new_WebViewLiteSignal_vulkan(); + + public static global::System.IntPtr new_WebViewLiteSignal() + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + return new_WebViewLiteSignal_vulkan(); + } + else + { + return new_WebViewLiteSignal_gl(); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_delete_WebViewLiteSignal")] + public static extern void delete_WebViewLiteSignal_gl(global::System.Runtime.InteropServices.HandleRef jarg1); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_delete_WebViewLiteSignal")] + public static extern void delete_WebViewLiteSignal_vulkan(global::System.Runtime.InteropServices.HandleRef jarg1); + + public static void delete_WebViewLiteSignal(global::System.Runtime.InteropServices.HandleRef jarg1) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + delete_WebViewLiteSignal_vulkan(jarg1); + } + else + { + delete_WebViewLiteSignal_gl(jarg1); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_SWIGUpcast")] + public static extern global::System.IntPtr WebViewLite_SWIGUpcast_gl(global::System.IntPtr jarg1); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_WebViewLite_SWIGUpcast")] + public static extern global::System.IntPtr WebViewLite_SWIGUpcast_vulkan(global::System.IntPtr jarg1); + + public static global::System.IntPtr WebViewLite_SWIGUpcast(global::System.IntPtr jarg1) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + return WebViewLite_SWIGUpcast_vulkan(jarg1); + } + else + { + return WebViewLite_SWIGUpcast_gl(jarg1); } } @@ -68213,6 +68555,42 @@ namespace Tizen.NUI } } + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_SetMaxTextureSize")] + public static extern void SetMaxTextureSize_gl(uint jarg1); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_SetMaxTextureSize")] + public static extern void SetMaxTextureSize_vulkan(uint jarg1); + + public static void SetMaxTextureSize(uint jarg1) + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + SetMaxTextureSize_vulkan(jarg1); + } + else + { + SetMaxTextureSize_gl(jarg1); + } + } + + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_GetMaxTextureSize")] + public static extern uint GetMaxTextureSize_gl(); + + [global::System.Runtime.InteropServices.DllImport(Graphics.VulkanCSharpBinder, EntryPoint = "CSharp_Dali_GetMaxTextureSize")] + public static extern uint GetMaxTextureSize_vulkan(); + + public static uint GetMaxTextureSize() + { + if (Tizen.NUI.Graphics.Backend == Tizen.NUI.Graphics.BackendType.Vulkan) + { + return GetMaxTextureSize_vulkan(); + } + else + { + return GetMaxTextureSize_gl(); + } + } + [global::System.Runtime.InteropServices.DllImport(Graphics.GlesCSharpBinder, EntryPoint = "CSharp_Dali_GetEnvironmentVariable")] public static extern string EnvironmentVariable_GetEnvironmentVariable_gl(string jarg1); diff --git a/src/Tizen.NUI/src/internal/NUICoreBackend.cs b/src/Tizen.NUI/src/internal/NUICoreBackend.cs index f7c31acaa..336a490a1 100755 --- a/src/Tizen.NUI/src/internal/NUICoreBackend.cs +++ b/src/Tizen.NUI/src/internal/NUICoreBackend.cs @@ -147,9 +147,7 @@ namespace Tizen.NUI _application.AppControl += OnAppControl; _application.MainLoop(); - _application.Dispose(); - } /// @@ -161,7 +159,7 @@ namespace Tizen.NUI { Log.Info("NUI", "NUICorebackend OnRegionChanged Called"); var handler = Handlers[EventType.RegionFormatChanged] as Action; - handler?.Invoke( new RegionFormatChangedEventArgs((source as Application)?.GetRegion())); + handler?.Invoke( new RegionFormatChangedEventArgs(e.Application.GetRegion())); } /// @@ -203,7 +201,7 @@ namespace Tizen.NUI { Log.Info("NUI", "NUICorebackend OnLanguageChanged Called"); var handler = Handlers[EventType.LocaleChanged] as Action; - handler?.Invoke( new LocaleChangedEventArgs((source as Application)?.GetLanguage())); + handler?.Invoke( new LocaleChangedEventArgs(e.Application.GetLanguage())); } /// diff --git a/src/Tizen.NUI/src/internal/VersionCheck.cs b/src/Tizen.NUI/src/internal/VersionCheck.cs index cc597b516..33981fd4c 100755 --- a/src/Tizen.NUI/src/internal/VersionCheck.cs +++ b/src/Tizen.NUI/src/internal/VersionCheck.cs @@ -27,7 +27,7 @@ namespace Tizen.NUI //from dali_1.3.28 : NUI internal API version 502 //from dali_1.3.34 : NUI internal API version 503 //from dali_1.3.41 : NUI internal API version 504 - //from dali_1.3.48 : NUI internal API version 505 + //from dali_1.3.43 : NUI internal API version 505 public const int nuiAPIVer = 505; public const int reservedVer1 = 0; public const int reservedVer2 = 0; @@ -42,7 +42,8 @@ namespace Tizen.NUI { if (NDalicManualPINVOKE.InternalAPIVersionCheck(ref ver1, ref ver2, ref ver3) == true) { - if (ver1 != nuiAPIVer) + //temporary permit 504 version. the 504 will be removed. + if (ver1 != nuiAPIVer && ver1 != 504) { NUILog.Error($"NUI API version mismatch error! NUI API Version: ({nuiAPIVer}) but read version from native: ({ver1}.{ver2}.{ver3})"); throw new System.InvalidOperationException($"NUI API version mismatch error! NUI API version should be ({nuiAPIVer}) but read version from native: ({ver1}.{ver2}.{ver3})"); diff --git a/src/Tizen.NUI/src/internal/WatchApplication.cs b/src/Tizen.NUI/src/internal/WatchApplication.cs index 921573e36..32f1a73cd 100755 --- a/src/Tizen.NUI/src/internal/WatchApplication.cs +++ b/src/Tizen.NUI/src/internal/WatchApplication.cs @@ -209,10 +209,13 @@ namespace Tizen.NUI private void OnTimeTick(IntPtr application, IntPtr watchTime) { TimeTickEventArgs e = new TimeTickEventArgs(); - e.Application = this; - e.WatchTime = WatchTime.GetWatchTimeFromPtr(watchTime); - + using (e.Application = Application.GetApplicationFromPtr(application)) + { + using (e.WatchTime = WatchTime.GetWatchTimeFromPtr(watchTime)) + { _timeTickEventHandler?.Invoke(this, e); + } + } } @@ -286,10 +289,14 @@ namespace Tizen.NUI { AmbientTickEventArgs e = new AmbientTickEventArgs(); - e.Application = this; - e.WatchTime = WatchTime.GetWatchTimeFromPtr(watchTime); + using (e.Application = Application.GetApplicationFromPtr(application)) + { + using (e.WatchTime = WatchTime.GetWatchTimeFromPtr(watchTime)) + { _ambientTickEventHandler?.Invoke(this, e); } + } + } internal WatchTimeSignal AmbientTickSignal() { @@ -360,10 +367,12 @@ namespace Tizen.NUI private void OnAmbientChanged(IntPtr application, bool changed) { AmbientChangedEventArgs e = new AmbientChangedEventArgs(); - e.Application = this; + using (e.Application = Application.GetApplicationFromPtr(application)) + { e.Changed = changed; _ambientChangedEventHandler?.Invoke(this, e); } + } internal WatchBoolSignal AmbientChangedSignal() { diff --git a/src/Tizen.NUI/src/internal/WebView.cs b/src/Tizen.NUI/src/internal/WebView.cs index 8c111969f..4feefd439 100755 --- a/src/Tizen.NUI/src/internal/WebView.cs +++ b/src/Tizen.NUI/src/internal/WebView.cs @@ -32,16 +32,6 @@ namespace Tizen.NUI internal WebView(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.WebView_SWIGUpcast(cPtr), cMemoryOwn) { swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); - - InitializeSignals(); - } - - private global::System.Runtime.InteropServices.HandleRef pageLoadStartedSignalProxy; - private global::System.Runtime.InteropServices.HandleRef pageLoadFinishedSignalProxy; - private void InitializeSignals() - { - pageLoadStartedSignalProxy = new global::System.Runtime.InteropServices.HandleRef(this, NDalicPINVOKE.new_WebViewSignalProxy_PageLoadStarted(swigCPtr)); - pageLoadFinishedSignalProxy = new global::System.Runtime.InteropServices.HandleRef(this, NDalicPINVOKE.new_WebViewSignalProxy_PageLoadFinished(swigCPtr)); } internal static global::System.Runtime.InteropServices.HandleRef getCPtr(WebView obj) @@ -73,7 +63,7 @@ namespace Tizen.NUI //You should not access any managed member here except static instance. //because the execution order of Finalizes is non-deterministic. - DisposeSignals(); + DisConnectFromSignals(); if (swigCPtr.Handle != global::System.IntPtr.Zero) { @@ -88,27 +78,17 @@ namespace Tizen.NUI base.Dispose(type); } - private void DisposeSignals() + private void DisConnectFromSignals() { - if (pageLoadStartedSignalProxy.Handle != global::System.IntPtr.Zero) - { - if (pageLoadStartedCallback != null) - { - WebViewProxyDisconnect(pageLoadStartedSignalProxy, pageLoadStartedCallback); - } - NDalicPINVOKE.delete_WebViewSignalProxy(pageLoadStartedSignalProxy); - pageLoadStartedSignalProxy = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } - - if (pageLoadFinishedSignalProxy.Handle != global::System.IntPtr.Zero) - { - if (pageLoadFinishedCallback != null) - { - WebViewProxyDisconnect(pageLoadFinishedSignalProxy, pageLoadFinishedCallback); - } - NDalicPINVOKE.delete_WebViewSignalProxy(pageLoadFinishedSignalProxy); - pageLoadFinishedSignalProxy = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); - } + // Save current CPtr. + global::System.Runtime.InteropServices.HandleRef currentCPtr = swigCPtr; + + // Use BaseHandle CPtr as current might have been deleted already in derived classes. + swigCPtr = GetBaseHandleCPtrHandleRef; + + // BaseHandle CPtr is used in Registry and there is danger of deletion if we keep using it here. + // Restore current CPtr. + swigCPtr = currentCPtr; } /// @@ -156,149 +136,6 @@ namespace Tizen.NUI return ret; } - /// - /// Event arguments that passed via the webview signal. - /// - public class WebViewEventArgs : EventArgs - { - private WebView _webView; - /// - /// The view for displaying webpages. - /// - public WebView WebView - { - get - { - return _webView; - } - set - { - _webView = value; - } - } - - private string _pageUrl; - /// - /// The url string of current webpage. - /// - public string PageUrl - { - get - { - return _pageUrl; - } - set - { - _pageUrl = value; - } - } - } - - [UnmanagedFunctionPointer(CallingConvention.StdCall)] - private delegate void WebViewCallbackDelegate(IntPtr data, string pageUrl); - - private void WebViewProxyConnect(global::System.Runtime.InteropServices.HandleRef proxy, System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.WebViewSignalProxy_Connect(proxy, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - - private void WebViewProxyDisconnect(global::System.Runtime.InteropServices.HandleRef proxy, System.Delegate func) - { - System.IntPtr ip = System.Runtime.InteropServices.Marshal.GetFunctionPointerForDelegate(func); - { - NDalicPINVOKE.WebViewSignalProxy_Disconnect(proxy, new System.Runtime.InteropServices.HandleRef(this, ip)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - } - } - - private EventHandler pageLoadStartedEventHandler; - private WebViewCallbackDelegate pageLoadStartedCallback; - - /// - /// Event for the PageLoadStarted signal which can be used to subscribe or unsubscribe the event handler.
- /// This signal is emitted when page loading has started.
- ///
- [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler PageLoadStarted - { - add - { - if (pageLoadStartedEventHandler == null) - { - pageLoadStartedCallback = (OnPageLoadStarted); - WebViewProxyConnect(pageLoadStartedSignalProxy, pageLoadStartedCallback); - } - pageLoadStartedEventHandler += value; - } - remove - { - pageLoadStartedEventHandler -= value; - if (pageLoadStartedEventHandler == null && pageLoadStartedCallback != null) - { - WebViewProxyDisconnect(pageLoadStartedSignalProxy, pageLoadStartedCallback); - } - } - } - - private void OnPageLoadStarted(IntPtr data, string pageUrl) - { - WebViewEventArgs e = new WebViewEventArgs(); - - e.WebView = Registry.GetManagedBaseHandleFromNativePtr(data) as WebView; - e.PageUrl = pageUrl; - - if (pageLoadStartedEventHandler != null) - { - pageLoadStartedEventHandler(this, e); - } - } - - private EventHandler pageLoadFinishedEventHandler; - private WebViewCallbackDelegate pageLoadFinishedCallback; - - /// - /// Event for the PageLoadFinished signal which can be used to subscribe or unsubscribe the event handler.
- /// This signal is emitted when page loading has finished.
- ///
- [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler PageLoadFinished - { - add - { - if (pageLoadFinishedEventHandler == null) - { - pageLoadFinishedCallback = (OnPageLoadFinished); - WebViewProxyConnect(pageLoadFinishedSignalProxy, pageLoadFinishedCallback); - } - pageLoadFinishedEventHandler += value; - } - remove - { - pageLoadFinishedEventHandler -= value; - if (pageLoadFinishedEventHandler == null && pageLoadFinishedCallback != null) - { - WebViewProxyDisconnect(pageLoadFinishedSignalProxy, pageLoadFinishedCallback); - } - } - } - - private void OnPageLoadFinished(IntPtr data, string pageUrl) - { - WebViewEventArgs e = new WebViewEventArgs(); - - e.WebView = Registry.GetManagedBaseHandleFromNativePtr(data) as WebView; - e.PageUrl = pageUrl; - - if (pageLoadFinishedEventHandler != null) - { - pageLoadFinishedEventHandler(this, e); - } - } - /// /// Loads a html. /// The path of Web diff --git a/src/Tizen.NUI/src/internal/Xaml/ApplyPropertiesVisitor.cs b/src/Tizen.NUI/src/internal/Xaml/ApplyPropertiesVisitor.cs index a174eff15..d7302a13d 100755 --- a/src/Tizen.NUI/src/internal/Xaml/ApplyPropertiesVisitor.cs +++ b/src/Tizen.NUI/src/internal/Xaml/ApplyPropertiesVisitor.cs @@ -100,8 +100,6 @@ namespace Tizen.NUI.Xaml if (propertyName != XmlName.Empty || TryGetPropertyName(node, parentNode, out propertyName)) { if (Skips.Contains(propertyName)) return; - if (parentElement == null) - return; if (parentElement.SkipProperties.Contains(propertyName)) return; @@ -236,8 +234,10 @@ namespace Tizen.NUI.Xaml if (value.GetType().GetTypeInfo().GetCustomAttribute() == null) serviceProvider = new XamlServiceProvider(node, Context); - if (serviceProvider != null && serviceProvider.IProvideValueTarget != null && propertyName != XmlName.Empty) + if (serviceProvider != null && propertyName != XmlName.Empty) + { ((XamlValueTargetProvider)serviceProvider.IProvideValueTarget).TargetProperty = GetTargetProperty(source, propertyName, Context, node); + } if (markupExtension != null) value = markupExtension.ProvideValue(serviceProvider); @@ -609,7 +609,7 @@ namespace Tizen.NUI.Xaml if (addMethod == null) return false; - if (serviceProvider != null && serviceProvider.IProvideValueTarget != null) + if (serviceProvider != null) ((XamlValueTargetProvider)serviceProvider.IProvideValueTarget).TargetProperty = targetProperty; addMethod.Invoke(collection, new [] { value.ConvertTo(addMethod.GetParameters() [0].ParameterType, (Func)null, serviceProvider) }); diff --git a/src/Tizen.NUI/src/internal/Xaml/CreateValuesVisitor.cs b/src/Tizen.NUI/src/internal/Xaml/CreateValuesVisitor.cs index c148a6b3c..1e759f389 100755 --- a/src/Tizen.NUI/src/internal/Xaml/CreateValuesVisitor.cs +++ b/src/Tizen.NUI/src/internal/Xaml/CreateValuesVisitor.cs @@ -290,16 +290,9 @@ namespace Tizen.NUI.Xaml INode node; if (!enode.Properties.TryGetValue(name, out node)) { - String msg = ""; - if (propname != null) - { - msg = String.Format("The Property {0} is required to create a {1} object.", propname, ctorInfo.DeclaringType.FullName); - } - else - { - msg = "propname is null."; - } - throw new XamlParseException(msg, enode as IXmlLineInfo); + throw new XamlParseException( + String.Format("The Property {0} is required to create a {1} object.", propname, ctorInfo.DeclaringType.FullName), + enode as IXmlLineInfo); } if (!enode.SkipProperties.Contains(name)) enode.SkipProperties.Add(name); diff --git a/src/Tizen.NUI/src/internal/Xaml/MarkupExpressionParser.cs b/src/Tizen.NUI/src/internal/Xaml/MarkupExpressionParser.cs index 188ec532b..6dbc21aaf 100755 --- a/src/Tizen.NUI/src/internal/Xaml/MarkupExpressionParser.cs +++ b/src/Tizen.NUI/src/internal/Xaml/MarkupExpressionParser.cs @@ -57,7 +57,7 @@ namespace Tizen.NUI.Xaml throw new Exception("Expression did not end in '}'"); var parser = Activator.CreateInstance(GetType()) as IExpressionParser; - return parser?.Parse(match, ref expression, serviceProvider); + return parser.Parse(match, ref expression, serviceProvider); } internal static bool MatchMarkup(out string match, string expression, out int end) diff --git a/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StaticExtension.cs b/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StaticExtension.cs index d22e0ed8d..629cf1dce 100755 --- a/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StaticExtension.cs +++ b/src/Tizen.NUI/src/internal/Xaml/MarkupExtensions/StaticExtension.cs @@ -36,9 +36,9 @@ namespace Tizen.NUI.Xaml var type = typeResolver.Resolve(typename, serviceProvider); - var pinfo = type.GetRuntimeProperties().FirstOrDefault(pi => pi.GetMethod != null && pi.Name == membername && pi.GetMethod.IsStatic); + var pinfo = type.GetRuntimeProperties().FirstOrDefault(pi => pi.Name == membername && pi.GetMethod.IsStatic); if (pinfo != null) - return pinfo.GetMethod?.Invoke(null, Array.Empty()); + return pinfo.GetMethod.Invoke(null, new object[] { }); var finfo = type.GetRuntimeFields().FirstOrDefault(fi => fi.Name == membername && fi.IsStatic); if (finfo != null) diff --git a/src/Tizen.NUI/src/internal/XamlBinding/BindablePropertyConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/BindablePropertyConverter.cs index 9f99006c1..5dfd12d43 100755 --- a/src/Tizen.NUI/src/internal/XamlBinding/BindablePropertyConverter.cs +++ b/src/Tizen.NUI/src/internal/XamlBinding/BindablePropertyConverter.cs @@ -104,7 +104,7 @@ namespace Tizen.NUI.Binding throw new XamlParseException($"Can't resolve {name} on {type.Name}", lineinfo); var bp = bpinfo.GetValue(null) as BindableProperty; var isObsolete = bpinfo.GetCustomAttribute() != null; - if (bp != null && bp.PropertyName != propertyName && !isObsolete) + if (bp.PropertyName != propertyName && !isObsolete) throw new XamlParseException($"The PropertyName of {type.Name}.{name} is not {propertyName}", lineinfo); return bp; } diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Binding.cs b/src/Tizen.NUI/src/internal/XamlBinding/Binding.cs index 6debd8cc3..be4bfaad3 100755 --- a/src/Tizen.NUI/src/internal/XamlBinding/Binding.cs +++ b/src/Tizen.NUI/src/internal/XamlBinding/Binding.cs @@ -200,7 +200,7 @@ namespace Tizen.NUI.Binding string indexerName = defaultMember != null ? defaultMember.MemberName : "Item"; MethodInfo getterInfo = - declarerType.GetProperties().Where(pi => (pi.GetMethod != null) && pi.Name == indexerName && pi.CanRead && pi.GetMethod.IsPublic && !pi.GetMethod.IsStatic).Select(pi => pi.GetMethod).FirstOrDefault(); + declarerType.GetProperties().Where(pi => pi.Name == indexerName && pi.CanRead && pi.GetMethod.IsPublic && !pi.GetMethod.IsStatic).Select(pi => pi.GetMethod).FirstOrDefault(); if (getterInfo != null) { if (getterInfo == methodCall.Method) diff --git a/src/Tizen.NUI/src/internal/XamlBinding/BindingExpression.cs b/src/Tizen.NUI/src/internal/XamlBinding/BindingExpression.cs index 215cb820a..4724d8376 100755 --- a/src/Tizen.NUI/src/internal/XamlBinding/BindingExpression.cs +++ b/src/Tizen.NUI/src/internal/XamlBinding/BindingExpression.cs @@ -342,46 +342,43 @@ namespace Tizen.NUI.Binding if (property != null) { - if (property.CanRead && property.GetMethod != null) + if (property.CanRead && property.GetMethod.IsPublic && !property.GetMethod.IsStatic) { - if (property.GetMethod.IsPublic && !property.GetMethod.IsStatic) - part.LastGetter = property.GetMethod; + part.LastGetter = property.GetMethod; } - if (property.CanWrite && property.SetMethod != null) + + if (property.CanWrite && property.SetMethod.IsPublic && !property.SetMethod.IsStatic) { - if(property.SetMethod.IsPublic && !property.SetMethod.IsStatic) - { - part.LastSetter = property.SetMethod; - part.SetterType = part.LastSetter.GetParameters().Last().ParameterType; + part.LastSetter = property.SetMethod; + part.SetterType = part.LastSetter.GetParameters().Last().ParameterType; - if (Binding.AllowChaining) + if (Binding.AllowChaining) + { + FieldInfo bindablePropertyField = sourceType.GetDeclaredField(part.Content + "Property"); + if (bindablePropertyField != null && bindablePropertyField.FieldType == typeof(BindableProperty) && sourceType.ImplementedInterfaces.Contains(typeof(IElementController))) { - FieldInfo bindablePropertyField = sourceType.GetDeclaredField(part.Content + "Property"); - if (bindablePropertyField != null && bindablePropertyField.FieldType == typeof(BindableProperty) && sourceType.ImplementedInterfaces.Contains(typeof(IElementController))) - { - MethodInfo setValueMethod = null; + MethodInfo setValueMethod = null; #if NETSTANDARD1_0 - foreach (MethodInfo m in sourceType.AsType().GetRuntimeMethods()) + foreach (MethodInfo m in sourceType.AsType().GetRuntimeMethods()) + { + if (m.Name.EndsWith("IElementController.SetValueFromRenderer")) { - if (m.Name.EndsWith("IElementController.SetValueFromRenderer")) + ParameterInfo[] parameters = m.GetParameters(); + if (parameters.Length == 2 && parameters[0].ParameterType == typeof(BindableProperty)) { - ParameterInfo[] parameters = m.GetParameters(); - if (parameters.Length == 2 && parameters[0].ParameterType == typeof(BindableProperty)) - { - setValueMethod = m; - break; - } + setValueMethod = m; + break; } } + } #else - setValueMethod = typeof(IElementController).GetMethod("SetValueFromRenderer", new[] { typeof(BindableProperty), typeof(object) }); + setValueMethod = typeof(IElementController).GetMethod("SetValueFromRenderer", new[] { typeof(BindableProperty), typeof(object) }); #endif - if (setValueMethod != null) - { - part.LastSetter = setValueMethod; - part.IsBindablePropertySetter = true; - part.BindablePropertyField = bindablePropertyField.GetValue(null); - } + if (setValueMethod != null) + { + part.LastSetter = setValueMethod; + part.IsBindablePropertySetter = true; + part.BindablePropertyField = bindablePropertyField.GetValue(null); } } } diff --git a/src/Tizen.NUI/src/internal/XamlBinding/DataTemplateSelector.cs b/src/Tizen.NUI/src/internal/XamlBinding/DataTemplateSelector.cs index 9dce2ee2c..c7afa2c75 100755 --- a/src/Tizen.NUI/src/internal/XamlBinding/DataTemplateSelector.cs +++ b/src/Tizen.NUI/src/internal/XamlBinding/DataTemplateSelector.cs @@ -9,30 +9,17 @@ namespace Tizen.NUI.Binding public DataTemplate SelectTemplate(object item, BindableObject container) { - // var listView = container as ListView; - - // var recycle = listView == null ? false : - // (listView.CachingStrategy & ListViewCachingStrategy.RecycleElementAndDataTemplate) == - // ListViewCachingStrategy.RecycleElementAndDataTemplate; - DataTemplate dataTemplate = null; - // if (recycle && _dataTemplates.TryGetValue(item.GetType(), out dataTemplate)) - // return dataTemplate; + if (_dataTemplates.TryGetValue(item.GetType(), out dataTemplate)) + { + return dataTemplate; + } dataTemplate = OnSelectTemplate(item, container); if (dataTemplate is DataTemplateSelector) throw new NotSupportedException( "DataTemplateSelector.OnSelectTemplate must not return another DataTemplateSelector"); - // if (recycle) - // { - // if (!dataTemplate.CanRecycle) - // throw new NotSupportedException( - // "RecycleElementAndDataTemplate requires DataTemplate activated with ctor taking a type."); - - // _dataTemplates[item.GetType()] = dataTemplate; - // } - return dataTemplate; } diff --git a/src/Tizen.NUI/src/internal/XamlBinding/Layout.cs b/src/Tizen.NUI/src/internal/XamlBinding/Layout.cs index 4b15ffaa2..d7c12a8ee 100755 --- a/src/Tizen.NUI/src/internal/XamlBinding/Layout.cs +++ b/src/Tizen.NUI/src/internal/XamlBinding/Layout.cs @@ -58,11 +58,10 @@ namespace Tizen.NUI.Binding public static readonly BindableProperty CascadeInputTransparentProperty = BindableProperty.Create( nameof(CascadeInputTransparent), typeof(bool), typeof(Layout), true); - public static readonly BindableProperty PaddingProperty = PaddingElement.PaddingProperty; + public new static readonly BindableProperty PaddingProperty = PaddingElement.PaddingProperty; static IList> s_resolutionList = new List>(); static bool s_relayoutInProgress; - bool _allocatedFlag; bool _hasDoneLayout; Size _lastLayoutSize = new Size(-1, -1, 0); @@ -126,59 +125,16 @@ namespace Tizen.NUI.Binding public void ForceLayout() { - //SizeAllocated(Width, Height); } - [Obsolete("OnSizeRequest is obsolete as of version 2.2.0. Please use OnMeasure instead.")] - // public sealed override SizeRequest GetSizeRequest(double widthConstraint, double heightConstraint) - // { - // SizeRequest size = base.GetSizeRequest(widthConstraint - Padding.HorizontalThickness, heightConstraint - Padding.VerticalThickness); - // return new SizeRequest(new Size(size.Request.Width + Padding.HorizontalThickness, size.Request.Height + Padding.VerticalThickness, 0), - // new Size(size.Minimum.Width + Padding.HorizontalThickness, size.Minimum.Height + Padding.VerticalThickness, 0)); - // } - public static void LayoutChildIntoBoundingRegion(/*VisualElement*/BaseHandle child, Rectangle region) + public static void LayoutChildIntoBoundingRegion(BaseHandle child, Rectangle region) { - //var parent = child.Parent as IFlowDirectionController; - //bool isRightToLeft = false; - //if (parent != null && (isRightToLeft = parent.EffectiveFlowDirection.IsRightToLeft())) - //region = new Rectangle(parent.Width - region.Right, region.Y, region.Width, region.Height); - var view = child as View; if (view == null) { - //child.Layout(region); return; } - - //LayoutOptions horizontalOptions = view.HorizontalOptions; - // if (horizontalOptions.Alignment != LayoutAlignment.Fill) - // { - // SizeRequest request = child.Measure(region.Width, region.Height, MeasureFlags.IncludeMargins); - // double diff = Math.Max(0, region.Width - request.Request.Width); - // double horizontalAlign = horizontalOptions.Alignment.ToDouble(); - // if (isRightToLeft) - // horizontalAlign = 1 - horizontalAlign; - // region.X += (int)(diff * horizontalAlign); - // region.Width -= diff; - // } - - // LayoutOptions verticalOptions = view.VerticalOptions; - // if (verticalOptions.Alignment != LayoutAlignment.Fill) - // { - // SizeRequest request = child.Measure(region.Width, region.Height, MeasureFlags.IncludeMargins); - // double diff = Math.Max(0, region.Height - request.Request.Height); - // region.Y += (int)(diff * verticalOptions.Alignment.ToDouble()); - // region.Height -= diff; - // } - - // Thickness margin = view.Margin; - // region.X += margin.Left; - // region.Width -= margin.HorizontalThickness; - // region.Y += margin.Top; - // region.Height -= margin.VerticalThickness; - - // child.Layout(region); } public void LowerChild(View view) @@ -187,7 +143,6 @@ namespace Tizen.NUI.Binding return; InternalChildren.Move(InternalChildren.IndexOf(view), 0); - // OnChildrenReordered(); } public void RaiseChild(View view) @@ -196,13 +151,11 @@ namespace Tizen.NUI.Binding return; InternalChildren.Move(InternalChildren.IndexOf(view), InternalChildren.Count - 1); - // OnChildrenReordered(); } protected virtual void InvalidateLayout() { _hasDoneLayout = false; - // InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged); if (!_hasDoneLayout) ForceLayout(); } @@ -212,7 +165,7 @@ namespace Tizen.NUI.Binding protected void OnChildMeasureInvalidated(object sender, EventArgs e) { InvalidationTrigger trigger = (e as InvalidationEventArgs)?.Trigger ?? InvalidationTrigger.Undefined; - OnChildMeasureInvalidated((/*VisualElement*/BaseHandle)sender, trigger); + OnChildMeasureInvalidated((BaseHandle)sender, trigger); OnChildMeasureInvalidated(); } @@ -220,13 +173,6 @@ namespace Tizen.NUI.Binding { } - // protected override void OnSizeAllocated(double width, double height) - // { - // _allocatedFlag = true; - // base.OnSizeAllocated(width, height); - // UpdateChildrenLayout(); - // } - protected virtual bool ShouldInvalidateOnChildAdded(View child) { return true; @@ -244,118 +190,35 @@ namespace Tizen.NUI.Binding if (!ShouldLayoutChildren()) return; - var oldBounds = new Rectangle[LogicalChildrenInternal.Count]; - for (var index = 0; index < oldBounds.Length; index++) - { - var c = (/*VisualElement*/BaseHandle)LogicalChildrenInternal[index]; - // oldBounds[index] = c.Bounds; - } - - // double width = Width; - // double height = Height; - - // double x = Padding.Left; - // double y = Padding.Top; - // double w = Math.Max(0, width - Padding.HorizontalThickness); - // double h = Math.Max(0, height - Padding.VerticalThickness); - - // var isHeadless = CompressedLayout.GetIsHeadless(this); - // var headlessOffset = CompressedLayout.GetHeadlessOffset(this); - // for (var i = 0; i < LogicalChildrenInternal.Count; i++) - // CompressedLayout.SetHeadlessOffset((/*VisualElement*/BaseHandle)LogicalChildrenInternal[i], isHeadless ? new Point(headlessOffset.X + Bounds.X, headlessOffset.Y + Bounds.Y) : new Point()); - - // LayoutChildren(x, y, w, h); - - // for (var i = 0; i < oldBounds.Length; i++) - // { - // Rectangle oldBound = oldBounds[i]; - // Rectangle newBound = ((/*VisualElement*/BaseHandle)LogicalChildrenInternal[i]).Bounds; - // if (oldBound != newBound) - // { - // LayoutChanged?.Invoke(this, EventArgs.Empty); - // return; - // } - // } - - // _lastLayoutSize = new Size((float)width, (float)height, 0); + LayoutChanged?.Invoke(this, EventArgs.Empty); } internal static void LayoutChildIntoBoundingRegion(View child, Rectangle region, SizeRequest childSizeRequest) { - // var parent = child.Parent as IFlowDirectionController; - // bool isRightToLeft = false; - // if (parent != null && (isRightToLeft = parent.EffectiveFlowDirection.IsRightToLeft())) - // region = new Rectangle(parent.Width - region.Right, region.Y, region.Width, region.Height); - - // if (region.Size != childSizeRequest.Request) - // { - // bool canUseAlreadyDoneRequest = region.Width >= childSizeRequest.Request.Width && region.Height >= childSizeRequest.Request.Height; - - // LayoutOptions horizontalOptions = child.HorizontalOptions; - // if (horizontalOptions.Alignment != LayoutAlignment.Fill) - // { - // SizeRequest request = canUseAlreadyDoneRequest ? childSizeRequest : child.Measure(region.Width, region.Height, MeasureFlags.IncludeMargins); - // double diff = Math.Max(0, region.Width - request.Request.Width); - // double horizontalAlign = horizontalOptions.Alignment.ToDouble(); - // if (isRightToLeft) - // horizontalAlign = 1 - horizontalAlign; - // region.X += (int)(diff * horizontalAlign); - // region.Width -= diff; - // } - - // LayoutOptions verticalOptions = child.VerticalOptions; - // if (verticalOptions.Alignment != LayoutAlignment.Fill) - // { - // SizeRequest request = canUseAlreadyDoneRequest ? childSizeRequest : child.Measure(region.Width, region.Height, MeasureFlags.IncludeMargins); - // double diff = Math.Max(0, region.Height - request.Request.Height); - // region.Y += (int)(diff * verticalOptions.Alignment.ToDouble()); - // region.Height -= diff; - // } - // } - - // Thickness margin = child.Margin; - // region.X += margin.Left; - // region.Width -= margin.HorizontalThickness; - // region.Y += margin.Top; - // region.Height -= margin.VerticalThickness; - - // child.Layout(region); } - internal virtual void OnChildMeasureInvalidated(/*VisualElement*/BaseHandle child, InvalidationTrigger trigger) + internal virtual void OnChildMeasureInvalidated(BaseHandle child, InvalidationTrigger trigger) { ReadOnlyCollection children = LogicalChildrenInternal; int count = children.Count; for (var index = 0; index < count; index++) { - var v = LogicalChildrenInternal[index] as /*VisualElement*/BaseHandle; - if (v != null /*&& v.IsVisible && (!v.IsPlatformEnabled || !v.IsNativeStateConsistent)*/) + var v = LogicalChildrenInternal[index] as BaseHandle; + if (v != null) + { return; + } } var view = child as View; if (view != null) { - // we can ignore the request if we are either fully constrained or when the size request changes and we were already fully constrainted - // if ((trigger == InvalidationTrigger.MeasureChanged && view.Constraint == LayoutConstraint.Fixed) || - // (trigger == InvalidationTrigger.SizeRequestChanged && view.ComputedConstraint == LayoutConstraint.Fixed)) - // { - // return; - // } - // if (trigger == InvalidationTrigger.HorizontalOptionsChanged || trigger == InvalidationTrigger.VerticalOptionsChanged) - // { - // ComputeConstraintForView(view); - // } - } - - _allocatedFlag = false; - if (trigger == InvalidationTrigger.RendererReady) - { - // InvalidateMeasureInternal(InvalidationTrigger.RendererReady); - } - else - { - // InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged); + //we can ignore the request if we are either fully constrained or when the size request changes and we were already fully constrainted + if ((trigger == InvalidationTrigger.MeasureChanged) || + (trigger == InvalidationTrigger.SizeRequestChanged)) + { + return; + } } s_resolutionList.Add(new KeyValuePair(this, GetElementDepth(this))); @@ -368,32 +231,10 @@ namespace Tizen.NUI.Binding IList> copy = s_resolutionList; s_resolutionList = new List>(); s_relayoutInProgress = false; - - foreach (KeyValuePair kvp in copy.OrderBy(kvp => kvp.Value)) - { - Layout layout = kvp.Key; - // double width = layout.Width, height = layout.Height; - // if (!layout._allocatedFlag && width >= 0 && height >= 0) - // { - // layout.SizeAllocated(width, height); - // } - } }); } } - // internal override void OnIsVisibleChanged(bool oldValue, bool newValue) - // { - // base.OnIsVisibleChanged(oldValue, newValue); - // if (newValue) - // { - // if (_lastLayoutSize != new Size(Width, Height)) - // { - // UpdateChildrenLayout(); - // } - // } - // } - static int GetElementDepth(Element view) { var result = 0; @@ -442,20 +283,16 @@ namespace Tizen.NUI.Binding void OnInternalAdded(View view) { - var parent = view.Parent as Layout; + var parent = view.GetParent() as Layout; parent?.InternalChildren.Remove(view); OnChildAdded(view); if (ShouldInvalidateOnChildAdded(view)) InvalidateLayout(); - - // view.MeasureInvalidated += OnChildMeasureInvalidated; } void OnInternalRemoved(View view) { - // view.MeasureInvalidated -= OnChildMeasureInvalidated; - OnChildRemoved(view); if (ShouldInvalidateOnChildRemoved(view)) InvalidateLayout(); @@ -463,20 +300,19 @@ namespace Tizen.NUI.Binding bool ShouldLayoutChildren() { - // if (Width <= 0 || Height <= 0 || !LogicalChildrenInternal.Any() || !IsVisible || !IsNativeStateConsistent || DisableLayout) - // return false; - - // foreach (Element element in VisibleDescendants()) - // { - // var visual = element as /*VisualElement*/BaseHandle; - // if (visual == null || !visual.IsVisible) - // continue; - - // if (!visual.IsPlatformEnabled || !visual.IsNativeStateConsistent) - // { - // return false; - // } - // } + if ( !LogicalChildrenInternal.Any() ) + { + return false; + } + + foreach (Element element in VisibleDescendants()) + { + var visual = element as BaseHandle; + if (visual == null) + { + continue; + } + } return true; } } diff --git a/src/Tizen.NUI/src/internal/XamlBinding/NavigationPage.cs b/src/Tizen.NUI/src/internal/XamlBinding/NavigationPage.cs index f58b05382..887f0d93d 100755 --- a/src/Tizen.NUI/src/internal/XamlBinding/NavigationPage.cs +++ b/src/Tizen.NUI/src/internal/XamlBinding/NavigationPage.cs @@ -241,11 +241,6 @@ namespace Tizen.NUI /// public event EventHandler Popped; - /// - /// Event that is raised when the last nonroot element is popped from this NavigationPage element. - /// - public event EventHandler PoppedToRoot; - /// /// Pops all but the root Page off the navigation stack. /// diff --git a/src/Tizen.NUI/src/internal/XamlBinding/SynchronizedList.cs b/src/Tizen.NUI/src/internal/XamlBinding/SynchronizedList.cs index a0761b4ec..73918cb3a 100755 --- a/src/Tizen.NUI/src/internal/XamlBinding/SynchronizedList.cs +++ b/src/Tizen.NUI/src/internal/XamlBinding/SynchronizedList.cs @@ -42,11 +42,7 @@ namespace Tizen.NUI.Binding public int Count { - get - { - lock (_list) - return _list.Count; - } + get { return _list.Count; } } bool ICollection.IsReadOnly @@ -75,15 +71,14 @@ namespace Tizen.NUI.Binding public IEnumerator GetEnumerator() { - lock (_list) + ReadOnlyCollection snap = _snapshot; + if (snap == null) { - ReadOnlyCollection snap = _snapshot; - if (snap == null) - { + lock (_list) _snapshot = snap = new ReadOnlyCollection(_list.ToList()); - } - return snap?.GetEnumerator(); } + + return snap?.GetEnumerator(); } public int IndexOf(T item) @@ -105,14 +100,12 @@ namespace Tizen.NUI.Binding { get { - lock (_list) - { - ReadOnlyCollection snap = _snapshot; - if (snap != null) - return snap[index]; + ReadOnlyCollection snap = _snapshot; + if (snap != null) + return snap[index]; + lock (_list) return _list[index]; - } } set diff --git a/src/Tizen.NUI/src/internal/XamlBinding/TemplateUtilities.cs b/src/Tizen.NUI/src/internal/XamlBinding/TemplateUtilities.cs index d93517a97..06f3e24f4 100755 --- a/src/Tizen.NUI/src/internal/XamlBinding/TemplateUtilities.cs +++ b/src/Tizen.NUI/src/internal/XamlBinding/TemplateUtilities.cs @@ -13,19 +13,10 @@ namespace Tizen.NUI.Binding if (element.RealParent is Application) return null; - var skipCount = 0; element = await GetRealParentAsync(element); while (!Application.IsApplicationOrNull(element)) { var controlTemplated = element as IControlTemplated; - //if (controlTemplated?.ControlTemplate != null) - //{ - // if (skipCount == 0) - // return element; - // skipCount--; - //} - // if (element is ContentPresenter) - // skipCount++; element = await GetRealParentAsync(element); } @@ -55,25 +46,16 @@ namespace Tizen.NUI.Binding public static void OnContentChanged(BindableObject bindable, object oldValue, object newValue) { + /* var self = (IControlTemplated)bindable; var newElement = (Element)newValue; - //if (self.ControlTemplate == null) - //{ - // while (self.InternalChildren.Count > 0) - // { - // self.InternalChildren.RemoveAt(self.InternalChildren.Count - 1); - // } - - // if (newValue != null) - // self.InternalChildren.Add(newElement); - //} - //else - //{ - // if (newElement != null) - // { - // BindableObject.SetInheritedBindingContext(newElement, bindable.BindingContext); - // } - //} + var oldElement = (Element)oldValue; + + if (newElement == oldElement) + { + return; + } + */ } public static void OnControlTemplateChanged(BindableObject bindable, object oldValue, object newValue) @@ -94,12 +76,7 @@ namespace Tizen.NUI.Binding { Element child = children[i]; var controlTemplated = child as IControlTemplated; - - // var presenter = child as ContentPresenter; - // if (presenter != null) - // presenter.Clear(); - // else if (controlTemplated == null || controlTemplated.ControlTemplate == null) - // queue.Enqueue(child); + queue.Enqueue(child); } } } @@ -109,23 +86,6 @@ namespace Tizen.NUI.Binding { self.InternalChildren.RemoveAt(self.InternalChildren.Count - 1); } - - //ControlTemplate template = self.ControlTemplate; - //if (template == null) - //{ - // // do nothing for now - //} - //else - //{ - // var content = template.CreateContent() as View; - // if (content == null) - // { - // throw new NotSupportedException("ControlTemplate must return a type derived from View."); - // } - - // self.InternalChildren.Add(content); - // ((IControlTemplated)bindable).OnControlTemplateChanged((ControlTemplate)oldValue, (ControlTemplate)newValue); - //} } } } diff --git a/src/Tizen.NUI/src/internal/XamlBinding/TizenPlatformServices.cs b/src/Tizen.NUI/src/internal/XamlBinding/TizenPlatformServices.cs index b1f804f35..8fc16b275 100755 --- a/src/Tizen.NUI/src/internal/XamlBinding/TizenPlatformServices.cs +++ b/src/Tizen.NUI/src/internal/XamlBinding/TizenPlatformServices.cs @@ -212,15 +212,12 @@ namespace Tizen.NUI.Binding try { Assembly refAsm = Assembly.Load(refName); - if (refAsm != null) + RegisterAssemblyRecursively(refAsm); + if (refName.Name == "Xamarin.Forms.Core") { - RegisterAssemblyRecursively(refAsm); - if (refName.Name == "Xamarin.Forms.Core") + if (refAsm.GetType("Xamarin.Forms.PlatformConfiguration.TizenSpecific.VisualElement") != null) { - if (refAsm.GetType("Xamarin.Forms.PlatformConfiguration.TizenSpecific.VisualElement") != null) - { - IsTizenSpecificAvailable = true; - } + IsTizenSpecificAvailable = true; } } } diff --git a/src/Tizen.NUI/src/internal/XamlBinding/VectorTypeConverter.cs b/src/Tizen.NUI/src/internal/XamlBinding/VectorTypeConverter.cs index 10add14c5..4d1ecc3f4 100755 --- a/src/Tizen.NUI/src/internal/XamlBinding/VectorTypeConverter.cs +++ b/src/Tizen.NUI/src/internal/XamlBinding/VectorTypeConverter.cs @@ -78,7 +78,7 @@ namespace Tizen.NUI.Binding } } - throw new InvalidOperationException("Cannot convert \"{value}\" into {typeof(RelativeVector2)}"); + throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(RelativeVector2)}"); } } diff --git a/src/Tizen.NUI/src/public/Animation.cs b/src/Tizen.NUI/src/public/Animation.cs index bb995a51c..430cee522 100755 --- a/src/Tizen.NUI/src/public/Animation.cs +++ b/src/Tizen.NUI/src/public/Animation.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -671,8 +671,6 @@ namespace Tizen.NUI { Func getConverter = () => { - MemberInfo memberInfo; - string converterTypeName = GetTypeConverterTypeName(toType.GetTypeInfo().CustomAttributes); if (converterTypeName == null) return null; diff --git a/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs b/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs index 639b19e37..22f4e1299 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/ImageView.cs @@ -31,7 +31,7 @@ namespace Tizen.NUI.BaseComponents { /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty ResourceUrlProperty = BindableProperty.Create(nameof(ImageView.ResourceUrl), typeof(string), typeof(ImageView), string.Empty, propertyChanged: (bindable, oldValue, newValue) => + public static readonly BindableProperty ResourceUrlProperty = BindableProperty.Create("ResourceUrl", typeof(string), typeof(ImageView), string.Empty, propertyChanged: (bindable, oldValue, newValue) => { var imageView = (ImageView)bindable; if (newValue != null) @@ -49,7 +49,7 @@ namespace Tizen.NUI.BaseComponents defaultValueCreator:(bindable) => { var imageView = (ImageView)bindable; - Tizen.NUI.Object.GetProperty(imageView.swigCPtr, ImageView.Property.IMAGE).Get(out imageView._url); + Tizen.NUI.Object.GetProperty(imageView.swigCPtr, ImageView.Property.IMAGE).Get(out imageView._url); return imageView._url; }); /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. @@ -478,8 +478,6 @@ namespace Tizen.NUI.BaseComponents /// /// ImageView ResourceUrl, type string. - /// This is one of mandatory property. Even if not set or null set, it sets empty string ("") internally. - /// When it is set as null, it gives empty string ("") to be read. /// /// 3 public string ResourceUrl @@ -490,8 +488,7 @@ namespace Tizen.NUI.BaseComponents } set { - _url = (value == null? "" : value); - SetValue(ResourceUrlProperty, _url); + SetValue(ResourceUrlProperty, value); NotifyPropertyChanged(); } } diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs index d90c82bb0..0f6934061 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs @@ -1250,6 +1250,7 @@ namespace Tizen.NUI.BaseComponents /// Get the InputMethodContext instance. /// /// The InputMethodContext instance. + /// 5 public InputMethodContext GetInputMethodContext() { if (inputMethodContext == null) diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs index cff7bb440..1519d7f3e 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextField.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextField.cs @@ -172,32 +172,8 @@ namespace Tizen.NUI.BaseComponents public static readonly BindableProperty HorizontalAlignmentProperty = BindableProperty.Create("HorizontalAlignment", typeof(HorizontalAlignment), typeof(TextField), HorizontalAlignment.Begin, propertyChanged: (bindable, oldValue, newValue) => { var textField = (TextField)bindable; - string valueToString = ""; if (newValue != null) { - switch ((HorizontalAlignment)newValue) - { - case HorizontalAlignment.Begin: - { - valueToString = "BEGIN"; - break; - } - case HorizontalAlignment.Center: - { - valueToString = "CENTER"; - break; - } - case HorizontalAlignment.End: - { - valueToString = "END"; - break; - } - default: - { - valueToString = "BEGIN"; - break; - } - } Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.HORIZONTAL_ALIGNMENT, new Tizen.NUI.PropertyValue((int)newValue)); } }, @@ -223,16 +199,8 @@ namespace Tizen.NUI.BaseComponents public static readonly BindableProperty VerticalAlignmentProperty = BindableProperty.Create("VerticalAlignment", typeof(VerticalAlignment), typeof(TextField), VerticalAlignment.Bottom, propertyChanged: (bindable, oldValue, newValue) => { var textField = (TextField)bindable; - string valueToString = ""; if (newValue != null) { - switch ((VerticalAlignment)newValue) - { - case VerticalAlignment.Top: { valueToString = "TOP"; break; } - case VerticalAlignment.Center: { valueToString = "CENTER"; break; } - case VerticalAlignment.Bottom: { valueToString = "BOTTOM"; break; } - default: { valueToString = "BOTTOM"; break; } - } Tizen.NUI.Object.SetProperty(textField.swigCPtr, TextField.Property.VERTICAL_ALIGNMENT, new Tizen.NUI.PropertyValue((int)newValue)); } }, @@ -1289,6 +1257,7 @@ namespace Tizen.NUI.BaseComponents /// Get the InputMethodContext instance. /// /// The InputMethodContext instance. + /// 5 public InputMethodContext GetInputMethodContext() { if (inputMethodCotext == null) diff --git a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs index 1f6e3cb7c..03ba911b9 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -704,6 +704,9 @@ namespace Tizen.NUI.BaseComponents if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } + /// + /// Invoked whenever the binding context of the textlabel changes. Implement this method to add class handling for this event. + /// protected override void OnBindingContextChanged() { base.OnBindingContextChanged(); diff --git a/src/Tizen.NUI/src/public/BaseComponents/View.cs b/src/Tizen.NUI/src/public/BaseComponents/View.cs index 79c45d77f..5050725db 100755 --- a/src/Tizen.NUI/src/public/BaseComponents/View.cs +++ b/src/Tizen.NUI/src/public/BaseComponents/View.cs @@ -27,9 +27,12 @@ namespace Tizen.NUI.BaseComponents /// 3 public class View : Container, IResourcesProvider { + + /// /// Flag to allow Layouting to be disabled for Views. /// Once a View has a Layout set then any children added to Views from then on will receive /// automatic Layouts. + /// private static bool layoutingDisabled = true; /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. @@ -158,13 +161,7 @@ namespace Tizen.NUI.BaseComponents { NUILog.Error("State get error!"); } - switch (temp) - { - case 0: return States.Normal; - case 1: return States.Focused; - case 2: return States.Disabled; - default: return States.Normal; - } + return (States)temp; }); /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] @@ -225,6 +222,8 @@ namespace Tizen.NUI.BaseComponents // Tizen.NUI.Object.SetProperty(view.swigCPtr, View.Property.TOOLTIP, new Tizen.NUI.PropertyValue((string)newValue)); // } // }); + /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. + [EditorBrowsable(EditorBrowsableState.Never)] public static readonly BindableProperty FlexProperty = BindableProperty.Create("Flex", typeof(float), typeof(View), default(float), propertyChanged: (bindable, oldValue, newValue) => { var view = (View)bindable; @@ -416,10 +415,10 @@ namespace Tizen.NUI.BaseComponents }); /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create(nameof(View.LeftFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) => + public static readonly BindableProperty LeftFocusableViewProperty = BindableProperty.Create("LeftFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) => { var view = (View)bindable; - if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View)?.GetId(); } + if (newValue != null) { view.LeftFocusableViewId = (int)(newValue as View).GetId(); } else { view.LeftFocusableViewId = -1; } }, defaultValueCreator:(bindable) => @@ -430,10 +429,10 @@ namespace Tizen.NUI.BaseComponents }); /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create(nameof(View.RightFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) => + public static readonly BindableProperty RightFocusableViewProperty = BindableProperty.Create("RightFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) => { var view = (View)bindable; - if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View)?.GetId(); } + if (newValue != null) { view.RightFocusableViewId = (int)(newValue as View).GetId(); } else { view.RightFocusableViewId = -1; } }, defaultValueCreator:(bindable) => @@ -444,10 +443,10 @@ namespace Tizen.NUI.BaseComponents }); /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create(nameof(View.UpFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) => + public static readonly BindableProperty UpFocusableViewProperty = BindableProperty.Create("UpFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) => { var view = (View)bindable; - if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View)?.GetId(); } + if (newValue != null) { view.UpFocusableViewId = (int)(newValue as View).GetId(); } else { view.UpFocusableViewId = -1; } }, defaultValueCreator:(bindable) => @@ -458,10 +457,10 @@ namespace Tizen.NUI.BaseComponents }); /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create(nameof(View.DownFocusableView), typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) => + public static readonly BindableProperty DownFocusableViewProperty = BindableProperty.Create("DownFocusableView", typeof(View), typeof(View), default(View), propertyChanged: (bindable, oldValue, newValue) => { var view = (View)bindable; - if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View)?.GetId(); } + if (newValue != null) { view.DownFocusableViewId = (int)(newValue as View).GetId(); } else { view.DownFocusableViewId = -1; } }, defaultValueCreator:(bindable) => @@ -4641,7 +4640,6 @@ namespace Tizen.NUI.BaseComponents set { SetValue(SizeWidthProperty, value); - SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue(value)); NotifyPropertyChanged(); } } @@ -4659,7 +4657,6 @@ namespace Tizen.NUI.BaseComponents set { SetValue(SizeHeightProperty, value); - SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue(value)); NotifyPropertyChanged(); } } @@ -5105,7 +5102,7 @@ namespace Tizen.NUI.BaseComponents { case ResizePolicyType.UseNaturalSize : { - SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) ); + SetProperty(LayoutItemWrapper.ChildProperty.WIDTH_SPECIFICATION, new Tizen.NUI.PropertyValue( NaturalSize.Width) ); break; } case ResizePolicyType.FillToParent : @@ -5144,7 +5141,7 @@ namespace Tizen.NUI.BaseComponents { case ResizePolicyType.UseNaturalSize : { - SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( (int)ChildLayoutData.WrapContent ) ); + SetProperty(LayoutItemWrapper.ChildProperty.HEIGHT_SPECIFICATION, new Tizen.NUI.PropertyValue( NaturalSize.Height) ); break; } case ResizePolicyType.FillToParent : diff --git a/src/Tizen.NUI/src/public/FocusManager.cs b/src/Tizen.NUI/src/public/FocusManager.cs index 3f9d3d29a..d00acb3e9 100755 --- a/src/Tizen.NUI/src/public/FocusManager.cs +++ b/src/Tizen.NUI/src/public/FocusManager.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -731,7 +731,7 @@ namespace Tizen.NUI } } - private EventHandler _focusedViewEnterKeyEventHandler2; + private EventHandler _focusedViewEnterKeyEventHandler2; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void FocusedViewEnterKeyEventCallback2(IntPtr view); private FocusedViewEnterKeyEventCallback2 _focusedViewEnterKeyEventCallback2; @@ -747,7 +747,7 @@ namespace Tizen.NUI "FocusManager.Instance.FocusedViewActivated = OnFocusedViewActivated; " + "private void OnFocusedViewActivated(object source, FocusManager.FocusedViewActivatedEventArgs args) {...}")] [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler FocusedViewEnterKeyPressed + public event EventHandler FocusedViewEnterKeyPressed { add { diff --git a/src/Tizen.NUI/src/public/ImageLoading.cs b/src/Tizen.NUI/src/public/ImageLoading.cs index 60d8506dc..cc815e6c9 100755 --- a/src/Tizen.NUI/src/public/ImageLoading.cs +++ b/src/Tizen.NUI/src/public/ImageLoading.cs @@ -299,5 +299,31 @@ namespace Tizen.NUI return ret; } + /// + /// Set the maximum texture size. Then size can be kwown by GL_MAX_TEXTURE_SIZE. + /// + /// The maximum texture size to set. + /// 5 + /// This will be released at Tizen.NET API Level 5. Therefore, currently this would be used as an in-house API. + [EditorBrowsable(EditorBrowsableState.Never)] + public static void SetMaxTextureSize(uint size) + { + NDalicPINVOKE.SetMaxTextureSize(size); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + + /// + /// Get the maximum texture size. + /// + /// The maximum texture size. + /// 5 + /// This will be released at Tizen.NET API Level 5. Therefore, currently this would be used as an in-house API. + [EditorBrowsable(EditorBrowsableState.Never)] + public static uint GetMaxTextureSize() + { + uint ret = NDalicPINVOKE.GetMaxTextureSize(); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + return ret; + } } } diff --git a/src/Tizen.NUI/src/public/ImfManager.cs b/src/Tizen.NUI/src/public/ImfManager.cs index 8f6892766..a2d3c5e23 100755 --- a/src/Tizen.NUI/src/public/ImfManager.cs +++ b/src/Tizen.NUI/src/public/ImfManager.cs @@ -541,12 +541,14 @@ namespace Tizen.NUI /// /// 4 /// Please do not use! This will be deprecated, instead please USE Tizen.NUI.ImfManager.Instance.DestroyContext()! + #pragma warning disable 0465 [Obsolete("Please do not use! This will be deprecated! Please use ImfManager.Instance.DestroyContext() instead!")] [EditorBrowsable(EditorBrowsableState.Never)] public void Finalize() { DestroyContext(); } + #pragma warning restore 0465 /// /// Retrieves a handle to the instance of the ImfManager. @@ -566,7 +568,7 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - + internal ImfManager(ImfManager imfManager) : this(NDalicManualPINVOKE.new_InputMethodContext__SWIG_1(ImfManager.getCPtr(imfManager)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } diff --git a/src/Tizen.NUI/src/public/InputMethodContext.cs b/src/Tizen.NUI/src/public/InputMethodContext.cs index e7e5794fd..89e6ec0dc 100755 --- a/src/Tizen.NUI/src/public/InputMethodContext.cs +++ b/src/Tizen.NUI/src/public/InputMethodContext.cs @@ -293,7 +293,6 @@ namespace Tizen.NUI return ret; } } - } /// @@ -523,18 +522,6 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - /// - /// Destroys the context of the IMF.
- ///
- /// 5 - /// Please do not use! This will be deprecated, instead please USE Tizen.NUI.InputMethodContext.Instance.DestroyContext()! - [Obsolete("Please do not use! This will be deprecated! Please use InputMethodContext.Instance.DestroyContext() instead!")] - [EditorBrowsable(EditorBrowsableState.Never)] - public void Finalize() - { - DestroyContext(); - } - /// /// Constructor.
///
@@ -543,7 +530,7 @@ namespace Tizen.NUI if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } - + internal InputMethodContext(InputMethodContext inputMethodContext) : this(NDalicManualPINVOKE.new_InputMethodContext__SWIG_1(InputMethodContext.getCPtr(inputMethodContext)), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } diff --git a/src/Tizen.NUI/src/public/NUIApplication.cs b/src/Tizen.NUI/src/public/NUIApplication.cs index 2575bf923..f5a273a03 100755 --- a/src/Tizen.NUI/src/public/NUIApplication.cs +++ b/src/Tizen.NUI/src/public/NUIApplication.cs @@ -355,15 +355,28 @@ namespace Tizen.NUI /// /// Graphics BackendType /// - /// InhouseAPI, this could be opend in NextTizen + /// InhouseAPI, this could be opened in NextTizen [EditorBrowsable(EditorBrowsableState.Never)] public class Graphics { + /// + /// Enumeration for Rendering backend + /// public enum BackendType { + /// + /// GLES + /// Gles, + /// + /// Vulkan + /// Vulkan } + + /// + /// Active backend + /// public static BackendType Backend = BackendType.Gles; internal const string GlesCSharpBinder = "libdali-csharp-binder.so"; internal const string VulkanCSharpBinder = "libdali-csharp-binder-vk.so"; diff --git a/src/Tizen.NUI/src/public/Position.cs b/src/Tizen.NUI/src/public/Position.cs index 4a70047f1..28d80f58b 100755 --- a/src/Tizen.NUI/src/public/Position.cs +++ b/src/Tizen.NUI/src/public/Position.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -337,6 +337,16 @@ namespace Tizen.NUI return equal; } + /// + /// Gets the the hash code of this Position. + /// + /// The Hash Code. + /// 5 + public override int GetHashCode() + { + return X.GetHashCode(); + } + /// /// Compares if rhs is equal to. /// diff --git a/src/Tizen.NUI/src/public/Position2D.cs b/src/Tizen.NUI/src/public/Position2D.cs index f31cfbd02..bfd7b3ec9 100755 --- a/src/Tizen.NUI/src/public/Position2D.cs +++ b/src/Tizen.NUI/src/public/Position2D.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,6 +15,7 @@ * */ using System; +using System.Globalization; using Tizen.NUI.Binding; namespace Tizen.NUI @@ -27,6 +28,11 @@ namespace Tizen.NUI [Tizen.NUI.Binding.TypeConverter(typeof(Position2DTypeConverter))] public class Position2D : global::System.IDisposable { + /// + /// Convert a string to Position2D. + /// + /// The string to convert. + /// The converted value. static public Position2D ConvertFromString(System.String value) { if (value != null) @@ -34,13 +40,16 @@ namespace Tizen.NUI string[] parts = value.Split(','); if (parts.Length == 2) { - return new Position2D(int.Parse(parts[0].Trim()), int.Parse(parts[1].Trim())); + return new Position2D(int.Parse(parts[0].Trim(), CultureInfo.InvariantCulture), int.Parse(parts[1].Trim(), CultureInfo.InvariantCulture)); } } throw new InvalidOperationException($"Cannot convert \"{value}\" into {typeof(Position2D)}"); } + /// + /// Constructor a Position2D from a stirng. + /// public static implicit operator Position2D(System.String value) { return ConvertFromString(value); @@ -352,6 +361,16 @@ namespace Tizen.NUI return equal; } + /// + /// Gets the the hash code of this Position2D. + /// + /// The Hash Code. + /// 5 + public override int GetHashCode() + { + return X.GetHashCode(); + } + /// /// Compares if the rhs is equal to. /// diff --git a/src/Tizen.NUI/src/public/RelativeVector2.cs b/src/Tizen.NUI/src/public/RelativeVector2.cs index 69d67d31e..e9a4984fe 100755 --- a/src/Tizen.NUI/src/public/RelativeVector2.cs +++ b/src/Tizen.NUI/src/public/RelativeVector2.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -334,6 +334,16 @@ namespace Tizen.NUI return equal; } + /// + /// Gets the the hash code of this RelativeVector2. + /// + /// The Hash Code. + /// 5 + public override int GetHashCode() + { + return X.GetHashCode(); + } + /// /// Compares if the rhs is equal to. /// diff --git a/src/Tizen.NUI/src/public/RelativeVector3.cs b/src/Tizen.NUI/src/public/RelativeVector3.cs index 9b674ff2f..2920c0f36 100755 --- a/src/Tizen.NUI/src/public/RelativeVector3.cs +++ b/src/Tizen.NUI/src/public/RelativeVector3.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -336,6 +336,16 @@ namespace Tizen.NUI return equal; } + /// + /// Gets the the hash code of this RelativeVector3. + /// + /// The Hash Code. + /// 5 + public override int GetHashCode() + { + return X.GetHashCode(); + } + /// /// Compares if the rhs is equal to. /// diff --git a/src/Tizen.NUI/src/public/RelativeVector4.cs b/src/Tizen.NUI/src/public/RelativeVector4.cs index ea8818037..00a085592 100755 --- a/src/Tizen.NUI/src/public/RelativeVector4.cs +++ b/src/Tizen.NUI/src/public/RelativeVector4.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -335,6 +335,16 @@ namespace Tizen.NUI return equal; } + /// + /// Gets the the hash code of this RelativeVector4. + /// + /// The Hash Code. + /// 5 + public override int GetHashCode() + { + return X.GetHashCode(); + } + /// /// Compares if the rhs is equal to. /// diff --git a/src/Tizen.NUI/src/public/Size.cs b/src/Tizen.NUI/src/public/Size.cs index 6a20e20e4..c67571212 100755 --- a/src/Tizen.NUI/src/public/Size.cs +++ b/src/Tizen.NUI/src/public/Size.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -345,6 +345,15 @@ namespace Tizen.NUI return equal; } + /// + /// Gets the the hash code of this Size. + /// + /// The Hash Code. + /// 5 + public override int GetHashCode() + { + return Zero.GetHashCode(); + } /// /// Checks equality.
diff --git a/src/Tizen.NUI/src/public/Size2D.cs b/src/Tizen.NUI/src/public/Size2D.cs index 7ad795ed3..3d6ee9674 100755 --- a/src/Tizen.NUI/src/public/Size2D.cs +++ b/src/Tizen.NUI/src/public/Size2D.cs @@ -328,6 +328,16 @@ namespace Tizen.NUI return equal; } + /// + /// Gets the the hash code of this Size2D. + /// + /// The Hash Code. + /// 5 + public override int GetHashCode() + { + return Width.GetHashCode(); + } + /// /// Checks equality.
/// Utilizes appropriate machine epsilon values.
diff --git a/src/Tizen.NUI/src/public/TapGestureDetector.cs b/src/Tizen.NUI/src/public/TapGestureDetector.cs index 460cf2067..9715dbf69 100755 --- a/src/Tizen.NUI/src/public/TapGestureDetector.cs +++ b/src/Tizen.NUI/src/public/TapGestureDetector.cs @@ -206,7 +206,7 @@ namespace Tizen.NUI /// /// Creates an initialized TapGestureDetector with the specified parameters. /// - /// The minimum & maximum number of taps required + /// The minimum and maximum number of taps required /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public TapGestureDetector(uint tapsRequired) : this(NDalicPINVOKE.TapGestureDetector_New__SWIG_1(tapsRequired), true) diff --git a/src/Tizen.NUI/src/public/Vector2.cs b/src/Tizen.NUI/src/public/Vector2.cs index 888f39f50..a58fb03a6 100755 --- a/src/Tizen.NUI/src/public/Vector2.cs +++ b/src/Tizen.NUI/src/public/Vector2.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -497,6 +497,16 @@ namespace Tizen.NUI return equal; } + /// + /// Gets the the hash code of this Vector2. + /// + /// The Hash Code. + /// 5 + public override int GetHashCode() + { + return X.GetHashCode(); + } + /// /// Returns the length of the vector. /// diff --git a/src/Tizen.NUI/src/public/Vector3.cs b/src/Tizen.NUI/src/public/Vector3.cs index 6ecd903b5..614b65712 100755 --- a/src/Tizen.NUI/src/public/Vector3.cs +++ b/src/Tizen.NUI/src/public/Vector3.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -549,6 +549,16 @@ namespace Tizen.NUI return equal; } + /// + /// Gets the the hash code of this Vector3. + /// + /// The Hash Code. + /// 5 + public override int GetHashCode() + { + return X.GetHashCode(); + } + /// /// Returns the length of the vector. /// diff --git a/src/Tizen.NUI/src/public/Vector4.cs b/src/Tizen.NUI/src/public/Vector4.cs index d36215c33..e0132de88 100755 --- a/src/Tizen.NUI/src/public/Vector4.cs +++ b/src/Tizen.NUI/src/public/Vector4.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -512,6 +512,16 @@ namespace Tizen.NUI return equal; } + /// + /// Gets the the hash code of this Vector4. + /// + /// The Hash Code. + /// 5 + public override int GetHashCode() + { + return X.GetHashCode(); + } + /// /// Returns the length of the vector. /// diff --git a/src/Tizen.NUI/src/public/VisualFactory.cs b/src/Tizen.NUI/src/public/VisualFactory.cs index 0c1e0662a..afad17721 100755 --- a/src/Tizen.NUI/src/public/VisualFactory.cs +++ b/src/Tizen.NUI/src/public/VisualFactory.cs @@ -1,5 +1,5 @@ /* - * Copyright(c) 2017 Samsung Electronics Co., Ltd. + * Copyright(c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -29,6 +29,11 @@ namespace Tizen.NUI { private global::System.Runtime.InteropServices.HandleRef swigCPtr; + /// + /// Instance of the VisualFactory singleton. + /// + private static VisualFactory instance; + internal VisualFactory(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.VisualFactory_SWIGUpcast(cPtr), cMemoryOwn) { swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); @@ -50,9 +55,7 @@ namespace Tizen.NUI [EditorBrowsable(EditorBrowsableState.Never)] public static VisualFactory Get() { - VisualFactory ret = new VisualFactory(NDalicPINVOKE.VisualFactory_Get(), true); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - return ret; + return VisualFactory.Instance; } internal VisualFactory() : this(NDalicPINVOKE.new_VisualFactory__SWIG_0(), true) @@ -81,8 +84,6 @@ namespace Tizen.NUI return ret; } - private static readonly VisualFactory instance = VisualFactory.Get(); - /// /// Retrieves the VisualFactory singleton. /// @@ -91,6 +92,12 @@ namespace Tizen.NUI { get { + if (!instance) + { + instance = new VisualFactory(NDalicPINVOKE.VisualFactory_Get(), true); + if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); + } + return instance; } } diff --git a/src/Tizen.NUI/src/public/Widget.cs b/src/Tizen.NUI/src/public/Widget.cs index e7f601dee..cd4fc57c5 100755 --- a/src/Tizen.NUI/src/public/Widget.cs +++ b/src/Tizen.NUI/src/public/Widget.cs @@ -1,6 +1,6 @@ /* * Copyright (c) 2017 Samsung Electronics Co., Ltd. - * + *Z:\Desktop\shared\tizenfx\src\Tizen.NUI\src\public\BaseComponents\CustomView.cs * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at diff --git a/src/Tizen.NUI/src/public/Window.cs b/src/Tizen.NUI/src/public/Window.cs index 09e3d8cc4..3a8a2b299 100755 --- a/src/Tizen.NUI/src/public/Window.cs +++ b/src/Tizen.NUI/src/public/Window.cs @@ -34,7 +34,6 @@ namespace Tizen.NUI private readonly global::System.Runtime.InteropServices.HandleRef rootLayoutCPtr; private Layer _rootLayer; private string _windowTitle; - private readonly LayoutItem rootLayoutItem; private List _childLayers = new List(); internal List LayersChildren @@ -50,23 +49,16 @@ namespace Tizen.NUI swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); if (NDalicPINVOKE.Stage_IsInstalled()) { - global::System.IntPtr rootLayoutIntPtr; stageCPtr = new global::System.Runtime.InteropServices.HandleRef(this, NDalicPINVOKE.Stage_GetCurrent()); // Create a root layout (AbsoluteLayout) that is invisible to the user but enables layouts added to the Window // Enables layouts added to the Window to have a parent layout. As parent layout is needed to store measure spec properties. // Currently without these measure specs the new layout added will always be the size of the window. - rootLayoutIntPtr = NDalicManualPINVOKE.Window_NewRootLayout(); + global::System.IntPtr rootLayoutIntPtr = NDalicManualPINVOKE.Window_NewRootLayout(); // Store HandleRef used by Add() rootLayoutCPtr = new global::System.Runtime.InteropServices.HandleRef(this, rootLayoutIntPtr); Layer rootLayer = GetRootLayer(); // Add the root layout created above to the root layer. NDalicPINVOKE.Actor_Add( Layer.getCPtr(rootLayer), rootLayoutCPtr ); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - global::System.IntPtr rootControlLayoutIntPtr = Tizen.NUI.NDalicManualPINVOKE.GetLayout__SWIG_1(rootLayoutCPtr); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - rootLayoutItem = new LayoutItem(rootControlLayoutIntPtr, true); } } @@ -1474,11 +1466,6 @@ namespace Tizen.NUI NDalicManualPINVOKE.SetSize(swigCPtr, Uint16Pair.getCPtr(val)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - if(rootLayoutItem != null) - { - rootLayoutItem.RequestLayout(); - } } internal Size2D GetWindowSize() @@ -1496,11 +1483,6 @@ namespace Tizen.NUI NDalicManualPINVOKE.SetPosition(swigCPtr, Uint16Pair.getCPtr(val)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - if(rootLayoutItem != null) - { - rootLayoutItem.RequestLayout(); - } } internal Position2D GetPosition() @@ -1512,17 +1494,6 @@ namespace Tizen.NUI return ret; } - internal void SetPositionSize(Rectangle positionSize) - { - NDalicPINVOKE.Window_SetPositionSize(swigCPtr, Rectangle.getCPtr(positionSize)); - if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); - - if(rootLayoutItem != null) - { - rootLayoutItem.RequestLayout(); - } - } - /// /// Sets whether the window is transparent or not. /// @@ -1641,7 +1612,7 @@ namespace Tizen.NUI private WindowFocusChangedEventCallbackType _windowFocusChangedEventCallback2; [UnmanagedFunctionPointer(CallingConvention.StdCall)] private delegate void WindowFocusChangedEventCallbackType2(bool focusGained); - private event EventHandler _windowFocusChangedEventHandler2; + private event EventHandler _windowFocusChangedEventHandler2; /// /// Please do not use! this will be deprecated. Please use 'FocusChanged' event instead. @@ -1654,7 +1625,7 @@ namespace Tizen.NUI "Window.Instance.FocusChanged = OnFocusChanged; " + "private void OnFocusChanged(object source, Window.FocusChangedEventArgs args) {...}")] [EditorBrowsable(EditorBrowsableState.Never)] - public event EventHandler WindowFocusChanged + public event EventHandler WindowFocusChanged { add { @@ -1679,7 +1650,7 @@ namespace Tizen.NUI private void OnWindowFocusedChanged2(bool focusGained) { - WindowFocusChangedEventArgs e = new WindowFocusChangedEventArgs(); + FocusChangedEventArgs e = new FocusChangedEventArgs(); e.FocusGained = focusGained; @@ -1721,26 +1692,6 @@ namespace Tizen.NUI } } - /// - /// Sets position and size of the window. This API guarantees that - /// both moving and resizing of window will appear on the screen at once. - /// - [EditorBrowsable(EditorBrowsableState.Never)] - public Rectangle WindowPositionSize - { - get - { - Position2D position = GetPosition(); - Size2D size = GetSize(); - Rectangle ret = new Rectangle(position.X, position.Y, size.Width, size.Height); - return ret; - } - set - { - SetPositionSize(value); - } - } - /// /// Feeds a key event into the window. /// @@ -1811,63 +1762,5 @@ namespace Tizen.NUI } } - /// - /// Disconnect all native signals - /// - /// 5 - internal void DisconnectNativeSignals() - { - if( _windowFocusChangedEventCallback != null ) - { - WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback); - } - - if( _rootLayerTouchDataCallback != null ) - { - TouchDataSignal().Disconnect(_rootLayerTouchDataCallback); - } - - if( _wheelEventCallback != null ) - { - StageWheelEventSignal().Disconnect(_wheelEventCallback); - } - - if( _stageKeyCallbackDelegate != null ) - { - KeyEventSignal().Disconnect(_stageKeyCallbackDelegate); - } - - if( _stageEventProcessingFinishedEventCallbackDelegate != null ) - { - EventProcessingFinishedSignal().Disconnect(_stageEventProcessingFinishedEventCallbackDelegate); - } - - if( _stageContextLostEventCallbackDelegate != null ) - { - ContextLostSignal().Disconnect(_stageContextLostEventCallbackDelegate); - } - - if( _stageContextRegainedEventCallbackDelegate != null ) - { - ContextRegainedSignal().Disconnect(_stageContextRegainedEventCallbackDelegate); - } - - if( _stageSceneCreatedEventCallbackDelegate != null ) - { - SceneCreatedSignal().Disconnect(_stageSceneCreatedEventCallbackDelegate); - } - - if( _windowResizedEventCallback != null ) - { - ResizedSignal().Disconnect(_windowResizedEventCallback); - } - - if( _windowFocusChangedEventCallback2 != null ) - { - WindowFocusChangedSignal().Disconnect(_windowFocusChangedEventCallback2); - } - - } - } } diff --git a/src/Tizen.NUI/src/public/XamlBinding/ContentPage.cs b/src/Tizen.NUI/src/public/XamlBinding/ContentPage.cs index 1ddfc1ee9..5f04e4776 100755 --- a/src/Tizen.NUI/src/public/XamlBinding/ContentPage.cs +++ b/src/Tizen.NUI/src/public/XamlBinding/ContentPage.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -34,7 +34,6 @@ namespace Tizen.NUI /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] public View Root {get; internal set;} - private Window Window; internal static readonly BindableProperty ContentProperty = BindableProperty.Create(nameof(Content), typeof(View), typeof(ContentPage), null, propertyChanged: (bindable, oldValue, newValue) => { @@ -116,8 +115,10 @@ namespace Tizen.NUI IsCreateByXaml = true; Root = new View(); - Root.WidthResizePolicy = ResizePolicyType.FillToParent; - Root.HeightResizePolicy = ResizePolicyType.FillToParent; + Root.Size2D = new Size2D(win.WindowSize.Width, win.WindowSize.Height); + Root.ParentOrigin = ParentOrigin.TopLeft; + Root.PivotPoint = PivotPoint.TopLeft; + Root.PositionUsesPivotPoint = true; win.Add(Root); } diff --git a/src/Tizen.NUI/src/public/XamlBinding/Element.cs b/src/Tizen.NUI/src/public/XamlBinding/Element.cs index b457dca8f..86149ab02 100755 --- a/src/Tizen.NUI/src/public/XamlBinding/Element.cs +++ b/src/Tizen.NUI/src/public/XamlBinding/Element.cs @@ -114,17 +114,17 @@ namespace Tizen.NUI.Binding /// /// Gets the element which is the closest ancestor of this element that is a BaseHandle. /// - [Obsolete("ParentView is obsolete as of version 2.1.0. Please use Parent instead.")] /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] - public /*VisualElement*/BaseHandle ParentView + [Obsolete("ParentView is obsolete as of version 2.1.0. Please use Parent instead.")] + public BaseHandle ParentView { get { Element parent = Parent; while (parent != null) { - var parentView = parent as /*VisualElement*/BaseHandle; + var parentView = parent as BaseHandle; if (parentView != null) return parentView; parent = parent.RealParent; @@ -606,23 +606,13 @@ namespace Tizen.NUI.Binding internal static void SetFlowDirectionFromParent(Element child) { - // IFlowDirectionController controller = child as IFlowDirectionController; - // if (controller == null) - // return; - - // if (controller.EffectiveFlowDirection.IsImplicit()) - // { - // var parentView = child.Parent as IFlowDirectionController; - // if (parentView == null) - // return; - - // var flowDirection = parentView.EffectiveFlowDirection.ToFlowDirection(); - - // if (flowDirection != controller.EffectiveFlowDirection.ToFlowDirection()) - // { - // controller.EffectiveFlowDirection = flowDirection.ToEffectiveFlowDirection(); - // } - // } + /* + var parentView = child.Parent; + if (parentView == null) + { + return; + } + */ } /// @@ -646,9 +636,11 @@ namespace Tizen.NUI.Binding ReadOnlyCollection children = queue.Dequeue().LogicalChildrenInternal; for (var i = 0; i < children.Count; i++) { - var child = children[i] as /*VisualElement*/BaseHandle; - if (child == null /*|| !child.IsVisible*/) + var child = children[i] as BaseHandle; + if (child == null) + { continue; + } yield return child; queue.Enqueue(child); } diff --git a/src/Tizen.NUI/src/public/XamlBinding/IResourcesProvider.cs b/src/Tizen.NUI/src/public/XamlBinding/IResourcesProvider.cs index 243b6b781..add06df0d 100755 --- a/src/Tizen.NUI/src/public/XamlBinding/IResourcesProvider.cs +++ b/src/Tizen.NUI/src/public/XamlBinding/IResourcesProvider.cs @@ -6,7 +6,13 @@ namespace Tizen.NUI.Binding [EditorBrowsable(EditorBrowsableState.Never)] public interface IResourcesProvider { + /// + /// Check if resources created. + /// bool IsResourcesCreated { get; } + /// + /// Saved xaml resources. + /// ResourceDictionary XamlResources { get; set; } } } diff --git a/src/Tizen.NUI/src/public/XamlBinding/IValueConverter.cs b/src/Tizen.NUI/src/public/XamlBinding/IValueConverter.cs index a60df5612..504bb7e1f 100755 --- a/src/Tizen.NUI/src/public/XamlBinding/IValueConverter.cs +++ b/src/Tizen.NUI/src/public/XamlBinding/IValueConverter.cs @@ -8,7 +8,23 @@ namespace Tizen.NUI.Binding [EditorBrowsable(EditorBrowsableState.Never)] public interface IValueConverter { + /// + /// Converts a value. + /// + /// The value produced by the binding source. + /// The type of the binding target property. + /// The converter parameter to use. + /// The culture to use in the converter. + /// A converted value. If the method returns null, the valid null value is used. object Convert(object value, Type targetType, object parameter, CultureInfo culture); + /// + /// Converts a value. + /// + /// The value that is produced by the binding target. + /// The type to convert to. + /// The converter parameter to use. + /// The culture to use in the converter. + /// A converted value. If the method returns null, the valid null value is used.> object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture); } } diff --git a/src/Tizen.NUI/src/public/XamlBinding/Page.cs b/src/Tizen.NUI/src/public/XamlBinding/Page.cs index 81222df3d..c11ca0318 100755 --- a/src/Tizen.NUI/src/public/XamlBinding/Page.cs +++ b/src/Tizen.NUI/src/public/XamlBinding/Page.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) 2017 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -84,7 +84,6 @@ namespace Tizen.NUI readonly Lazy> _platformConfigurationRegistry; - bool _allocatedFlag; Rectangle _containerArea; bool _containerAreaSet; @@ -200,7 +199,7 @@ namespace Tizen.NUI [EditorBrowsable(EditorBrowsableState.Never)] public ObservableCollection InternalChildren { get; } = new ObservableCollection(); - internal override ReadOnlyCollection LogicalChildrenInternal => + internal override ReadOnlyCollection LogicalChildrenInternal => _logicalChildren ?? (_logicalChildren = new ReadOnlyCollection(InternalChildren)); /// @@ -282,7 +281,6 @@ namespace Tizen.NUI [EditorBrowsable(EditorBrowsableState.Never)] public void ForceLayout() { - // SizeAllocated(Width, Height); } /// @@ -319,19 +317,6 @@ namespace Tizen.NUI area.Width = Math.Max(0, area.Width); area.Height = Math.Max(0, area.Height); } - - List elements = LogicalChildren.ToList(); - foreach (Element element in elements) - { - var child = element as /*VisualElement*/BaseHandle; - if (child == null) - continue; - var page = child as Page; - // if (page != null && page.IgnoresContainerArea) - // Forms.Layout.LayoutChildIntoBoundingRegion(child, originalArea); - // else - // Forms.Layout.LayoutChildIntoBoundingRegion(child, area); - } } /// @@ -352,15 +337,11 @@ namespace Tizen.NUI protected virtual bool OnBackButtonPressed() { var application = RealParent as Application; - // if (application == null || this == application.MainPage) - // return false; var canceled = false; EventHandler handler = (sender, args) => { canceled = true; }; - // application.PopCanceled += handler; Navigation.PopModalAsync().ContinueWith(t => { throw t.Exception; }, CancellationToken.None, TaskContinuationOptions.OnlyOnFaulted, TaskScheduler.FromCurrentSynchronizationContext()); - // application.PopCanceled -= handler; return !canceled; } @@ -372,10 +353,6 @@ namespace Tizen.NUI protected override void OnBindingContextChanged() { base.OnBindingContextChanged(); - // foreach (ToolbarItem toolbarItem in ToolbarItems) - // { - // SetInheritedBindingContext(toolbarItem, BindingContext); - // } } /// @@ -388,7 +365,7 @@ namespace Tizen.NUI protected virtual void OnChildMeasureInvalidated(object sender, EventArgs e) { InvalidationTrigger trigger = (e as InvalidationEventArgs)?.Trigger ?? InvalidationTrigger.Undefined; - OnChildMeasureInvalidated((/*VisualElement*/BaseHandle)sender, trigger); + OnChildMeasureInvalidated((BaseHandle)sender, trigger); } /// @@ -407,21 +384,9 @@ namespace Tizen.NUI [EditorBrowsable(EditorBrowsableState.Never)] protected override void OnParentSet() { - //if (!Application.IsApplicationOrNull(RealParent) && !(RealParent is Page)) - // throw new InvalidOperationException("Parent of a Page must also be a Page"); base.OnParentSet(); } - ///// - ///// Indicates that the Page has been assigned a size. - ///// - // protected override void OnSizeAllocated(double width, double height) - // { - // _allocatedFlag = true; - // //base.OnSizeAllocated(width, height); - // UpdateChildrenLayout(); - // } - /// /// Requests that the children Elements of the Page update their layouts. /// @@ -432,56 +397,37 @@ namespace Tizen.NUI if (!ShouldLayoutChildren()) return; - var startingLayout = new List(LogicalChildren.Count); - foreach (/*VisualElement*/BaseHandle c in LogicalChildren) - { - //startingLayout.Add(c.Bounds); - } - double x = Padding.Left; double y = Padding.Top; - //double w = Math.Max(0, Width - Padding.HorizontalThickness); - //double h = Math.Max(0, Height - Padding.VerticalThickness); - - //LayoutChildren(x, y, w, h); for (var i = 0; i < LogicalChildren.Count; i++) { - var c = (/*VisualElement*/BaseHandle)LogicalChildren[i]; - - // if (c.Bounds != startingLayout[i]) - // { - // LayoutChanged?.Invoke(this, EventArgs.Empty); - // return; - // } + LayoutChanged?.Invoke(this, EventArgs.Empty); } } - internal virtual void OnChildMeasureInvalidated(/*VisualElement*/BaseHandle child, InvalidationTrigger trigger) + internal virtual void OnChildMeasureInvalidated(BaseHandle child, InvalidationTrigger trigger) { var container = this as IPageContainer; if (container != null) { Page page = container.CurrentPage; - if (page != null /*&& page.IsVisible && (!page.IsPlatformEnabled || !page.IsNativeStateConsistent)*/) + if (page != null) + { return; + } } else { for (var i = 0; i < LogicalChildren.Count; i++) { - var v = LogicalChildren[i] as /*VisualElement*/BaseHandle; - if (v != null /*&& v.IsVisible && (!v.IsPlatformEnabled || !v.IsNativeStateConsistent)*/) + var v = LogicalChildren[i] as BaseHandle; + if (v != null) + { return; + } } } - - _allocatedFlag = false; - // InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged); - if (!_allocatedFlag /*&& Width >= 0 && Height >= 0*/) - { - // SizeAllocated(Width, Height); - } } /// @@ -503,8 +449,6 @@ namespace Tizen.NUI var pageContainer = this as IPageContainer; pageContainer?.CurrentPage?.SendAppearing(); - - //FindApplication(this)?.OnPageAppearing(this); } /// @@ -526,8 +470,6 @@ namespace Tizen.NUI OnDisappearing(); Disappearing?.Invoke(this, EventArgs.Empty); - - //FindApplication(this)?.OnPageDisappearing(this); } Application FindApplication(Element element) @@ -542,29 +484,28 @@ namespace Tizen.NUI { if (e.OldItems != null) { - foreach (/*VisualElement*/BaseHandle item in e.OldItems.OfType()) + foreach (BaseHandle item in e.OldItems.OfType()) + { OnInternalRemoved(item); + } } if (e.NewItems != null) { - foreach (/*VisualElement*/BaseHandle item in e.NewItems.OfType()) + foreach (BaseHandle item in e.NewItems.OfType()) + { OnInternalAdded(item); + } } } - void OnInternalAdded(/*VisualElement*/BaseHandle view) + private void OnInternalAdded(BaseHandle view) { - // view.MeasureInvalidated += OnChildMeasureInvalidated; - OnChildAdded(view); - // InvalidateMeasureInternal(InvalidationTrigger.MeasureChanged); } - void OnInternalRemoved(/*VisualElement*/BaseHandle view) + private void OnInternalRemoved(BaseHandle view) { - // view.MeasureInvalidated -= OnChildMeasureInvalidated; - OnChildRemoved(view); } @@ -586,22 +527,22 @@ namespace Tizen.NUI bool ShouldLayoutChildren() { - if (!LogicalChildren.Any()/* || Width <= 0 || Height <= 0 || !IsNativeStateConsistent*/) + if (!LogicalChildren.Any()) + { return false; + } var container = this as IPageContainer; if (container?.CurrentPage != null) { - // if (InternalChildren.Contains(container.CurrentPage)) - // return container.CurrentPage.IsPlatformEnabled && container.CurrentPage.IsNativeStateConsistent; return true; } var any = false; for (var i = 0; i < LogicalChildren.Count; i++) { - var v = LogicalChildren[i] as /*VisualElement*/BaseHandle; - if (v != null /*&& (!v.IsPlatformEnabled || !v.IsNativeStateConsistent)*/) + var v = LogicalChildren[i] as BaseHandle; + if (v != null) { any = true; break; diff --git a/src/Tizen.NUI/src/public/XamlBinding/ResourceDictionary.cs b/src/Tizen.NUI/src/public/XamlBinding/ResourceDictionary.cs index 0e2303e16..85a45f7af 100755 --- a/src/Tizen.NUI/src/public/XamlBinding/ResourceDictionary.cs +++ b/src/Tizen.NUI/src/public/XamlBinding/ResourceDictionary.cs @@ -31,10 +31,13 @@ namespace Tizen.NUI.Binding DependencyService.Register(); } - [TypeConverter(typeof(TypeTypeConverter))] - [Obsolete("Use Source")] + /// + /// Gets or sets the type of object with which the resource dictionary is merged. + /// /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] + [TypeConverter(typeof(TypeTypeConverter))] + [Obsolete("Use Source")] public Type MergedWith { get { return _mergedWith; } set { @@ -56,9 +59,12 @@ namespace Tizen.NUI.Binding } } - [TypeConverter(typeof(RDSourceTypeConverter))] + /// + /// Gets or sets the URI of the merged resource dictionary. + /// /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] + [TypeConverter(typeof(RDSourceTypeConverter))] public Uri Source { get { return _source; } set { @@ -68,7 +74,14 @@ namespace Tizen.NUI.Binding } } - //Used by the XamlC compiled converter + /// + /// To set and load source. + /// + /// The source. + /// The resource path. + /// The assembly. + /// The xml line info. + /// Used by the XamlC compiled converter. [EditorBrowsable(EditorBrowsableState.Never)] public void SetAndLoadSource(Uri value, string resourcePath, Assembly assembly, System.Xml.IXmlLineInfo lineInfo) { @@ -215,9 +228,12 @@ namespace Tizen.NUI.Binding return _innerDictionary.ContainsKey(key); } - [IndexerName("Item")] + /// + /// Gets or sets the value according to index. + /// /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] + [IndexerName("Item")] public object this[string index] { get diff --git a/src/Tizen.NUI/src/public/XamlBinding/XmlnsDefinitionAttribute.cs b/src/Tizen.NUI/src/public/XamlBinding/XmlnsDefinitionAttribute.cs index 85c6aeabe..baee6f12c 100755 --- a/src/Tizen.NUI/src/public/XamlBinding/XmlnsDefinitionAttribute.cs +++ b/src/Tizen.NUI/src/public/XamlBinding/XmlnsDefinitionAttribute.cs @@ -4,10 +4,14 @@ using System.ComponentModel; namespace Tizen.NUI { - [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] - [DebuggerDisplay("{XmlNamespace}, {ClrNamespace}, {AssemblyName}")] + /// + /// Specifies a mapping on a per-assembly basis between a XAML namespace and a CLR namespace,
+ /// which is then used for type resolution by a XAML object writer or XAML schema context. + ///
/// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API. [EditorBrowsable(EditorBrowsableState.Never)] + [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] + [DebuggerDisplay("{XmlNamespace}, {ClrNamespace}, {AssemblyName}")] public sealed class XmlnsDefinitionAttribute : Attribute { /// This will be public opened in tizen_5.0 after ACR done. Before ACR, need to be hidden as inhouse API.