Search code examples
pythonclutter

Clutter - run method at marker?


Markers seem to be designed to run a timeline at a point in another timeline. Is there any way to run an ordinary method at a marker, rather than a timeline?


Solution

  • no, markers on ClutterTimeline can run any function. just use the ClutterTimeline::marker-reached signal. if you are interested in a specific marker, you can detail the signal using the marker name, e.g.:

    g_signal_connect (timeline, "marker-reached::my-marker",
                      G_CALLBACK (on_my_marker_reached),
                      NULL);
    

    and the timeline will call the *on_my_marker_reached* callback when the marker my-marker has been reached.