Eina_List *event_handlers;
Eina_Bool hw_composition;
+ Eina_Bool follow_topmost_visibility;
+ Eina_Bool allowed_property;
};
static void
E_API Eina_Bool
e_client_video_topmost_visibility_follow(E_Client *ec)
{
- IFACE_CHECK_RET(follow_topmost_visibility, EINA_FALSE);
+ INTERNAL_DATA_GET;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ecv, EINA_FALSE);
- return ecv->iface->follow_topmost_visibility(ecv->iface);
+ ecv->follow_topmost_visibility = EINA_TRUE;
+ return EINA_TRUE;
}
E_API Eina_Bool
e_client_video_topmost_visibility_unfollow(E_Client *ec)
{
- IFACE_CHECK_RET(unfollow_topmost_visibility, EINA_FALSE);
+ INTERNAL_DATA_GET;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ecv, EINA_FALSE);
- return ecv->iface->unfollow_topmost_visibility(ecv->iface);
+ ecv->follow_topmost_visibility = EINA_FALSE;
+ return EINA_TRUE;
}
EINTERN Eina_Bool
e_client_video_property_allow(E_Client *ec)
{
- IFACE_CHECK_RET(allowed_property, EINA_FALSE);
+ INTERNAL_DATA_GET;
+
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ecv, EINA_FALSE);
- return ecv->iface->allowed_property(ecv->iface);
+ ecv->allowed_property = EINA_TRUE;
+ return EINA_TRUE;
}
EINTERN Eina_Bool
e_client_video_property_disallow(E_Client *ec)
{
- IFACE_CHECK_RET(disallowed_property, EINA_FALSE);
+ INTERNAL_DATA_GET;
- return ecv->iface->disallowed_property(ecv->iface);
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ecv, EINA_FALSE);
+
+ ecv->allowed_property = EINA_FALSE;
+ return EINA_TRUE;
}
E_API Eina_Bool
EINA_SAFETY_ON_NULL_RETURN(ecv);
ecv->hw_composition = EINA_FALSE;
}
+
+EINTERN Eina_Bool
+e_client_video_topmost_visibility_follow_get(E_Client_Video *ecv)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ecv, EINA_FALSE);
+ return ecv->follow_topmost_visibility;
+}
+
+EINTERN Eina_Bool
+e_client_video_property_allow_get(E_Client_Video *ecv)
+{
+ EINA_SAFETY_ON_NULL_RETURN_VAL(ecv, EINA_FALSE);
+ return ecv->allowed_property;
+}
struct _E_Video_Comp_Iface
{
void (*destroy)(E_Video_Comp_Iface *iface);
- Eina_Bool (*follow_topmost_visibility)(E_Video_Comp_Iface *iface);
- Eina_Bool (*unfollow_topmost_visibility)(E_Video_Comp_Iface *iface);
- Eina_Bool (*allowed_property)(E_Video_Comp_Iface *iface);
- Eina_Bool (*disallowed_property)(E_Video_Comp_Iface *iface);
Eina_Bool (*property_get)(E_Video_Comp_Iface *iface, unsigned int id, tdm_value *value);
Eina_Bool (*property_set)(E_Video_Comp_Iface *iface, unsigned int id, tdm_value value);
Eina_Bool (*property_delay_set)(E_Video_Comp_Iface *iface, unsigned int id, tdm_value value);
EINTERN E_Client *e_client_video_ec_get(E_Client_Video *ecv);
EINTERN void e_client_video_hw_composition_set(E_Client_Video *ecv);
EINTERN void e_client_video_hw_composition_unset(E_Client_Video *ecv);
+EINTERN Eina_Bool e_client_video_topmost_visibility_follow_get(E_Client_Video *ecv);
+EINTERN Eina_Bool e_client_video_property_allow_get(E_Client_Video *ecv);
#endif
}
static Eina_Bool
-_e_video_hwc_iface_follow_topmost_visibility(E_Video_Comp_Iface *iface)
-{
- IFACE_ENTRY;
-
- evh->follow_topmost_visibility = EINA_TRUE;
- return EINA_TRUE;
-}
-
-static Eina_Bool
-_e_video_hwc_iface_unfollow_topmost_visibility(E_Video_Comp_Iface *iface)
-{
- IFACE_ENTRY;
-
- evh->follow_topmost_visibility = EINA_FALSE;
- return EINA_TRUE;
-}
-
-static Eina_Bool
-_e_video_hwc_iface_allowed_property(E_Video_Comp_Iface *iface)
-{
- IFACE_ENTRY;
-
- evh->allowed_attribute = EINA_TRUE;
- return EINA_TRUE;
-}
-
-static Eina_Bool
-_e_video_hwc_iface_disallowed_property(E_Video_Comp_Iface *iface)
-{
- IFACE_ENTRY;
-
- evh->allowed_attribute = EINA_FALSE;
- return EINA_TRUE;
-}
-
-static Eina_Bool
_e_video_hwc_iface_property_get(E_Video_Comp_Iface *iface, unsigned int id, tdm_value *value)
{
IFACE_ENTRY;
/* if stand_alone is true, not show */
if ((ec->comp_data->sub.data && ec->comp_data->sub.data->stand_alone) ||
- (ec->comp_data->sub.data && evh->follow_topmost_visibility))
+ (ec->comp_data->sub.data && e_client_video_topmost_visibility_follow_get(evh->ecv)))
return;
/* FIXME It seems unnecessary. */
evh->ecv = ecv;
evh->iface.destroy = _e_video_hwc_iface_destroy;
- evh->iface.follow_topmost_visibility = _e_video_hwc_iface_follow_topmost_visibility;
- evh->iface.unfollow_topmost_visibility = _e_video_hwc_iface_unfollow_topmost_visibility;
- evh->iface.allowed_property = _e_video_hwc_iface_allowed_property;
- evh->iface.disallowed_property = _e_video_hwc_iface_disallowed_property;
evh->iface.property_get = _e_video_hwc_iface_property_get;
evh->iface.property_set = _e_video_hwc_iface_property_set;
evh->iface.property_delay_set = _e_video_hwc_iface_property_delay_set;
Eina_Bool cb_registered;
Eina_Bool need_force_render;
- Eina_Bool follow_topmost_visibility;
- Eina_Bool allowed_attribute;
};
/* Functions for HWC */
if (topmost != ec)
goto end;
- if (evhp->base.follow_topmost_visibility)
+ if (e_client_video_topmost_visibility_follow_get(evhp->base.ecv))
{
switch (ec->visibility.obscured)
{
* Set property with assigning layer right away if allowed_attribute
* flag is set. The reason why we have to do like this isn't figured
* yet. It's for backward compatibility. */
- if (evhp->base.allowed_attribute)
+ if (e_client_video_property_allow_get(evhp->base.ecv))
{
if (!_e_video_hwc_planes_tdm_layer_set(evhp))
{
ev = event;
evhw = data;
- if (!evhw->base.follow_topmost_visibility)
+ if (!e_client_video_topmost_visibility_follow_get(evhw->base.ecv))
goto end;
topmost = e_comp_wl_topmost_parent_get(evhw->base.ec);
E_Client *topmost1, *topmost2;
evhw = data;
- if (!evhw->base.follow_topmost_visibility)
+ if (!e_client_video_topmost_visibility_follow_get(evhw->base.ecv))
return;
/* This is to raise an 'VISIBILITY_CHANGE' event to video client when its
return EINA_FALSE;
}
- if (evhw->base.allowed_attribute)
+ if (e_client_video_property_allow_get(evhw->base.ecv))
{
VIN("set_attribute now : property(%s), value(%d)", evhw->base.ec, name, value.u32);