launchscreen: added indicator object for launchscreen 41/109041/3 accepted/tizen/3.0/common/20170111.161650 accepted/tizen/3.0/ivi/20170111.085805 accepted/tizen/3.0/mobile/20170111.085647 accepted/tizen/3.0/tv/20170111.085723 accepted/tizen/3.0/wearable/20170111.085748 accepted/tizen/common/20170110.155120 accepted/tizen/ivi/20170110.224652 accepted/tizen/mobile/20170110.224509 accepted/tizen/tv/20170110.224559 accepted/tizen/wearable/20170110.224626 submit/tizen/20170110.094105 submit/tizen_3.0/20170110.102156
authorMinJeong Kim <minjjj.kim@samsung.com>
Fri, 6 Jan 2017 05:27:03 +0000 (14:27 +0900)
committerMinJeong Kim <minjjj.kim@samsung.com>
Tue, 10 Jan 2017 01:05:17 +0000 (17:05 -0800)
Change-Id: I37d8238aedc1e77fecfa2e2fad5bf2ef53383380
Signed-off-by: MinJeong Kim <minjjj.kim@samsung.com>
src/bin/e_config.c
src/bin/e_config.h
src/bin/e_policy_wl.c

index 3136ca0aa3b1da11aa601cf9f3f3d9874fe49177..8c8bb8e4366c4b5e1d9ee70764b8a68a2b8ac001 100644 (file)
@@ -270,6 +270,7 @@ _e_config_edd_init(Eina_Bool old)
    E_CONFIG_VAL(D, T, launchscreen_timeout, DOUBLE);
    E_CONFIG_VAL(D, T, calc_vis_without_effect, UCHAR);
    E_CONFIG_VAL(D, T, save_win_buffer, UCHAR);
+   E_CONFIG_VAL(D, T, indicator_plug_name, STR);
 }
 
 /* externally accessible functions */
index 31a0d6c9acf361d3fa7b8a6a062bae1e6020d032..6a5a3299a229bb7bbf24527a95761af36dc5f568 100644 (file)
@@ -167,6 +167,7 @@ struct _E_Config
    double launchscreen_timeout;
    Eina_Bool calc_vis_without_effect;
    Eina_Bool save_win_buffer;
+   const char *indicator_plug_name;
 };
 
 struct _E_Config_Desklock_Background
index e99690c029d0774739e73fc899117bfea4d86aa4..f4d8c7ce9f1fdabd76f52556eab148ae409e4cd9 100644 (file)
@@ -137,6 +137,7 @@ typedef struct _E_Policy_Wl_Tzlaunch_Img
    E_Pixmap                  *ep;               /* pixmap for launch screen client */
    E_Client                  *ec;               /* client for launch screen image */
    Ecore_Timer               *timeout;          /* launch screen image hide timer */
+   Evas_Object               *indicator_obj;    /* plug object of indicator */
 
    Eina_Bool                  valid;            /* validation check */
    Eina_Bool                  replaced;
@@ -3759,10 +3760,12 @@ _e_tzsh_indicator_find_topvisible_client(E_Zone *zone)
         if (e_client_util_ignored_get(ec)) continue;
         if (ec->zone != zone) continue;
         if (!ec->frame) continue;
+
         if (!ec->visible) continue;
         if (ec->visibility.skip) continue;
         if ((ec->visibility.obscured != E_VISIBILITY_UNOBSCURED) &&
-            (ec->visibility.obscured != E_VISIBILITY_PARTIALLY_OBSCURED))
+            (ec->visibility.obscured != E_VISIBILITY_PARTIALLY_OBSCURED) &&
+            (!eina_list_data_find(e_comp->launchscrns, ec)))
           continue;
 
         /* if ec is subsurface, skip this */
@@ -4414,6 +4417,20 @@ _launchscreen_client_del(E_Client *ec)
      }
 }
 
