Add API to show/hide the indicator 08/124708/2
authorPawel Andruszkiewicz <p.andruszkie@samsung.com>
Wed, 12 Apr 2017 07:16:14 +0000 (09:16 +0200)
committerPawel Andruszkiewicz <p.andruszkie@samsung.com>
Wed, 12 Apr 2017 07:45:58 +0000 (09:45 +0200)
Change-Id: I4b7999395166d2bc45b472c7e4c35fe6da03690a
Signed-off-by: Pawel Andruszkiewicz <p.andruszkie@samsung.com>
ElmSharp/ElmSharp/Window.cs
ElmSharp/Interop/Interop.Elementary.Win.cs
packaging/elm-sharp.spec

index 52391de..5025e4b 100755 (executable)
@@ -78,6 +78,25 @@ namespace ElmSharp
     }
 
     /// <summary>
+    /// Indicator mode.
+    /// </summary>
+    public enum IndicatorMode
+    {
+        /// <summary>
+        /// Unknown indicator state.
+        /// </summary>
+        Unknown = 0,
+        /// <summary>
+        /// Hides the indicator.
+        /// </summary>
+        Hide,
+        /// <summary>
+        /// Shows the indicator.
+        /// </summary>
+        Show,
+    };
+
+    /// <summary>
     /// The Window is container that contain the graphical user interface of a program.
     /// </summary>
     public class Window : Widget
@@ -112,7 +131,7 @@ namespace ElmSharp
         {
             Name = name;
             Realize(parent);
-            Interop.Elementary.elm_win_indicator_mode_set(Handle, 2 /* ELM_WIN_INDICATOR_SHOW */);
+            IndicatorMode = IndicatorMode.Show;
 
             _deleteRequest = new SmartEvent(this, "delete,request");
             _rotationChanged = new SmartEvent(this, "wm,rotation,changed");
@@ -297,6 +316,22 @@ namespace ElmSharp
         }
 
         /// <summary>
+        /// Gets or sets the window's indicator mode.
+        /// </summary>
+        /// <value>The indicator mode.</value>
+        public IndicatorMode IndicatorMode
+        {
+            get
+            {
+                return Interop.Elementary.elm_win_indicator_mode_get(RealHandle);
+            }
+            set
+            {
+                Interop.Elementary.elm_win_indicator_mode_set(RealHandle, value);
+            }
+        }
+
+        /// <summary>
         /// This function sends a request to the Windows Manager to activate the Window.
         /// If honored by the WM, the window receives the keyboard focus.
         /// </summary>
index 30871f0..6a8ac80 100644 (file)
@@ -83,10 +83,10 @@ internal static partial class Interop
         internal static extern int elm_win_indicator_opacity_get(IntPtr obj);
 
         [DllImport(Libraries.Elementary)]
-        internal static extern void elm_win_indicator_mode_set(IntPtr obj, int mode);
+        internal static extern void elm_win_indicator_mode_set(IntPtr obj, IndicatorMode mode);
 
         [DllImport(Libraries.Elementary)]
-        internal static extern int elm_win_indicator_mode_get(IntPtr obj);
+        internal static extern IndicatorMode elm_win_indicator_mode_get(IntPtr obj);
 
         [DllImport(Libraries.Elementary)]
         internal static extern void elm_win_conformant_set(IntPtr obj, bool conformant);
index 5a8658a..17f1e13 100644 (file)
@@ -1,4 +1,4 @@
-%define DEV_VERSION beta-019
+%define DEV_VERSION beta-020
 
 Name:       elm-sharp
 Summary:    C# Binding for Elementary