*/
EAPI Evas_Object *evas_object_vg_add(Evas *e) EINA_WARN_UNUSED_RESULT EINA_ARG_NONNULL(1) EINA_MALLOC;
+/**
+ * Get the total number of frames of the vector, if animated.
+ *
+ * @return 0, if not animated.
+ *
+ * @since 1.22
+ */
+EAPI int evas_object_vg_animated_frame_count_get(const Evas_Object *obj) EINA_ARG_NONNULL(1);
+
+/**
+ * Set the frame to current frame of an animated vector.
+ *
+ * @param[in] frame_index The index of current frame.
+ *
+ * @return Returns @c EINA_TRUE, if the frame index is valid.
+ *
+ * @since 1.22
+ */
+EAPI Eina_Bool evas_object_vg_animated_frame_set(Evas_Object *obj, int frame_index) EINA_ARG_NONNULL(1, 2);
+
#include "canvas/efl_canvas_vg_node.eo.legacy.h"
#include "canvas/efl_canvas_vg.eo.legacy.h"
#include "canvas/efl_canvas_vg_container.eo.legacy.h"
_update_vgtree_viewport(ev->object, pd);
}
-/* the actual api call to add a vector graphic object */
-EAPI Evas_Object *
-evas_object_vg_add(Evas *e)
-{
- e = evas_find(e);
- EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(e, EVAS_CANVAS_CLASS), NULL);
- // TODO: Ask backend to return the main Ector_Surface
- return efl_add(MY_CLASS, e, efl_canvas_object_legacy_ctor(efl_added));
-}
-
EOLIAN static Efl_VG *
_efl_canvas_vg_root_node_get(const Eo *obj EINA_UNUSED, Efl_Canvas_Vg_Data *pd)
{
{
return pd->frame_index;
}
+/* the actual api call to add a vector graphic object */
+EAPI Evas_Object *
+evas_object_vg_add(Evas *e)
+{
+ e = evas_find(e);
+ EINA_SAFETY_ON_FALSE_RETURN_VAL(efl_isa(e, EVAS_CANVAS_CLASS), NULL);
+ // TODO: Ask backend to return the main Ector_Surface
+ return efl_add(MY_CLASS, e, efl_canvas_object_legacy_ctor(efl_added));
+}
+
+EAPI int
+evas_object_vg_animated_frame_count_get(const Evas_Object *obj)
+{
+ return efl_gfx_image_animated_frame_count_get(obj);
+}
+
+EAPI Eina_Bool
+evas_object_vg_animated_frame_set(Evas_Object *obj, int frame_index)
+{
+ return efl_gfx_image_animated_frame_set(obj, frame_index);
+}
#include "efl_canvas_vg.eo.c"