e_policy_softkey: remove the policy_softkey_feature 16/318616/1
authorJunseok Kim <juns.kim@samsung.com>
Mon, 20 Jan 2025 08:44:41 +0000 (17:44 +0900)
committerTizen Window System <tizen.windowsystem@gmail.com>
Tue, 21 Jan 2025 06:59:35 +0000 (15:59 +0900)
Change-Id: I6277ca4c8b02208e62d595410bdc3396e58fbc31

src/bin/Makefile.mk
src/bin/server/e_policy_wl.c
src/bin/windowmgr/e_policy.c
src/bin/windowmgr/e_policy_desk.c
src/bin/windowmgr/e_policy_intern.h
src/bin/windowmgr/e_policy_softkey.c [deleted file]
src/bin/windowmgr/e_policy_softkey_intern.h [deleted file]
src/bin/windowmgr/services/e_service_softkey_intern.h
src/include/e_config.h

index ce5e1f4172ff5d8587f34a17fa63371aad83e7e1..1d4a6083c79e14dda9e5d05bf4c831189339a0fe 100644 (file)
@@ -218,7 +218,6 @@ src/bin/windowmgr/e_policy_desk_area.c \
 src/bin/windowmgr/e_policy_stack.c  \
 src/bin/windowmgr/e_policy_visibility.c \
 src/bin/windowmgr/e_policy_conformant.c \
-src/bin/windowmgr/e_policy_softkey.c \
 src/bin/windowmgr/e_focus.c \
 src/bin/windowmgr/e_focus_policy_iface.c \
 src/bin/windowmgr/e_focus_policy_history.c \
index 109de4e4b5831e67e87c7b9d8da0be12a2dc1847..b171d9eb45cd814190218fa39b533d8d1f25e265 100644 (file)
@@ -35,7 +35,6 @@
 #include "e_input_thread_client_intern.h"
 #include "e_view_intern.h"
 #include "e_view_client_intern.h"
-#include "e_policy_softkey_intern.h"
 #include "e_policy_stack_intern.h"
 #include "e_compositor_intern.h"
 #include "e_canvas_intern.h"
@@ -5494,7 +5493,7 @@ _tzsh_softkey_iface_cb_support_check(struct wl_client *client EINA_UNUSED, struc
    if (!eina_list_data_find(polwl->tzsh_clients, tzsh_client))
      return;
 
-   if (e_config->use_softkey || e_config->use_softkey_service)
+   if (e_config->use_softkey_service)
      support = 1;
    else
      support = 0;
@@ -5506,6 +5505,7 @@ _tzsh_softkey_iface_cb_support_check(struct wl_client *client EINA_UNUSED, struc
 static void
 _tzsh_softkey_show(E_Policy_Wl_Tzsh_Client *tzsh_client)
 {
+   E_Service_Softkey *softkey_service;
    E_Zone *zone;
    E_Client *ec;
 
@@ -5513,32 +5513,18 @@ _tzsh_softkey_show(E_Policy_Wl_Tzsh_Client *tzsh_client)
    if (!zone) return;
    ec = tzsh_client->ec;
    if (!ec) return;
+   if (!e_config->use_softkey_service) return;
 
-   if (e_config->use_softkey)
+   softkey_service = e_service_softkey_get(zone);
+   if (softkey_service)
      {
-        E_Policy_Softkey *softkey;
-        softkey = e_policy_softkey_get(zone);
-        if (softkey)
-          {
-             ELOGF("TZ_SOFTKEY", "SHOW softkey", ec);
-             e_policy_softkey_show(softkey);
-          }
+        ELOGF("TZ_SOFTKEY", "Request to SHOW softkey service. (service:%p)", ec, softkey_service);
+        e_service_softkey_visible_set(softkey_service, 1);
      }
-
-   if (e_config->use_softkey_service)
+   else
      {
-        E_Service_Softkey *softkey_service;
-        softkey_service = e_service_softkey_get(zone);
-        if (softkey_service)
-          {
-             ELOGF("TZ_SOFTKEY", "Request to SHOW softkey service. (service:%p)", ec, softkey_service);
-             e_service_softkey_visible_set(softkey_service, 1);
-          }
-        else
-          {
-             ELOGF("TZ_SOFTKEY", "There is no softkey service. store show request", ec);
-             e_service_softkey_store_visible_request(ec, 1);
-          }
+        ELOGF("TZ_SOFTKEY", "There is no softkey service. store show request", ec);
+        e_service_softkey_store_visible_request(ec, 1);
      }
 }
 
@@ -5546,21 +5532,18 @@ static void
 _tzsh_softkey_iface_cb_show(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzsh_softkey)
 {
    E_Policy_Wl_Tzsh_Client *tzsh_client;
+   E_Policy_Wl_Tzsh_Client_Data_Softkey *tzsh_client_data_softkey;
 
    ELOGF("TZ_SOFTKEY", "Request to Show softkey", NULL);
 
-   if (!e_config->use_softkey && !e_config->use_softkey_service)
-     return;
+   if (!e_config->use_softkey_service) return;
 
    tzsh_client = wl_resource_get_user_data(res_tzsh_softkey);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_client);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_client->tzsh);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_client->ec);
+   if (!eina_list_data_find(polwl->tzsh_clients, tzsh_client)) return;
 
-   if (!eina_list_data_find(polwl->tzsh_clients, tzsh_client))
-     return;
-
-   E_Policy_Wl_Tzsh_Client_Data_Softkey *tzsh_client_data_softkey;
    tzsh_client_data_softkey = (E_Policy_Wl_Tzsh_Client_Data_Softkey*)tzsh_client->client_data;
    EINA_SAFETY_ON_NULL_RETURN(tzsh_client_data_softkey);
 
