Tizen 2.4.0 rev3 SDK Public Release tizen_2.4
authorjk7744.park <jk7744.park@samsung.com>
Wed, 24 Feb 2016 09:39:05 +0000 (18:39 +0900)
committerjk7744.park <jk7744.park@samsung.com>
Wed, 24 Feb 2016 09:39:05 +0000 (18:39 +0900)
common/src/lib/eext_events.c
mobile/data/HD-inc.edc
mobile/data/groups/floatingbutton.edc
mobile/src/lib/eext_floatingbutton.c
packaging/efl-extension.spec

index b57ff11..55ebbad 100644 (file)
@@ -148,33 +148,29 @@ _eext_top_parent_candidates(Eina_List **candidates, Evas *e)
 }
 
 static Eext_Object_Event *
-_eext_find_event_target(Eina_List *candidates, Evas_Object *parent, Eext_Callback_Type type)
+_eext_find_event_target(Eina_List *candidates, Evas_Object *parent)
 {
    Eext_Object_Event *obj_event = NULL;
-   Eina_List *l, *ll;
+   Eina_List *l;
    Evas_Object *obj;
    Eina_List *members = NULL;
-   Eext_Event_Callback *callback;
 
-   if (eo_isa(parent, EVAS_OBJECT_SMART_CLASS))
+   //FIXME: when eo api is opened, we should use
+   // eo_isa(parent, evas_object_smart_class_get)
+   const char *type = evas_object_type_get(parent);
+   if (strcmp(type, "rectangle") && strcmp(type, "line") && strcmp(type, "polygon")
+       && strcmp(type, "text") && strcmp(type, "textblock") && strcmp(type, "image"))
      members = evas_object_smart_members_get(parent);
-
    if (members)
      {
         EINA_LIST_REVERSE_FOREACH(members, l, obj)
           {
-             obj_event = _eext_find_event_target(candidates, obj, type);
+             obj_event = _eext_find_event_target(candidates, obj);
              //got you!
              if (obj_event)
                {
-                  EINA_LIST_FOREACH(obj_event->callbacks, ll, callback)
-                    {
-                       if (callback->type == type)
-                         {
-                            eina_list_free(members);
-                            return obj_event;
-                         }
-                    }
+                  eina_list_free(members);
+                  return obj_event;
                }
           }
         eina_list_free(members);
@@ -183,21 +179,14 @@ _eext_find_event_target(Eina_List *candidates, Evas_Object *parent, Eext_Callbac
    EINA_LIST_REVERSE_FOREACH(candidates, l, obj_event)
      {
         //got you!
-        if (parent == obj_event->obj)
-          {
-             EINA_LIST_FOREACH(obj_event->callbacks, ll, callback)
-               {
-                  if (callback->type == type)
-                    return obj_event;
-               }
-          }
+        if (parent == obj_event->obj) return obj_event;
      }
 
    return NULL;
 }
 
 static Eext_Object_Event *
-_eext_top_obj_event_find(Eext_Event_Mgr *event_mgr, Eext_Callback_Type type)
+_eext_top_obj_event_find(Eext_Event_Mgr *event_mgr)
 {
    Eext_Object_Event *obj_event = NULL;
    Eina_List *l, *l_next;
@@ -247,7 +236,7 @@ _eext_top_obj_event_find(Eext_Event_Mgr *event_mgr, Eext_Callback_Type type)
    if (eina_list_count(candidates) == 1) goto found;
 
    //4. find the target in this parent tree.
-   obj_event = _eext_find_event_target(candidates, parent, type);
+   obj_event = _eext_find_event_target(candidates, parent);
    eina_list_free(candidates);
    return obj_event;
 
@@ -268,15 +257,15 @@ _eext_key_grab_rect_key_up_cb(void *data, Evas *e, Evas_Object *obj,
    Eext_Callback_Type type;
    Eina_List *l;
 
+   obj_event = _eext_top_obj_event_find(event_mgr);
+   if (!obj_event) return;
+
    if (!strcmp(ev->keyname, EEXT_KEY_BACK))
      type = EEXT_CALLBACK_BACK;
    else if (!strcmp(ev->keyname, EEXT_KEY_MENU))
      type = EEXT_CALLBACK_MORE;
    else return;
 
-   obj_event = _eext_top_obj_event_find(event_mgr, type);
-   if (!obj_event) return;
-
    obj_event->on_callback = EINA_TRUE;
    EINA_LIST_FOREACH(obj_event->callbacks, l, callback)
      {
index 410d2ef..46d58e6 100644 (file)
@@ -19,7 +19,6 @@
 //****************************************************************************//
 // Floatingbutton
 //****************************************************************************//
-#define FLOATINGBUTTON_LAYOUT_LR_WIDTH 64
 #define FLOATINGBUTTON_LR_WIDTH 50
 #define FLOATINGBUTTON_LR_MAX_VARIATION 20
 #define FLOATINGBUTTON_MID_WIDTH 20
@@ -28,4 +27,3 @@
 #define FLOATINGBUTTON_HEIGHT 120
 #define FLOATINGBUTTON_HANDLER_SIZE 32
 #define FLOATINGBUTTON_SIDE_MARGIN 20
-#define FLOATINGBUTTON_LAYOUT_SIDE_MARGIN 34
index f518350..382bb37 100644 (file)
             }
             description { state: "expand" 0.0;
                inherit: "default" 0.0;
-               min: (FLOATINGBUTTON_LR_WIDTH+FLOATINGBUTTON_LAYOUT_SIDE_MARGIN) 0;
+               min: (FLOATINGBUTTON_LR_WIDTH+FLOATINGBUTTON_SIDE_MARGIN) 0;
             }
          }
          part { name: "right_spacer";
             }
             description { state: "expand" 0.0;
                inherit: "default" 0.0;
-               min: (FLOATINGBUTTON_LR_WIDTH+FLOATINGBUTTON_LAYOUT_SIDE_MARGIN) 0;
+               min: (FLOATINGBUTTON_LR_WIDTH+FLOATINGBUTTON_SIDE_MARGIN) 0;
             }
          }
          part { name: "elm.swallow.box";
index 39405c1..3f30be7 100644 (file)
@@ -129,8 +129,8 @@ _pos_recalc(Eo *obj, Eext_Floatingbutton_Data *sd)
    if (count >= 2) w1 = EEXT_SCALE_SIZE(FLOATINGBUTTON_2BTN_WIDTH, obj);
    else w1 = EEXT_SCALE_SIZE(FLOATINGBUTTON_1BTN_WIDTH, obj);
 
-   sd->pos_table[EEXT_FLOATINGBUTTON_LEFT] = (w1 - EEXT_SCALE_SIZE(FLOATINGBUTTON_LR_WIDTH, obj)) / (double)(w - w1);
-   sd->pos_table[EEXT_FLOATINGBUTTON_RIGHT] = (w - w1 * 2 + EEXT_SCALE_SIZE(FLOATINGBUTTON_LR_WIDTH, obj)) / (double)(w - w1);
+   sd->pos_table[EEXT_FLOATINGBUTTON_LEFT] = (w1 - EEXT_SCALE_SIZE(50, obj)) / (double)(w - w1);
+   sd->pos_table[EEXT_FLOATINGBUTTON_RIGHT] = (w - w1 * 2 + EEXT_SCALE_SIZE(50, obj)) / (double)(w - w1);
 }
 
 static void
@@ -169,7 +169,7 @@ _vg_resize_cb(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_inf
 
    evas_vg_shape_shape_reset(fbd->base_shape);
    evas_vg_shape_shape_append_rect(fbd->base_shape, 0, 0, w, h,
-                                   EEXT_SCALE_SIZE(FLOATINGBUTTON_LAYOUT_LR_WIDTH, fbd->obj),
+                                   EEXT_SCALE_SIZE(FLOATINGBUTTON_LR_WIDTH, fbd->obj),
                                    (EEXT_SCALE_SIZE(FLOATINGBUTTON_HEIGHT, fbd->obj)/2));
 }
 
index 0b06e51..3277a56 100644 (file)
@@ -1,6 +1,6 @@
 Name:       efl-extension
 Summary:    EFL extension library
-Version:    0.2.19
+Version:    0.2.18
 Release:    1
 Group:      System/Libraries
 License:    Flora-1.1