forked from enlightenment/efl
Add the extra proxy convenience functions.
SVN revision: 56773
This commit is contained in:
parent
2dd6fa09cb
commit
37ea40c0cc
|
@ -2095,6 +2095,8 @@ struct _Evas_Smart_Cb_Description
|
||||||
*/
|
*/
|
||||||
EAPI Evas_Object *evas_object_proxy_add (Evas *e) EINA_MALLOC;
|
EAPI Evas_Object *evas_object_proxy_add (Evas *e) EINA_MALLOC;
|
||||||
EAPI Eina_Bool evas_object_proxy_source_set (Evas_Object *o, Evas_Object *source);
|
EAPI Eina_Bool evas_object_proxy_source_set (Evas_Object *o, Evas_Object *source);
|
||||||
|
EAPI Evas_Object *evas_object_proxy_source_get (Evas_Object *o);
|
||||||
|
EAPI Eina_Bool evas_object_proxy_source_unset (Evas_Object *o);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @defgroup Evas_Cserve Shared Image Cache Server
|
* @defgroup Evas_Cserve Shared Image Cache Server
|
||||||
|
|
|
@ -116,7 +116,7 @@ evas_object_proxy_add(Evas *e)
|
||||||
EAPI Eina_Bool
|
EAPI Eina_Bool
|
||||||
evas_object_proxy_source_set(Evas_Object *obj, Evas_Object *src)
|
evas_object_proxy_source_set(Evas_Object *obj, Evas_Object *src)
|
||||||
{
|
{
|
||||||
Evas_Object_Proxy *o;
|
Evas_Object_Proxy *o,*so;
|
||||||
|
|
||||||
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
||||||
return false;
|
return false;
|
||||||
|
@ -128,6 +128,18 @@ evas_object_proxy_source_set(Evas_Object *obj, Evas_Object *src)
|
||||||
|
|
||||||
if (o->source == src) return true;
|
if (o->source == src) return true;
|
||||||
|
|
||||||
|
if (src)
|
||||||
|
{
|
||||||
|
MAGIC_CHECK(src, Evas_Object, MAGIC_OBJ);
|
||||||
|
return false;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
so = src->object_data;
|
||||||
|
/* Stop the loop _now_ */
|
||||||
|
/* FIXME: Should I check for smarts that contain proxies too? */
|
||||||
|
if (so->magic == MAGIC_OBJ_PROXY)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (o->source)
|
if (o->source)
|
||||||
{
|
{
|
||||||
_proxy_unset(obj);
|
_proxy_unset(obj);
|
||||||
|
@ -141,6 +153,30 @@ evas_object_proxy_source_set(Evas_Object *obj, Evas_Object *src)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
EAPI Evas_Object *
|
||||||
|
evas_object_proxy_source_get(Evas_Object *obj)
|
||||||
|
{
|
||||||
|
Evas_Object_Proxy *o;
|
||||||
|
|
||||||
|
MAGIC_CHECK(obj, Evas_Object, MAGIC_OBJ);
|
||||||
|
return NULL;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
o = obj->object_data;
|
||||||
|
MAGIC_CHECK(o, Evas_Object_Proxy, MAGIC_OBJ_PROXY);
|
||||||
|
return NULL;
|
||||||
|
MAGIC_CHECK_END();
|
||||||
|
|
||||||
|
return o->source;
|
||||||
|
}
|
||||||
|
|
||||||
|
EAPI Eina_Bool
|
||||||
|
evas_object_proxy_source_unset(Evas_Object *o)
|
||||||
|
{
|
||||||
|
return evas_object_proxy_source_set(o, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Internal helpers */
|
/* Internal helpers */
|
||||||
static void
|
static void
|
||||||
|
|
Loading…
Reference in New Issue