Here is new elm_transit patch . 

Fixed indentation and fixed some logic of flip/resizableflip/wipe effect. 

Thanks. 


-----Original Message-----
From: ChunEon Park [mailto:chuneon.p...@samsung.com] 
Sent: Thursday, December 09, 2010 3:06 PM
To: 마이크; enlightenment-devel@lists.sourceforge.net
Subject: Re: [E-devel] elm_transit patch


   sorry. I missed that

   I will try again soon.


   Thanks.


   ------- Original Message -------

   Sender   :   마이크<mj.mccorm...@samsung.com>   책임/Mobile   S/W  Platform
   Lab(DMC연)/삼성전자

   Date : 2010-12-09 14:42 (GMT+09:00)

   Title : Re: [E-devel] elm_transit patch


   Hello Hermet,
   Please avoid changing spacing in your patches, it makes them harder to read.
   Additionally, I don't think Raster will appreciate you coming up with a
   new indentation style for EFL...
   Patches should contain the important pieces you want to change, and nothing
   else.
   thanks,
   Mike
   -   transit->time.duration = duration;
   -
   -   transit->time.begin = ecore_loop_time_get();
   +
   + transit->time.duration = duration;
   + transit->time.begin = ecore_loop_time_get();
   On 12/09/2010 02:28 PM, ChunEon Park wrote:
   > Sorry, it filtered the patch file .
   > try again.
   >
   >
   > -----Original Message-----
   > From: ChunEon Park [mailto:chuneon.p...@samsung.com]
   > Sent: Thursday, December 09, 2010 2:23 PM
   > To: 'enlightenment-devel@lists.sourceforge.net'
   > Subject: elm_transit patch
   >
   > Hello, This is Hermet.
   >
   > Here is a first patch for the elm_transit.
   >
   > * deprecated elm_transit_event_block_set and added
   > elm_transit_event_enabled_set
   > * modified event_enabled = EINA_FALSE as a default
   >
   > Thanks.
   >
   >
   >
   >
   ----------------------------------------------------------------------------
   --
   > This SF Dev2Dev email is sponsored by:
   >
   > WikiLeaks The End of the Free Internet
   > http://p.sf.net/sfu/therealnews-com
   >
   >
   >
   > _______________________________________________
   > enlightenment-devel mailing list
   > enlightenment-devel@lists.sourceforge.net
   > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
   ----------------------------------------------------------------------------
   --
   This SF Dev2Dev email is sponsored by:
   WikiLeaks The End of the Free Internet
   http://p.sf.net/sfu/therealnews-com
   _______________________________________________
   enlightenment-devel mailing list
   enlightenment-devel@lists.sourceforge.net
   https://lists.sourceforge.net/lists/listinfo/enlightenment-devel


   [cid:XT4NZ5JE7EUA@namo.co.kr]

   [SeenTimeChecker?do=d9ce704749a25c625c75c5c1c8aeb9ad6336263812f2ecb86b754d17
   d001ca18ba777c355c197185c465c2cf80a2b7ef9aba4bb3b2b5ca43ddd7e184e0604d958075
   b6b33f32d245b7f8aafe245478a5f1d21d5ebee74427cf878f9a26ce15a0]
Index: elm_transit.c
===================================================================
--- elm_transit.c       (revision 55386)
+++ elm_transit.c       (working copy)
@@ -58,9 +58,6 @@
    Eina_List *effect_list;
    Eina_List *objs;
    Elm_Transit_Tween_Mode tween_mode;
-   Eina_Bool auto_reverse:1;
-   Eina_Bool block:1;
-   Eina_Bool deleted:1;
    unsigned int effects_pending_del;
    int walking;
    struct
@@ -80,6 +77,9 @@
       int current;
       Eina_Bool reverse;
    } repeat;
+   Eina_Bool auto_reverse:1;
+   Eina_Bool event_enabled:1;
+   Eina_Bool deleted:1;
 };
 
 struct _Elm_Effect
@@ -282,9 +282,8 @@
    EINA_MAGIC_SET(transit, ELM_TRANSIT_MAGIC);
 
    elm_transit_tween_mode_set(transit, ELM_TRANSIT_TWEEN_MODE_LINEAR);
-
+       
    transit->time.duration = duration;
-
    transit->time.begin = ecore_loop_time_get();
    transit->animator = ecore_animator_add(_animator_animate_cb, transit);
 
@@ -463,8 +462,7 @@
 
    transit->objs = eina_list_append(transit->objs, obj);
 
