Пример #1
0
static void
_eio_load_xattr_done(void *data, Eio_File *handler, double xattr_double)
{
   Smart_Data *sd = data;

   emotion_object_position_set(evas_object_smart_parent_get(sd->obj), xattr_double);
   evas_object_smart_callback_call(evas_object_smart_parent_get(sd->obj), SIG_POSITION_LOAD_SUCCEED, NULL);
   _eio_load_xattr_cleanup(sd, handler);
}
Пример #2
0
Object *Object::getParent (const Object &obj)
{
  Evas_Object *eo = evas_object_smart_parent_get (o);
  // TODO: try if this works also with objectLink() logic...
  
  return Object::wrap (eo);
}
Пример #3
0
static void
_eio_load_xattr_error(void *data, Eio_File *handler, int err EINA_UNUSED)
{
   Smart_Data *sd = data;

   evas_object_smart_callback_call(evas_object_smart_parent_get(sd->obj), SIG_POSITION_LOAD_FAILED, NULL);
   _eio_load_xattr_cleanup(sd, handler);
}
Пример #4
0
//--// callbacks
static int
_dnd_sorter(const void *d1, const void *d2)
{
  Evas_Object *o1 = (Evas_Object *)d1;
  Evas_Object *o2 = (Evas_Object *)d2;
  Eina_List *o1l = NULL, *o2l = NULL, *l1, *l2, *list, *l;
  Evas_Object *common = NULL, *o;

  while (o1)
  {
    o1l = eina_list_prepend(o1l, o1);
    o1 = evas_object_smart_parent_get(o1);
  }
  while (o2)
  {
    o2l = eina_list_prepend(o2l, o2);
    o2 = evas_object_smart_parent_get(o2);
  }
  o1 = o1l->data;
  o2 = o2l->data;
  if (o1 != o2)
  {
    // different toplevels
    o = evas_object_bottom_get(evas_object_evas_get(o1));
    while (o)
    {
      if (o1 == o)
      {
	// o1 below o2
	eina_list_free(o1l);
	eina_list_free(o2l);
	return -1;
      }
      if (o2 == o)
      {
	// o2 below o1
	eina_list_free(o1l);
	eina_list_free(o2l);
	return 1;
      }
      o = evas_object_above_get(o);
    }
  }
  for (l1 = o1l, l2 = o2l;
       l1 && l2;
       l1 = l1->next, l2 = l2->next)
  {
    o1 = l1->data; o2 = l2->data;
    if (o1 != o2)
    {
      // children differ, thus parent is common
      list = evas_object_smart_members_get(common);
      for (l = list; l; l = l->next)
      {
	o = l->data;
	if (o1 == o)
	{
	  // o1 below o2
	  eina_list_free(list);
	  eina_list_free(o1l);
	  eina_list_free(o2l);
	  return -1;
	}
	if (o2 == o)
	{
	  // o2 below o1
	  eina_list_free(list);
	  eina_list_free(o1l);
	  eina_list_free(o2l);
	  return 1;
	}
      }
      eina_list_free(list);
      break;
    }
    common = o1;
  }
  eina_list_free(o1l);
  eina_list_free(o2l);
  return 0;
}
Пример #5
0
   _ewk_view_parent_sc.sc.add(obj);
}

static void
_view_smart_del(Evas_Object *obj)
{
   _ewk_view_parent_sc.sc.del(obj);
}

static Evas_Object *
_view_smart_window_create(Ewk_View_Smart_Data *vsd,
                          const Ewk_Window_Features *window_features)
{
   Evas_Object *new;
   Evas_Object *obj = evas_object_smart_parent_get(vsd->self);

   ELM_WEB_DATA_GET_OR_RETURN_VAL(obj, sd, NULL);

   if (!sd->hook.window_create) return NULL;

   new = sd->hook.window_create
       (sd->hook.window_create_data, obj, EINA_TRUE,
       (const Elm_Web_Window_Features *)window_features);
   if (new) return elm_web_webkit_view_get(new);

   return NULL;
}

static void
_view_smart_window_close(Ewk_View_Smart_Data *sd)