efl.ecore.AnimatorTimeline Class

class efl.ecore.AnimatorTimeline(func, double runtime, *args, **kargs)

Bases: efl.ecore.Animator

Create an animator that runs for a limited time

This is just like a normal Animator except the animator only runs for a limited time specified in seconds by runtime. Once the runtime the animator has elapsed (animator finished) it will automatically be deleted. The callback function func can return ECORE_CALLBACK_RENEW to keep the animator running or ECORE_CALLBACK_CANCEL ro stop it and have it be deleted automatically at any time.

The func will ALSO be passed a position parameter that will be in value from 0.0 to 1.0 to indicate where along the timeline (0.0 start, 1.0 end) the animator run is at. If the callback wishes not to have a linear transition it can “map” this value to one of several curves and mappings via Animator.pos_map().

Note

The default frametime value is 1/30th of a second.

New in version 1.8.

Parameters
  • func (callable) – The function to call when it ticks off

  • runtime (double) – The time to run in seconds

  • *args – All the remaining arguments will be passed back in the callback function.

  • **kwargs – All the remaining keyword arguments will be passed back in the callback function.

Expected func signature:

func(pos, *args, **kargs) -> bool