Compare commits

...

2 Commits

Author SHA1 Message Date
Marcel Hollerbach 5f55b25b69 clouseau: highlight everything that has a geometry 5 years ago
Marcel Hollerbach 9640ad7c6a clouseau: lets use eo to evalulate if a function is implemented 5 years ago
  1. 29
      src/lib/clouseau_debug.c

@ -446,6 +446,23 @@ _complex_buffer_fill(const Eolian_Unit *unit, char *buf, const Eolian_Type *eo_t
return size;
}
static Eina_Bool
_api_resolvable(Eo *obj, const Eolian_Function *function)
{
Efl_Object_Op_Call_Data call_data = {};
Efl_Object_Call_Cache call_cache = {};
const char *func_c_name;
void *func_api;
func_c_name = eolian_function_full_c_name_get(function, EOLIAN_PROP_GET, EINA_FALSE);
func_api = dlsym(RTLD_DEFAULT, func_c_name);
call_cache.op = _efl_object_op_api_id_get(func_api, obj, func_c_name, __FILE__, __LINE__);
call_cache.generation = _efl_object_init_generation;
_efl_object_call_resolve(obj, func_c_name, &call_data, &call_cache, __FILE__, __LINE__);
return !!call_data.func;
}
static unsigned int
_class_buffer_fill(Eo *obj, const Eolian_Unit *unit, const Eolian_Class *okl, const Eolian_Class *ekl, char *buf)
{
@ -454,8 +471,10 @@ _class_buffer_fill(Eo *obj, const Eolian_Unit *unit, const Eolian_Class *okl, co
const Eolian_Function *func;
EINA_ITERATOR_FOREACH(funcs, func)
{
if (eolian_function_type_get(func) == EOLIAN_PROP_SET ||
!_eolian_function_is_implemented(func, EOLIAN_PROP_GET, unit, okl)) continue;
if (eolian_function_type_get(func) == EOLIAN_PROP_SET) continue;
if (!_api_resolvable(obj, func)) continue;
Eina_Iterator *keys_itr = eolian_property_keys_get(func, EOLIAN_PROP_GET);
eina_iterator_free(keys_itr);
/* We dont support functions with key parameters */
@ -759,14 +778,14 @@ _main_loop_obj_highlight_cb(Eina_Debug_Session *session EINA_UNUSED, int srcid E
if (size != sizeof(uint64_t)) return;
memcpy(&ptr64, buffer, sizeof(ptr64));
Eo *obj = (Eo *)SWAP_64(ptr64);
if (!efl_isa(obj, EFL_CANVAS_OBJECT_CLASS) && !efl_isa(obj, EVAS_CANVAS_CLASS)) return;
if (!efl_isa(obj, EFL_GFX_INTERFACE) && !efl_isa(obj, EVAS_CANVAS_CLASS)) return;
Evas *e = evas_object_evas_get(obj);
Eo *rect = evas_object_polygon_add(e);
evas_object_move(rect, 0, 0);
if (efl_isa(obj, EFL_CANVAS_OBJECT_CLASS))
if (efl_isa(obj, EFL_GFX_INTERFACE))
{
Evas_Coord x = 0, y = 0, w = 0, h = 0;
evas_object_geometry_get(obj, &x, &y, &w, &h);
efl_gfx_geometry_get(obj, &x, &y, &w, &h);
if (efl_isa(obj, EFL_UI_WIN_CLASS)) x = y = 0;
evas_object_polygon_point_add(rect, x, y);

Loading…
Cancel
Save