obj = elm_table_add(parent);
+ if (!surface)
+ surface = _eext_circle_surface_init(circle_obj->main_obj, NULL, EEXT_CIRCLE_SURFACE_TYPE_PRIVATE);
+
circle_obj = (Eext_Circle_Object *)calloc(1, sizeof(Eext_Circle_Object));
// Obj is expected to be elm_image object.
circle_obj->main_obj = obj;
circle_obj->widget_type = EEXT_CIRCLE_OBJECT_TYPE;
circle_obj->del_func = NULL;
circle_obj->disabled_func = NULL;
- circle_obj->vg_container = evas_vg_container_add(NULL);
+ circle_obj->vg_container = evas_vg_container_add(surface->vg_root);
/* When circle object is deleted, it must call efl_unref() for vg_container */
efl_ref(circle_obj->vg_container);
evas_object_smart_callback_add(widget_obj, "enabled", _eext_circle_object_widget_object_enabled_cb, circle_obj);
}
- if (surface)
- _eext_circle_surface_object_append(surface, circle_obj);
- else
- {
- Eext_Circle_Surface *private_surface =
- _eext_circle_surface_init(circle_obj->main_obj, NULL, EEXT_CIRCLE_SURFACE_TYPE_PRIVATE);
- _eext_circle_surface_object_append(private_surface, circle_obj);
- }
+ _eext_circle_surface_object_append(surface, circle_obj);
return obj;
}
}
surface->vg_obj = evas_object_vg_add(evas_object_evas_get(surface->main_obj));
- root = evas_vg_container_add(NULL);
+ root = evas_vg_container_add(surface->vg_obj);
evas_object_vg_root_node_set(surface->vg_obj, root);
surface->vg_root = root;
evas_object_repeat_events_set(surface->vg_obj, EINA_TRUE);
if (!parent) return NULL;
- if (type != EEXT_CIRCLE_SURFACE_TYPE_NAVIFRAME)
- main_obj = _eext_circle_surface_main_obj_add(parent);
+ //FIXME: vg container need main object as their parent.
+ // This main object will be fake parent in naviframe case.
+ //if (type != EEXT_CIRCLE_SURFACE_TYPE_NAVIFRAME)
+ main_obj = _eext_circle_surface_main_obj_add(parent);
surface = _eext_circle_surface_init(main_obj, parent, type);
+ _eext_circle_surface_vector_init(surface);
return surface;
}