diff options
author | Seungkeun Lee <sngn.lee@samsung.com> | 2017-05-11 06:38:04 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@review.ap-northeast-2.compute.internal> | 2017-05-11 06:38:04 +0000 |
commit | 8576b6ea18583b3c90eafb165596f11cac546ce4 (patch) | |
tree | dcdc5ea1d92d64f8a623ea8f12db6761623faf7d | |
parent | d0473a8e2af7d4359c566a1c4cb1bb1690d46f9d (diff) | |
parent | caf37c84eaa08247514e20fed34bb0906557b487 (diff) | |
download | elm-sharp-8576b6ea18583b3c90eafb165596f11cac546ce4.tar.gz elm-sharp-8576b6ea18583b3c90eafb165596f11cac546ce4.tar.bz2 elm-sharp-8576b6ea18583b3c90eafb165596f11cac546ce4.zip |
Merge "Add IsExpanded property in GenListItem" into tizen
-rw-r--r--[-rwxr-xr-x] | ElmSharp/ElmSharp/GenListItem.cs | 24 | ||||
-rw-r--r-- | ElmSharp/Interop/Interop.Elementary.GenListView.cs | 15 |
2 files changed, 37 insertions, 2 deletions
diff --git a/ElmSharp/ElmSharp/GenListItem.cs b/ElmSharp/ElmSharp/GenListItem.cs index 0b1d677..33ee199 100755..100644 --- a/ElmSharp/ElmSharp/GenListItem.cs +++ b/ElmSharp/ElmSharp/GenListItem.cs @@ -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 diff --git a/ElmSharp/Interop/Interop.Elementary.GenListView.cs b/ElmSharp/Interop/Interop.Elementary.GenListView.cs index 1df2030..380d059 100644 --- a/ElmSharp/Interop/Interop.Elementary.GenListView.cs +++ b/ElmSharp/Interop/Interop.Elementary.GenListView.cs @@ -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 |