2010/9/21 Otávio Pontes <ota...@profusion.mobi>
>
>
> 2010/9/21 Iván Briano (Sachiel) <sachi...@gmail.com>
>>
>> 2010/9/21 Otávio Pontes <ota...@profusion.mobi>:
>> > I am sending two patches to add a transition layout to elm_box. The
>> > transition layout is used to display an animation when switching layouts in
>> > elm_box. A sample video of this layout working can be found in
>> > http://www.youtube.com/watch?v=kjFCyRFoT7A .
>> > The first patch is for evas_object_box. Some changes in this file were
>> > necessary, because it was important for the layout function to know if any
>> > child has been added or removed during the animation. The other patch is 
>> > for
>> > elm_box, adding the layout.
>> >
>>
>> in svn
>
> thanks

There are 2 simple problems with the committed code. First, it would
be better to locate the struct _Elm_Box_Transition in elm_box.c
instead of Elementary.h.in, because users should create it with
elm_box_transition_new and changing its contents can be dangerous. And
second, in struct _Transition_Animation_Data, I declared 4 coordinate
variables as int, instead of using Evas_Coords.
I am sending both patches attached.

>>
>> > Thanks,
>> > Otávio Pontes
>> >
>> > ------------------------------------------------------------------------------
>> > Start uncovering the many advantages of virtual appliances
>> > and start using them to simplify application deployment and
>> > accelerate your shift to cloud computing.
>> > http://p.sf.net/sfu/novell-sfdev2dev
>> > _______________________________________________
>> > enlightenment-devel mailing list
>> > enlightenment-devel@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
>> >
>> >
>
From 37d70f9769b82415af391bb48a40ef6fa3cf0289 Mon Sep 17 00:00:00 2001
From: Otavio Pontes <ota...@profusion.mobi>
Date: Tue, 21 Sep 2010 13:44:41 -0300
Subject: [PATCH 1/2] struct _Elm_Box_Transition should be private, not public.
To: ota...@profusion.mobi

---
 TMP/st/elementary/src/lib/Elementary.h.in |   21 ---------------------
 TMP/st/elementary/src/lib/elm_box.c       |   22 ++++++++++++++++++++++
 2 files changed, 22 insertions(+), 21 deletions(-)

diff --git a/TMP/st/elementary/src/lib/Elementary.h.in b/TMP/st/elementary/src/lib/Elementary.h.in
index 410b31f..83a2493 100644
--- a/TMP/st/elementary/src/lib/Elementary.h.in
+++ b/TMP/st/elementary/src/lib/Elementary.h.in
@@ -470,27 +470,6 @@ extern "C" {
     */
 
    typedef struct _Elm_Box_Transition Elm_Box_Transition;
-   struct _Elm_Box_Transition
-   {
-      double initial_time;
-      double duration;
-      Eina_Bool animation_ended:1;
-      Eina_Bool recalculate:1;
-      Ecore_Animator *animator;
-
-      struct
-      {
-         Evas_Object_Box_Layout layout;
-         void *data;
-         void(*free_data)(void *data);
-      } start, end;
-
-      void(*transition_end_cb)(void *data);
-      void *transition_end_data;
-      void (*transition_end_free_data)(void *data);
-      Eina_List *objs;
-      Evas_Object *box;
-   };
 
    EAPI Evas_Object *elm_box_add(Evas_Object *parent);
    EAPI void         elm_box_horizontal_set(Evas_Object *obj, Eina_Bool horizontal);
diff --git a/TMP/st/elementary/src/lib/elm_box.c b/TMP/st/elementary/src/lib/elm_box.c
index 53ef245..2a9878a 100644
--- a/TMP/st/elementary/src/lib/elm_box.c
+++ b/TMP/st/elementary/src/lib/elm_box.c
@@ -30,6 +30,28 @@ struct _Widget_Data
    Eina_Bool homogeneous:1;
 };
 
+struct _Elm_Box_Transition
+{
+   double initial_time;
+   double duration;
+   Eina_Bool animation_ended:1;
+   Eina_Bool recalculate:1;
+   Ecore_Animator *animator;
+
+   struct
+   {
+      Evas_Object_Box_Layout layout;
+      void *data;
+      void(*free_data)(void *data);
+   } start, end;
+
+   void(*transition_end_cb)(void *data);
+   void *transition_end_data;
+   void (*transition_end_free_data)(void *data);
+   Eina_List *objs;
+   Evas_Object *box;
+};
+
 struct _Transition_Animation_Data
 {
    Evas_Object *obj;
-- 
1.7.2.3

From 79264396765fabc63c7dac42be000944971124c9 Mon Sep 17 00:00:00 2001
From: Otavio Pontes <ota...@profusion.mobi>
Date: Tue, 21 Sep 2010 16:26:49 -0300
Subject: [PATCH 2/2] Using Evas_Coord instead of int to declare coords variables.
To: ota...@profusion.mobi

---
 TMP/st/elementary/src/lib/elm_box.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/TMP/st/elementary/src/lib/elm_box.c b/TMP/st/elementary/src/lib/elm_box.c
index 2a9878a..6be5383 100644
--- a/TMP/st/elementary/src/lib/elm_box.c
+++ b/TMP/st/elementary/src/lib/elm_box.c
@@ -57,7 +57,7 @@ struct _Transition_Animation_Data
    Evas_Object *obj;
    struct
    {
-      int x, y, w, h;
+      Evas_Coord x, y, w, h;
    } start, end;
 };
 
-- 
1.7.2.3

------------------------------------------------------------------------------
Start uncovering the many advantages of virtual appliances
and start using them to simplify application deployment and
accelerate your shift to cloud computing.
http://p.sf.net/sfu/novell-sfdev2dev
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to