Add IsExpanded property in GenListItem 12/128712/1
authorSungHyun Min <shyun.min@samsung.com>
Thu, 11 May 2017 06:26:56 +0000 (15:26 +0900)
committerSungHyun Min <shyun.min@samsung.com>
Thu, 11 May 2017 06:26:56 +0000 (15:26 +0900)
 TASK=TCAPI-2326

Change-Id: Ie95ea510b890343af1bd57f0b839bf27ffb4715a
Signed-off-by: SungHyun Min <shyun.min@samsung.com>
ElmSharp/ElmSharp/GenListItem.cs [changed mode: 0755->0644]
ElmSharp/Interop/Interop.Elementary.GenListView.cs

old mode 100755 (executable)
new mode 100644 (file)
index 0b1d677..33ee199
@@ -27,14 +27,17 @@ namespace ElmSharp
         /// Default select mode.
         /// </summary>
         Default,
+
         /// <summary>
         /// Always select mode.
         /// </summary>
         Always,
+
         /// <summary>
         /// No select mode.
         /// </summary>
         None,
+
         /// <summary>
         /// No select mode with no finger size rule.
         /// </summary>
@@ -51,18 +54,22 @@ namespace ElmSharp
         /// All item's parts.
         /// </summary>
         All = 0,
+
         /// <summary>
         /// The text part type.
         /// </summary>
         Text = (1 << 0),
+
         /// <summary>
         /// The Content part type.
         /// </summary>
         Content = (1 << 1),
+
         /// <summary>
         /// The state of part.
         /// </summary>
         State = (1 << 2),
+
         /// <summary>
         /// No part type.
         /// </summary>
@@ -97,6 +104,21 @@ namespace ElmSharp
         }
 
         /// <summary>
+        /// Gets or sets whether a given genlist item is expanded.
+        /// </summary>
+        public bool IsExpanded
+        {
+            get
+            {
+                return Interop.Elementary.elm_genlist_item_expanded_get(Handle);
+            }
+            set
+            {
+                Interop.Elementary.elm_genlist_item_expanded_set(Handle, value);
+            }
+        }
+
+        /// <summary>
         /// Updates the content of an item.
         /// This updates an item by calling all the <see cref="GenItemClass"/> again to get the content, text, and states.
         /// Use this when the original item data has changed and the changes are desired to reflect.
@@ -182,4 +204,4 @@ namespace ElmSharp
             Interop.Elementary.elm_genlist_item_item_class_update((IntPtr)Handle, itemClass.UnmanagedPtr);
         }
     }
-}
+}
\ No newline at end of file
index 1df2030..380d059 100644 (file)
@@ -24,14 +24,19 @@ internal static partial class Interop
         internal enum Elm_Genlist_Item_Scrollto_Type
         {
             ELM_GENLIST_ITEM_SCROLLTO_NONE = 0,
+
             // Scrolls to nowhere
             ELM_GENLIST_ITEM_SCROLLTO_IN = (1 << 0),
+
             // Scrolls to the nearest viewport
             ELM_GENLIST_ITEM_SCROLLTO_TOP = (1 << 1),
+
             // Scrolls to the top of the viewport
             ELM_GENLIST_ITEM_SCROLLTO_MIDDLE = (1 << 2),
+
             // Scrolls to the middle of the viewport
             ELM_GENLIST_ITEM_SCROLLTO_BOTTOM = (1 << 3)
+
             // Scrolls to the bottom of the viewport
         }
 
@@ -148,5 +153,13 @@ internal static partial class Interop
         [DllImport(Libraries.Elementary)]
         [return: MarshalAs(UnmanagedType.U1)]
         internal static extern bool elm_genlist_reorder_mode_get(IntPtr obj);
+
+        [DllImport(Libraries.Elementary)]
+        [return: MarshalAs(UnmanagedType.U1)]
+        internal static extern void elm_genlist_item_expanded_set(IntPtr obj, bool isExpanded);
+
+        [DllImport(Libraries.Elementary)]
+        [return: MarshalAs(UnmanagedType.U1)]
+        internal static extern bool elm_genlist_item_expanded_get(IntPtr obj);
     }
-}
+}
\ No newline at end of file