@@ -5574,6 +5557,7 @@ _tzsh_softkey_iface_cb_show(struct wl_client *client EINA_UNUSED, struct wl_reso
 static void
 _tzsh_softkey_hide(E_Policy_Wl_Tzsh_Client *tzsh_client)
 {
+   E_Service_Softkey *softkey_service;
    E_Zone *zone;
    E_Client *ec;
 
@@ -5581,32 +5565,18 @@ _tzsh_softkey_hide(E_Policy_Wl_Tzsh_Client *tzsh_client)
    if (!zone) return;
    ec = tzsh_client->ec;
    if (!ec) return;
+   if (!e_config->use_softkey_service) return;
 
-   if (e_config->use_softkey)
+   softkey_service = e_service_softkey_get(zone);
+   if (softkey_service)
      {
-        E_Policy_Softkey *softkey;
-        softkey = e_policy_softkey_get(zone);
-        if (softkey)
-          {
-             ELOGF("TZ_SOFTKEY", "HIDE softkey", NULL);
-             e_policy_softkey_hide(softkey);
-          }
+        ELOGF("TZ_SOFTKEY", "Request to HIDE softkey service. (service:%p)", ec, softkey_service);
+        e_service_softkey_visible_set(softkey_service, 0);
      }
-
-   if (e_config->use_softkey_service)
+   else
      {
-        E_Service_Softkey *softkey_service;
-        softkey_service = e_service_softkey_get(zone);
-        if (softkey_service)
-          {
-             ELOGF("TZ_SOFTKEY", "Request to HIDE softkey service. (service:%p)", ec, softkey_service);
-             e_service_softkey_visible_set(softkey_service, 0);
-          }
-        else
-          {
-             ELOGF("TZ_SOFTKEY", "There is no softkey service. store hide request", ec);
-             e_service_softkey_store_visible_request(ec, 0);
-          }
+        ELOGF("TZ_SOFTKEY", "There is no softkey service. store hide request", ec);
+        e_service_softkey_store_visible_request(ec, 0);
      }
 }
 
@@ -5617,8 +5587,7 @@ _tzsh_softkey_iface_cb_hide(struct wl_client *client EINA_UNUSED, struct wl_reso
 
    ELOGF("TZ_SOFTKEY", "Request to Hide softkey", NULL);
 
-   if (!e_config->use_softkey && !e_config->use_softkey_service)
-     return;
+   if (!e_config->use_softkey_service) return;
 
    tzsh_client = wl_resource_get_user_data(res_tzsh_softkey);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_client);
@@ -5643,93 +5612,55 @@ static void
 _tzsh_softkey_iface_cb_state_set(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzsh_softkey, int32_t type, int32_t val)
 {
    E_Policy_Wl_Tzsh_Client *tzsh_client;
+   E_Service_Softkey *softkey_service;
    E_Policy_Softkey_Expand expand;
    E_Policy_Softkey_Opacity opacity;
 
    ELOGF("TZ_SOFTKEY", "Request to Set state (tz_type:%d, tz_val:%d)", NULL, type, val);
 
-   if (!e_config->use_softkey && !e_config->use_softkey_service)
-     return;
+   if (!e_config->use_softkey_service) return;
 
    tzsh_client = wl_resource_get_user_data(res_tzsh_softkey);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_client);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_client->tzsh);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_client->ec);
 
-   if (!eina_list_data_find(polwl->tzsh_clients, tzsh_client))
-     return;
+   if (!eina_list_data_find(polwl->tzsh_clients, tzsh_client)) return;
 
-   if (e_config->use_softkey)
+   softkey_service = e_service_softkey_get(tzsh_client->zone);
+   if (!softkey_service) return;
+
+   switch (type)
      {
-        E_Policy_Softkey *softkey;
-        softkey = e_policy_softkey_get(tzsh_client->zone);
-        if (!softkey) return;
+       case TWS_SOFTKEY_STATE_EXPAND:
+           if (val == TWS_SOFTKEY_STATE_EXPAND_ON)
+             expand = E_POLICY_SOFTKEY_EXPAND_ON;
+           else
+             expand = E_POLICY_SOFTKEY_EXPAND_OFF;
 
-        switch (type)
-          {
-           case TWS_SOFTKEY_STATE_EXPAND:
-              if (val == TWS_SOFTKEY_STATE_EXPAND_ON)
-                expand = E_POLICY_SOFTKEY_EXPAND_ON;
-              else
-                expand = E_POLICY_SOFTKEY_EXPAND_OFF;
-
-              ELOGF("TZ_SOFTKEY", "Set EXPAND state to %d", NULL, expand);
-              e_policy_softkey_expand_set(softkey, expand);
-              break;
-
-           case TWS_SOFTKEY_STATE_OPACITY:
-              if (val == TWS_SOFTKEY_STATE_OPACITY_TRANSPARENT)
-                opacity = E_POLICY_SOFTKEY_OPACITY_TRANSPARENT;
-              else
-                opacity = E_POLICY_SOFTKEY_OPACITY_OPAQUE;
-
-              ELOGF("TZ_SOFTKEY", "Set OPACITY state to %d", NULL, opacity);
-              e_policy_softkey_opacity_set(softkey, opacity);
-              break;
-
-           default:
-              break;
-          }
-     }
+           ELOGF("TZ_SOFTKEY", "Request to Change EXPAND state to %d. (service:%p)", NULL, expand, softkey_service);
+           e_service_softkey_expand_set(softkey_service, expand);
+           break;
 