-
-   if (transit->block)
+   if (!transit->event_enabled) 
      evas_object_pass_events_set(obj, EINA_TRUE);
 
    evas_object_event_callback_add(obj, EVAS_CALLBACK_DEL,
@@ -519,9 +517,9 @@
 }
 
 /**
- * Set the event blocked when transit is operating.
+ * Set the event enabled when transit is operating.
  *
- * If @p disabled is EINA_TRUE, the objects of the transit will not receives
+ * If @p enabled is EINA_TRUE, the objects of the transit will receives
  * events from mouse and keyboard during the animation.
  * @note When you add an object with elm_transit_object_add(), its state from
  * evas_object_pass_events_get(obj) is saved, and it is applied when the
@@ -530,27 +528,28 @@
  * run.
  *
  * @param transit The transit object.
- * @param disabled Disable or enable.
+ * @param enabled Disable or enable.
  *
  * @ingroup Transit
  */
 EAPI void
-elm_transit_event_block_set(Elm_Transit *transit, Eina_Bool disabled)
+elm_transit_event_enabled_set(Elm_Transit *transit, Eina_Bool enabled)
 {
    ELM_TRANSIT_CHECK_OR_RETURN(transit);
 
-   if (transit->block == disabled) return;
+   if (transit->event_enabled == enabled) return;
 
    Evas_Object *obj;
    Eina_List *elist;
+   Elm_Obj_Data *obj_data;
 
-   transit->block = disabled;
+   transit->event_enabled = enabled;
 
-   if (!transit->block)
+   if (enabled)
      {
         EINA_LIST_FOREACH(transit->objs, elist, obj)
           {
-             Elm_Obj_Data *obj_data = evas_object_data_get(obj, _transit_key);
+             obj_data = evas_object_data_get(obj, _transit_key);
              evas_object_pass_events_set(obj, obj_data->state);
           }
      }
@@ -562,25 +561,68 @@
 }
 
 /**
- * Get the value of event blocked status.
+ * Get the value of event enabled status.
  *
- * @see elm_transit_event_block_set()
+ * @see elm_transit_event_enabled_set()
  *
  * @param transit The Transit object
- * @return EINA_TRUE, when event block is enabled. If @p transit is NULL
+ * @return EINA_TRUE, when event is enabled. If @p transit is NULL
  * EINA_FALSE is returned
  *
  * @ingroup Transit
  */
 EAPI Eina_Bool
-elm_transit_event_block_get(const Elm_Transit *transit)
+elm_transit_event_enabled_get(const Elm_Transit *transit)
 {
    ELM_TRANSIT_CHECK_OR_RETURN(transit, EINA_FALSE);
 
-   return transit->block;
+   return transit->event_enabled;
 }
 
+
 /**
+ * Set the event enabled when transit is operating.
+ *
+ * If @p disabled is EINA_TRUE, the objects of the transit will receives
+ * events from mouse and keyboard during the animation.
+ * @note When you add an object with elm_transit_object_add(), its state from
+ * evas_object_pass_events_get(obj) is saved, and it is applied when the
+ * transit ends, if you change this state with evas_object_pass_events_set()
+ * after add the object, this state will change again when @p transit stops to
+ * run.
+ *
+ * @see elm_transit_event_enabled_set()
+ *
+ * @param transit The transit object.
+ * @param disabled Disable or enable.
+ *
+ * @ingroup Transit
+ */
+EINA_DEPRECATED EAPI void
+elm_transit_event_block_set(Elm_Transit *transit, Eina_Bool disabled)
+{
+   elm_transit_event_enabled_set(transit, disabled);
+}
+
+
+/**
+ * Get the value of event block enabled  status.
+ *
+ * @see elm_transit_event_enabled_set(), elm_transit_event_enabled_get()
+ *
+ * @param transit The Transit object
+ * @return EINA_TRUE, when event is enabled. If @p transit is NULL
+ * EINA_FALSE is returned
+ *
+ * @ingroup Transit
+ */
+EINA_DEPRECATED EAPI Eina_Bool
+elm_transit_event_block_get(const Elm_Transit *transit)
+{
+   return !elm_transit_event_enabled_get(transit);
+}
+
+/**
  * Set the user-callback function when the transit is deleted.
  *
  * @note Using this function twice will overwrite the first function setted.
@@ -720,7 +762,7 @@
  * @ingroup Transit
  */
 EAPI Elm_Transit_Tween_Mode