+static void
+_launchscreen_img_cb_indicator_resized(Ecore_Evas *ee)
+{
+   Evas_Coord_Size size = {0, 0};
+   Evas_Object *indicator = ecore_evas_data_get(ee, "indicator");
+
+   if (!indicator) return;
+
+   ecore_evas_geometry_get(ee, NULL, NULL, &(size.w), &(size.h));
+
+   evas_object_move(indicator, 0, 0);
+   evas_object_resize(indicator, size.w, size.h);
+}
+
 static void
 _launchscreen_img_cb_del(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
 {
@@ -4454,6 +4471,12 @@ _launchscreen_img_off(E_Policy_Wl_Tzlaunch_Img *tzlaunch_img)
          "Launchscreen hide | pid %d",
          ec->pixmap, ec, tzlaunch_img->pid);
 
+   if (tzlaunch_img->indicator_obj)
+     {
+        evas_object_del(tzlaunch_img->indicator_obj);
+        tzlaunch_img->indicator_obj = NULL;
+     }
+
    if ((ec->pixmap) &&
        (ec->pixmap == tzlaunch_img->ep))
      {
@@ -4552,6 +4575,14 @@ _tzlaunch_img_iface_cb_launch(struct wl_client *client EINA_UNUSED, struct wl_re
    tzlaunch_img->indicator = indicator;
    tzlaunch_img->angle = angle;
 
+   if (indicator)
+     {
+        /* To configure indicator options */
+        ec->indicator.state = TIZEN_INDICATOR_STATE_ON;
+        ec->indicator.visible_type = TIZEN_INDICATOR_VISIBLE_TYPE_SHOWN;
+        ec->indicator.opacity_mode = TIZEN_INDICATOR_OPACITY_MODE_BG_TRANSPARENT;
+     }
+
    intercepted = e_policy_interceptor_call(E_POLICY_INTERCEPT_LAUNCHSCREEN_OBJECT_SETUP,
                                            ec,
                                            pfname, ftype, depth,
@@ -4598,6 +4629,61 @@ _tzlaunch_img_iface_cb_launch(struct wl_client *client EINA_UNUSED, struct wl_re
              ERR("Setting comp object content for %p failed!", ec);
              goto error;
           }
+
+     }
+
+   if (indicator)
+     {
+        Evas_Object *indicator_obj = NULL;
+        Eina_Bool ret = EINA_FALSE;
+
+        e_mod_indicator_owner_set(ec);
+        e_tzsh_indicator_srv_property_update(ec);
+
+        indicator_obj = ecore_evas_extn_plug_new(e_comp->ee);
+        if (!indicator_obj)
+          {
+             ELOGF("TZPOL",
+                   "Launchscreen launch | Faild to create ecore_evas_plug for indicator",
+                   ec->pixmap, ec);
+          }
+        else
+          {
+             if (e_config->indicator_plug_name)
+               {
+                  ret = ecore_evas_extn_plug_connect(indicator_obj, e_config->indicator_plug_name, 0, EINA_FALSE);
+                  if (ret)
+                    {
+                       Ecore_Evas *ee;
+
+                       ee = ecore_evas_object_ecore_evas_get(indicator_obj);
+                       ecore_evas_data_set(ee, "indicator", indicator_obj);
+                       ecore_evas_callback_resize_set(ee,
+                                                      _launchscreen_img_cb_indicator_resized);
+
+                       evas_object_layer_set(indicator_obj, ec->layer);
+                       evas_object_stack_above(indicator_obj, ec->frame);
+                       evas_object_show(indicator_obj);
+                       ELOGF("TZPOL",
+                             "Launchscreen launch | Succeeded to add indicator object plug_name(%s) indicator_obj(%p)",
+                             ec->pixmap, ec, e_config->indicator_plug_name, indicator_obj);
+                    }
+                  else
+                    {
+                       evas_object_del(indicator_obj);
+                       indicator_obj = NULL;
+                    }
+               }
+
+             if (!indicator_obj)
+               {
+                  ELOGF("TZPOL",
+                        "Launchscreen launch | Failed to add indicator object plug_name(%s)",
+                        ec->pixmap, ec, e_config->indicator_plug_name?:"NO PLUG NAME");
+               }
+          }
+
+        tzlaunch_img->indicator_obj = indicator_obj;
      }
 
    if (tzlaunch_img->obj)
@@ -4710,6 +4796,13 @@ _tzlaunch_img_iface_cb_owner(struct wl_client *client EINA_UNUSED, struct wl_res
              e_object_del(E_OBJECT(old_ec));
              tzlaunch_img->ep = NULL;
 
+             if (tzlaunch_img->indicator_obj)
+               {
+                  e_mod_indicator_owner_set(new_ec);
+                  e_tzsh_indicator_srv_property_update(new_ec);
+                  evas_object_stack_above(tzlaunch_img->indicator_obj, new_ec->frame);
+               }
+
              e_client_visibility_calculate();
           }
         else