elm_gengrid:Added Eolian changes in gengrid reorder Api
authorAnand <anand.km@samsung.com>
Fri, 14 Aug 2015 06:21:02 +0000 (09:21 +0300)
committerDaniel Zaoui <daniel.zaoui@yahoo.com>
Fri, 14 Aug 2015 06:40:18 +0000 (09:40 +0300)
Summary:
Modified gengrid reorder Api's(elm_gengrid_reorder_mode_start, elm_gengrid_reorder_mode_stop,
elm_gengrid_reorder_type_set) in Eolian format.

Test Plan: elementry_test->gengrid->gengrid_focus

Reviewers: seoz, raster, Hermet, JackDanielZ

Subscribers: cedric, JackDanielZ, mvsovani, singh.amitesh, sachin.dev

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

legacy/elementary/src/lib/elm_gengrid.c
legacy/elementary/src/lib/elm_gengrid.eo
legacy/elementary/src/lib/elm_gengrid_legacy.h

index f31ece6..4d47952 100644 (file)
@@ -4926,33 +4926,24 @@ elm_gengrid_item_cursor_engine_only_get(const Elm_Object_Item *eo_it)
    else return it->cursor_engine_only;
 }
 
-EAPI void
-elm_gengrid_reorder_mode_start(Evas_Object *obj, Ecore_Pos_Map tween_mode)
+EOLIAN static void
+_elm_gengrid_reorder_mode_start(Eo *obj EINA_UNUSED, Elm_Gengrid_Data *sd, Ecore_Pos_Map tween_mode)
 {
-   ELM_GENGRID_CHECK(obj);
-   ELM_GENGRID_DATA_GET(obj, sd);
-
    sd->reorder_mode = EINA_TRUE;
    sd->reorder.tween_mode = tween_mode;
    sd->reorder.type = ELM_GENGRID_REORDER_TYPE_NORMAL;
 }
 
-EAPI void
-elm_gengrid_reorder_mode_stop(Evas_Object *obj)
+EOLIAN static void
+_elm_gengrid_reorder_mode_stop(Eo *obj EINA_UNUSED, Elm_Gengrid_Data *sd)
 {
-   ELM_GENGRID_CHECK(obj);
-   ELM_GENGRID_DATA_GET(obj, sd);
-
    sd->reorder_mode = EINA_FALSE;
    sd->reorder.tween_mode = -1;
 }
 
-EAPI void
-elm_gengrid_reorder_type_set(Evas_Object *obj, Elm_Gengrid_Reorder_Type type)
+EOLIAN static void
+_elm_gengrid_reorder_type_set(Eo *obj EINA_UNUSED, Elm_Gengrid_Data *sd, Elm_Gengrid_Reorder_Type type)
 {
-   ELM_GENGRID_CHECK(obj);
-   ELM_GENGRID_DATA_GET(obj, sd);
-
    sd->reorder.type = type;
 }
 
index 7befb97..b2110ee 100644 (file)
@@ -1,5 +1,11 @@
 import elm_general;
 
+enum Elm.Gengrid.Reorder_Type
+{
+   normal, [[ normal reorder type ]]
+   swap    [[ swap reorder type ]]
+}
+
 class Elm.Gengrid (Elm.Layout, Elm_Interface_Scrollable,
                    Evas.Clickable_Interface, Elm_Interface_Atspi_Widget_Action,
                    Elm_Interface_Atspi_Selection)
@@ -170,6 +176,16 @@ class Elm.Gengrid (Elm.Layout, Elm_Interface_Scrollable,
             highlight: bool;
          }
       }
+      @property reorder_type {
+         set {
+            [[ Set the Gengrid reorder type
+               @since 1.11
+            ]]
+         }
+         values {
+            type: Elm.Gengrid.Reorder_Type; [[ Reorder type value ]]
+         }
+      }
       @property item_size {
          set {
             [[Set the size for the items of a given gengrid widget.
@@ -502,6 +518,21 @@ class Elm.Gengrid (Elm.Layout, Elm_Interface_Scrollable,
             @in flags: Elm_Glob_Match_Flags; [[Search flags.]]
          }
       }
+      reorder_mode_start {
+         [[
+            Starts the reorder mode of Gengrid
+            @since 1.10
+         ]]
+         params {
+            @in tween_mode: Ecore_Pos_Map; [[ Position mappings for animation ]]
+         }
+      }
+      reorder_mode_stop {
+         [[
+            Stops the reorder mode of Gengrid
+            @since 1.10
+         ]]
+      }
    }
    implements {
       class.constructor;
index 7632923..7fdd731 100644 (file)
@@ -211,50 +211,5 @@ EINA_DEPRECATED EAPI void          elm_gengrid_last_page_get(const Evas_Object *
  */
 EINA_DEPRECATED EAPI void          elm_gengrid_page_bring_in(const Evas_Object *obj, int h_pagenumber, int v_pagenumber);
 
-typedef enum _Elm_Gengrid_Reorder_Type
-{
-   ELM_GENGRID_REORDER_TYPE_NORMAL,
-   ELM_GENGRID_REORDER_TYPE_SWAP
-} Elm_Gengrid_Reorder_Type;
-
-/**
- * Enable the gengrid widget mode reordered with keys
- *
- * @param obj The gengrid object
- * @param tween_mode Position mappings for animation
- * @see _Ecore_Map_Pos
- *
- * @see elm_gengrid_reorder_mode_stop()
- * @since 1.10
- *
- * @ingroup Gengrid
- */
-EAPI void                        elm_gengrid_reorder_mode_start(Evas_Object *obj, Ecore_Pos_Map tween_mode);
-
-/**
- * Stop the gengrid widget mode reorder.
- *
- * @param obj The gengrid object
- *
- * @see elm_gengrid_reorder_mode_start()
- * @since 1.10
- *
- * @ingroup Gengrid
- */
-EAPI void                        elm_gengrid_reorder_mode_stop(Evas_Object *obj);
-
-/**
- * Set the reorder type
- *
- * @param obj The gengrid object
- * @param type Elm_Gengrid_Reorder_Type value
- *
- * @see Elm_Gengrid_Reorder_Type
- * @since 1.11
- *
- * @ingroup Gengrid
- */
-EAPI void                        elm_gengrid_reorder_type_set(Evas_Object *obj, Elm_Gengrid_Reorder_Type type);
-
 #include "elm_gengrid_item.eo.legacy.h"
 #include "elm_gengrid.eo.legacy.h"