-   if (e_config->use_softkey_service)
-     {
-        E_Service_Softkey *softkey_service;
+       case TWS_SOFTKEY_STATE_OPACITY:
+           if (val == TWS_SOFTKEY_STATE_OPACITY_TRANSPARENT)
+             opacity = E_POLICY_SOFTKEY_OPACITY_TRANSPARENT;
+           else
+             opacity = E_POLICY_SOFTKEY_OPACITY_OPAQUE;
 
-        softkey_service = e_service_softkey_get(tzsh_client->zone);
-        if (!softkey_service) return;
+           ELOGF("TZ_SOFTKEY", "Request to Change OPACITY state to %d. (service:%p)", NULL, opacity, softkey_service);
+           e_service_softkey_opacity_set(softkey_service, opacity);
+           break;
 
-        switch (type)
-          {
-           case TWS_SOFTKEY_STATE_EXPAND:
-              if (val == TWS_SOFTKEY_STATE_EXPAND_ON)
-                expand = E_POLICY_SOFTKEY_EXPAND_ON;
-              else
-                expand = E_POLICY_SOFTKEY_EXPAND_OFF;
-
-              ELOGF("TZ_SOFTKEY", "Request to Change EXPAND state to %d. (service:%p)", NULL, expand, softkey_service);
-              e_service_softkey_expand_set(softkey_service, expand);
-              break;
-
-           case TWS_SOFTKEY_STATE_OPACITY:
-              if (val == TWS_SOFTKEY_STATE_OPACITY_TRANSPARENT)
-                opacity = E_POLICY_SOFTKEY_OPACITY_TRANSPARENT;
-              else
-                opacity = E_POLICY_SOFTKEY_OPACITY_OPAQUE;
-
-              ELOGF("TZ_SOFTKEY", "Request to Change OPACITY state to %d. (service:%p)", NULL, opacity, softkey_service);
-              e_service_softkey_opacity_set(softkey_service, opacity);
-              break;
-
-           default:
-              break;
-          }
+       default:
+           break;
      }
 }
 
 static void
 _tzsh_softkey_iface_cb_state_get(struct wl_client *client EINA_UNUSED, struct wl_resource *res_tzsh_softkey, int32_t type)
 {
+   E_Service_Softkey *softkey_service;
    E_Policy_Wl_Tzsh_Client *tzsh_client;
    E_Policy_Softkey_Expand expand;
    E_Policy_Softkey_Opacity opacity;
@@ -5739,109 +5670,58 @@ _tzsh_softkey_iface_cb_state_get(struct wl_client *client EINA_UNUSED, struct wl
 
    ELOGF("TZ_SOFTKEY", "Request to Get state (tz_type:%d)", NULL, type);
 
-   if (!e_config->use_softkey && !e_config->use_softkey_service)
-     return;
+   if (!e_config->use_softkey_service) return;
 
    tzsh_client = wl_resource_get_user_data(res_tzsh_softkey);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_client);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_client->tzsh);
    EINA_SAFETY_ON_NULL_RETURN(tzsh_client->ec);
+
    zone = tzsh_client->zone;
    EINA_SAFETY_ON_NULL_RETURN(zone);
 
-   if (!eina_list_data_find(polwl->tzsh_clients, tzsh_client))
-     return;
-
-   if (e_config->use_softkey)
-     {
-        E_Policy_Softkey *softkey;
-        softkey = e_policy_softkey_get(zone);
-        if (!softkey) return;
+   if (!eina_list_data_find(polwl->tzsh_clients, tzsh_client)) return;
 
-        switch (type)
-          {
-           case TWS_SOFTKEY_STATE_VISIBLE:
-              visible = e_policy_softkey_visible_get(softkey);
-              if (visible)
-                val = TWS_SOFTKEY_STATE_VISIBLE_SHOW;
-              else
-                val = TWS_SOFTKEY_STATE_VISIBLE_HIDE;
-
-              ELOGF("TZ_SOFTKEY", "Send current VISIBLE state: %d (tz_val:%d)", NULL, visible, val);
-              tws_softkey_send_state_get_done(res_tzsh_softkey, type, val, 0);
-              break;
-
-           case TWS_SOFTKEY_STATE_EXPAND:
-              e_policy_softkey_expand_get(softkey, &expand);
-              if (expand == E_POLICY_SOFTKEY_EXPAND_ON)
-                val = TWS_SOFTKEY_STATE_EXPAND_ON;
-              else
-                val = TWS_SOFTKEY_STATE_EXPAND_OFF;
-
-              ELOGF("TZ_SOFTKEY", "Send current EXPAND state: %d (tz_val:%d)", NULL, expand, val);
-              tws_softkey_send_state_get_done(res_tzsh_softkey, type, val, 0);
-              break;
-
-           case TWS_SOFTKEY_STATE_OPACITY:
-              e_policy_softkey_opacity_get(softkey, &opacity);
-              if (opacity == E_POLICY_SOFTKEY_OPACITY_TRANSPARENT)
-                val = TWS_SOFTKEY_STATE_OPACITY_TRANSPARENT;
-              else
-                val = TWS_SOFTKEY_STATE_OPACITY_OPAQUE;
-
-              ELOGF("TZ_SOFTKEY", "Send current OPACITY state: %d (tz_val:%d)", NULL, opacity, val);
-              tws_softkey_send_state_get_done(res_tzsh_softkey, type, val, 0);
-              break;
-
-           default:
-              break;
-          }
-     }
+   softkey_service = e_service_softkey_get(zone);
+   if (!softkey_service) return;
 
