2013-06-20 03:53:29 -07:00
|
|
|
#include "evas_common_private.h"
|
2002-11-08 00:02:15 -08:00
|
|
|
#include "evas_private.h"
|
|
|
|
|
2010-11-26 02:01:18 -08:00
|
|
|
EVAS_MEMPOOL(_mp_sh);
|
|
|
|
|
2014-06-02 06:47:59 -07:00
|
|
|
#define MY_CLASS EVAS_OBJECT_CLASS
|
2012-10-08 18:58:41 -07:00
|
|
|
|
|
|
|
#define MY_CLASS_NAME "Evas_Object"
|
|
|
|
|
|
|
|
static void
|
|
|
|
_show(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
|
|
|
static void
|
|
|
|
_hide(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj);
|
|
|
|
|
2008-10-17 04:23:18 -07:00
|
|
|
static Eina_Inlist *
|
2009-11-27 01:51:08 -08:00
|
|
|
get_layer_objects(Evas_Layer *l)
|
2006-01-22 22:54:04 -08:00
|
|
|
{
|
2010-11-26 02:01:18 -08:00
|
|
|
if ((!l) || (!l->objects)) return NULL;
|
2009-11-27 01:51:08 -08:00
|
|
|
return (EINA_INLIST_GET(l->objects));
|
2006-01-22 22:54:04 -08:00
|
|
|
}
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
/* evas internal stuff */
|
2013-01-16 23:21:06 -08:00
|
|
|
static const Evas_Object_Proxy_Data default_proxy = {
|
2013-12-26 23:56:30 -08:00
|
|
|
NULL, NULL, NULL, 0, 0, NULL, 0, 0, 0, 0
|
2013-01-16 23:21:06 -08:00
|
|
|
};
|
2013-01-21 19:56:00 -08:00
|
|
|
static const Evas_Object_Map_Data default_map = {
|
|
|
|
{ NULL, NULL, 0, 0 }, { NULL, NULL, 0, 0 }, NULL, 0, 0, NULL, NULL
|
|
|
|
};
|
2013-03-12 05:58:19 -07:00
|
|
|
static const Evas_Object_Protected_State default_state = {
|
2013-04-06 23:11:56 -07:00
|
|
|
NULL, { 0, 0, 0, 0 },
|
2013-03-12 05:58:19 -07:00
|
|
|
{ { 0, 0, 0, 0, 0, 0, 0, 0, EINA_FALSE, EINA_FALSE } },
|
|
|
|
{ 255, 255, 255, 255 },
|
|
|
|
1.0, EVAS_RENDER_BLEND, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE, EINA_FALSE
|
|
|
|
};
|
2013-01-16 23:21:06 -08:00
|
|
|
|
|
|
|
Eina_Cow *evas_object_proxy_cow = NULL;
|
2013-01-21 19:56:00 -08:00
|
|
|
Eina_Cow *evas_object_map_cow = NULL;
|
2013-03-12 05:58:19 -07:00
|
|
|
Eina_Cow *evas_object_state_cow = NULL;
|
2013-01-21 19:56:00 -08:00
|
|
|
|
2013-12-26 23:56:30 -08:00
|
|
|
Eina_Cow *evas_object_3d_cow = NULL;
|
|
|
|
|
2013-01-21 19:56:00 -08:00
|
|
|
static Eina_Bool
|
|
|
|
_init_cow(void)
|
|
|
|
{
|
2013-12-26 23:56:30 -08:00
|
|
|
if (evas_object_map_cow && evas_object_proxy_cow && evas_object_state_cow && evas_object_3d_cow) return EINA_TRUE;
|
2013-01-21 19:56:00 -08:00
|
|
|
|
2013-04-02 01:10:35 -07:00
|
|
|
evas_object_proxy_cow = eina_cow_add("Evas Object Proxy", sizeof (Evas_Object_Proxy_Data), 8, &default_proxy, EINA_TRUE);
|
|
|
|
evas_object_map_cow = eina_cow_add("Evas Object Map", sizeof (Evas_Object_Map_Data), 8, &default_map, EINA_TRUE);
|
|
|
|
evas_object_state_cow = eina_cow_add("Evas Object State", sizeof (Evas_Object_Protected_State), 64, &default_state, EINA_FALSE);
|
2013-01-21 19:56:00 -08:00
|
|
|
|
2013-12-26 23:56:30 -08:00
|
|
|
evas_object_3d_cow = eina_cow_add("Evas Object 3D", sizeof (Evas_Object_3D_Data), 8, &default_proxy, EINA_TRUE);
|
|
|
|
|
|
|
|
if (!(evas_object_map_cow && evas_object_proxy_cow && evas_object_state_cow && evas_object_3d_cow))
|
2013-01-21 19:56:00 -08:00
|
|
|
{
|
|
|
|
eina_cow_del(evas_object_proxy_cow);
|
|
|
|
eina_cow_del(evas_object_map_cow);
|
2013-11-17 20:08:28 -08:00
|
|
|
eina_cow_del(evas_object_state_cow);
|
2013-01-27 00:42:57 -08:00
|
|
|
evas_object_proxy_cow = NULL;
|
|
|
|
evas_object_map_cow = NULL;
|
2013-11-17 20:08:28 -08:00
|
|
|
evas_object_state_cow = NULL;
|
2013-12-26 23:56:30 -08:00
|
|
|
|
|
|
|
eina_cow_del(evas_object_3d_cow);
|
|
|
|
evas_object_3d_cow = NULL;
|
|
|
|
|
2013-01-21 19:56:00 -08:00
|
|
|
return EINA_FALSE;
|
|
|
|
}
|
|
|
|
|
|
|
|
return EINA_TRUE;
|
|
|
|
}
|
2013-01-16 23:21:06 -08:00
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
2014-03-18 07:01:24 -07:00
|
|
|
_evas_object_eo_base_constructor(Eo *eo_obj, Evas_Object_Protected_Data *obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2013-03-18 08:33:54 -07:00
|
|
|
eo_do_super(eo_obj, MY_CLASS, eo_constructor());
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_do(eo_obj, evas_obj_type_set(MY_CLASS_NAME));
|
|
|
|
eo_manual_free_set(eo_obj, EINA_TRUE);
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2013-01-21 19:56:00 -08:00
|
|
|
if (!obj || !_init_cow())
|
2013-01-16 23:21:06 -08:00
|
|
|
{
|
|
|
|
eo_error_set(eo_obj);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2011-12-26 15:09:45 -08:00
|
|
|
obj->is_frame = EINA_FALSE;
|
2012-10-08 18:58:41 -07:00
|
|
|
obj->object = eo_obj;
|
2013-01-16 23:21:06 -08:00
|
|
|
obj->proxy = eina_cow_alloc(evas_object_proxy_cow);
|
2013-01-21 19:56:00 -08:00
|
|
|
obj->map = eina_cow_alloc(evas_object_map_cow);
|
2013-03-12 05:58:19 -07:00
|
|
|
obj->cur = eina_cow_alloc(evas_object_state_cow);
|
|
|
|
obj->prev = eina_cow_alloc(evas_object_state_cow);
|
2013-12-26 23:56:30 -08:00
|
|
|
obj->data_3d = eina_cow_alloc(evas_object_3d_cow);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2012-05-16 05:59:33 -07:00
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change_reset(Evas_Object *eo_obj)
|
2012-05-16 05:59:33 -07:00
|
|
|
{
|
2013-05-02 00:47:16 -07:00
|
|
|
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS);
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj) return;
|
2012-05-16 05:59:33 -07:00
|
|
|
obj->changed = EINA_FALSE;
|
|
|
|
obj->changed_move = EINA_FALSE;
|
2012-05-18 00:17:34 -07:00
|
|
|
obj->changed_color = EINA_FALSE;
|
2012-05-16 05:59:33 -07:00
|
|
|
obj->changed_pchange = EINA_FALSE;
|
2012-10-25 08:24:27 -07:00
|
|
|
obj->changed_src_visible = EINA_FALSE;
|
2012-05-16 05:59:33 -07:00
|
|
|
}
|
|
|
|
|
2012-07-17 02:09:45 -07:00
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_cur_prev(Evas_Object *eo_obj)
|
2012-07-17 02:09:45 -07:00
|
|
|
{
|
2013-05-02 00:47:16 -07:00
|
|
|
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS);
|
2012-11-09 19:44:04 -08:00
|
|
|
if (!obj) return;
|
2013-01-21 19:56:00 -08:00
|
|
|
if (!obj->map->prev.valid_map && obj->map->prev.map)
|
2012-09-12 11:36:15 -07:00
|
|
|
{
|
2013-01-21 19:56:00 -08:00
|
|
|
EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
|
|
|
|
{
|
|
|
|
if (map_write->prev.map != map_write->cur.map)
|
|
|
|
evas_map_free(map_write->prev.map);
|
|
|
|
if (map_write->cache_map == map_write->prev.map)
|
|
|
|
map_write->cache_map = NULL;
|
|
|
|
map_write->prev.map = NULL;
|
|
|
|
}
|
|
|
|
EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
|
2012-09-12 11:36:15 -07:00
|
|
|
}
|
2012-08-23 12:58:02 -07:00
|
|
|
|
2013-01-21 19:56:00 -08:00
|
|
|
if (obj->map->cur.map != obj->map->prev.map)
|
2012-07-17 02:09:45 -07:00
|
|
|
{
|
2013-01-21 19:56:00 -08:00
|
|
|
EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
|
|
|
|
{
|
|
|
|
if (map_write->cache_map) evas_map_free(map_write->cache_map);
|
|
|
|
map_write->cache_map = map_write->prev.map;
|
|
|
|
}
|
|
|
|
EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
|
|
|
|
}
|
|
|
|
if (memcmp(&obj->map->prev, &obj->map->cur, sizeof (obj->map->cur)))
|
|
|
|
{
|
|
|
|
EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
|
|
|
|
map_write->prev = map_write->cur;
|
|
|
|
EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
|
2012-07-17 02:09:45 -07:00
|
|
|
}
|
2013-03-12 05:58:19 -07:00
|
|
|
eina_cow_memcpy(evas_object_state_cow, (const Eina_Cow_Data **) &obj->prev, obj->cur);
|
2012-07-17 02:09:45 -07:00
|
|
|
}
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_free(Evas_Object *eo_obj, int clean_layer)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2013-05-02 00:47:16 -07:00
|
|
|
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS);
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj) return;
|
|
|
|
obj->clean_layer = clean_layer;
|
|
|
|
|
2005-10-26 19:44:36 -07:00
|
|
|
int was_smart_child = 0;
|
2006-07-30 07:30:24 -07:00
|
|
|
|
2013-01-27 16:28:53 -08:00
|
|
|
_evas_object_image_free(eo_obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_map_set(eo_obj, NULL);
|
2013-01-21 19:56:00 -08:00
|
|
|
if (obj->map->prev.map) evas_map_free(obj->map->prev.map);
|
|
|
|
if (obj->map->cache_map) evas_map_free(obj->map->cache_map);
|
|
|
|
if (obj->map->surface)
|
2012-09-07 01:02:32 -07:00
|
|
|
{
|
2012-11-11 18:22:39 -08:00
|
|
|
if (obj->layer)
|
|
|
|
{
|
|
|
|
obj->layer->evas->engine.func->image_map_surface_free
|
|
|
|
(obj->layer->evas->engine.data.output,
|
2013-01-21 19:56:00 -08:00
|
|
|
obj->map->surface);
|
2012-11-11 18:22:39 -08:00
|
|
|
}
|
2013-01-21 19:56:00 -08:00
|
|
|
EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
|
|
|
|
map_write->surface = NULL;
|
|
|
|
EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
|
2012-09-07 01:02:32 -07:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_grabs_cleanup(eo_obj, obj);
|
|
|
|
evas_object_intercept_cleanup(eo_obj);
|
2005-10-26 19:44:36 -07:00
|
|
|
if (obj->smart.parent) was_smart_child = 1;
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_cleanup(eo_obj);
|
|
|
|
if (obj->func->free)
|
|
|
|
{
|
2013-07-08 17:46:15 -07:00
|
|
|
obj->func->free(eo_obj, obj, obj->private_data);
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
if (!was_smart_child) evas_object_release(eo_obj, obj, obj->clean_layer);
|
2013-11-03 19:23:25 -08:00
|
|
|
if (obj->clip.clipees)
|
2013-12-29 22:54:21 -08:00
|
|
|
obj->clip.clipees = eina_list_free(obj->clip.clipees);
|
2013-04-10 21:21:54 -07:00
|
|
|
obj->clip.cache_clipees_answer = eina_list_free(obj->clip.cache_clipees_answer);
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_clip_changes_clean(eo_obj);
|
|
|
|
evas_object_event_callback_all_del(eo_obj);
|
|
|
|
evas_object_event_callback_cleanup(eo_obj);
|
2013-01-21 19:56:00 -08:00
|
|
|
if (obj->map->spans)
|
2012-08-03 21:14:38 -07:00
|
|
|
{
|
2013-01-21 19:56:00 -08:00
|
|
|
EINA_COW_WRITE_BEGIN(evas_object_map_cow, obj->map, Evas_Object_Map_Data, map_write)
|
|
|
|
{
|
|
|
|
free(map_write->spans);
|
|
|
|
map_write->spans = NULL;
|
|
|
|
}
|
|
|
|
EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2010-11-26 02:01:18 -08:00
|
|
|
if (obj->size_hints)
|
|
|
|
{
|
2013-11-03 19:23:25 -08:00
|
|
|
EVAS_MEMPOOL_FREE(_mp_sh, obj->size_hints);
|
2010-11-26 02:01:18 -08:00
|
|
|
}
|
2013-11-03 19:47:48 -08:00
|
|
|
eina_cow_free(evas_object_proxy_cow, (const Eina_Cow_Data**) &obj->proxy);
|
|
|
|
eina_cow_free(evas_object_map_cow, (const Eina_Cow_Data**) &obj->map);
|
|
|
|
eina_cow_free(evas_object_state_cow, (const Eina_Cow_Data**) &obj->cur);
|
|
|
|
eina_cow_free(evas_object_state_cow, (const Eina_Cow_Data**) &obj->prev);
|
2013-12-26 23:56:30 -08:00
|
|
|
eina_cow_free(evas_object_3d_cow, (const Eina_Cow_Data**) &obj->data_3d);
|
2013-07-08 17:46:15 -07:00
|
|
|
eo_data_unref(eo_obj, obj->private_data);
|
|
|
|
obj->private_data = NULL;
|
2013-11-26 04:16:22 -08:00
|
|
|
|
|
|
|
/* Try to manual free, and if it fails, unset it so the next unref will
|
|
|
|
* actually free the object. */
|
|
|
|
if (!eo_manual_free(eo_obj))
|
|
|
|
eo_manual_free_set(eo_obj, EINA_FALSE);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2008-10-21 09:31:05 -07:00
|
|
|
Eina_List *l;
|
2013-04-10 21:21:54 -07:00
|
|
|
Evas_Object_Protected_Data *obj2;
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object *eo_obj2;
|
2012-05-17 03:51:54 -07:00
|
|
|
Eina_Bool movch = EINA_FALSE;
|
2013-12-26 23:56:30 -08:00
|
|
|
Evas_3D_Texture *texture;
|
2012-05-17 03:51:54 -07:00
|
|
|
|
2012-11-11 18:22:39 -08:00
|
|
|
if (!obj->layer) return;
|
2012-05-17 03:51:54 -07:00
|
|
|
if (obj->layer->evas->nochange) return;
|
|
|
|
obj->layer->evas->changed = EINA_TRUE;
|
2011-06-08 19:45:59 -07:00
|
|
|
|
2011-01-19 03:59:53 -08:00
|
|
|
if (obj->changed_move)
|
|
|
|
{
|
2012-05-17 03:51:54 -07:00
|
|
|
movch = EINA_TRUE;
|
2012-03-28 00:17:39 -07:00
|
|
|
obj->changed_move = EINA_FALSE;
|
2011-01-19 03:59:53 -08:00
|
|
|
}
|
2012-05-17 03:51:54 -07:00
|
|
|
|
2012-07-16 20:35:53 -07:00
|
|
|
if (obj->changed) return;
|
2012-05-17 03:51:54 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_render_object_recalc(eo_obj);
|
2002-11-08 00:02:15 -08:00
|
|
|
/* set changed flag on all objects this one clips too */
|
2011-01-19 03:59:53 -08:00
|
|
|
if (!((movch) && (obj->is_static_clip)))
|
|
|
|
{
|
2013-04-10 21:21:54 -07:00
|
|
|
EINA_LIST_FOREACH(obj->clip.clipees, l, obj2)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2013-04-10 21:21:54 -07:00
|
|
|
evas_object_change(obj2->object, obj2);
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
}
|
2013-01-16 23:21:06 -08:00
|
|
|
EINA_LIST_FOREACH(obj->proxy->proxies, l, eo_obj2)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2013-05-02 00:47:16 -07:00
|
|
|
obj2 = eo_data_scope_get(eo_obj2, MY_CLASS);
|
2013-04-10 21:21:54 -07:00
|
|
|
|
2013-11-17 20:08:28 -08:00
|
|
|
if (!obj2) continue;
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj2, obj2);
|
2011-01-19 03:59:53 -08:00
|
|
|
}
|
2013-12-26 23:56:30 -08:00
|
|
|
EINA_LIST_FOREACH(obj->proxy->proxy_textures, l, texture)
|
|
|
|
{
|
2014-04-25 10:28:38 -07:00
|
|
|
eo_do(texture, evas_3d_object_change(EVAS_3D_STATE_TEXTURE_DATA, NULL));
|
2013-12-26 23:56:30 -08:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->smart.parent)
|
2011-05-19 06:01:44 -07:00
|
|
|
{
|
2013-05-02 00:47:16 -07:00
|
|
|
Evas_Object_Protected_Data *smart_parent = eo_data_scope_get(obj->smart.parent, MY_CLASS);
|
2012-11-09 19:44:04 -08:00
|
|
|
if (!smart_parent) return;
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(obj->smart.parent, smart_parent);
|
2011-05-19 06:01:44 -07:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2013-02-28 13:36:32 -08:00
|
|
|
void
|
|
|
|
evas_object_content_change(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
|
|
|
{
|
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
|
|
|
|
if ((obj->map) && (obj->map->surface))
|
|
|
|
{
|
|
|
|
EINA_COW_WRITE_BEGIN(evas_object_map_cow,
|
|
|
|
obj->map, Evas_Object_Map_Data, map_write)
|
|
|
|
{
|
|
|
|
obj->layer->evas->engine.func->image_map_surface_free
|
|
|
|
(obj->layer->evas->engine.data.output, map_write->surface);
|
|
|
|
map_write->surface = NULL;
|
|
|
|
}
|
|
|
|
EINA_COW_WRITE_END(evas_object_map_cow, obj->map, map_write);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-07-07 14:29:29 -07:00
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_render_pre_visible_change(Eina_Array *rects, Evas_Object *eo_obj, int is_v, int was_v)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2013-05-02 00:47:16 -07:00
|
|
|
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS);
|
2012-10-08 18:58:41 -07:00
|
|
|
|
2012-11-09 19:44:04 -08:00
|
|
|
if (!obj) return;
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->is_smart) return;
|
2011-12-26 15:09:45 -08:00
|
|
|
if (is_v == was_v) return;
|
2002-11-08 00:02:15 -08:00
|
|
|
if (is_v)
|
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
evas_add_rect(rects,
|
2013-03-12 05:58:19 -07:00
|
|
|
obj->cur->cache.clip.x,
|
|
|
|
obj->cur->cache.clip.y,
|
|
|
|
obj->cur->cache.clip.w,
|
|
|
|
obj->cur->cache.clip.h);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
evas_add_rect(rects,
|
2013-03-12 05:58:19 -07:00
|
|
|
obj->prev->cache.clip.x,
|
|
|
|
obj->prev->cache.clip.y,
|
|
|
|
obj->prev->cache.clip.w,
|
|
|
|
obj->prev->cache.clip.h);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-07-07 14:29:29 -07:00
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_render_pre_clipper_change(Eina_Array *rects, Evas_Object *eo_obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2013-05-02 00:47:16 -07:00
|
|
|
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS);
|
2012-10-08 18:58:41 -07:00
|
|
|
|
2012-11-09 19:44:04 -08:00
|
|
|
if (!obj) return;
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->is_smart) return;
|
2013-03-12 05:58:19 -07:00
|
|
|
if (obj->cur->clipper == obj->prev->clipper) return;
|
|
|
|
if ((obj->cur->clipper) && (obj->prev->clipper))
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
/* get difference rects between clippers */
|
|
|
|
evas_rects_return_difference_rects(rects,
|
2013-03-12 05:58:19 -07:00
|
|
|
obj->cur->clipper->cur->cache.clip.x,
|
|
|
|
obj->cur->clipper->cur->cache.clip.y,
|
|
|
|
obj->cur->clipper->cur->cache.clip.w,
|
|
|
|
obj->cur->clipper->cur->cache.clip.h,
|
|
|
|
obj->prev->clipper->prev->cache.clip.x,
|
|
|
|
obj->prev->clipper->prev->cache.clip.y,
|
|
|
|
obj->prev->clipper->prev->cache.clip.w,
|
|
|
|
obj->prev->clipper->prev->cache.clip.h);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2013-03-12 05:58:19 -07:00
|
|
|
else if (obj->cur->clipper)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
evas_rects_return_difference_rects(rects,
|
2013-03-12 05:58:19 -07:00
|
|
|
obj->cur->geometry.x,
|
|
|
|
obj->cur->geometry.y,
|
|
|
|
obj->cur->geometry.w,
|
|
|
|
obj->cur->geometry.h,
|
|
|
|
//// rl = evas_rects_return_difference_rects(obj->cur->cache.geometry.x,
|
|
|
|
//// obj->cur->cache.geometry.y,
|
|
|
|
//// obj->cur->cache.geometry.w,
|
|
|
|
//// obj->cur->cache.geometry.h,
|
|
|
|
obj->cur->clipper->cur->cache.clip.x,
|
|
|
|
obj->cur->clipper->cur->cache.clip.y,
|
|
|
|
obj->cur->clipper->cur->cache.clip.w,
|
|
|
|
obj->cur->clipper->cur->cache.clip.h);
|
|
|
|
}
|
|
|
|
else if (obj->prev->clipper)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
evas_rects_return_difference_rects(rects,
|
2013-03-12 05:58:19 -07:00
|
|
|
obj->prev->geometry.x,
|
|
|
|
obj->prev->geometry.y,
|
|
|
|
obj->prev->geometry.w,
|
|
|
|
obj->prev->geometry.h,
|
|
|
|
//// rl = evas_rects_return_difference_rects(obj->prev->cache.geometry.x,
|
|
|
|
//// obj->prev->cache.geometry.y,
|
|
|
|
//// obj->prev->cache.geometry.w,
|
|
|
|
//// obj->prev->cache.geometry.h,
|
|
|
|
obj->prev->clipper->prev->cache.clip.x,
|
|
|
|
obj->prev->clipper->prev->cache.clip.y,
|
|
|
|
obj->prev->clipper->prev->cache.clip.w,
|
|
|
|
obj->prev->clipper->prev->cache.clip.h);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-07-07 14:29:29 -07:00
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_render_pre_prev_cur_add(Eina_Array *rects, Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj) return;
|
|
|
|
|
2008-07-07 14:29:29 -07:00
|
|
|
evas_add_rect(rects,
|
2013-03-12 05:58:19 -07:00
|
|
|
obj->cur->cache.clip.x,
|
|
|
|
obj->cur->cache.clip.y,
|
|
|
|
obj->cur->cache.clip.w,
|
|
|
|
obj->cur->cache.clip.h);
|
2009-11-03 07:41:36 -08:00
|
|
|
evas_add_rect(rects,
|
2013-03-12 05:58:19 -07:00
|
|
|
obj->prev->cache.clip.x,
|
|
|
|
obj->prev->cache.clip.y,
|
|
|
|
obj->prev->cache.clip.w,
|
|
|
|
obj->prev->cache.clip.h);
|
2012-03-28 00:17:39 -07:00
|
|
|
/*
|
2009-11-03 07:41:36 -08:00
|
|
|
evas_add_rect(rects,
|
2013-03-12 05:58:19 -07:00
|
|
|
obj->cur->geometry.x,
|
|
|
|
obj->cur->geometry.y,
|
|
|
|
obj->cur->geometry.w,
|
|
|
|
obj->cur->geometry.h);
|
|
|
|
//// obj->cur->cache.geometry.x,
|
|
|
|
//// obj->cur->cache.geometry.y,
|
|
|
|
//// obj->cur->cache.geometry.w,
|
|
|
|
//// obj->cur->cache.geometry.h);
|
2009-11-03 07:41:36 -08:00
|
|
|
evas_add_rect(rects,
|
2013-03-12 05:58:19 -07:00
|
|
|
obj->prev->geometry.x,
|
|
|
|
obj->prev->geometry.y,
|
|
|
|
obj->prev->geometry.w,
|
|
|
|
obj->prev->geometry.h);
|
|
|
|
//// obj->prev->cache.geometry.x,
|
|
|
|
//// obj->prev->cache.geometry.y,
|
|
|
|
//// obj->prev->cache.geometry.w,
|
|
|
|
//// obj->prev->cache.geometry.h);
|
2009-11-03 07:41:36 -08:00
|
|
|
*/
|
2005-05-21 19:49:50 -07:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2009-04-14 05:15:07 -07:00
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_clip_changes_clean(Evas_Object *eo_obj)
|
2009-04-14 05:15:07 -07:00
|
|
|
{
|
2013-05-02 00:47:16 -07:00
|
|
|
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS);
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj) return;
|
|
|
|
|
2009-06-23 06:57:27 -07:00
|
|
|
Eina_Rectangle *r;
|
2009-04-14 05:15:07 -07:00
|
|
|
|
2012-03-28 00:17:39 -07:00
|
|
|
EINA_LIST_FREE(obj->clip.changes, r)
|
2011-12-26 15:09:45 -08:00
|
|
|
eina_rectangle_free(r);
|
2009-04-14 05:15:07 -07:00
|
|
|
}
|
|
|
|
|
2002-11-08 00:02:15 -08:00
|
|
|
void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_render_pre_effect_updates(Eina_Array *rects, Evas_Object *eo_obj, int is_v, int was_v EINA_UNUSED)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2013-05-02 00:47:16 -07:00
|
|
|
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS);
|
2009-06-23 06:57:27 -07:00
|
|
|
Eina_Rectangle *r;
|
2008-10-21 09:31:05 -07:00
|
|
|
Eina_List *l;
|
2008-07-07 14:29:29 -07:00
|
|
|
unsigned int i;
|
2009-04-15 06:40:37 -07:00
|
|
|
Eina_Array_Iterator it;
|
2008-07-07 14:29:29 -07:00
|
|
|
int x, y, w, h;
|
2002-11-08 00:02:15 -08:00
|
|
|
|
2012-10-10 00:23:00 -07:00
|
|
|
if (!obj) return;
|
2012-11-11 18:22:39 -08:00
|
|
|
if (!obj->layer) return;
|
2012-10-10 00:23:00 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->is_smart) goto end;
|
2002-11-08 00:02:15 -08:00
|
|
|
/* FIXME: was_v isn't used... why? */
|
|
|
|
if (!obj->clip.clipees)
|
|
|
|
{
|
2013-04-26 11:01:44 -07:00
|
|
|
Evas_Public_Data *e;
|
|
|
|
e = obj->layer->evas;
|
2011-06-08 19:45:59 -07:00
|
|
|
EINA_ARRAY_ITER_NEXT(rects, i, r, it)
|
|
|
|
{
|
|
|
|
/* get updates and clip to current clip */
|
|
|
|
x = r->x;
|
|
|
|
y = r->y;
|
|
|
|
w = r->w;
|
|
|
|
h = r->h;
|
|
|
|
RECTS_CLIP_TO_RECT(x, y, w, h,
|
2013-03-12 05:58:19 -07:00
|
|
|
obj->cur->cache.clip.x,
|
|
|
|
obj->cur->cache.clip.y,
|
|
|
|
obj->cur->cache.clip.w,
|
|
|
|
obj->cur->cache.clip.h);
|
2011-06-08 19:45:59 -07:00
|
|
|
if ((w > 0) && (h > 0))
|
2013-04-26 11:01:44 -07:00
|
|
|
obj->layer->evas->engine.func->output_redraws_rect_add(e->engine.data.output,
|
|
|
|
x + e->framespace.x,
|
|
|
|
y + e->framespace.y,
|
|
|
|
w, h);
|
2011-06-08 19:45:59 -07:00
|
|
|
/* get updates and clip to previous clip */
|
|
|
|
x = r->x;
|
|
|
|
y = r->y;
|
|
|
|
w = r->w;
|
|
|
|
h = r->h;
|
|
|
|
RECTS_CLIP_TO_RECT(x, y, w, h,
|
2013-03-12 05:58:19 -07:00
|
|
|
obj->prev->cache.clip.x,
|
|
|
|
obj->prev->cache.clip.y,
|
|
|
|
obj->prev->cache.clip.w,
|
|
|
|
obj->prev->cache.clip.h);
|
2011-06-08 19:45:59 -07:00
|
|
|
if ((w > 0) && (h > 0))
|
2013-04-26 11:01:44 -07:00
|
|
|
obj->layer->evas->engine.func->output_redraws_rect_add(e->engine.data.output,
|
|
|
|
x + e->framespace.x,
|
|
|
|
y + e->framespace.y,
|
|
|
|
w, h);
|
2011-06-08 19:45:59 -07:00
|
|
|
}
|
|
|
|
/* if the object is actually visible, take any parent clip changes */
|
|
|
|
if (is_v)
|
|
|
|
{
|
2012-10-10 00:23:00 -07:00
|
|
|
Evas_Object_Protected_Data *clipper;
|
|
|
|
|
2013-03-12 05:58:19 -07:00
|
|
|
clipper = obj->cur->clipper;
|
2012-10-10 00:23:00 -07:00
|
|
|
while (clipper)
|
2011-06-08 19:45:59 -07:00
|
|
|
{
|
|
|
|
EINA_LIST_FOREACH(clipper->clip.changes, l, r)
|
|
|
|
{
|
|
|
|
/* get updates and clip to current clip */
|
|
|
|
x = r->x; y = r->y; w = r->w; h = r->h;
|
|
|
|
RECTS_CLIP_TO_RECT(x, y, w, h,
|
2013-03-12 05:58:19 -07:00
|
|
|
obj->cur->cache.clip.x,
|
|
|
|
obj->cur->cache.clip.y,
|
|
|
|
obj->cur->cache.clip.w,
|
|
|
|
obj->cur->cache.clip.h);
|
2011-06-08 19:45:59 -07:00
|
|
|
if ((w > 0) && (h > 0))
|
2013-04-26 11:01:44 -07:00
|
|
|
obj->layer->evas->engine.func->output_redraws_rect_add(e->engine.data.output,
|
|
|
|
x + e->framespace.x,
|
|
|
|
y + e->framespace.y,
|
|
|
|
w, h);
|
2011-06-08 19:45:59 -07:00
|
|
|
/* get updates and clip to previous clip */
|
|
|
|
x = r->x; y = r->y; w = r->w; h = r->h;
|
|
|
|
RECTS_CLIP_TO_RECT(x, y, w, h,
|
2013-03-12 05:58:19 -07:00
|
|
|
obj->prev->cache.clip.x,
|
|
|
|
obj->prev->cache.clip.y,
|
|
|
|
obj->prev->cache.clip.w,
|
|
|
|
obj->prev->cache.clip.h);
|
2011-06-08 19:45:59 -07:00
|
|
|
if ((w > 0) && (h > 0))
|
2013-04-26 11:01:44 -07:00
|
|
|
obj->layer->evas->engine.func->output_redraws_rect_add(e->engine.data.output,
|
|
|
|
x + e->framespace.x,
|
|
|
|
y + e->framespace.y,
|
|
|
|
w, h);
|
2011-06-08 19:45:59 -07:00
|
|
|
}
|
2013-03-12 05:58:19 -07:00
|
|
|
clipper = clipper->cur->clipper;
|
2011-06-08 19:45:59 -07:00
|
|
|
}
|
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_clip_changes_clean(eo_obj);
|
2011-06-08 19:45:59 -07:00
|
|
|
EINA_ARRAY_ITER_NEXT(rects, i, r, it)
|
|
|
|
obj->clip.changes = eina_list_append(obj->clip.changes, r);
|
|
|
|
eina_array_clean(rects);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2008-07-07 14:29:29 -07:00
|
|
|
|
|
|
|
end:
|
2009-04-15 06:40:37 -07:00
|
|
|
EINA_ARRAY_ITER_NEXT(rects, i, r, it)
|
2009-06-23 06:57:27 -07:00
|
|
|
eina_rectangle_free(r);
|
2009-04-15 06:40:37 -07:00
|
|
|
eina_array_clean(rects);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_was_in_output_rect(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, int x, int y, int w, int h)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2013-01-21 19:56:00 -08:00
|
|
|
if (obj->is_smart && !obj->map->prev.map && !obj->map->prev.usemap) return 0;
|
2002-11-08 00:02:15 -08:00
|
|
|
/* assumes coords have been recalced */
|
|
|
|
if ((RECTS_INTERSECT(x, y, w, h,
|
2013-03-12 05:58:19 -07:00
|
|
|
obj->prev->cache.clip.x,
|
|
|
|
obj->prev->cache.clip.y,
|
|
|
|
obj->prev->cache.clip.w,
|
|
|
|
obj->prev->cache.clip.h)))
|
2002-11-08 00:02:15 -08:00
|
|
|
return 1;
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_was_opaque(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->is_smart) return 0;
|
2013-03-12 05:58:19 -07:00
|
|
|
if (obj->prev->cache.clip.a == 255)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
if (obj->func->was_opaque)
|
2013-07-08 17:46:15 -07:00
|
|
|
return obj->func->was_opaque(eo_obj, obj, obj->private_data);
|
2011-06-08 19:45:59 -07:00
|
|
|
return 1;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2007-07-23 07:22:57 -07:00
|
|
|
int
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_is_inside(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord x, Evas_Coord y)
|
2007-07-23 07:22:57 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->is_smart) return 0;
|
2007-07-23 07:22:57 -07:00
|
|
|
if (obj->func->is_inside)
|
2013-07-08 17:46:15 -07:00
|
|
|
return obj->func->is_inside(eo_obj, obj, obj->private_data, x, y);
|
2007-07-23 07:22:57 -07:00
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
int
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_was_inside(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord x, Evas_Coord y)
|
2007-07-23 07:22:57 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->is_smart) return 0;
|
2007-07-23 07:22:57 -07:00
|
|
|
if (obj->func->was_inside)
|
2013-07-08 17:46:15 -07:00
|
|
|
return obj->func->was_inside(eo_obj, obj, obj->private_data, x, y);
|
2007-07-23 07:22:57 -07:00
|
|
|
return 0;
|
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
/* routines apps will call */
|
|
|
|
|
2011-03-08 04:23:37 -08:00
|
|
|
EAPI void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_ref(Evas_Object *eo_obj)
|
2011-03-08 04:23:37 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
2011-03-08 04:23:37 -08:00
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2012-10-08 18:58:41 -07:00
|
|
|
|
|
|
|
eo_ref(eo_obj);
|
|
|
|
|
2013-05-02 00:47:16 -07:00
|
|
|
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS);
|
2012-11-09 19:44:04 -08:00
|
|
|
if (!obj) return;
|
2011-03-08 04:23:37 -08:00
|
|
|
obj->ref++;
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_unref(Evas_Object *eo_obj)
|
2011-03-08 04:23:37 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
2011-03-08 04:23:37 -08:00
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2012-10-08 18:58:41 -07:00
|
|
|
|
2013-05-02 00:47:16 -07:00
|
|
|
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS);
|
2012-11-09 19:44:04 -08:00
|
|
|
if (!obj) return;
|
2012-10-08 18:58:41 -07:00
|
|
|
|
2011-03-08 04:23:37 -08:00
|
|
|
if (obj->ref == 0) return;
|
|
|
|
obj->ref--;
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_unref(eo_obj);
|
|
|
|
if ((obj->del_ref) && (obj->ref == 0)) evas_object_del(eo_obj);
|
|
|
|
|
2011-03-08 04:23:37 -08:00
|
|
|
}
|
|
|
|
|
2012-03-29 00:46:30 -07:00
|
|
|
EAPI int
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_ref_get(const Evas_Object *eo_obj)
|
2012-03-29 00:46:30 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
2012-03-29 00:46:30 -07:00
|
|
|
return 0;
|
|
|
|
MAGIC_CHECK_END();
|
2012-10-08 18:58:41 -07:00
|
|
|
|
2013-05-02 00:47:16 -07:00
|
|
|
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS);
|
2012-11-09 19:44:04 -08:00
|
|
|
if (!obj) return 0;
|
2012-03-29 00:46:30 -07:00
|
|
|
return obj->ref;
|
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_del(Evas_Object *eo_obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!eo_obj) return;
|
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
2002-11-08 00:02:15 -08:00
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2006-10-15 07:39:16 -07:00
|
|
|
|
2013-05-02 00:47:16 -07:00
|
|
|
Evas_Object_Protected_Data *obj = eo_data_scope_get(eo_obj, MY_CLASS);
|
2006-07-12 17:26:25 -07:00
|
|
|
|
2012-11-09 19:44:04 -08:00
|
|
|
if (!obj) return;
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->delete_me || obj->eo_del_called) return;
|
2011-03-08 04:23:37 -08:00
|
|
|
if (obj->ref > 0)
|
|
|
|
{
|
2012-03-28 00:17:39 -07:00
|
|
|
obj->del_ref = EINA_TRUE;
|
2011-03-08 04:23:37 -08:00
|
|
|
return;
|
|
|
|
}
|
2010-05-21 00:10:45 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
obj->eo_del_called = EINA_TRUE;
|
|
|
|
|
2013-09-24 21:32:56 -07:00
|
|
|
eo_do(eo_obj, eo_parent_set(NULL));
|
2012-10-08 18:58:41 -07:00
|
|
|
// eo_del(eo_obj);
|
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
2014-03-18 07:01:24 -07:00
|
|
|
_evas_object_eo_base_destructor(Eo *eo_obj, Evas_Object_Protected_Data *obj)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2014-02-05 03:09:05 -08:00
|
|
|
Evas_Object *proxy;
|
|
|
|
Eina_List *l, *l2;
|
2014-05-12 00:47:54 -07:00
|
|
|
Evas_3D_Texture *texture;
|
2012-10-08 18:58:41 -07:00
|
|
|
|
|
|
|
evas_object_hide(eo_obj);
|
2011-03-08 22:16:46 -08:00
|
|
|
if (obj->focused)
|
|
|
|
{
|
2012-03-28 00:17:39 -07:00
|
|
|
obj->focused = EINA_FALSE;
|
2012-11-11 18:22:39 -08:00
|
|
|
if (obj->layer)
|
|
|
|
obj->layer->evas->focused = NULL;
|
2011-06-08 19:45:59 -07:00
|
|
|
_evas_object_event_new();
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_FOCUS_OUT, NULL, _evas_event_counter);
|
2012-11-11 18:22:39 -08:00
|
|
|
if (obj->layer)
|
|
|
|
_evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
|
2011-03-08 22:16:46 -08:00
|
|
|
}
|
2010-03-04 06:48:21 -08:00
|
|
|
_evas_object_event_new();
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_DEL, NULL, _evas_event_counter);
|
2012-11-11 18:22:39 -08:00
|
|
|
if (obj->layer)
|
|
|
|
_evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
|
|
|
|
if ((obj->mouse_grabbed > 0) && (obj->layer))
|
2011-09-24 21:43:02 -07:00
|
|
|
obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed;
|
2012-11-11 18:22:39 -08:00
|
|
|
if (((obj->mouse_in) || (obj->mouse_grabbed > 0)) && (obj->layer))
|
2012-10-22 01:57:08 -07:00
|
|
|
obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, eo_obj);
|
2011-09-24 21:43:02 -07:00
|
|
|
obj->mouse_grabbed = 0;
|
|
|
|
obj->mouse_in = 0;
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->name) evas_object_name_set(eo_obj, NULL);
|
2002-11-08 00:02:15 -08:00
|
|
|
if (!obj->layer)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_manual_free_set(eo_obj, EINA_FALSE);
|
|
|
|
obj->clean_layer = 1;
|
|
|
|
goto end;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_grabs_cleanup(eo_obj, obj);
|
2014-03-11 00:34:56 -07:00
|
|
|
/* "while" should be used for null check of obj->clip.clipees,
|
|
|
|
because evas_objct_clip_unset can set null to obj->clip.clipees */
|
|
|
|
while (obj->clip.clipees)
|
|
|
|
{
|
|
|
|
Evas_Object_Protected_Data *tmp;
|
|
|
|
tmp = eina_list_data_get(obj->clip.clipees);
|
|
|
|
evas_object_clip_unset(tmp->object);
|
|
|
|
}
|
2014-02-05 03:09:05 -08:00
|
|
|
EINA_LIST_FOREACH_SAFE(obj->proxy->proxies, l, l2, proxy)
|
2014-03-03 21:14:15 -08:00
|
|
|
{
|
2014-06-02 06:47:59 -07:00
|
|
|
if (eo_isa(proxy, EVAS_IMAGE_CLASS))
|
2014-03-03 21:14:15 -08:00
|
|
|
evas_object_image_source_unset(proxy);
|
2014-06-02 06:47:59 -07:00
|
|
|
else if (eo_isa(proxy, EVAS_TEXT_CLASS))
|
2014-03-03 21:14:15 -08:00
|
|
|
eo_do(proxy, evas_obj_text_filter_source_set(NULL, eo_obj));
|
|
|
|
}
|
2014-01-07 00:39:23 -08:00
|
|
|
|
2014-05-12 00:47:54 -07:00
|
|
|
EINA_COW_WRITE_BEGIN(evas_object_proxy_cow, obj->proxy,
|
|
|
|
Evas_Object_Proxy_Data, proxy_src)
|
|
|
|
{
|
|
|
|
EINA_LIST_FREE(proxy_src->proxy_textures, texture)
|
|
|
|
eo_do(texture, evas_3d_texture_source_set(NULL));
|
|
|
|
}
|
|
|
|
EINA_COW_WRITE_END(evas_object_proxy_cow, obj->proxy, proxy_src);
|
2014-01-07 00:39:23 -08:00
|
|
|
|
2013-03-12 05:58:19 -07:00
|
|
|
if (obj->cur->clipper) evas_object_clip_unset(eo_obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_map_set(eo_obj, NULL);
|
|
|
|
if (obj->is_smart) evas_object_smart_del(eo_obj);
|
2010-03-04 06:48:21 -08:00
|
|
|
_evas_object_event_new();
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_FREE, NULL, _evas_event_counter);
|
2012-11-11 18:22:39 -08:00
|
|
|
if (obj->layer)
|
|
|
|
_evas_post_event_callback_call(obj->layer->evas->evas, obj->layer->evas);
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_smart_cleanup(eo_obj);
|
2004-03-07 18:42:08 -08:00
|
|
|
obj->delete_me = 1;
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
|
|
|
end:
|
2013-04-11 12:08:24 -07:00
|
|
|
evas_object_event_callback_all_del(eo_obj);
|
|
|
|
evas_object_event_callback_cleanup(eo_obj);
|
2013-07-08 17:46:15 -07:00
|
|
|
|
2013-03-18 08:33:54 -07:00
|
|
|
eo_do_super(eo_obj, MY_CLASS, eo_destructor());
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2013-07-19 02:37:11 -07:00
|
|
|
evas_object_geometry_set(Evas_Object *eo_obj, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h)
|
|
|
|
{
|
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
|
|
|
eo_do(eo_obj,
|
|
|
|
evas_obj_position_set(x, y),
|
|
|
|
evas_obj_size_set(w, h));
|
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_position_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord x, Evas_Coord y)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
|
2012-10-21 22:02:53 -07:00
|
|
|
Eina_Bool is, was = EINA_FALSE;
|
|
|
|
Eina_Bool pass = EINA_FALSE, freeze = EINA_FALSE;
|
|
|
|
Eina_Bool source_invisible = EINA_FALSE;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2004-03-07 18:42:08 -08:00
|
|
|
if (obj->delete_me) return;
|
2012-11-11 18:22:39 -08:00
|
|
|
if (!obj->layer) return;
|
2012-01-02 13:27:46 -08:00
|
|
|
|
2013-04-26 15:34:35 -07:00
|
|
|
if (evas_object_intercept_call_move(eo_obj, obj, x, y)) return;
|
2012-01-02 13:27:46 -08:00
|
|
|
|
2010-10-14 22:39:53 -07:00
|
|
|
if (obj->doing.in_move > 0)
|
2006-10-07 10:35:14 -07:00
|
|
|
{
|
2010-10-14 22:39:53 -07:00
|
|
|
WRN("evas_object_move() called on object %p when in the middle of moving the same object", obj);
|
|
|
|
return;
|
2006-10-07 10:35:14 -07:00
|
|
|
}
|
2011-12-26 15:09:45 -08:00
|
|
|
|
2013-04-26 15:34:35 -07:00
|
|
|
if ((obj->cur->geometry.x == x) && (obj->cur->geometry.y == y)) return;
|
2012-01-02 13:27:46 -08:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!(obj->layer->evas->is_frozen))
|
2005-07-22 03:28:11 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
pass = evas_event_passes_through(eo_obj, obj);
|
|
|
|
freeze = evas_event_freezes_through(eo_obj, obj);
|
2012-10-21 21:57:32 -07:00
|
|
|
source_invisible = evas_object_is_source_invisible(eo_obj, obj);
|
|
|
|
if ((!pass) && (!freeze) && (!source_invisible))
|
2012-10-08 18:58:41 -07:00
|
|
|
was = evas_object_is_in_output_rect(eo_obj, obj,
|
2011-06-08 19:45:59 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y, 1, 1);
|
2005-07-22 03:28:11 -07:00
|
|
|
}
|
2010-10-14 22:39:53 -07:00
|
|
|
obj->doing.in_move++;
|
2011-12-26 15:09:45 -08:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->is_smart)
|
2010-10-14 22:39:53 -07:00
|
|
|
{
|
2013-03-26 10:51:05 -07:00
|
|
|
eo_do(eo_obj, evas_obj_smart_move(x, y));
|
2010-10-14 22:39:53 -07:00
|
|
|
}
|
2011-12-26 15:09:45 -08:00
|
|
|
|
2013-03-12 05:58:19 -07:00
|
|
|
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
|
|
|
|
{
|
2013-04-26 15:34:35 -07:00
|
|
|
state_write->geometry.x = x;
|
|
|
|
state_write->geometry.y = y;
|
2013-03-12 05:58:19 -07:00
|
|
|
}
|
|
|
|
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
|
2011-12-26 15:09:45 -08:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_update_bounding_box(eo_obj, obj);
|
2012-05-01 00:31:42 -07:00
|
|
|
|
2013-03-12 05:58:19 -07:00
|
|
|
//// obj->cur->cache.geometry.validity = 0;
|
2012-03-28 00:17:39 -07:00
|
|
|
obj->changed_move = EINA_TRUE;
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
|
|
|
evas_object_clip_dirty(eo_obj, obj);
|
2010-10-14 22:39:53 -07:00
|
|
|
obj->doing.in_move--;
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!(obj->layer->evas->is_frozen))
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2013-04-06 22:00:10 -07:00
|
|
|
evas_object_recalc_clippees(obj);
|
2011-06-08 19:45:59 -07:00
|
|
|
if (!pass)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj->is_smart)
|
2011-06-08 19:45:59 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
is = evas_object_is_in_output_rect(eo_obj, obj,
|
2011-06-08 19:45:59 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y, 1, 1);
|
2013-03-12 05:58:19 -07:00
|
|
|
if ((is ^ was) && obj->cur->visible)
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
2011-06-08 19:45:59 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
|
|
|
obj->layer->evas->last_timestamp,
|
|
|
|
NULL);
|
|
|
|
}
|
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_move(eo_obj, obj);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord w, Evas_Coord h)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2012-10-21 22:02:53 -07:00
|
|
|
Eina_Bool is, was = EINA_FALSE;
|
|
|
|
Eina_Bool pass = EINA_FALSE, freeze = EINA_FALSE;
|
2012-11-10 01:05:05 -08:00
|
|
|
Eina_Bool source_invisible = EINA_FALSE;
|
2012-10-08 18:58:41 -07:00
|
|
|
|
2004-03-07 18:42:08 -08:00
|
|
|
if (obj->delete_me) return;
|
2012-11-11 18:22:39 -08:00
|
|
|
if (!obj->layer) return;
|
2009-09-23 21:55:01 -07:00
|
|
|
if (w < 0) w = 0; if (h < 0) h = 0;
|
2011-12-26 15:09:45 -08:00
|
|
|
|
2013-08-28 18:53:48 -07:00
|
|
|
if (evas_object_intercept_call_resize(eo_obj, obj, w, h)) return;
|
2011-12-26 15:09:45 -08:00
|
|
|
|
2010-10-14 22:39:53 -07:00
|
|
|
if (obj->doing.in_resize > 0)
|
2006-10-07 10:35:14 -07:00
|
|
|
{
|
2010-10-14 22:39:53 -07:00
|
|
|
WRN("evas_object_resize() called on object %p when in the middle of resizing the same object", obj);
|
|
|
|
return;
|
2006-10-07 10:35:14 -07:00
|
|
|
}
|
2011-12-26 15:09:45 -08:00
|
|
|
|
2013-03-12 05:58:19 -07:00
|
|
|
if ((obj->cur->geometry.w == w) && (obj->cur->geometry.h == h)) return;
|
2012-01-02 13:27:46 -08:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!(obj->layer->evas->is_frozen))
|
2005-07-22 03:28:11 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
pass = evas_event_passes_through(eo_obj, obj);
|
|
|
|
freeze = evas_event_freezes_through(eo_obj, obj);
|
2012-11-10 01:05:05 -08:00
|
|
|
source_invisible = evas_object_is_source_invisible(eo_obj, obj);
|
|
|
|
if ((!pass) && (!freeze) && (!source_invisible))
|
2012-10-08 18:58:41 -07:00
|
|
|
was = evas_object_is_in_output_rect(eo_obj, obj,
|
2011-06-08 19:45:59 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y, 1, 1);
|
2005-07-22 03:28:11 -07:00
|
|
|
}
|
2010-10-14 22:39:53 -07:00
|
|
|
obj->doing.in_resize++;
|
2011-12-26 15:09:45 -08:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->is_smart)
|
2010-10-14 22:39:53 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_do(eo_obj, evas_obj_smart_resize(w, h));
|
2010-10-14 22:39:53 -07:00
|
|
|
}
|
2011-12-26 15:09:45 -08:00
|
|
|
|
2013-03-12 05:58:19 -07:00
|
|
|
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
|
|
|
|
{
|
|
|
|
state_write->geometry.w = w;
|
|
|
|
state_write->geometry.h = h;
|
|
|
|
}
|
|
|
|
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
|
2011-12-26 15:09:45 -08:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_update_bounding_box(eo_obj, obj);
|
2012-05-01 00:31:42 -07:00
|
|
|
|
2013-03-12 05:58:19 -07:00
|
|
|
//// obj->cur->cache.geometry.validity = 0;
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
|
|
|
evas_object_clip_dirty(eo_obj, obj);
|
2010-10-14 22:39:53 -07:00
|
|
|
obj->doing.in_resize--;
|
2009-08-07 13:35:30 -07:00
|
|
|
/* NB: evas_object_recalc_clippees was here previously ( < 08/07/2009) */
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!(obj->layer->evas->is_frozen))
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2009-08-07 13:35:30 -07:00
|
|
|
/* NB: If this creates glitches on screen then move to above position */
|
2013-04-06 22:00:10 -07:00
|
|
|
evas_object_recalc_clippees(obj);
|
2009-08-07 13:35:30 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
// if (obj->func->coords_recalc) obj->func->coords_recalc(eo_obj);
|
2011-06-08 19:45:59 -07:00
|
|
|
if (!pass)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj->is_smart)
|
2011-06-08 19:45:59 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
is = evas_object_is_in_output_rect(eo_obj, obj,
|
2011-06-08 19:45:59 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y, 1, 1);
|
2013-03-12 05:58:19 -07:00
|
|
|
if ((is ^ was) && (obj->cur->visible))
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
2011-06-08 19:45:59 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
|
|
|
obj->layer->evas->last_timestamp,
|
|
|
|
NULL);
|
|
|
|
}
|
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_resize(eo_obj);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_geometry_get(const Evas_Object *eo_obj, Evas_Coord *x, Evas_Coord *y, Evas_Coord *w, Evas_Coord *h)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
2002-11-08 00:02:15 -08:00
|
|
|
if (x) *x = 0; if (y) *y = 0; if (w) *w = 0; if (h) *h = 0;
|
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_do((Eo *)eo_obj, evas_obj_position_get(x, y), evas_obj_size_get(w, h));
|
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_position_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *x, Evas_Coord *y)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2012-11-11 18:22:39 -08:00
|
|
|
if ((obj->delete_me) || (!obj->layer))
|
2004-03-07 18:42:08 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (x) *x = 0; if (y) *y = 0;
|
2011-06-08 19:45:59 -07:00
|
|
|
return;
|
2004-03-07 18:42:08 -08:00
|
|
|
}
|
2012-01-02 13:27:46 -08:00
|
|
|
|
2013-04-26 15:34:35 -07:00
|
|
|
if (x) *x = obj->cur->geometry.x;
|
|
|
|
if (y) *y = obj->cur->geometry.y;
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *w, Evas_Coord *h)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
|
|
|
if (obj->delete_me)
|
|
|
|
{
|
|
|
|
if (w) *w = 0; if (h) *h = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2013-03-12 05:58:19 -07:00
|
|
|
if (w) *w = obj->cur->geometry.w;
|
|
|
|
if (h) *h = obj->cur->geometry.h;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2008-10-04 09:57:02 -07:00
|
|
|
static void
|
2012-10-08 18:58:41 -07:00
|
|
|
_evas_object_size_hint_alloc(Evas_Object *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
2008-10-04 09:57:02 -07:00
|
|
|
{
|
|
|
|
if (obj->size_hints) return;
|
2009-09-03 22:13:19 -07:00
|
|
|
|
2012-06-16 18:32:10 -07:00
|
|
|
EVAS_MEMPOOL_INIT(_mp_sh, "evas_size_hints", Evas_Size_Hints, 32, );
|
2010-11-26 02:01:18 -08:00
|
|
|
obj->size_hints = EVAS_MEMPOOL_ALLOC(_mp_sh, Evas_Size_Hints);
|
|
|
|
if (!obj->size_hints) return;
|
|
|
|
EVAS_MEMPOOL_PREP(_mp_sh, obj->size_hints, Evas_Size_Hints);
|
2008-10-04 09:57:02 -07:00
|
|
|
obj->size_hints->max.w = -1;
|
|
|
|
obj->size_hints->max.h = -1;
|
|
|
|
obj->size_hints->align.x = 0.5;
|
|
|
|
obj->size_hints->align.y = 0.5;
|
2012-09-27 01:54:54 -07:00
|
|
|
obj->size_hints->dispmode = EVAS_DISPLAY_MODE_NONE;
|
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static Evas_Display_Mode
|
|
|
|
_evas_object_size_hint_display_mode_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
2012-09-27 01:54:54 -07:00
|
|
|
{
|
2012-11-09 19:44:04 -08:00
|
|
|
if (!obj) return EVAS_DISPLAY_MODE_NONE;
|
2012-09-27 01:54:54 -07:00
|
|
|
if ((!obj->size_hints) || obj->delete_me)
|
|
|
|
return EVAS_DISPLAY_MODE_NONE;
|
|
|
|
return obj->size_hints->dispmode;
|
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_hint_display_mode_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Display_Mode dispmode)
|
2012-09-27 01:54:54 -07:00
|
|
|
{
|
2012-11-09 19:44:04 -08:00
|
|
|
if (!obj) return;
|
|
|
|
if (obj->delete_me) return;
|
2012-10-08 18:58:41 -07:00
|
|
|
_evas_object_size_hint_alloc(eo_obj, obj);
|
2012-09-27 01:54:54 -07:00
|
|
|
if (obj->size_hints->dispmode == dispmode) return;
|
|
|
|
obj->size_hints->dispmode = dispmode;
|
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_changed_size_hints(eo_obj);
|
2008-10-04 09:57:02 -07:00
|
|
|
}
|
2008-04-11 16:12:20 -07:00
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_hint_min_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *w, Evas_Coord *h)
|
2008-04-11 16:12:20 -07:00
|
|
|
{
|
2008-04-30 15:51:08 -07:00
|
|
|
if ((!obj->size_hints) || obj->delete_me)
|
2008-04-11 16:12:20 -07:00
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
if (w) *w = 0; if (h) *h = 0;
|
|
|
|
return;
|
2008-04-11 16:12:20 -07:00
|
|
|
}
|
2008-04-30 15:51:08 -07:00
|
|
|
if (w) *w = obj->size_hints->min.w;
|
|
|
|
if (h) *h = obj->size_hints->min.h;
|
2008-04-11 16:12:20 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_hint_min_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord w, Evas_Coord h)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2008-04-11 16:12:20 -07:00
|
|
|
if (obj->delete_me)
|
|
|
|
return;
|
2012-10-08 18:58:41 -07:00
|
|
|
_evas_object_size_hint_alloc(eo_obj, obj);
|
2008-10-04 10:10:44 -07:00
|
|
|
if ((obj->size_hints->min.w == w) && (obj->size_hints->min.h == h)) return;
|
2008-04-30 15:51:08 -07:00
|
|
|
obj->size_hints->min.w = w;
|
|
|
|
obj->size_hints->min.h = h;
|
2008-04-11 16:12:20 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_changed_size_hints(eo_obj);
|
2008-04-11 16:12:20 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_hint_max_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *w, Evas_Coord *h)
|
2008-04-11 16:12:20 -07:00
|
|
|
{
|
2008-04-30 15:51:08 -07:00
|
|
|
if ((!obj->size_hints) || obj->delete_me)
|
2008-04-11 16:12:20 -07:00
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
if (w) *w = -1; if (h) *h = -1;
|
|
|
|
return;
|
2008-04-11 16:12:20 -07:00
|
|
|
}
|
2008-04-30 15:51:08 -07:00
|
|
|
if (w) *w = obj->size_hints->max.w;
|
|
|
|
if (h) *h = obj->size_hints->max.h;
|
2008-04-11 16:12:20 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_hint_max_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord w, Evas_Coord h)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2008-04-11 16:12:20 -07:00
|
|
|
if (obj->delete_me)
|
|
|
|
return;
|
2012-10-08 18:58:41 -07:00
|
|
|
_evas_object_size_hint_alloc(eo_obj, obj);
|
2008-10-04 10:10:44 -07:00
|
|
|
if ((obj->size_hints->max.w == w) && (obj->size_hints->max.h == h)) return;
|
2008-04-30 15:51:08 -07:00
|
|
|
obj->size_hints->max.w = w;
|
|
|
|
obj->size_hints->max.h = h;
|
2008-04-11 16:12:20 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_changed_size_hints(eo_obj);
|
2008-04-11 16:12:20 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_hint_request_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *w, Evas_Coord *h)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2008-04-30 15:51:08 -07:00
|
|
|
if ((!obj->size_hints) || obj->delete_me)
|
2008-04-11 16:12:20 -07:00
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
if (w) *w = 0; if (h) *h = 0;
|
|
|
|
return;
|
2008-04-11 16:12:20 -07:00
|
|
|
}
|
2008-04-30 15:51:08 -07:00
|
|
|
if (w) *w = obj->size_hints->request.w;
|
|
|
|
if (h) *h = obj->size_hints->request.h;
|
2008-04-11 16:12:20 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_hint_request_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord w, Evas_Coord h)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2008-04-11 16:12:20 -07:00
|
|
|
if (obj->delete_me)
|
|
|
|
return;
|
2012-10-08 18:58:41 -07:00
|
|
|
_evas_object_size_hint_alloc(eo_obj, obj);
|
2008-10-04 10:10:44 -07:00
|
|
|
if ((obj->size_hints->request.w == w) && (obj->size_hints->request.h == h)) return;
|
2008-04-30 15:51:08 -07:00
|
|
|
obj->size_hints->request.w = w;
|
|
|
|
obj->size_hints->request.h = h;
|
2008-04-11 16:12:20 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_changed_size_hints(eo_obj);
|
2008-04-11 16:12:20 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_hint_aspect_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Aspect_Control *aspect, Evas_Coord *w, Evas_Coord *h)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2008-04-30 15:51:08 -07:00
|
|
|
if ((!obj->size_hints) || obj->delete_me)
|
2008-04-11 16:12:20 -07:00
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
if (aspect) *aspect = EVAS_ASPECT_CONTROL_NONE;
|
|
|
|
if (w) *w = 0; if (h) *h = 0;
|
|
|
|
return;
|
2008-04-11 16:12:20 -07:00
|
|
|
}
|
2008-04-30 15:51:08 -07:00
|
|
|
if (aspect) *aspect = obj->size_hints->aspect.mode;
|
|
|
|
if (w) *w = obj->size_hints->aspect.size.w;
|
|
|
|
if (h) *h = obj->size_hints->aspect.size.h;
|
2008-04-11 16:12:20 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_hint_aspect_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Aspect_Control aspect, Evas_Coord w, Evas_Coord h)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2008-04-11 16:12:20 -07:00
|
|
|
if (obj->delete_me)
|
|
|
|
return;
|
2012-10-08 18:58:41 -07:00
|
|
|
_evas_object_size_hint_alloc(eo_obj, obj);
|
2008-10-04 20:47:52 -07:00
|
|
|
if ((obj->size_hints->aspect.mode == aspect) && (obj->size_hints->aspect.size.w == w) && (obj->size_hints->aspect.size.h == h)) return;
|
2008-04-30 15:51:08 -07:00
|
|
|
obj->size_hints->aspect.mode = aspect;
|
|
|
|
obj->size_hints->aspect.size.w = w;
|
|
|
|
obj->size_hints->aspect.size.h = h;
|
2008-04-11 16:12:20 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_changed_size_hints(eo_obj);
|
2008-04-11 16:12:20 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_hint_align_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, double *x, double *y)
|
2008-10-04 09:11:23 -07:00
|
|
|
{
|
|
|
|
if ((!obj->size_hints) || obj->delete_me)
|
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
if (x) *x = 0.5; if (y) *y = 0.5;
|
|
|
|
return;
|
2008-10-04 09:11:23 -07:00
|
|
|
}
|
|
|
|
if (x) *x = obj->size_hints->align.x;
|
|
|
|
if (y) *y = obj->size_hints->align.y;
|
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_hint_align_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, double x, double y)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2008-10-04 09:11:23 -07:00
|
|
|
if (obj->delete_me)
|
|
|
|
return;
|
2012-10-08 18:58:41 -07:00
|
|
|
_evas_object_size_hint_alloc(eo_obj, obj);
|
2008-10-04 10:10:44 -07:00
|
|
|
if ((obj->size_hints->align.x == x) && (obj->size_hints->align.y == y)) return;
|
2008-10-04 09:11:23 -07:00
|
|
|
obj->size_hints->align.x = x;
|
2008-10-04 10:10:44 -07:00
|
|
|
obj->size_hints->align.y = y;
|
2008-10-04 09:11:23 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_changed_size_hints(eo_obj);
|
2008-10-04 09:11:23 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_hint_weight_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, double *x, double *y)
|
2008-10-04 09:11:23 -07:00
|
|
|
{
|
|
|
|
if ((!obj->size_hints) || obj->delete_me)
|
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
if (x) *x = 0.0; if (y) *y = 0.0;
|
|
|
|
return;
|
2008-10-04 09:11:23 -07:00
|
|
|
}
|
|
|
|
if (x) *x = obj->size_hints->weight.x;
|
|
|
|
if (y) *y = obj->size_hints->weight.y;
|
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_hint_weight_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, double x, double y)
|
2008-10-04 09:11:23 -07:00
|
|
|
{
|
|
|
|
if (obj->delete_me)
|
|
|
|
return;
|
2012-10-08 18:58:41 -07:00
|
|
|
_evas_object_size_hint_alloc(eo_obj, obj);
|
2008-10-04 10:10:44 -07:00
|
|
|
if ((obj->size_hints->weight.x == x) && (obj->size_hints->weight.y == y)) return;
|
2008-10-04 09:11:23 -07:00
|
|
|
obj->size_hints->weight.x = x;
|
2008-10-04 10:10:44 -07:00
|
|
|
obj->size_hints->weight.y = y;
|
2008-10-04 09:11:23 -07:00
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_changed_size_hints(eo_obj);
|
2008-10-04 09:11:23 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_hint_padding_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Evas_Coord *l, Evas_Coord *r, Evas_Coord *t, Evas_Coord *b)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2008-10-04 09:11:23 -07:00
|
|
|
if ((!obj->size_hints) || obj->delete_me)
|
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
if (l) *l = 0; if (r) *r = 0;
|
|
|
|
if (t) *t = 0; if (b) *b = 0;
|
|
|
|
return;
|
2008-10-04 09:11:23 -07:00
|
|
|
}
|
|
|
|
if (l) *l = obj->size_hints->padding.l;
|
|
|
|
if (r) *r = obj->size_hints->padding.r;
|
|
|
|
if (t) *t = obj->size_hints->padding.t;
|
|
|
|
if (b) *b = obj->size_hints->padding.b;
|
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_size_hint_padding_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Coord l, Evas_Coord r, Evas_Coord t, Evas_Coord b)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2008-10-04 09:11:23 -07:00
|
|
|
if (obj->delete_me)
|
|
|
|
return;
|
2012-10-08 18:58:41 -07:00
|
|
|
_evas_object_size_hint_alloc(eo_obj, obj);
|
2008-10-04 10:10:44 -07:00
|
|
|
if ((obj->size_hints->padding.l == l) && (obj->size_hints->padding.r == r) && (obj->size_hints->padding.t == t) && (obj->size_hints->padding.b == b)) return;
|
2008-10-04 10:28:43 -07:00
|
|
|
obj->size_hints->padding.l = l;
|
2008-10-04 09:11:23 -07:00
|
|
|
obj->size_hints->padding.r = r;
|
|
|
|
obj->size_hints->padding.t = t;
|
|
|
|
obj->size_hints->padding.b = b;
|
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_changed_size_hints(eo_obj);
|
2008-10-04 09:11:23 -07:00
|
|
|
}
|
2008-04-11 16:12:20 -07:00
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI void
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_show(Evas_Object *eo_obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
2002-11-08 00:02:15 -08:00
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_do(eo_obj, evas_obj_visibility_set(EINA_TRUE));
|
|
|
|
}
|
|
|
|
|
|
|
|
EAPI void
|
|
|
|
evas_object_hide(Evas_Object *eo_obj)
|
|
|
|
{
|
|
|
|
if (!eo_obj) return;
|
|
|
|
eo_do(eo_obj, evas_obj_visibility_set(EINA_FALSE));
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2014-03-11 04:51:35 -07:00
|
|
|
_evas_object_visibility_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Eina_Bool visible)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
|
|
|
if (visible) _show(eo_obj, obj);
|
|
|
|
else _hide(eo_obj, obj);
|
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2012-11-11 18:22:39 -08:00
|
|
|
_show(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2012-11-11 18:22:39 -08:00
|
|
|
if (!obj->layer) return;
|
2004-03-07 18:42:08 -08:00
|
|
|
if (obj->delete_me) return;
|
2013-08-28 18:53:48 -07:00
|
|
|
if (evas_object_intercept_call_show(eo_obj, obj)) return;
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->is_smart)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_do(eo_obj, evas_obj_smart_show());
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2013-03-12 05:58:19 -07:00
|
|
|
if (obj->cur->visible)
|
2002-12-09 22:45:18 -08:00
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
return;
|
2002-12-09 22:45:18 -08:00
|
|
|
}
|
2013-03-12 05:58:19 -07:00
|
|
|
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
|
|
|
|
{
|
|
|
|
state_write->visible = 1;
|
|
|
|
}
|
|
|
|
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
|
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
|
|
|
evas_object_clip_dirty(eo_obj, obj);
|
|
|
|
if (!(obj->layer->evas->is_frozen))
|
|
|
|
{
|
|
|
|
evas_object_clip_across_clippees_check(eo_obj, obj);
|
2013-04-06 22:00:10 -07:00
|
|
|
evas_object_recalc_clippees(obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
if ((!evas_event_passes_through(eo_obj, obj)) &&
|
2012-10-21 21:57:32 -07:00
|
|
|
(!evas_event_freezes_through(eo_obj, obj)) &&
|
|
|
|
(!evas_object_is_source_invisible(eo_obj, obj)))
|
2011-06-08 19:45:59 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (!obj->is_smart)
|
2011-06-08 19:45:59 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (evas_object_is_in_output_rect(eo_obj, obj,
|
2011-06-08 19:45:59 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y, 1, 1))
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
2011-06-08 19:45:59 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
|
|
|
obj->layer->evas->last_timestamp,
|
|
|
|
NULL);
|
|
|
|
}
|
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_show(eo_obj);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
static void
|
|
|
|
_hide(Evas_Object *eo_obj, Evas_Object_Protected_Data *obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
MAGIC_CHECK(eo_obj, Evas_Object, MAGIC_OBJ);
|
2002-11-08 00:02:15 -08:00
|
|
|
return;
|
|
|
|
MAGIC_CHECK_END();
|
2012-11-11 18:22:39 -08:00
|
|
|
if (!obj->layer) return;
|
2004-03-07 18:42:08 -08:00
|
|
|
if (obj->delete_me) return;
|
2013-08-28 18:53:48 -07:00
|
|
|
if (evas_object_intercept_call_hide(eo_obj, obj)) return;
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->is_smart)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_do(eo_obj, evas_obj_smart_hide());
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2013-03-12 05:58:19 -07:00
|
|
|
if (!obj->cur->visible)
|
2002-12-09 22:45:18 -08:00
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
return;
|
2002-12-09 22:45:18 -08:00
|
|
|
}
|
2013-03-12 05:58:19 -07:00
|
|
|
|
|
|
|
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
|
|
|
|
{
|
|
|
|
state_write->visible = 0;
|
|
|
|
}
|
|
|
|
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
|
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
|
|
|
evas_object_clip_dirty(eo_obj, obj);
|
|
|
|
if (!(obj->layer->evas->is_frozen))
|
|
|
|
{
|
|
|
|
evas_object_clip_across_clippees_check(eo_obj, obj);
|
2013-04-06 22:00:10 -07:00
|
|
|
evas_object_recalc_clippees(obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
if ((!evas_event_passes_through(eo_obj, obj)) &&
|
2012-10-21 21:57:32 -07:00
|
|
|
(!evas_event_freezes_through(eo_obj, obj)) &&
|
|
|
|
(!evas_object_is_source_invisible(eo_obj, obj)))
|
2011-06-08 19:45:59 -07:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if ((!obj->is_smart) ||
|
2013-01-21 19:56:00 -08:00
|
|
|
((obj->map->cur.map) && (obj->map->cur.map->count == 4) && (obj->map->cur.usemap)))
|
2011-06-08 19:45:59 -07:00
|
|
|
{
|
2011-09-25 19:45:06 -07:00
|
|
|
if (!obj->mouse_grabbed)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
if (evas_object_is_in_output_rect(eo_obj, obj,
|
2011-09-25 19:45:06 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y, 1, 1))
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_event_feed_mouse_move(obj->layer->evas->evas,
|
2011-09-25 19:45:06 -07:00
|
|
|
obj->layer->evas->pointer.x,
|
|
|
|
obj->layer->evas->pointer.y,
|
|
|
|
obj->layer->evas->last_timestamp,
|
|
|
|
NULL);
|
|
|
|
}
|
2011-09-24 21:43:02 -07:00
|
|
|
/* this is at odds to handling events when an obj is moved out of the mouse
|
|
|
|
* ore resized out or clipped out. if mouse is grabbed - regardless of
|
|
|
|
* visibility, mouse move events should keep happening and mouse up.
|
|
|
|
* for better or worse it's at least consistent.
|
2011-09-25 19:45:06 -07:00
|
|
|
if (obj->delete_me) return;
|
2011-06-08 19:45:59 -07:00
|
|
|
if (obj->mouse_grabbed > 0)
|
2011-09-24 21:43:02 -07:00
|
|
|
obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed;
|
2008-11-14 21:13:09 -08:00
|
|
|
if ((obj->mouse_in) || (obj->mouse_grabbed > 0))
|
2012-10-22 01:57:08 -07:00
|
|
|
obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, eo_obj);
|
2008-11-14 21:13:09 -08:00
|
|
|
obj->mouse_grabbed = 0;
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->layer->evas->is_frozen)
|
2008-11-14 21:13:09 -08:00
|
|
|
{
|
|
|
|
obj->mouse_in = 0;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
if (obj->mouse_in)
|
|
|
|
{
|
|
|
|
Evas_Event_Mouse_Out ev;
|
2009-09-03 22:13:19 -07:00
|
|
|
|
2011-06-08 19:45:59 -07:00
|
|
|
_evas_object_event_new();
|
2010-03-04 06:48:21 -08:00
|
|
|
|
2008-11-14 21:13:09 -08:00
|
|
|
obj->mouse_in = 0;
|
|
|
|
ev.buttons = obj->layer->evas->pointer.button;
|
|
|
|
ev.output.x = obj->layer->evas->pointer.x;
|
|
|
|
ev.output.y = obj->layer->evas->pointer.y;
|
|
|
|
ev.canvas.x = obj->layer->evas->pointer.x;
|
|
|
|
ev.canvas.y = obj->layer->evas->pointer.y;
|
|
|
|
ev.data = NULL;
|
|
|
|
ev.modifiers = &(obj->layer->evas->modifiers);
|
|
|
|
ev.locks = &(obj->layer->evas->locks);
|
2011-06-08 19:45:59 -07:00
|
|
|
ev.timestamp = obj->layer->evas->last_timestamp;
|
|
|
|
ev.event_flags = EVAS_EVENT_FLAG_NONE;
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_event_callback_call(eo_obj, obj, EVAS_CALLBACK_MOUSE_OUT, &ev);
|
|
|
|
_evas_post_event_callback_call(obj->layer->evas, obj->layer->evas);
|
2011-06-08 19:45:59 -07:00
|
|
|
}
|
2011-09-24 21:43:02 -07:00
|
|
|
*/
|
2011-06-08 19:45:59 -07:00
|
|
|
}
|
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2005-08-01 06:52:55 -07:00
|
|
|
else
|
|
|
|
{
|
2012-03-28 00:17:39 -07:00
|
|
|
/*
|
2011-07-06 01:43:18 -07:00
|
|
|
if (obj->mouse_grabbed > 0)
|
2011-09-24 21:43:02 -07:00
|
|
|
obj->layer->evas->pointer.mouse_grabbed -= obj->mouse_grabbed;
|
2011-06-08 19:45:59 -07:00
|
|
|
if ((obj->mouse_in) || (obj->mouse_grabbed > 0))
|
2012-10-22 01:57:08 -07:00
|
|
|
obj->layer->evas->pointer.object.in = eina_list_remove(obj->layer->evas->pointer.object.in, eo_obj);
|
2011-06-08 19:45:59 -07:00
|
|
|
obj->mouse_grabbed = 0;
|
|
|
|
obj->mouse_in = 0;
|
2011-09-24 21:43:02 -07:00
|
|
|
*/
|
2005-08-01 06:52:55 -07:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_inform_call_hide(eo_obj);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
static Eina_Bool
|
|
|
|
_evas_object_visibility_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2014-03-11 04:51:35 -07:00
|
|
|
if (obj->delete_me) return EINA_FALSE;
|
|
|
|
return obj->cur->visible;
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_color_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, int r, int g, int b, int a)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2004-03-07 18:42:08 -08:00
|
|
|
if (obj->delete_me) return;
|
2002-11-08 00:02:15 -08:00
|
|
|
if (r > 255) r = 255; if (r < 0) r = 0;
|
|
|
|
if (g > 255) g = 255; if (g < 0) g = 0;
|
|
|
|
if (b > 255) b = 255; if (b < 0) b = 0;
|
|
|
|
if (a > 255) a = 255; if (a < 0) a = 0;
|
2012-03-16 08:02:01 -07:00
|
|
|
if (r > a)
|
|
|
|
{
|
|
|
|
r = a;
|
2012-04-08 20:43:45 -07:00
|
|
|
ERR("Evas only handles pre multiplied colors!");
|
2012-03-16 08:02:01 -07:00
|
|
|
}
|
|
|
|
if (g > a)
|
|
|
|
{
|
|
|
|
g = a;
|
2012-04-08 20:43:45 -07:00
|
|
|
ERR("Evas only handles pre multiplied colors!");
|
2012-03-16 08:02:01 -07:00
|
|
|
}
|
|
|
|
if (b > a)
|
|
|
|
{
|
|
|
|
b = a;
|
2012-04-08 20:43:45 -07:00
|
|
|
ERR("Evas only handles pre multiplied colors!");
|
2012-03-16 08:02:01 -07:00
|
|
|
}
|
2012-02-22 20:53:19 -08:00
|
|
|
|
2013-08-28 18:53:48 -07:00
|
|
|
if (evas_object_intercept_call_color_set(eo_obj, obj, r, g, b, a)) return;
|
2012-10-08 18:58:41 -07:00
|
|
|
if (obj->is_smart)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_do(eo_obj, evas_obj_smart_color_set(r, g, b, a));
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2013-03-12 05:58:19 -07:00
|
|
|
if ((obj->cur->color.r == r) &&
|
|
|
|
(obj->cur->color.g == g) &&
|
|
|
|
(obj->cur->color.b == b) &&
|
|
|
|
(obj->cur->color.a == a)) return;
|
|
|
|
|
|
|
|
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
|
|
|
|
{
|
|
|
|
state_write->color.r = r;
|
|
|
|
state_write->color.g = g;
|
|
|
|
state_write->color.b = b;
|
|
|
|
}
|
|
|
|
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
|
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_clip_dirty(eo_obj, obj);
|
2013-03-12 05:58:19 -07:00
|
|
|
if ((obj->cur->color.a == 0) && (a == 0) && (obj->cur->render_op == EVAS_RENDER_BLEND)) return;
|
|
|
|
|
|
|
|
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
|
|
|
|
{
|
|
|
|
state_write->color.a = a;
|
|
|
|
}
|
|
|
|
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
|
|
|
|
|
2012-05-18 00:17:34 -07:00
|
|
|
obj->changed_color = EINA_TRUE;
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_color_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, int *r, int *g, int *b, int *a)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2004-03-07 18:42:08 -08:00
|
|
|
if (obj->delete_me)
|
|
|
|
{
|
2011-06-08 19:45:59 -07:00
|
|
|
if (r) *r = 0; if (g) *g = 0; if (b) *b = 0; if (a) *a = 0;
|
|
|
|
return;
|
2004-03-07 18:42:08 -08:00
|
|
|
}
|
2013-03-12 05:58:19 -07:00
|
|
|
if (r) *r = obj->cur->color.r;
|
|
|
|
if (g) *g = obj->cur->color.g;
|
|
|
|
if (b) *b = obj->cur->color.b;
|
|
|
|
if (a) *a = obj->cur->color.a;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_anti_alias_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Eina_Bool anti_alias)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2005-12-03 01:27:53 -08:00
|
|
|
if (obj->delete_me) return;
|
2010-08-23 19:56:04 -07:00
|
|
|
anti_alias = !!anti_alias;
|
2013-03-12 05:58:19 -07:00
|
|
|
if (obj->cur->anti_alias == anti_alias)return;
|
|
|
|
|
|
|
|
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
|
|
|
|
{
|
|
|
|
state_write->anti_alias = anti_alias;
|
|
|
|
}
|
|
|
|
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
|
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
2005-12-03 01:27:53 -08:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_evas_object_anti_alias_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
2005-12-03 01:27:53 -08:00
|
|
|
{
|
2014-03-11 04:51:35 -07:00
|
|
|
if (obj->delete_me) return EINA_FALSE;
|
|
|
|
return obj->cur->anti_alias;
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_scale_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, double scale)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2008-09-09 07:14:26 -07:00
|
|
|
if (obj->delete_me) return;
|
2013-03-12 05:58:19 -07:00
|
|
|
if (obj->cur->scale == scale) return;
|
|
|
|
|
|
|
|
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
|
|
|
|
{
|
|
|
|
state_write->scale = scale;
|
|
|
|
}
|
|
|
|
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
|
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
2013-07-08 17:46:15 -07:00
|
|
|
if (obj->func->scale_update) obj->func->scale_update(eo_obj, obj, obj->private_data);
|
2008-09-09 07:14:26 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static double
|
|
|
|
_evas_object_scale_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
2008-09-09 07:14:26 -07:00
|
|
|
{
|
2014-03-11 04:51:35 -07:00
|
|
|
if (obj->delete_me) return 1.0;
|
|
|
|
return obj->cur->scale;
|
2008-09-09 07:14:26 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_render_op_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Evas_Render_Op render_op)
|
2006-05-02 00:28:49 -07:00
|
|
|
{
|
|
|
|
if (obj->delete_me) return;
|
2013-03-12 05:58:19 -07:00
|
|
|
if (obj->cur->render_op == render_op) return;
|
|
|
|
|
|
|
|
EINA_COW_STATE_WRITE_BEGIN(obj, state_write, cur)
|
|
|
|
{
|
|
|
|
state_write->render_op = render_op;
|
|
|
|
}
|
|
|
|
EINA_COW_STATE_WRITE_END(obj, state_write, cur);
|
|
|
|
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_change(eo_obj, obj);
|
2006-05-02 00:28:49 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static Evas_Render_Op
|
|
|
|
_evas_object_render_op_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2014-03-11 04:51:35 -07:00
|
|
|
if (obj->delete_me) return EVAS_RENDER_BLEND;
|
|
|
|
return obj->cur->render_op;
|
2006-05-02 00:28:49 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_eo_base_dbg_info_get(Eo *eo_obj, Evas_Object_Protected_Data *obj EINA_UNUSED, Eo_Dbg_Info *root)
|
2013-01-28 22:36:23 -08:00
|
|
|
{
|
2013-03-18 08:33:54 -07:00
|
|
|
eo_do_super(eo_obj, MY_CLASS, eo_dbg_info_get(root));
|
2013-01-28 22:36:23 -08:00
|
|
|
Eo_Dbg_Info *group = EO_DBG_INFO_LIST_APPEND(root, MY_CLASS_NAME);
|
|
|
|
Eo_Dbg_Info *node;
|
2013-09-06 09:19:57 -07:00
|
|
|
const char *name;
|
2013-04-11 02:56:52 -07:00
|
|
|
double dblw, dblh;
|
|
|
|
double dblx, dbly;
|
|
|
|
double scale;
|
|
|
|
unsigned int m;
|
|
|
|
int r, g, b, a;
|
|
|
|
int w, h;
|
|
|
|
int requestw, requesth;
|
|
|
|
int minw, minh;
|
|
|
|
int maxw, maxh;
|
|
|
|
int x, y;
|
|
|
|
short layer;
|
|
|
|
Eina_Bool focus;
|
2013-01-28 22:36:23 -08:00
|
|
|
Eina_Bool visible;
|
2013-04-11 02:56:52 -07:00
|
|
|
Eina_Bool pass_event;
|
|
|
|
Eina_Bool propagate_event;
|
|
|
|
Eina_Bool repeat_event;
|
|
|
|
Eina_Bool clipees_has;
|
|
|
|
|
|
|
|
eo_do(eo_obj,
|
2014-04-02 03:16:09 -07:00
|
|
|
visible = evas_obj_visibility_get(),
|
|
|
|
layer = evas_obj_layer_get(),
|
|
|
|
name = evas_obj_name_get(),
|
2013-04-11 02:56:52 -07:00
|
|
|
evas_obj_position_get(&x, &y),
|
|
|
|
evas_obj_size_get(&w, &h),
|
2014-04-02 03:16:09 -07:00
|
|
|
scale = evas_obj_scale_get(),
|
2013-04-11 02:56:52 -07:00
|
|
|
evas_obj_size_hint_min_get(&minw, &minh),
|
|
|
|
evas_obj_size_hint_max_get(&maxw, &maxh),
|
|
|
|
evas_obj_size_hint_request_get(&requestw, &requesth),
|
|
|
|
evas_obj_size_hint_align_get(&dblx, &dbly),
|
|
|
|
evas_obj_size_hint_weight_get(&dblw, &dblh),
|
|
|
|
evas_obj_color_get(&r, &g, &b, &a),
|
2014-04-02 03:16:09 -07:00
|
|
|
focus = evas_obj_focus_get(),
|
|
|
|
m = evas_obj_pointer_mode_get(),
|
|
|
|
pass_event = evas_obj_pass_events_get(),
|
|
|
|
repeat_event = evas_obj_repeat_events_get(),
|
|
|
|
propagate_event = evas_obj_propagate_events_get(),
|
|
|
|
clipees_has = evas_obj_clipees_has());
|
2013-01-28 22:36:23 -08:00
|
|
|
|
2013-04-11 02:56:52 -07:00
|
|
|
EO_DBG_INFO_APPEND(group, "Visibility", EINA_VALUE_TYPE_CHAR, visible);
|
2013-09-06 09:19:57 -07:00
|
|
|
|
|
|
|
if (name)
|
|
|
|
EO_DBG_INFO_APPEND(group, "Name", EINA_VALUE_TYPE_STRING, name);
|
|
|
|
|
2013-01-29 08:36:01 -08:00
|
|
|
EO_DBG_INFO_APPEND(group, "Layer", EINA_VALUE_TYPE_INT, layer);
|
2013-01-28 22:36:23 -08:00
|
|
|
|
|
|
|
node = EO_DBG_INFO_LIST_APPEND(group, "Position");
|
2013-01-29 08:36:01 -08:00
|
|
|
EO_DBG_INFO_APPEND(node, "x", EINA_VALUE_TYPE_INT, x);
|
|
|
|
EO_DBG_INFO_APPEND(node, "y", EINA_VALUE_TYPE_INT, y);
|
2013-01-28 22:36:23 -08:00
|
|
|
|
|
|
|
node = EO_DBG_INFO_LIST_APPEND(group, "Size");
|
2013-01-29 08:36:01 -08:00
|
|
|
EO_DBG_INFO_APPEND(node, "w", EINA_VALUE_TYPE_INT, w);
|
|
|
|
EO_DBG_INFO_APPEND(node, "h", EINA_VALUE_TYPE_INT, h);
|
2013-01-28 22:36:23 -08:00
|
|
|
|
2013-01-29 08:36:01 -08:00
|
|
|
EO_DBG_INFO_APPEND(group, "Scale", EINA_VALUE_TYPE_DOUBLE, scale);
|
2013-01-28 22:36:23 -08:00
|
|
|
|
|
|
|
node = EO_DBG_INFO_LIST_APPEND(group, "Min size");
|
2013-04-11 02:56:52 -07:00
|
|
|
EO_DBG_INFO_APPEND(node, "w", EINA_VALUE_TYPE_INT, minw);
|
|
|
|
EO_DBG_INFO_APPEND(node, "h", EINA_VALUE_TYPE_INT, minh);
|
2013-01-28 22:36:23 -08:00
|
|
|
|
|
|
|
node = EO_DBG_INFO_LIST_APPEND(group, "Max size");
|
2013-04-11 02:56:52 -07:00
|
|
|
EO_DBG_INFO_APPEND(node, "w", EINA_VALUE_TYPE_INT, maxw);
|
|
|
|
EO_DBG_INFO_APPEND(node, "h", EINA_VALUE_TYPE_INT, maxh);
|
2013-01-28 22:36:23 -08:00
|
|
|
|
|
|
|
node = EO_DBG_INFO_LIST_APPEND(group, "Request size");
|
2013-04-11 02:56:52 -07:00
|
|
|
EO_DBG_INFO_APPEND(node, "w", EINA_VALUE_TYPE_INT, requestw);
|
|
|
|
EO_DBG_INFO_APPEND(node, "h", EINA_VALUE_TYPE_INT, requesth);
|
2013-01-28 22:36:23 -08:00
|
|
|
|
|
|
|
node = EO_DBG_INFO_LIST_APPEND(group, "Align");
|
2013-03-19 03:47:33 -07:00
|
|
|
EO_DBG_INFO_APPEND(node, "x", EINA_VALUE_TYPE_DOUBLE, dblx);
|
|
|
|
EO_DBG_INFO_APPEND(node, "y", EINA_VALUE_TYPE_DOUBLE, dbly);
|
2013-01-28 22:36:23 -08:00
|
|
|
|
|
|
|
node = EO_DBG_INFO_LIST_APPEND(group, "Weight");
|
2013-03-19 03:47:33 -07:00
|
|
|
EO_DBG_INFO_APPEND(node, "w", EINA_VALUE_TYPE_DOUBLE, dblw);
|
|
|
|
EO_DBG_INFO_APPEND(node, "h", EINA_VALUE_TYPE_DOUBLE, dblh);
|
2013-01-28 22:36:23 -08:00
|
|
|
|
|
|
|
node = EO_DBG_INFO_LIST_APPEND(group, "Color");
|
2013-01-29 08:36:01 -08:00
|
|
|
EO_DBG_INFO_APPEND(node, "r", EINA_VALUE_TYPE_INT, r);
|
|
|
|
EO_DBG_INFO_APPEND(node, "g", EINA_VALUE_TYPE_INT, g);
|
|
|
|
EO_DBG_INFO_APPEND(node, "b", EINA_VALUE_TYPE_INT, b);
|
|
|
|
EO_DBG_INFO_APPEND(node, "a", EINA_VALUE_TYPE_INT, a);
|
2013-01-28 22:36:23 -08:00
|
|
|
|
2013-01-29 08:36:01 -08:00
|
|
|
EO_DBG_INFO_APPEND(group, "Has focus", EINA_VALUE_TYPE_CHAR, focus);
|
2013-01-28 22:36:23 -08:00
|
|
|
|
2013-04-11 02:56:52 -07:00
|
|
|
{
|
2013-09-06 09:19:07 -07:00
|
|
|
const char *text = NULL;
|
|
|
|
switch (m)
|
|
|
|
{
|
|
|
|
case EVAS_OBJECT_POINTER_MODE_AUTOGRAB:
|
|
|
|
text = "EVAS_OBJECT_POINTER_MODE_AUTOGRAB";
|
|
|
|
break;
|
|
|
|
case EVAS_OBJECT_POINTER_MODE_NOGRAB:
|
|
|
|
text = "EVAS_OBJECT_POINTER_MODE_NOGRAB";
|
|
|
|
break;
|
|
|
|
case EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN:
|
|
|
|
text = "EVAS_OBJECT_POINTER_MODE_NOGRAB_NO_REPEAT_UPDOWN";
|
|
|
|
break;
|
|
|
|
default:
|
|
|
|
text = NULL;
|
|
|
|
break;
|
|
|
|
}
|
2013-01-28 22:36:23 -08:00
|
|
|
|
2013-09-06 09:19:07 -07:00
|
|
|
if (text)
|
|
|
|
EO_DBG_INFO_APPEND(group, "Pointer Mode", EINA_VALUE_TYPE_STRING, text);
|
|
|
|
}
|
2013-01-28 22:36:23 -08:00
|
|
|
|
2013-04-11 02:56:52 -07:00
|
|
|
EO_DBG_INFO_APPEND(group, "Pass Events", EINA_VALUE_TYPE_CHAR, pass_event);
|
|
|
|
EO_DBG_INFO_APPEND(group, "Repeat Events", EINA_VALUE_TYPE_CHAR, repeat_event);
|
|
|
|
EO_DBG_INFO_APPEND(group, "Propagate Events", EINA_VALUE_TYPE_CHAR, propagate_event);
|
2013-04-10 21:21:54 -07:00
|
|
|
EO_DBG_INFO_APPEND(group, "Has clipees", EINA_VALUE_TYPE_CHAR, clipees_has);
|
2013-01-28 22:36:23 -08:00
|
|
|
|
2013-04-17 00:58:27 -07:00
|
|
|
Evas_Object *clipper = NULL;
|
2014-04-02 03:16:09 -07:00
|
|
|
eo_do(eo_obj, clipper = evas_obj_clip_get());
|
2013-04-18 04:20:46 -07:00
|
|
|
EO_DBG_INFO_APPEND(group, "Clipper", EINA_VALUE_TYPE_UINT64, (uintptr_t) clipper);
|
2013-04-17 00:58:27 -07:00
|
|
|
|
2013-01-28 22:36:23 -08:00
|
|
|
const Evas_Map *map = evas_object_map_get(eo_obj);
|
|
|
|
if (map)
|
|
|
|
{ /* Save map coords count info if object has map */
|
|
|
|
node = EO_DBG_INFO_LIST_APPEND(group, "Evas Map");
|
|
|
|
int points_count = evas_map_count_get(map);
|
2013-04-04 05:32:06 -07:00
|
|
|
Eo_Dbg_Info *points = EO_DBG_INFO_LIST_APPEND(node, "Points");
|
|
|
|
Eo_Dbg_Info *pointsuv = EO_DBG_INFO_LIST_APPEND(node, "Image UV");
|
|
|
|
for (int i = 0 ; i < points_count; i++)
|
2013-01-28 22:36:23 -08:00
|
|
|
{
|
2013-04-04 05:32:06 -07:00
|
|
|
{
|
|
|
|
Evas_Coord px, py, pz;
|
|
|
|
evas_map_point_coord_get(map, i, &px, &py, &pz);
|
|
|
|
Eo_Dbg_Info *point = EO_DBG_INFO_LIST_APPEND(points, "Points");
|
|
|
|
EO_DBG_INFO_APPEND(point, "x", EINA_VALUE_TYPE_INT, px);
|
|
|
|
EO_DBG_INFO_APPEND(point, "y", EINA_VALUE_TYPE_INT, py);
|
|
|
|
EO_DBG_INFO_APPEND(point, "z", EINA_VALUE_TYPE_INT, pz);
|
|
|
|
}
|
|
|
|
|
|
|
|
{
|
|
|
|
double pu, pv;
|
|
|
|
evas_map_point_image_uv_get(map, i, &pu, &pv);
|
|
|
|
Eo_Dbg_Info *point = EO_DBG_INFO_LIST_APPEND(pointsuv, "Image UV");
|
|
|
|
EO_DBG_INFO_APPEND(point, "u", EINA_VALUE_TYPE_DOUBLE, pu);
|
|
|
|
EO_DBG_INFO_APPEND(point, "v", EINA_VALUE_TYPE_DOUBLE, pv);
|
|
|
|
}
|
2013-01-28 22:36:23 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
static Evas *
|
|
|
|
_evas_object_evas_common_interface_evas_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2014-03-11 04:51:35 -07:00
|
|
|
if ((obj->delete_me) || (!obj->layer)) return NULL;
|
|
|
|
return obj->layer->evas->evas;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2014-03-11 23:53:00 -07:00
|
|
|
EOLIAN Evas_Object*
|
|
|
|
_evas_object_top_at_xy_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
Evas_Layer *lay;
|
2002-11-08 00:02:15 -08:00
|
|
|
int xx, yy;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2006-11-15 19:20:24 -08:00
|
|
|
xx = x;
|
|
|
|
yy = y;
|
2012-10-08 18:58:41 -07:00
|
|
|
//// xx = evas_coord_world_x_to_screen(eo_e, x);
|
|
|
|
//// yy = evas_coord_world_y_to_screen(eo_e, y);
|
2008-10-21 05:19:57 -07:00
|
|
|
EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object *eo_obj;
|
|
|
|
Evas_Object_Protected_Data *obj;
|
2011-06-08 19:45:59 -07:00
|
|
|
|
|
|
|
EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_obj = obj->object;
|
2011-06-08 19:45:59 -07:00
|
|
|
if (obj->delete_me) continue;
|
2011-11-15 07:10:19 -08:00
|
|
|
if ((!include_pass_events_objects) &&
|
2012-10-08 18:58:41 -07:00
|
|
|
(evas_event_passes_through(eo_obj, obj))) continue;
|
2012-10-21 21:57:32 -07:00
|
|
|
if (evas_object_is_source_invisible(eo_obj, obj)) continue;
|
2013-03-12 05:58:19 -07:00
|
|
|
if ((!include_hidden_objects) && (!obj->cur->visible)) continue;
|
2013-04-06 22:00:10 -07:00
|
|
|
evas_object_clip_recalc(obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
if ((evas_object_is_in_output_rect(eo_obj, obj, xx, yy, 1, 1)) &&
|
2014-03-11 23:53:00 -07:00
|
|
|
(!obj->clip.clipees)) return eo_obj;
|
2011-06-08 19:45:59 -07:00
|
|
|
}
|
2005-05-21 19:49:50 -07:00
|
|
|
}
|
2014-03-11 23:53:00 -07:00
|
|
|
return NULL;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2006-01-06 15:05:17 -08:00
|
|
|
EAPI Evas_Object *
|
2012-10-08 18:58:41 -07:00
|
|
|
evas_object_top_at_pointer_get(const Evas *eo_e)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2013-05-02 00:47:16 -07:00
|
|
|
Evas_Public_Data *e = eo_data_scope_get(eo_e, EVAS_CLASS);
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object *ret = NULL;
|
2012-11-09 19:44:04 -08:00
|
|
|
if (!e) return NULL;
|
2014-04-02 03:16:09 -07:00
|
|
|
eo_do((Eo *)eo_e, ret = evas_canvas_object_top_at_xy_get(e->pointer.x, e->pointer.y, EINA_TRUE,
|
|
|
|
EINA_TRUE));
|
2012-10-08 18:58:41 -07:00
|
|
|
return ret;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2014-03-11 23:53:00 -07:00
|
|
|
EOLIAN Evas_Object*
|
|
|
|
_evas_object_top_in_rectangle_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2008-10-17 04:23:18 -07:00
|
|
|
Evas_Layer *lay;
|
2002-11-08 00:02:15 -08:00
|
|
|
int xx, yy, ww, hh;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2006-11-15 19:20:24 -08:00
|
|
|
xx = x;
|
|
|
|
yy = y;
|
|
|
|
ww = w;
|
|
|
|
hh = h;
|
2012-10-08 18:58:41 -07:00
|
|
|
//// xx = evas_coord_world_x_to_screen(eo_e, x);
|
|
|
|
//// yy = evas_coord_world_y_to_screen(eo_e, y);
|
|
|
|
//// ww = evas_coord_world_x_to_screen(eo_e, w);
|
|
|
|
//// hh = evas_coord_world_y_to_screen(eo_e, h);
|
2002-11-08 00:02:15 -08:00
|
|
|
if (ww < 1) ww = 1;
|
|
|
|
if (hh < 1) hh = 1;
|
2008-10-21 05:19:57 -07:00
|
|
|
EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object *eo_obj;
|
|
|
|
Evas_Object_Protected_Data *obj;
|
2011-06-08 19:45:59 -07:00
|
|
|
|
|
|
|
EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_obj = obj->object;
|
2011-06-08 19:45:59 -07:00
|
|
|
if (obj->delete_me) continue;
|
2011-11-15 07:10:19 -08:00
|
|
|
if ((!include_pass_events_objects) &&
|
2012-10-08 18:58:41 -07:00
|
|
|
(evas_event_passes_through(eo_obj, obj))) continue;
|
2012-10-21 21:57:32 -07:00
|
|
|
if (evas_object_is_source_invisible(eo_obj, obj)) continue;
|
2013-03-12 05:58:19 -07:00
|
|
|
if ((!include_hidden_objects) && (!obj->cur->visible)) continue;
|
2013-04-06 22:00:10 -07:00
|
|
|
evas_object_clip_recalc(obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
if ((evas_object_is_in_output_rect(eo_obj, obj, xx, yy, ww, hh)) &&
|
2014-03-11 23:53:00 -07:00
|
|
|
(!obj->clip.clipees)) return eo_obj;
|
2011-06-08 19:45:59 -07:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
|
2014-03-11 23:53:00 -07:00
|
|
|
EOLIAN Eina_List*
|
|
|
|
_evas_objects_at_xy_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord x, Evas_Coord y, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2008-10-21 09:31:05 -07:00
|
|
|
Eina_List *in = NULL;
|
2008-10-17 04:23:18 -07:00
|
|
|
Evas_Layer *lay;
|
2002-11-08 00:02:15 -08:00
|
|
|
int xx, yy;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2006-11-15 19:20:24 -08:00
|
|
|
xx = x;
|
|
|
|
yy = y;
|
2012-10-08 18:58:41 -07:00
|
|
|
//// xx = evas_coord_world_x_to_screen(eo_e, x);
|
|
|
|
//// yy = evas_coord_world_y_to_screen(eo_e, y);
|
2008-10-21 05:19:57 -07:00
|
|
|
EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object *eo_obj;
|
|
|
|
Evas_Object_Protected_Data *obj;
|
2011-06-08 19:45:59 -07:00
|
|
|
|
|
|
|
EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_obj = obj->object;
|
|
|
|
// FIXME - Daniel: we don't know yet how to handle the next line
|
2011-06-08 19:45:59 -07:00
|
|
|
if (obj->delete_me) continue;
|
2011-11-15 07:10:19 -08:00
|
|
|
if ((!include_pass_events_objects) &&
|
2012-10-08 18:58:41 -07:00
|
|
|
(evas_event_passes_through(eo_obj, obj))) continue;
|
2012-10-21 21:57:32 -07:00
|
|
|
if (evas_object_is_source_invisible(eo_obj, obj)) continue;
|
2013-03-12 05:58:19 -07:00
|
|
|
if ((!include_hidden_objects) && (!obj->cur->visible)) continue;
|
2013-04-06 22:00:10 -07:00
|
|
|
evas_object_clip_recalc(obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
if ((evas_object_is_in_output_rect(eo_obj, obj, xx, yy, 1, 1)) &&
|
2011-06-08 19:45:59 -07:00
|
|
|
(!obj->clip.clipees))
|
2012-10-22 01:57:08 -07:00
|
|
|
in = eina_list_prepend(in, eo_obj);
|
2011-06-08 19:45:59 -07:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2014-03-11 23:53:00 -07:00
|
|
|
return in;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2009-09-17 15:38:10 -07:00
|
|
|
/**
|
|
|
|
* Retrieves the objects in the given rectangle region
|
2012-10-22 23:26:40 -07:00
|
|
|
* @param eo_e The given evas object.
|
2009-09-17 15:38:10 -07:00
|
|
|
* @param x The horizontal coordinate.
|
|
|
|
* @param y The vertical coordinate.
|
|
|
|
* @param w The width size.
|
|
|
|
* @param h The height size.
|
|
|
|
* @param include_pass_events_objects Boolean Flag to include or not pass events objects
|
|
|
|
* @param include_hidden_objects Boolean Flag to include or not hidden objects
|
|
|
|
* @return The list of evas object in the rectangle region.
|
|
|
|
*
|
|
|
|
*/
|
2014-03-11 23:53:00 -07:00
|
|
|
EOLIAN Eina_List*
|
|
|
|
_evas_objects_in_rectangle_get(Eo *eo_e EINA_UNUSED, Evas_Public_Data *e, Evas_Coord x, Evas_Coord y, Evas_Coord w, Evas_Coord h, Eina_Bool include_pass_events_objects, Eina_Bool include_hidden_objects)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2008-10-21 09:31:05 -07:00
|
|
|
Eina_List *in = NULL;
|
2008-10-17 04:23:18 -07:00
|
|
|
Evas_Layer *lay;
|
2002-11-08 00:02:15 -08:00
|
|
|
int xx, yy, ww, hh;
|
2005-05-21 19:49:50 -07:00
|
|
|
|
2006-11-15 19:20:24 -08:00
|
|
|
xx = x;
|
|
|
|
yy = y;
|
2008-10-17 04:23:18 -07:00
|
|
|
ww = w;
|
2006-11-15 19:20:24 -08:00
|
|
|
hh = h;
|
2012-10-08 18:58:41 -07:00
|
|
|
//// xx = evas_coord_world_x_to_screen(eo_e, x);
|
|
|
|
//// yy = evas_coord_world_y_to_screen(eo_e, y);
|
|
|
|
//// ww = evas_coord_world_x_to_screen(eo_e, w);
|
|
|
|
//// hh = evas_coord_world_y_to_screen(eo_e, h);
|
2002-11-08 00:02:15 -08:00
|
|
|
if (ww < 1) ww = 1;
|
|
|
|
if (hh < 1) hh = 1;
|
2008-10-21 05:19:57 -07:00
|
|
|
EINA_INLIST_REVERSE_FOREACH((EINA_INLIST_GET(e->layers)), lay)
|
2002-11-08 00:02:15 -08:00
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
Evas_Object *eo_obj;
|
|
|
|
Evas_Object_Protected_Data *obj;
|
2011-06-08 19:45:59 -07:00
|
|
|
|
|
|
|
EINA_INLIST_REVERSE_FOREACH(get_layer_objects(lay), obj)
|
|
|
|
{
|
2012-10-08 18:58:41 -07:00
|
|
|
eo_obj = obj->object;
|
|
|
|
// FIXME - Daniel: we don't know yet how to handle the next line
|
2011-06-08 19:45:59 -07:00
|
|
|
if (obj->delete_me) continue;
|
2011-11-15 07:10:19 -08:00
|
|
|
if ((!include_pass_events_objects) &&
|
2012-10-08 18:58:41 -07:00
|
|
|
(evas_event_passes_through(eo_obj, obj))) continue;
|
2012-10-21 21:57:32 -07:00
|
|
|
if (evas_object_is_source_invisible(eo_obj, obj)) continue;
|
2013-03-12 05:58:19 -07:00
|
|
|
if ((!include_hidden_objects) && (!obj->cur->visible)) continue;
|
2013-04-06 22:00:10 -07:00
|
|
|
evas_object_clip_recalc(obj);
|
2012-10-08 18:58:41 -07:00
|
|
|
if ((evas_object_is_in_output_rect(eo_obj, obj, xx, yy, ww, hh)) &&
|
2011-06-08 19:45:59 -07:00
|
|
|
(!obj->clip.clipees))
|
2012-10-22 01:57:08 -07:00
|
|
|
in = eina_list_prepend(in, eo_obj);
|
2011-06-08 19:45:59 -07:00
|
|
|
}
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2014-03-11 23:53:00 -07:00
|
|
|
return in;
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static const char *
|
|
|
|
_evas_object_type_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2014-03-11 04:51:35 -07:00
|
|
|
if (obj->delete_me) return "";
|
|
|
|
return obj->type;
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_type_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, const char *type)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
|
|
|
obj->type = type; // Store it as the top type of this class
|
2002-11-08 00:02:15 -08:00
|
|
|
}
|
2007-07-23 07:22:57 -07:00
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_precise_is_inside_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Eina_Bool precise)
|
2007-07-23 07:22:57 -07:00
|
|
|
{
|
|
|
|
obj->precise_is_inside = precise;
|
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_evas_object_precise_is_inside_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
2007-07-23 07:22:57 -07:00
|
|
|
{
|
2014-03-11 04:51:35 -07:00
|
|
|
return obj->precise_is_inside;
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_static_clip_set(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj, Eina_Bool is_static_clip)
|
2010-09-02 17:06:56 -07:00
|
|
|
{
|
|
|
|
obj->is_static_clip = is_static_clip;
|
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_evas_object_static_clip_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
2010-09-02 17:06:56 -07:00
|
|
|
{
|
2014-03-11 04:51:35 -07:00
|
|
|
return obj->is_static_clip;
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
static void
|
2013-03-26 10:51:05 -07:00
|
|
|
_is_frame_flag_set(Evas_Object_Protected_Data *obj, Eina_Bool is_frame)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2013-03-26 10:51:05 -07:00
|
|
|
const Eina_Inlist *l;
|
|
|
|
Evas_Object_Protected_Data *child;
|
|
|
|
|
2011-12-26 15:09:45 -08:00
|
|
|
obj->is_frame = is_frame;
|
2013-03-26 10:51:05 -07:00
|
|
|
|
|
|
|
l = evas_object_smart_members_get_direct(obj->object);
|
|
|
|
|
|
|
|
EINA_INLIST_FOREACH(l, child)
|
|
|
|
_is_frame_flag_set(child, is_frame);
|
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void
|
|
|
|
_evas_object_is_frame_object_set(Eo *eo_obj, Evas_Object_Protected_Data *obj, Eina_Bool is_frame)
|
2013-03-26 10:51:05 -07:00
|
|
|
{
|
|
|
|
Evas_Coord x, y;
|
|
|
|
|
|
|
|
evas_object_geometry_get(eo_obj, &x, &y, NULL, NULL);
|
|
|
|
|
|
|
|
_is_frame_flag_set(obj, is_frame);
|
|
|
|
|
|
|
|
evas_object_move(eo_obj, x, y);
|
2011-12-26 15:09:45 -08:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_evas_object_is_frame_object_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
2011-12-26 15:09:45 -08:00
|
|
|
{
|
2014-03-11 04:51:35 -07:00
|
|
|
return obj->is_frame;
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static Evas_Object *
|
|
|
|
_evas_object_smart_parent_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2014-03-11 04:51:35 -07:00
|
|
|
if (!obj) return NULL;
|
|
|
|
return obj->smart.parent;
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static void *
|
|
|
|
_evas_object_smart_data_get(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2014-03-11 04:51:35 -07:00
|
|
|
return NULL;
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_evas_object_smart_type_check(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, const char *type EINA_UNUSED)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2014-03-11 04:51:35 -07:00
|
|
|
return EINA_FALSE;
|
2011-12-26 15:09:45 -08:00
|
|
|
}
|
2012-10-08 18:58:41 -07:00
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
EOLIAN static Eina_Bool
|
|
|
|
_evas_object_smart_type_check_ptr(Eo *eo_obj EINA_UNUSED, Evas_Object_Protected_Data *obj EINA_UNUSED, const char *type EINA_UNUSED)
|
2012-10-08 18:58:41 -07:00
|
|
|
{
|
2014-03-11 04:51:35 -07:00
|
|
|
return EINA_FALSE;
|
2012-10-08 18:58:41 -07:00
|
|
|
}
|
|
|
|
|
2014-03-11 04:51:35 -07:00
|
|
|
#include "canvas/evas_object.eo.c"
|
2014-03-11 23:53:00 -07:00
|
|
|
|