return EINA_FALSE;
}
+E_API Eina_Bool
+e_policy_aux_message_use_get(E_Client *ec)
+{
+ E_OBJECT_CHECK_RETURN(ec, EINA_FALSE);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ec->comp_data, EINA_FALSE);
+
+ E_Comp_Wl_Client_Data *cdata = (E_Comp_Wl_Client_Data *)ec->comp_data;
+ if (cdata->aux_hint.use_msg)
+ {
+ return EINA_TRUE;
+ }
+
+ return EINA_FALSE;
+}
+
+E_API void
+e_policy_aux_message_send(E_Client *ec, const char *key, const char *val, Eina_List *options)
+{
+ E_OBJECT_CHECK(ec);
+ E_OBJECT_TYPE_CHECK(ec, E_CLIENT_TYPE);
+
+ e_policy_wl_aux_message_send(ec, key, val, options);
+}
+
E_API void
e_policy_deferred_job(void)
{
EINTERN Eina_Bool e_policy_conf_rot_enable_get(int angle);
+E_API Eina_Bool e_policy_aux_message_use_get(E_Client *ec);
+E_API void e_policy_aux_message_send(E_Client *ec, const char *key, const char *val, Eina_List *options);
+
E_API void e_policy_deferred_job(void);
-E_API int e_policy_init(void);
-E_API int e_policy_shutdown(void);
+E_API int e_policy_init(void);
+E_API int e_policy_shutdown(void);
#endif
#endif
E_POLICY_HINT_ABOVE_LOCKSCREEN = 4,
E_POLICY_HINT_GESTURE_DISABLE = 5,
E_POLICY_HINT_EFFECT_DISABLE = 6,
+ E_POLICY_HINT_MSG_USE = 7,
};
static const char *hint_names[] =
"wm.policy.win.above.lock",
"wm.policy.win.gesture.disable",
"wm.policy.win.effect.disable",
+ "wm.policy.win.msg.use",
};
static void _e_policy_wl_surf_del(E_Policy_Wl_Surface *psurf);
ec->animatable = 0;
}
}
+ else if (!strcmp(hint->hint, hint_names[E_POLICY_HINT_MSG_USE]))
+ {
+ if ((hint->deleted) || (!strcmp(hint->val, "0")))
+ ec->comp_data->aux_hint.use_msg = EINA_FALSE;
+ else if (!strcmp(hint->val, "1"))
+ ec->comp_data->aux_hint.use_msg = EINA_TRUE;
+ }
if (send)
_e_policy_wl_allowed_aux_hint_send(ec, hint->id);
eina_iterator_free(it);
}
+void
+e_policy_wl_aux_message_send(E_Client *ec,
+ const char *key,
+ const char *val,
+ Eina_List *options)
+{
+ E_Policy_Wl_Tzpol *tzpol;
+ E_Policy_Wl_Surface *psurf;
+ Eina_List *l;
+ Eina_Iterator *it;
+ struct wl_array opt_array;
+ const char *option;
+ int len;
+ char *p;
+
+ if (!ec->comp_data->aux_hint.use_msg) return;
+
+ wl_array_init(&opt_array);
+ EINA_LIST_FOREACH(options, l, option)
+ {
+ len = strlen(option) + 1;
+ p = wl_array_add(&opt_array, len);
+
+ if (p == NULL)
+ break;
+ strncpy(p, option, len);
+ }
+
+ it = eina_hash_iterator_data_new(polwl->tzpols);
+ EINA_ITERATOR_FOREACH(it, tzpol)
+ EINA_LIST_FOREACH(tzpol->psurfs, l, psurf)
+ {
+ if (e_pixmap_client_get(psurf->cp) != ec) continue;
+ tizen_policy_send_aux_message(tzpol->res_tzpol,
+ psurf->surf,
+ key, val, &opt_array);
+ ELOGF("TZPOL",
+ "SEND |res_tzpol:0x%08x|aux message key:%s val:%s opt_count:%d",
+ ec->pixmap, ec,
+ (unsigned int)tzpol->res_tzpol,
+ key, val, eina_list_count(options));
+ }
+ eina_iterator_free(it);
+ wl_array_release(&opt_array);
+}
+
void
e_policy_wl_aux_hint_init(void)
{