list/genlist/gengrid: Fix default return value in eolian APIs. 57/38057/1
authorSangHyeon Lee <sh10233.lee@samsung.com>
Fri, 10 Apr 2015 05:30:46 +0000 (14:30 +0900)
committerJaeun Choi <jaeun12.choi@samsung.com>
Fri, 10 Apr 2015 09:23:11 +0000 (18:23 +0900)
Summary:
Some APIs need to return specific values for their usage.
For Examples, elm_xx_select_mode_get function need to return
ELM_OBJECT_SELECT_MODE_MAX when invalid input comes.
**Fixed API list :**
elm_list_mode_get
elm_list_multi_select_mode_get
elm_genlist_mode_get
elm_genlist_select_mode_get
elm_genlist_multi_select_mode_get
elm_genlist_item_type_get
elm_genlist_ttem_index_get
elm_genlist_item_select_mode_get
elm_gengrid_select_mode_get
elm_gengrid_multi_select_mode_get
elm_gengrid_item_index_get

Test Plan: Call API with NULL parameter and check return value.

Reviewers: Hermet, seoz, jaehwan, raster, eunue

Subscribers: id213sin

Differential Revision: https://phab.enlightenment.org/D2306

Change-Id: Id8c83fcb408a95f5b4f89a93371c61903777fa8e
Origin: upstream

src/lib/elm_gengrid.eo
src/lib/elm_gengrid_item.eo
src/lib/elm_genlist.eo
src/lib/elm_genlist_item.eo
src/lib/elm_list.eo

index 74d719927ba3f78056687b682b56acf03d531a73..506f0c3503d13846f214c34eb13c7c90b0b9b056 100644 (file)
@@ -178,7 +178,7 @@ class Elm_Gengrid (Elm_Layout, Elm_Interface_Scrollable, Evas.Clickable_Interfac
             @ingroup Gengrid */
          }
          values {
-            Elm_Object_Select_Mode mode; /*@ The select mode */
+            Elm_Object_Select_Mode mode(4); /*@ The select mode */
          }
       }
       reorder_mode {
@@ -291,7 +291,7 @@ class Elm_Gengrid (Elm_Layout, Elm_Interface_Scrollable, Evas.Clickable_Interfac
             @since 1.8 */
          }
          values {
-            Elm_Object_Multi_Select_Mode mode; /*@ The multi select mode */
+            Elm_Object_Multi_Select_Mode mode(2); /*@ The multi select mode */
          }
       }
       horizontal {
index 85486965f88f30432ff215f5407d278044eca287..a7966acee70d731345d713a960427fdadfdb00f9 100644 (file)
@@ -93,7 +93,7 @@ class Elm_Gengrid_Item(Elm_Widget_Item)
                       */
                 }
                 values {
-                     int index; /*@ @return the position inside the list of item. */
+                     int index(-1); /*@ @return the position inside the list of item. */
                 }
            }
            pos {
index dcf40f35236647a8a48057f064aaf6b44e5686ae..026a93d014245a4b363883f334359c07f9f6d50c 100644 (file)
@@ -71,7 +71,7 @@ class Elm_Genlist (Elm_Layout, Elm_Interface_Scrollable, Evas.Clickable_Interfac
             @ingroup Genlist */
          }
          values {
-            Elm_Object_Select_Mode mode; /*@ The select mode */
+            Elm_Object_Select_Mode mode(4); /*@ The select mode */
          }
       }
       focus_on_selection {
@@ -239,7 +239,7 @@ class Elm_Genlist (Elm_Layout, Elm_Interface_Scrollable, Evas.Clickable_Interfac
             @since 1.8 */
          }
          values {
-            Elm_Object_Multi_Select_Mode mode; /*@ The multi select mode */
+            Elm_Object_Multi_Select_Mode mode(2); /*@ The multi select mode */
          }
       }
       block_count {
@@ -370,7 +370,7 @@ class Elm_Genlist (Elm_Layout, Elm_Interface_Scrollable, Evas.Clickable_Interfac
             @ingroup Genlist */
          }
          values {
-            Elm_List_Mode mode; /*@ The mode to use (one of #ELM_LIST_SCROLL or #ELM_LIST_LIMIT). */
+            Elm_List_Mode mode(4); /*@ The mode to use (one of #ELM_LIST_SCROLL or #ELM_LIST_LIMIT). */
          }
       }
       decorated_item {
index 9c6eecbc4dcdd74bc0975e7c0c2580feaabc16a4..34a6179ca3a47d9555b234afd4cee40a90b509c8 100644 (file)
@@ -175,7 +175,7 @@ class Elm_Genlist_Item(Elm_Widget_Item)
                       */
                 }
                 values {
-                     int index; /*@ @return the position inside the list of item. */
+                     int index(-1); /*@ @return the position inside the list of item. */
                 }
            }
            decorate_mode {
@@ -267,7 +267,7 @@ class Elm_Genlist_Item(Elm_Widget_Item)
                       */
                 }
                 values {
-                     Elm_Object_Select_Mode mode; /*@ The selected mode */
+                     Elm_Object_Select_Mode mode(4); /*@ The selected mode */
                 }
            }
            type {
@@ -284,7 +284,7 @@ class Elm_Genlist_Item(Elm_Widget_Item)
                       */
                 }
                 values {
-                     Elm_Genlist_Item_Type type; /*@ Item tupe */
+                     Elm_Genlist_Item_Type type(4); /*@ Item tupe */
                 }
            }
       }
index 5c08e7d3f1be483dee81a34c4ca8e95ea98e5264..f1b9556133233d133db8566879a0ff1381556822 100644 (file)
@@ -159,7 +159,7 @@ class Elm_List (Elm_Layout, Elm_Interface_Scrollable,
             @since 1.8 */
          }
          values {
-            Elm_Object_Multi_Select_Mode mode; /*@ The multi select mode */
+            Elm_Object_Multi_Select_Mode mode(2); /*@ The multi select mode */
          }
       }
       mode {
@@ -195,7 +195,7 @@ class Elm_List (Elm_Layout, Elm_Interface_Scrollable,
             @ingroup List */
          }
          values {
-            Elm_List_Mode mode; /*@ One of #Elm_List_Mode: #ELM_LIST_COMPRESS,
+            Elm_List_Mode mode(4); /*@ One of #Elm_List_Mode: #ELM_LIST_COMPRESS,
             #ELM_LIST_SCROLL, #ELM_LIST_LIMIT or #ELM_LIST_EXPAND. */
          }
       }