-   if (e_config->use_softkey_service)
+   switch (type)
      {
-        E_Service_Softkey *softkey_service;
-        softkey_service = e_service_softkey_get(zone);
-        if (!softkey_service) return;
-
-        switch (type)
-          {
-           case TWS_SOFTKEY_STATE_VISIBLE:
-              visible = e_service_softkey_visible_get(softkey_service);
-              if (visible)
-                val = TWS_SOFTKEY_STATE_VISIBLE_SHOW;
-              else
-                val = TWS_SOFTKEY_STATE_VISIBLE_HIDE;
-
-              ELOGF("TZ_SOFTKEY", "Send service's current VISIBLE state: %d (tz_val:%d)", NULL, visible, val);
-              tws_softkey_send_state_get_done(res_tzsh_softkey, type, val, 0);
-              break;
-
-           case TWS_SOFTKEY_STATE_EXPAND:
-              e_service_softkey_expand_get(softkey_service, &expand);
-              if (expand == E_POLICY_SOFTKEY_EXPAND_ON)
-                val = TWS_SOFTKEY_STATE_EXPAND_ON;
-              else
-                val = TWS_SOFTKEY_STATE_EXPAND_OFF;
-
-              ELOGF("TZ_SOFTKEY", "Send service's current EXPAND state: %d (tz_val:%d)", NULL, expand, val);
-              tws_softkey_send_state_get_done(res_tzsh_softkey, type, val, 0);
-              break;
-
-           case TWS_SOFTKEY_STATE_OPACITY:
-              e_service_softkey_opacity_get(softkey_service, &opacity);
-              if (opacity == E_POLICY_SOFTKEY_OPACITY_TRANSPARENT)
-                val = TWS_SOFTKEY_STATE_OPACITY_TRANSPARENT;
-              else
-                val = TWS_SOFTKEY_STATE_OPACITY_OPAQUE;
-
-              ELOGF("TZ_SOFTKEY", "Send service's current OPACITY state: %d (tz_val:%d)", NULL, opacity, val);
-              tws_softkey_send_state_get_done(res_tzsh_softkey, type, val, 0);
-              break;
-
-           default:
-              break;
-          }
+       case TWS_SOFTKEY_STATE_VISIBLE:
+           visible = e_service_softkey_visible_get(softkey_service);
+           if (visible)
+             val = TWS_SOFTKEY_STATE_VISIBLE_SHOW;
+           else
+             val = TWS_SOFTKEY_STATE_VISIBLE_HIDE;
+
+           ELOGF("TZ_SOFTKEY", "Send service's current VISIBLE state: %d (tz_val:%d)", NULL, visible, val);
+           tws_softkey_send_state_get_done(res_tzsh_softkey, type, val, 0);
+           break;
+
+       case TWS_SOFTKEY_STATE_EXPAND:
+           e_service_softkey_expand_get(softkey_service, &expand);
+           if (expand == E_POLICY_SOFTKEY_EXPAND_ON)
+             val = TWS_SOFTKEY_STATE_EXPAND_ON;
+           else
+             val = TWS_SOFTKEY_STATE_EXPAND_OFF;
+
+           ELOGF("TZ_SOFTKEY", "Send service's current EXPAND state: %d (tz_val:%d)", NULL, expand, val);
+           tws_softkey_send_state_get_done(res_tzsh_softkey, type, val, 0);
+           break;
+
+       case TWS_SOFTKEY_STATE_OPACITY:
+           e_service_softkey_opacity_get(softkey_service, &opacity);
+           if (opacity == E_POLICY_SOFTKEY_OPACITY_TRANSPARENT)
+             val = TWS_SOFTKEY_STATE_OPACITY_TRANSPARENT;
+           else
+             val = TWS_SOFTKEY_STATE_OPACITY_OPAQUE;
+
+           ELOGF("TZ_SOFTKEY", "Send service's current OPACITY state: %d (tz_val:%d)", NULL, opacity, val);
+           tws_softkey_send_state_get_done(res_tzsh_softkey, type, val, 0);
+           break;
+
+       default:
+           break;
      }
 }
 
index f8f681c47574a15e6b68c721541e06d0cf467f82..9956ee56a488570f61e2509d57ced2dcc7fba45e 100644 (file)
@@ -20,7 +20,6 @@
 #include "e_comp_object_intern.h"
 #include "e_view_intern.h"
 #include "e_view_client_intern.h"
-#include "e_policy_softkey_intern.h"
 #include "e_policy_stack_intern.h"
 #include "e_compositor_intern.h"
 #include "e_policy_desk_intern.h"
