1. Change code to use E_Quickpanel_Client_Scroll_State enumeration not integer.
- E_QP_Client's scrollable value
- e_qp_client_scrollable_state_set
- e_qp_client_scrollable_state_get
2. Change code to use recommended function not deprecated function.
- e_qp_client_scrollable_set -> e_qp_client_scrollable_state_set
- e_qp_client_scrollable_get -> e_qp_client_scrollable_state_get
Change-Id: I822fe6ce40f7ffc58a9b432fa2d6437172425d56
if (!eina_list_data_find(polwl->tzsh_clients, tzsh_client))
return;
- e_qp_client_scrollable_set(ec, tzsh_client->qp_type, EINA_TRUE);
+ e_qp_client_scrollable_state_set(ec, tzsh_client->qp_type, E_QUICKPANEL_CLIENT_SCROLL_STATE_SET);
}
static void
if (!eina_list_data_find(polwl->tzsh_clients, tzsh_client))
return;
- e_qp_client_scrollable_set(ec, tzsh_client->qp_type, EINA_FALSE);
+ e_qp_client_scrollable_state_set(ec, tzsh_client->qp_type, E_QUICKPANEL_CLIENT_SCROLL_STATE_UNSET);
}
static void
{
E_Policy_Wl_Tzsh_Client *tzsh_client;
E_Client *ec;
- Eina_Bool vis, scrollable;
+ Eina_Bool vis;
+ E_Quickpanel_Client_Scroll_State scrollable;
int ridx;
int val = TWS_QUICKPANEL_STATE_VALUE_UNKNOWN;
if (vis) val = TWS_QUICKPANEL_STATE_VALUE_VISIBLE_SHOW;
break;
case TWS_QUICKPANEL_STATE_TYPE_SCROLLABLE:
- val = TWS_QUICKPANEL_STATE_VALUE_SCROLLABLE_UNSET;
- scrollable = e_qp_client_scrollable_get(ec, tzsh_client->qp_type);
- if (scrollable) val = TWS_QUICKPANEL_STATE_VALUE_SCROLLABLE_SET;
+ scrollable = e_qp_client_scrollable_state_get(ec, tzsh_client->qp_type);
+ if (scrollable == E_QUICKPANEL_CLIENT_SCROLL_STATE_UNSET)
+ val = TWS_QUICKPANEL_STATE_VALUE_SCROLLABLE_UNSET;
+ else if (scrollable == E_QUICKPANEL_CLIENT_SCROLL_STATE_SET)
+ val = TWS_QUICKPANEL_STATE_VALUE_SCROLLABLE_SET;
+ else if (scrollable == E_QUICKPANEL_CLIENT_SCROLL_STATE_RETAIN)
+ val = TWS_QUICKPANEL_STATE_VALUE_SCROLLABLE_RETAIN;
+ else
+ val = TWS_QUICKPANEL_STATE_VALUE_SCROLLABLE_SET;
break;
case TWS_QUICKPANEL_STATE_TYPE_ORIENTATION:
ridx = e_qp_orientation_get(ec, tzsh_client->qp_type);
struct
{
Eina_Bool vis;
- int scrollable;
+ E_Quickpanel_Client_Scroll_State scrollable;
} hint;
};
static void _e_qp_srv_effect_update(E_Policy_Quickpanel *qp, int x, int y);
static E_QP_Client * _e_qp_client_ec_get(E_Client *ec, E_Quickpanel_Type type);
static Eina_Bool _e_qp_client_scrollable_update(E_Policy_Quickpanel *qp);
-static Eina_Bool _e_qp_client_scrollable_state_set(E_Client *ec, E_Quickpanel_Type type, int state);
-static int _e_qp_client_scrollable_state_get(E_Client *ec, E_Quickpanel_Type type);
+static Eina_Bool _e_qp_client_scrollable_state_set(E_Client *ec, E_Quickpanel_Type type, E_Quickpanel_Client_Scroll_State state);
+static E_Quickpanel_Client_Scroll_State _e_qp_client_scrollable_state_get(E_Client *ec, E_Quickpanel_Type type);
static void _quickpanel_client_evas_cb_show(void *data, Evas *evas, Evas_Object *obj, void *event);
static void _quickpanel_client_evas_cb_hide(void *data, Evas *evas, Evas_Object *obj, void *event);
qp_client->ec = ec;
qp_client->ref = 1;
qp_client->hint.vis = EINA_TRUE;
- qp_client->hint.scrollable = EINA_TRUE;
+ qp_client->hint.scrollable = E_QUICKPANEL_CLIENT_SCROLL_STATE_SET;
qp_client->type = type;
qp_clients = eina_list_append(qp_clients, qp_client);
}
static Eina_Bool
-_e_qp_client_scrollable_state_set(E_Client *ec, E_Quickpanel_Type type, int state)
+_e_qp_client_scrollable_state_set(E_Client *ec, E_Quickpanel_Type type, E_Quickpanel_Client_Scroll_State state)
{
E_Policy_Quickpanel *qp;
E_QP_Client *qp_client;
return EINA_TRUE;
}
-static int
+static E_Quickpanel_Client_Scroll_State
_e_qp_client_scrollable_state_get(E_Client *ec, E_Quickpanel_Type type)
{
E_QP_Client *qp_client;
}
EINTERN Eina_Bool
-e_qp_client_scrollable_state_set(E_Client *ec, E_Quickpanel_Type type, int state)
+e_qp_client_scrollable_state_set(E_Client *ec, E_Quickpanel_Type type, E_Quickpanel_Client_Scroll_State state)
{
ELOGF("QUICKPANEL", "Request to Set scrollable state of Quickpanel(type:%d) to %d", ec, type, state);
BACKEND_FUNC_CALL_RET(qp_client_scrollable_state_set, ec, type, state);
return _e_qp_client_scrollable_state_set(ec, type, state);
}
-EINTERN int
+EINTERN E_Quickpanel_Client_Scroll_State
e_qp_client_scrollable_state_get(E_Client *ec, E_Quickpanel_Type type)
{
E_QP_Client *qp_client;
void (*qp_client_hide)(E_Client *ec, E_Quickpanel_Type type);
Eina_Bool (*qp_client_scrollable_set)(E_Client *ec, E_Quickpanel_Type type, Eina_Bool set);
Eina_Bool (*qp_client_scrollable_get)(E_Client *ec, E_Quickpanel_Type type);
- Eina_Bool (*qp_client_scrollable_state_set)(E_Client *ec, E_Quickpanel_Type type, int state);
- int (*qp_client_scrollable_state_get)(E_Client *ec, E_Quickpanel_Type type);
+ Eina_Bool (*qp_client_scrollable_state_set)(E_Client *ec, E_Quickpanel_Type type, E_Quickpanel_Client_Scroll_State state);
+ E_Quickpanel_Client_Scroll_State (*qp_client_scrollable_state_get)(E_Client *ec, E_Quickpanel_Type type);
};
E_API Eina_Bool e_service_quickpanel_module_func_set(E_QP_Mgr_Funcs *fp);
EINTERN void e_qp_client_hide(E_Client *ec, E_Quickpanel_Type type);
EINTERN Eina_Bool e_qp_client_scrollable_set(E_Client *ec, E_Quickpanel_Type type, Eina_Bool set);
EINTERN Eina_Bool e_qp_client_scrollable_get(E_Client *ec, E_Quickpanel_Type type);
-EINTERN Eina_Bool e_qp_client_scrollable_state_set(E_Client *ec, E_Quickpanel_Type type, int state);
-EINTERN int e_qp_client_scrollable_state_get(E_Client *ec, E_Quickpanel_Type type);
+EINTERN Eina_Bool e_qp_client_scrollable_state_set(E_Client *ec, E_Quickpanel_Type type, E_Quickpanel_Client_Scroll_State state);
+EINTERN E_Quickpanel_Client_Scroll_State e_qp_client_scrollable_state_get(E_Client *ec, E_Quickpanel_Type type);
#endif