-elm_transit_tween_mode_get(Elm_Transit *transit)
+elm_transit_tween_mode_get(const Elm_Transit *transit)
 {
    ELM_TRANSIT_CHECK_OR_RETURN(transit, ELM_TRANSIT_TWEEN_MODE_LINEAR);
 
@@ -1279,14 +1321,20 @@
         if ((degree < 90) && (degree > -90))
           {
              obj = front;
-             evas_object_hide(back);
-             evas_object_show(front);
+             if (front != back) 
+               {
+                  evas_object_hide(back);
+                  evas_object_show(front);
+               }
           }
         else
           {
              obj = back;
-             evas_object_hide(front);
-             evas_object_show(back);
+             if (front != back)
+               {
+                  evas_object_hide(front);
+                  evas_object_show(back);
+               }
           }
 
         evas_map_smooth_set(map, EINA_TRUE);
@@ -1621,14 +1669,20 @@
         if ((degree < 90) && (degree > -90))
           {
              obj = resizable_flip_node->front;
-             evas_object_hide(resizable_flip_node->back);
-             evas_object_show(resizable_flip_node->front);
+             if (resizable_flip_node->front != resizable_flip_node->back)
+               {
+                  evas_object_hide(resizable_flip_node->back);
+                  evas_object_show(resizable_flip_node->front);
+               }
           }
         else
           {
              obj = resizable_flip_node->back;
-             evas_object_hide(resizable_flip_node->front);
-             evas_object_show(resizable_flip_node->back);
+             if (resizable_flip_node->front != resizable_flip_node->back)
+               {
+                  evas_object_hide(resizable_flip_node->front);
+                  evas_object_show(resizable_flip_node->back);
+               }
           }
 
         evas_map_smooth_set(map, EINA_TRUE);
@@ -1752,8 +1806,8 @@
          evas_map_point_image_uv_set(map, 3, 0, h2);
          evas_map_point_coord_set(map, 0, x, y, 0);
          evas_map_point_coord_set(map, 1, w2, y, 0);
-         evas_map_point_coord_set(map, 2, w2, h2, 0);
-         evas_map_point_coord_set(map, 3, x, h2, 0);
+         evas_map_point_coord_set(map, 2, w2, y+h2, 0);
+         evas_map_point_coord_set(map, 3, x, y+h2, 0);
          break;
       case ELM_TRANSIT_EFFECT_WIPE_DIR_DOWN:
          w2 = (x + w);
Index: Elementary.h.in
===================================================================
--- Elementary.h.in     (revision 55386)
+++ Elementary.h.in     (working copy)
@@ -2454,15 +2454,17 @@
    EAPI void                   elm_transit_object_add(Elm_Transit *transit, 
Evas_Object *obj) EINA_ARG_NONNULL(1, 2);
    EAPI void                   elm_transit_object_remove(Elm_Transit *transit, 
Evas_Object *obj) EINA_ARG_NONNULL(1, 2);
    EAPI const Eina_List       *elm_transit_objects_get(const Elm_Transit 
*transit) EINA_ARG_NONNULL(1);
-   EAPI void                   elm_transit_event_block_set(Elm_Transit 
*transit, Eina_Bool disabled) EINA_ARG_NONNULL(1);
-   EAPI Eina_Bool              elm_transit_event_block_get(const Elm_Transit 
*transit) EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI void                   
elm_transit_event_block_set(Elm_Transit *transit, Eina_Bool disabled) 
EINA_ARG_NONNULL(1);
+   EINA_DEPRECATED EAPI Eina_Bool              
elm_transit_event_block_get(const Elm_Transit *transit) EINA_ARG_NONNULL(1);
+   EAPI void                   elm_transit_event_enabled_set(Elm_Transit 
*transit, Eina_Bool enabled) EINA_ARG_NONNULL(1);
+   EAPI Eina_Bool              elm_transit_event_enabled_get(const Elm_Transit 
*transit) EINA_ARG_NONNULL(1);
    EAPI void                   elm_transit_del_cb_set(Elm_Transit *transit, 
void (*cb)(void *data, Elm_Transit* transit), void *data) EINA_ARG_NONNULL(1);
    EAPI void                   elm_transit_auto_reverse_set(Elm_Transit 
*transit, Eina_Bool reverse) EINA_ARG_NONNULL(1);
    EAPI Eina_Bool              elm_transit_auto_reverse_get(Elm_Transit 
*transit) EINA_ARG_NONNULL(1) EINA_ARG_NONNULL(1);
    EAPI void                   elm_transit_repeat_times_set(Elm_Transit 
*transit, int repeat) EINA_ARG_NONNULL(1);
    EAPI int                    elm_transit_repeat_times_get(Elm_Transit 
*transit) EINA_ARG_NONNULL(1);
    EAPI void                   elm_transit_tween_mode_set(Elm_Transit 
*transit, Elm_Transit_Tween_Mode tween_mode) EINA_ARG_NONNULL(1);
-   EAPI Elm_Transit_Tween_Mode elm_transit_tween_mode_get(Elm_Transit 
*transit) EINA_ARG_NONNULL(1) EINA_ARG_NONNULL(1);
+   EAPI Elm_Transit_Tween_Mode elm_transit_tween_mode_get(const Elm_Transit 
*transit) EINA_ARG_NONNULL(1) EINA_ARG_NONNULL(1);
 
    EAPI void                  
*elm_transit_effect_resizing_context_new(Evas_Coord from_w, Evas_Coord from_h, 
Evas_Coord to_w, Evas_Coord to_h);
    EAPI void                   elm_transit_effect_resizing_op(void *data, 
Elm_Transit *transit, double progress) EINA_ARG_NONNULL(1, 2);
------------------------------------------------------------------------------
This SF Dev2Dev email is sponsored by:

WikiLeaks The End of the Free Internet
http://p.sf.net/sfu/therealnews-com
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to