@@ -94,11 +93,9 @@ static void        _e_policy_cb_hook_pixmap_unusable(void *data EINA_UNUSED, E_P
 static void        _e_policy_cb_client_data_free(void *data);
 static Eina_Bool   _e_policy_cb_zone_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
 static Eina_Bool   _e_policy_cb_zone_del(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
-static Eina_Bool   _e_policy_cb_zone_move_resize(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
 static Eina_Bool   _e_policy_cb_zone_desk_count_set(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
 static Eina_Bool   _e_policy_cb_zone_display_state_change(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
 static Eina_Bool   _e_policy_cb_zone_useful_geometry_change(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
-static Eina_Bool   _e_policy_cb_desk_show(void *data EINA_UNUSED, int type EINA_UNUSED, void *event);
 static Eina_Bool   _e_policy_cb_client_add(void *data EINA_UNUSED, int type, void *event);
 static Eina_Bool   _e_policy_cb_client_move(void *data EINA_UNUSED, int type, void *event);
 static Eina_Bool   _e_policy_cb_client_resize(void *data EINA_UNUSED, int type, void *event);
@@ -903,7 +900,6 @@ _e_policy_cb_zone_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
    E_Event_Zone_Add *ev;
    E_Zone *zone;
    E_Config_Policy_Desk *d;
-   E_Policy_Softkey *softkey;
    int i, n;
 
    ev = event;
@@ -929,14 +925,6 @@ _e_policy_cb_zone_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
           }
      }
 
-   /* add and show softkey */
-   if (e_config->use_softkey)
-     {
-        softkey = e_policy_softkey_get(zone);
-        if (!softkey)
-          softkey = e_policy_softkey_add(zone);
-     }
-
    return ECORE_CALLBACK_PASS_ON;
 }
 
@@ -946,7 +934,6 @@ _e_policy_cb_zone_del(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
    E_Event_Zone_Del *ev;
    E_Zone *zone;
    E_Policy_Desk *pd;
-   E_Policy_Softkey *softkey;
 
    int i, n;
 
@@ -959,32 +946,6 @@ _e_policy_cb_zone_del(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
         if (pd) e_policy_desk_del(pd);
      }
 
-   /* add and show softkey */
-   if (e_config->use_softkey)
-     {
-        softkey = e_policy_softkey_get(zone);
-        if (softkey)
-          e_policy_softkey_del(softkey);
-     }
-
-   return ECORE_CALLBACK_PASS_ON;
-}
-
-static Eina_Bool
-_e_policy_cb_zone_move_resize(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
-{
-   E_Event_Zone_Move_Resize *ev;
-   E_Policy_Softkey *softkey;
-
-   ev = event;
-   if (!ev) return ECORE_CALLBACK_PASS_ON;
-
-   if (e_config->use_softkey)
-     {
-        softkey = e_policy_softkey_get(ev->zone);
-        e_policy_softkey_update(softkey);
-     }
-
    return ECORE_CALLBACK_PASS_ON;
 }
 
@@ -1081,27 +1042,6 @@ _e_policy_cb_zone_useful_geometry_change(void *data EINA_UNUSED, int type EINA_U
    return ECORE_CALLBACK_PASS_ON;
 }
 
-static Eina_Bool
-_e_policy_cb_desk_show(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
-{
-   E_Event_Desk_Show *ev;
-   E_Policy_Softkey *softkey;
-
-   ev = event;
-
-   if (e_config->use_softkey)
-     {
-        softkey = e_policy_softkey_get(ev->desk->zone);
-        if (!softkey)
-          softkey = e_policy_softkey_add(ev->desk->zone);
-        if (e_policy_desk_get(ev->desk))
-          e_policy_softkey_show(softkey);
-        else
-          e_policy_softkey_hide(softkey);
-     }
-   return ECORE_CALLBACK_PASS_ON;
-}
-
 static Eina_Bool
 _e_policy_cb_client_add(void *data EINA_UNUSED, int type EINA_UNUSED, void *event)
 {
@@ -2378,11 +2318,9 @@ e_policy_init(void)
 
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_ADD,                  _e_policy_cb_zone_add,                        NULL);
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_DEL,                  _e_policy_cb_zone_del,                        NULL);
-   E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_MOVE_RESIZE,          _e_policy_cb_zone_move_resize,                NULL);
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_DESK_COUNT_SET,       _e_policy_cb_zone_desk_count_set,             NULL);
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_DISPLAY_STATE_CHANGE, _e_policy_cb_zone_display_state_change,       NULL);
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_ZONE_USEFUL_GEOMETRY_CHANGE, _e_policy_cb_zone_useful_geometry_change,   NULL);
-   E_LIST_HANDLER_APPEND(handlers, E_EVENT_DESK_SHOW,                 _e_policy_cb_desk_show,                       NULL);
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_ADD,                _e_policy_cb_client_add,                      NULL);
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_MOVE,               _e_policy_cb_client_move,                     NULL);
    E_LIST_HANDLER_APPEND(handlers, E_EVENT_CLIENT_RESIZE,             _e_policy_cb_client_resize,                   NULL);
