[ElmSharp.Wearable] Get back old ctor and Disabled 57/157557/2
authorpius.lee <pius.lee@samsung.com>
Wed, 25 Oct 2017 05:33:50 +0000 (14:33 +0900)
committerpius.lee <pius.lee@samsung.com>
Wed, 25 Oct 2017 05:48:54 +0000 (14:48 +0900)
for ABI

Change-Id: I3d0cf34f079c49f42cf7d3a0f3d8d0813c7749b1

src/ElmSharp.Wearable/ElmSharp.Wearable/CircleDatetimeSelector.cs
src/ElmSharp.Wearable/ElmSharp.Wearable/CircleGenList.cs
src/ElmSharp.Wearable/ElmSharp.Wearable/CircleProgressBar.cs
src/ElmSharp.Wearable/ElmSharp.Wearable/CircleScroller.cs
src/ElmSharp.Wearable/ElmSharp.Wearable/CircleSlider.cs
src/ElmSharp.Wearable/ElmSharp.Wearable/CircleSpinner.cs
src/ElmSharp.Wearable/ElmSharp.Wearable/CircleSurface.cs

index 851b135..28a8f89 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 using System;
+using System.ComponentModel;
 using System.Diagnostics;
 
 namespace ElmSharp.Wearable
@@ -41,6 +42,17 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
+        /// Creates and initializes a new instance of the Circle DateTimeSelector class.
+        /// </summary>
+        /// <param name="parent">The parent of new Circle CircleDateTimeSelector instance</param>
+        [Obsolete("It is not safe for guess circle surface from parent and create new surface by every new widget")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public CircleDateTimeSelector(EvasObject parent) : this(parent, CircleSurface.CreateCircleSurface(parent))
+        {
+            ((IRotaryActionWidget)this).Activate();
+        }
+
+        /// <summary>
         /// Gets the handle for Circle Widget.
         /// </summary>
         public virtual IntPtr CircleHandle => _circleHandle;
@@ -51,6 +63,17 @@ namespace ElmSharp.Wearable
         public virtual CircleSurface CircleSurface => _surface;
 
         /// <summary>
+        /// Sets or gets disabled state of this widget.
+        /// </summary>
+        [Obsolete("Use IsEnabled")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool Disabled
+        {
+            get => !IsEnabled;
+            set => IsEnabled = !value;
+        }
+
+        /// <summary>
         /// Sets or gets the state of the widget, which might be enabled or disabled.
         /// </summary>
         public override bool IsEnabled
index 1de98bd..7dc18e1 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 using System;
+using System.ComponentModel;
 using System.Diagnostics;
 
 namespace ElmSharp.Wearable
@@ -41,6 +42,17 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
+        /// Creates and initializes a new instance of the Circle GenList class.
+        /// </summary>
+        /// <param name="parent">The parent of new Circle CircleGenList instance</param>
+        [Obsolete("It is not safe for guess circle surface from parent and create new surface by every new widget")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public CircleGenList(EvasObject parent) : this(parent, CircleSurface.CreateCircleSurface(parent))
+        {
+            ((IRotaryActionWidget)this).Activate();
+        }
+
+        /// <summary>
         /// Gets the handle for Circle Widget.
         /// </summary>
         public virtual IntPtr CircleHandle => _circleHandle;
@@ -51,6 +63,17 @@ namespace ElmSharp.Wearable
         public virtual CircleSurface CircleSurface => _surface;
 
         /// <summary>
+        /// Sets or gets disabled state of this widget.
+        /// </summary>
+        [Obsolete("Use IsEnabled")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool Disabled
+        {
+            get => !IsEnabled;
+            set => IsEnabled = !value;
+        }
+
+        /// <summary>
         /// Sets or gets the state of the widget, which might be enabled or disabled.
         /// </summary>
         public override bool IsEnabled
index f4d7cbf..843b8aa 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 using System;
+using System.ComponentModel;
 using System.Diagnostics;
 
 namespace ElmSharp.Wearable
@@ -40,6 +41,16 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
+        /// Creates and initializes a new instance of the Circle Progressbar class.
+        /// </summary>
+        /// <param name="parent">The parent of new Circle Progressbar instance</param>
+        [Obsolete("It is not safe for guess circle surface from parent and create new surface by every new widget")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public CircleProgressBar(EvasObject parent) : this(parent, CircleSurface.CreateCircleSurface(parent))
+        {
+        }
+
+        /// <summary>
         /// Gets the handle for Circle Widget.
         /// </summary>
         public virtual IntPtr CircleHandle => Handle;
@@ -50,6 +61,17 @@ namespace ElmSharp.Wearable
         public virtual CircleSurface CircleSurface => _surface;
 
         /// <summary>
+        /// Sets or gets disabled state of this widget.
+        /// </summary>
+        [Obsolete("Use IsEnabled")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool Disabled
+        {
+            get => !IsEnabled;
+            set => IsEnabled = !value;
+        }
+
+        /// <summary>
         /// Sets or gets the state of the widget, which might be enabled or disabled.
         /// </summary>
         public override bool IsEnabled
index e60f31e..7eaf307 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 using System;
+using System.ComponentModel;
 using System.Diagnostics;
 
 namespace ElmSharp.Wearable
@@ -40,6 +41,17 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
+        /// Creates and initializes a new instance of the Circle Scroller class.
+        /// </summary>
+        /// <param name="parent">The parent of new Circle CircleScroller instance</param>
+        [Obsolete("It is not safe for guess circle surface from parent and create new surface by every new widget")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public CircleScroller(EvasObject parent) : this(parent, CircleSurface.CreateCircleSurface(parent))
+        {
+            ((IRotaryActionWidget)this).Activate();
+        }
+
+        /// <summary>
         /// Gets the handle for Circle Widget.
         /// </summary>
         public virtual IntPtr CircleHandle => _circleHandle;
@@ -50,6 +62,17 @@ namespace ElmSharp.Wearable
         public virtual CircleSurface CircleSurface => _surface;
 
         /// <summary>
+        /// Sets or gets disabled state of this widget.
+        /// </summary>
+        [Obsolete("Use IsEnabled")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool Disabled
+        {
+            get => !IsEnabled;
+            set => IsEnabled = !value;
+        }
+
+        /// <summary>
         /// Sets or gets the state of the widget, which might be enabled or disabled.
         /// </summary>
         public override bool IsEnabled
index 06bd53b..61959e0 100755 (executable)
@@ -15,6 +15,7 @@
  */
 
 using System;
+using System.ComponentModel;
 using System.Diagnostics;
 
 namespace ElmSharp.Wearable
@@ -40,6 +41,17 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
+        /// Creates and initializes a new instance of the Circle Slider class.
+        /// </summary>
+        /// <param name="parent">The parent of new Circle CircleSlider instance</param>
+        [Obsolete("It is not safe for guess circle surface from parent and create new surface by every new widget")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public CircleSlider(EvasObject parent) : this(parent, CircleSurface.CreateCircleSurface(parent))
+        {
+            ((IRotaryActionWidget)this).Activate();
+        }
+
+        /// <summary>
         /// Changed will be triggered when the circle slider value changes.
         /// </summary>
         public event EventHandler ValueChanged;
@@ -74,6 +86,17 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
+        /// Sets or gets disabled state of this widget.
+        /// </summary>
+        [Obsolete("Use IsEnabled")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool Disabled
+        {
+            get => !IsEnabled;
+            set => IsEnabled = !value;
+        }
+
+        /// <summary>
         /// Sets or gets the state of the widget, which might be enabled or disabled.
         /// </summary>
         public override bool IsEnabled
index e66fa54..8a39ce5 100644 (file)
@@ -15,6 +15,7 @@
  */
 
 using System;
+using System.ComponentModel;
 using System.Diagnostics;
 
 namespace ElmSharp.Wearable
@@ -43,6 +44,17 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
+        /// Creates and initializes a new instance of the Circle Spinner class.
+        /// </summary>
+        /// <param name="parent">The parent of new Circle CircleSpinner instance</param>
+        [Obsolete("It is not safe for guess circle surface from parent and create new surface by every new widget")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public CircleSpinner(EvasObject parent) : this(parent, CircleSurface.CreateCircleSurface(parent))
+        {
+            ((IRotaryActionWidget)this).Activate();
+        }
+
+        /// <summary>
         /// Gets the handle for Circle Widget.
         /// </summary>
         public virtual IntPtr CircleHandle => RealHandle;
@@ -69,6 +81,17 @@ namespace ElmSharp.Wearable
         }
 
         /// <summary>
+        /// Sets or gets disabled state of this widget.
+        /// </summary>
+        [Obsolete("Use IsEnabled")]
+        [EditorBrowsable(EditorBrowsableState.Never)]
+        public bool Disabled
+        {
+            get => !IsEnabled;
+            set => IsEnabled = !value;
+        }
+
+        /// <summary>
         /// Sets or gets the state of the widget, which might be enabled or disabled.
         /// </summary>
         public override bool IsEnabled
index 91da5a1..e00b593 100644 (file)
@@ -46,6 +46,17 @@ namespace ElmSharp.Wearable
             _handle = IntPtr.Zero;
         }
 
+        /// <summary>
+        /// Gets the handle for CircleSurface
+        /// </summary>
         public IntPtr Handle => _handle;
+
+        internal static CircleSurface CreateCircleSurface(EvasObject obj)
+        {
+            if (obj is Conformant) return new CircleSurface(obj as Conformant);
+            else if (obj is Naviframe) return new CircleSurface(obj as Naviframe);
+            else if (obj is Layout) return new CircleSurface(obj as Layout);
+            else return new CircleSurface();
+        }
     }
 }