@@ -2417,13 +2355,9 @@ EINTERN int
 e_policy_shutdown(void)
 {
    E_Policy *pol = e_policy;
-   Eina_List *l, *ll;
-   E_Policy_Softkey *softkey;
 
    eina_list_free(_e_pol_changed_zone);
    eina_list_free(pol->launchers);
-   EINA_LIST_FOREACH_SAFE(pol->softkeys, l, ll, softkey)
-     e_policy_softkey_del(softkey);
 
    E_FREE_LIST(hooks_cp, e_pixmap_hook_del);
    E_FREE_LIST(hooks_ec, e_client_hook_del);
index 8da2dec853c66e818bd5025d7043d154df16e6ec..8eceefd315cbafaa682d3b99e9f8f5950fc65b9e 100644 (file)
@@ -2,7 +2,6 @@
 #include "e_policy_desk_area_intern.h"
 
 #include "e_policy_intern.h"
-#include "e_policy_softkey_intern.h"
 #include "e_desk_area_intern.h"
 #include "e_client_intern.h"
 #include "e_utils_intern.h"
@@ -1922,15 +1921,6 @@ e_policy_desk_del(E_Policy_Desk *pd)
 {
    E_Policy_Client *pc;
    E_Client *ec;
-   E_Policy_Softkey *softkey;
-
-   /* hide and delete softkey */
-   if (e_config->use_softkey)
-     {
-        softkey = e_policy_softkey_get(pd->zone);
-        if (e_desk_current_get(pd->zone) == pd->desk)
-          e_policy_softkey_hide(softkey);
-     }
 
    /* remove clients */
    E_CLIENT_FOREACH(ec)
index 06076c8ae22fcd8e5549dfda8a2dc4427086beba..fa659ee7e5ae15ef1f871f96b44d69f9947e2d55 100644 (file)
@@ -27,7 +27,6 @@ struct _E_Policy
 {
    E_Module        *module;
    Eina_List       *launchers; /* launcher window per zone */
-   Eina_List       *softkeys; /* softkey ui object per zone */
 };
 
 struct _E_Policy_Client
diff --git a/src/bin/windowmgr/e_policy_softkey.c b/src/bin/windowmgr/e_policy_softkey.c
deleted file mode 100644 (file)
index 8d92123..0000000
+++ /dev/null
@@ -1,337 +0,0 @@
-#include "e_policy_softkey_intern.h"
-#include "e_policy_intern.h"
-#include "e_desk_intern.h"
-#include "e_utils_intern.h"
-#include "e_prefix_intern.h"
-#include "e_theme_intern.h"
-#include "e_config_intern.h"
-#include "e_comp_canvas_intern.h"
-#include "e_view_intern.h"
-#include "e_view_edje_intern.h"
-
-struct _E_Policy_Softkey
-{
-   EINA_INLIST;
-
-   E_Zone          *zone;
-   E_Policy_Softkey_Expand  expand;
-   E_Policy_Softkey_Opacity opacity;
-   E_View_Edje     *home;
-   E_View_Edje     *back;
-   void            *other;
-};
-
-static void         _e_policy_cb_softkey(void *data, E_View_Edje *edje, const char *emission, const char *source);
-static void         _e_policy_softkey_iconify(E_Zone *zone, Eina_Bool all);
-static E_View_Edje *_e_policy_softkey_icon_add(E_Zone *zone, const char *name);
-static void         _e_policy_softkey_icon_del(E_View_Edje *comp_edje);
-
-static E_Policy_Softkey_Funcs *_e_softkey_funcs = NULL;
-
-static void
-_e_policy_cb_softkey(void *data, E_View_Edje *edje, const char *emission, const char *source)
-{
-   E_Zone *zone;
-   Eina_Bool all;
-
-   zone = data;
-
-   if (!e_util_strcmp(emission, "e,action,softkey,home"))
-     all = EINA_TRUE;
-   else if (!e_util_strcmp(emission, "e,action,softkey,back"))
-     all = EINA_FALSE;
-   else
-     return;
-
-   _e_policy_softkey_iconify(zone, all);
-}
-
-static void
-_e_policy_softkey_iconify(E_Zone *zone, Eina_Bool all)
-{
-   E_Desk *desk;
-   E_Client *ec;
-   E_Policy_Client *launcher;
-
-   desk = e_desk_current_get(zone);
-   launcher = e_policy_client_launcher_get(zone);
-
-   E_CLIENT_REVERSE_FOREACH(ec)
-     {
-        if (e_client_util_ignored_get(ec)) continue;
-        if (!e_desk_has_ec(desk, ec)) continue;
-        if (!e_view_client_visible_get(e_client_view_get(ec))) continue;
-
-        if ((launcher) && (launcher->ec == ec))
-          return;
-
-        if (e_policy_client_is_home_screen(ec))
-          {
-             e_client_raise(ec);
-             return;
-          }
-        if (!all)
-          {
-             e_client_lower(ec);
-             return;
-          }
-     }
-}
-
-static E_View_Edje *
-_e_policy_softkey_icon_add(E_Zone *zone, const char *name)
-{
-   E_View_Edje *edje, *comp_edje;
-   char path[PATH_MAX], group[PATH_MAX];
-
-   edje = e_view_edje_create(e_canvas_layer_view_tree_get(e_comp_canvas_get(), E_CANVAS_LAYER_DESK_OBJECT_ABOVE));
-   EINA_SAFETY_ON_NULL_RETURN_VAL(edje, NULL);
-
-   snprintf(group, sizeof(group), "e/modules/policy-mobile/softkey/%s", name);
-   e_prefix_data_snprintf(path, sizeof(path), "data/themes/%s", "e-policy.edj");
-
-   if (!e_theme_edje_view_set(edje, NULL, group))
-     e_view_edje_file_set(edje, path, group);
-
-   e_view_edje_signal_callback_add(edje, "e,action,softkey,*", "e",
-                                   _e_policy_cb_softkey, zone);
-
-   /* use TYPE_NONE to disable shadow for softkey object */
-   comp_edje = e_view_edje_util_add(e_view_edje_view_get(edje));
-   e_view_data_set(e_view_edje_view_get(comp_edje), "policy_mobile_obj", edje);
-
-   return comp_edje;
-}
-
-static void
-_e_policy_softkey_icon_del(E_View_Edje *comp_edje)
-{
-   E_View_Edje *edje;
-
-   edje = e_view_data_get(e_view_edje_view_get(comp_edje), "policy_mobile_obj");
-   EINA_SAFETY_ON_NULL_RETURN(edje);
-
-   e_view_edje_signal_callback_del(edje, "e,action,softkey,*",
-                                   "e", _e_policy_cb_softkey);
-   e_view_hide(e_view_edje_view_get(comp_edje));
-   e_view_destroy(e_view_edje_view_get(comp_edje));
-}
-
-EINTERN E_Policy_Softkey *
-e_policy_softkey_add(E_Zone *zone)
-{
-   E_Policy_Softkey *softkey;
-
-   if (_e_softkey_funcs && _e_softkey_funcs->softkey_create)
-     {
-        softkey = _e_softkey_funcs->softkey_create(zone);
-        EINA_SAFETY_ON_NULL_RETURN_VAL(softkey, NULL);
-     }
-   else
-     {
-        softkey = E_NEW(E_Policy_Softkey, 1);
-        EINA_SAFETY_ON_NULL_RETURN_VAL(softkey, NULL);
-
-        softkey->zone = zone;
-        softkey->home = _e_policy_softkey_icon_add(zone, "home");
-        softkey->back = _e_policy_softkey_icon_add(zone, "back");
-     }
-
-   e_policy->softkeys = eina_list_append(e_policy->softkeys, softkey);
-
-   return softkey;
-}
-
-EINTERN void
-e_policy_softkey_del(E_Policy_Softkey *softkey)
-{
-   if (!softkey) return;
-
-   e_policy->softkeys = eina_list_remove(e_policy->softkeys, softkey);
-
-   if (_e_softkey_funcs && _e_softkey_funcs->softkey_destroy)
-     return _e_softkey_funcs->softkey_destroy(softkey);
-   else
-     {
-        _e_policy_softkey_icon_del(softkey->home);
-        _e_policy_softkey_icon_del(softkey->back);
-
-        E_FREE(softkey);
-     }
-}
-
-EINTERN void
-e_policy_softkey_show(E_Policy_Softkey *softkey)
-{
-   if (_e_softkey_funcs && _e_softkey_funcs->softkey_show)
-     return _e_softkey_funcs->softkey_show(softkey);
-
-   if (!softkey) return;
-
-   e_policy_softkey_update(softkey);
-
-   e_view_show(e_view_edje_view_get(softkey->home));
-   e_view_show(e_view_edje_view_get(softkey->back));
-}
-
-EINTERN void
-e_policy_softkey_hide(E_Policy_Softkey *softkey)
-{
-   if (_e_softkey_funcs && _e_softkey_funcs->softkey_hide)
-     return _e_softkey_funcs->softkey_hide(softkey);
-
-   if (!softkey) return;
-
-   e_view_hide(e_view_edje_view_get(softkey->home));
-   e_view_hide(e_view_edje_view_get(softkey->back));
-}
-
-EINTERN void
-e_policy_softkey_update(E_Policy_Softkey *softkey)
-{
-   int x, y, w, h, ow, oh, space;
-
-   if (_e_softkey_funcs && _e_softkey_funcs->softkey_update)
-     return _e_softkey_funcs->softkey_update(softkey);
-
-   if (!softkey) return;
-
-   e_zone_useful_geometry_get(softkey->zone, &x, &y, &w, &h);
-
-   ow = oh = e_config->softkey_size;
-
-   x = x + (w - ow) / 2;
-   y = h - oh;
-   space = ow * 4;
-
-   e_view_edje_geometry_set(softkey->home, x - space, y, ow, oh);
-   e_view_edje_geometry_set(softkey->back, x + space, y, ow, oh);
-}
-
-EINTERN int
-e_policy_softkey_visible_get(E_Policy_Softkey *softkey)
-{
-   int visible;
-
-   if (_e_softkey_funcs && _e_softkey_funcs->softkey_visible_get)
-     return _e_softkey_funcs->softkey_visible_get(softkey);
-
-   if (!softkey) return 0;
-
-   visible = e_view_visible_get(e_view_edje_view_get(softkey->home));
-   return visible;
-}
-
-EINTERN void
-e_policy_softkey_expand_set(E_Policy_Softkey *softkey, E_Policy_Softkey_Expand expand)
-{
-   if (_e_softkey_funcs && _e_softkey_funcs->softkey_expand_set)
-     return _e_softkey_funcs->softkey_expand_set(softkey, expand);
-
-   if (!softkey) return;
-
-   softkey->expand = expand;
-}
-
-EINTERN Eina_Bool
-e_policy_softkey_expand_get(E_Policy_Softkey *softkey, E_Policy_Softkey_Expand *expand)
-{
-   if (_e_softkey_funcs && _e_softkey_funcs->softkey_expand_get)
-     return _e_softkey_funcs->softkey_expand_get(softkey, expand);
-
-   if (!softkey)
-     {
-        if (expand)
-          *expand = E_POLICY_SOFTKEY_EXPAND_OFF;
-
-        return EINA_FALSE;
-     }
-   else
-     {
-        if (expand)
-          *expand = softkey->expand;
-
-        return EINA_TRUE;
-     }
-}
-
-EINTERN void
-e_policy_softkey_opacity_set(E_Policy_Softkey *softkey, E_Policy_Softkey_Opacity opacity)
-{
-   if (_e_softkey_funcs && _e_softkey_funcs->softkey_opacity_set)
-     return _e_softkey_funcs->softkey_opacity_set(softkey, opacity);
-
-   if (!softkey) return;
-
-   softkey->opacity = opacity;
-}
-
-EINTERN Eina_Bool
-e_policy_softkey_opacity_get(E_Policy_Softkey *softkey, E_Policy_Softkey_Opacity *opacity)
-{
-   if (_e_softkey_funcs && _e_softkey_funcs->softkey_opacity_get)
-     return _e_softkey_funcs->softkey_opacity_get(softkey, opacity);
-
-   if (!softkey)
-     {
-        if (opacity)
-          *opacity = E_POLICY_SOFTKEY_OPACITY_OPAQUE;
-
-        return EINA_FALSE;
-     }
-   else
-     {
-        if (opacity)
-          *opacity = softkey->opacity;
-
-        return EINA_TRUE;
-     }
-}
-
-EINTERN E_Policy_Softkey *
-e_policy_softkey_get(E_Zone *zone)
-{
-   E_Policy_Softkey *softkey;
-   Eina_List *l;
-
-   EINA_LIST_FOREACH(e_policy->softkeys, l, softkey)
-     {
-        if (softkey->zone == zone)
-          return softkey;
-     }
-
-   return NULL;
-}
-
-EINTERN Eina_Bool
-e_policy_softkey_module_func_set(E_Policy_Softkey_Funcs *fp)
-{
-   EINA_SAFETY_ON_FALSE_RETURN_VAL((_e_softkey_funcs == NULL), EINA_FALSE);
-
-   if (!fp) return EINA_FALSE;
-
-   _e_softkey_funcs = E_NEW(E_Policy_Softkey_Funcs, 1);
-   EINA_SAFETY_ON_NULL_RETURN_VAL(_e_softkey_funcs, EINA_FALSE);
-
-   _e_softkey_funcs->softkey_create = fp->softkey_create;
-   _e_softkey_funcs->softkey_destroy = fp->softkey_destroy;
-   _e_softkey_funcs->softkey_show = fp->softkey_show;
-   _e_softkey_funcs->softkey_hide = fp->softkey_hide;
-   _e_softkey_funcs->softkey_update = fp->softkey_update;
-   _e_softkey_funcs->softkey_visible_get = fp->softkey_visible_get;
-   _e_softkey_funcs->softkey_expand_set = fp->softkey_expand_set;
-   _e_softkey_funcs->softkey_expand_get = fp->softkey_expand_get;
-   _e_softkey_funcs->softkey_opacity_set = fp->softkey_opacity_set;
-   _e_softkey_funcs->softkey_opacity_get = fp->softkey_opacity_get;
-
-   return EINA_TRUE;
-}
-
-EINTERN void
-e_policy_softkey_module_func_unset(void)
-{
-   if (!_e_softkey_funcs)
-     return;
-
-   E_FREE(_e_softkey_funcs);
-}
diff --git a/src/bin/windowmgr/e_policy_softkey_intern.h b/src/bin/windowmgr/e_policy_softkey_intern.h
deleted file mode 100644 (file)
index 2dd8c98..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-# ifndef E_POLICY_SOFTKEY_INTERN_H
-# define E_POLICY_SOFTKEY_INTERN_H
-
-#include "e_intern.h"
-#include "e_zone_intern.h"
-
-typedef struct _E_Policy_Softkey       E_Policy_Softkey;
-typedef struct _E_Policy_Softkey_Funcs E_Policy_Softkey_Funcs;
-
-typedef enum _E_Policy_Softkey_Expand
-{
-   E_POLICY_SOFTKEY_EXPAND_OFF,
-   E_POLICY_SOFTKEY_EXPAND_ON
-} E_Policy_Softkey_Expand;
-
-typedef enum _E_Policy_Softkey_Opacity
-{
-   E_POLICY_SOFTKEY_OPACITY_OPAQUE,
-   E_POLICY_SOFTKEY_OPACITY_TRANSPARENT
-} E_Policy_Softkey_Opacity;
-
-struct _E_Policy_Softkey_Funcs
-{
-   E_Policy_Softkey* (*softkey_create)(E_Zone *zone);
-   void              (*softkey_destroy)(E_Policy_Softkey *softkey);
-   void              (*softkey_show)(E_Policy_Softkey *softkey);
-   void              (*softkey_hide)(E_Policy_Softkey *softkey);
-   void              (*softkey_update)(E_Policy_Softkey *softkey);
-   int               (*softkey_visible_get)(E_Policy_Softkey *softkey);
-   void              (*softkey_expand_set)(E_Policy_Softkey *softkey, E_Policy_Softkey_Expand expand);
-   Eina_Bool         (*softkey_expand_get)(E_Policy_Softkey *softkey, E_Policy_Softkey_Expand *expand);
-   void              (*softkey_opacity_set)(E_Policy_Softkey *softkey, E_Policy_Softkey_Opacity opacity);
-   Eina_Bool         (*softkey_opacity_get)(E_Policy_Softkey *softkey, E_Policy_Softkey_Opacity *opacity);
-};
-
-EINTERN E_Policy_Softkey *e_policy_softkey_add(E_Zone *zone);
-EINTERN void              e_policy_softkey_del(E_Policy_Softkey *softkey);
-EINTERN void              e_policy_softkey_show(E_Policy_Softkey *softkey);
-EINTERN void              e_policy_softkey_hide(E_Policy_Softkey *softkey);
-EINTERN void              e_policy_softkey_expand_set(E_Policy_Softkey *softkey, E_Policy_Softkey_Expand expand);
-EINTERN Eina_Bool         e_policy_softkey_expand_get(E_Policy_Softkey *softkey, E_Policy_Softkey_Expand *expand);
-EINTERN void              e_policy_softkey_opacity_set(E_Policy_Softkey *softkey, E_Policy_Softkey_Opacity opacity);
-EINTERN Eina_Bool         e_policy_softkey_opacity_get(E_Policy_Softkey *softkey, E_Policy_Softkey_Opacity *opacity);
-EINTERN E_Policy_Softkey *e_policy_softkey_get(E_Zone *zone);
-EINTERN void              e_policy_softkey_update(E_Policy_Softkey *softkey);
-EINTERN int               e_policy_softkey_visible_get(E_Policy_Softkey *softkey);
-EINTERN Eina_Bool         e_policy_softkey_module_func_set(E_Policy_Softkey_Funcs *fn);
-EINTERN void              e_policy_softkey_module_func_unset(void);
-
-#endif
index 961a3c1f6b15f52bef82005d804b6eca49d2f70c..79e682d76ad601612baa172005dce4d95760460c 100644 (file)
@@ -2,11 +2,22 @@
 #define E_SERVICE_SOFTKEY_INTERN_H
 
 #include "e_intern.h"
-#include "e_policy_softkey_intern.h"
 
 typedef struct _E_Service_Softkey E_Service_Softkey;
 typedef struct _E_Service_Softkey_Funcs E_Service_Softkey_Funcs;
 
+typedef enum _E_Policy_Softkey_Expand
+{
+   E_POLICY_SOFTKEY_EXPAND_OFF,
+   E_POLICY_SOFTKEY_EXPAND_ON
+} E_Policy_Softkey_Expand;
+
+typedef enum _E_Policy_Softkey_Opacity
+{
+   E_POLICY_SOFTKEY_OPACITY_OPAQUE,
+   E_POLICY_SOFTKEY_OPACITY_TRANSPARENT
+} E_Policy_Softkey_Opacity;
+
 struct _E_Service_Softkey_Funcs
 {
    E_Service_Softkey*  (*softkey_service_add)(E_Zone *zone, E_Client *ec);
index e266db0635def0a88acf9aca8ea8d16cee71165b..50ecf41b4c43beb9e5950cd748cf54c58d24c3ab 100644 (file)
@@ -48,7 +48,7 @@ struct _E_Config
    Eina_List  *policy_desks;
    int         use_configured_desks;
    int         use_softkey_service;
-   int         use_softkey;
+   E_DEPRECATED int         use_softkey;
    int         softkey_size;
    int         window_placement_policy;
    int         focus_policy;