summaryrefslogtreecommitdiff
path: root/clutter/clutter-timeline.h
Commit message (Collapse)AuthorAgeFilesLines
* Annotate all public symbolsEmmanuele Bassi2014-03-171-0/+25
| | | | | We are going to switch to compiler annotations to determine the visibility of the symbols.
* timeline: Add progress-based marker APIEmmanuele Bassi2013-02-201-0/+4
| | | | | | | | Being able to set a marker at a normalized point on a timeline, instead of using a specific time, is a nice fit with the current Timeline class API. https://bugzilla.gnome.org/show_bug.cgi?id=694319
* timeline: Add cubic-bezier() progress functionsEmmanuele Bassi2012-07-191-56/+64
| | | | | | | | | | | | Another progress function from the CSS3 Transitions specification, using a parametrices cubic bezier curve between (0, 0) and (1, 1) with two control points. (sadly, no ASCII art can approximate a cubic bezier, so no graph) The cubic-bezier() progress function comes with a bunch of preset easing modes: ease, ease-in, ease-out, and ease-in-out, that we can map to enumeration values.
* timeline: Add support for step() progressEmmanuele Bassi2012-07-191-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The CSS3 Transitions specification from the W3C defines the possibility of using a parametrized step() timing function, with the following prototype: steps(n_steps, [ start | end ]) where @n_steps represents the number of steps used to divide an interval between 0 and 1; the 'start' and 'end' tokens describe whether the value change should happen at the start of the transition, or at the end. For instance, the "steps(3, start)" timing function has the following profile: 1 | x | | | x---| | ' | | x---' | | ' | 0 |---' | Whereas the "steps(3, end)" timing function has the following profile: 1 | x---| | ' | | x---' | | ' | x---' | | | 0 | | Since ClutterTimeline uses an enumeration for controlling the progress mode, we need additional API to define the parameters of the steps() progress; for this reason, we need a CLUTTER_STEPS enumeration value, and a method for setting the number of steps and the value transition policy. The CSS3 Transitions spec helpfully also defines a step-start and a step-end shorthands, which expand to step(1, start) and step(1, end) respectively; we can provide a CLUTTER_STEP_START and CLUTTER_STEP_END enumeration values for those.
* docs: Add ClutterTimelineClass.stopped annotationEmmanuele Bassi2012-06-051-5/+6
|
* timeline: Add a new "stopped" signalEmmanuele Bassi2012-05-311-1/+2
| | | | | | | | | | | | | The ::stopped signal is emitted when the timeline has been completely exhausted or when the timeline has been programmatically stopped by using clutter_timeline_stop(); the notification at the end of the timeline run allows to write handlers without having to check whether the current repeat is the last one, like we are forced to do when using the ::completed signal. Based on the patch by: Jasper St. Pierre <jstpierre@mecheye.net> https://bugzilla.gnome.org/show_bug.cgi?id=676854
* timeline: Add more state accessorsEmmanuele Bassi2012-03-151-0/+5
| | | | | | | | | It should be possible to ask a timeline what is its duration, taking into account eventual repeats, and which repeat is the one currently in progress. These two functions allow writing animations that depend on the current state of another timeline.
* Annotate all functions available since 1.10Emmanuele Bassi2012-02-271-1/+5
|
* timeline: Add progress functionsEmmanuele Bassi2012-02-231-1/+28
| | | | | The whole progress computation should not be done using a separate class: it should be part of the Timeline class.
* timeline: Move deprecated methods into a separate headerEmmanuele Bassi2012-02-131-10/+0
|
* timeline: Add repeat-countEmmanuele Bassi2012-02-131-3/+10
| | | | | | | | | | | | | | | | | Being able to easily set the number of repeats has been a request for the animation framework for some time now. The usual way to implement this is: connect to the ::completed signal, use a static counter, and stop the timeline when the counter hits a specific spot. In the same light as the :auto-reverse property, we can make it easier to implement this common functionality by adding a :repeat-count property that, when set, limits the amount of loops that a Timeline can perform before stopping itself. In fact, we can implement the :loop property in terms of the :repeat-count property just by using a sentinel value mapping to "infinity", and map loop=FALSE to repeat-count=0, and loop=TRUE to repeat-count=-1.
* timeline: Deprecate the clone() methodEmmanuele Bassi2012-02-131-0/+1
| | | | | | | | | | | | The clutter_timeline_clone() method was a pretty dumb idea when it was introduced, back when we still had the ClutterEffectTemplate and the clutter_effect_* animation API. It has since become an API wart: we cannot change or add new properties to be cloned without the risk of breaking existing code. All in all, cloning a GObject is just a matter of calling g_object_new() with the wanted properties. Let's deprecate this throwback of the Olden Days™, so that we can remove it for good once we break for 2.0.
* Clean up clutter-timeline.hEmmanuele Bassi2012-02-131-47/+43
| | | | | Re-align everything to allow expansion, and move the only "protected" function to the clutter-master-clock.h private header.
* Move more typedefs into clutter-types.hEmmanuele Bassi2011-10-111-1/+0
|
* Move all enumerations to a separate fileEmmanuele Bassi2011-10-111-15/+1
| | | | | This should allow sharing types, and we can avoid glib-mkenums thrawling the whole repository for enumerations.
* Move clutter-fixed.[ch] to the deprecated sectionEmmanuele Bassi2011-10-111-1/+0
|
* docs: Remove mentions of "frames" in TimelineEmmanuele Bassi2011-09-021-1/+1
| | | | We still have some really old naming lying around.
* ClutterTimeline: Fix the 'msecs' parameter for the new-frame signalNeil Roberts2011-01-241-1/+1
| | | | | | | | | Between Clutter 0.8 and 1.0, the new-frame signal of ClutterTimeline changed the second parameter to be an elapsed time in milliseconds rather than the frame number. However a few places in clutter were still calling the parameter 'frame_num' which is a bit misleading. Notably the signature for the signal class closure in the header was using the wrong name. This changes them to use 'msecs'.
* timeline: Rename the reverse property to auto-reverseEmmanuele Bassi2010-12-171-2/+2
| | | | | | Other frameworks expose the same functionality as "auto-reverse", probably to match the cassette tape player. It actually makes sense for Clutter to follow suit.
* timeline: Add :reverse propertyEmmanuele Bassi2010-11-181-0/+3
| | | | | | | The :reverse property removes the pattern of connecting to the ::completed signal of a Timeline to change the direction. http://bugzilla.clutter-project.org/show_bug.cgi?id=2408
* Move away from GTimeValEmmanuele Bassi2010-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | GLib 2.28 will deprecate GTimeVal and related API in favour of standardizing on microseconds granularity for all time-based API. Clutter should switch too. All of the current users of GTimeVal convert to milliseconds when doing time operations, and use GTimeVal only as storage. This can effectively be replaced by a gint64. The Master Clock uses a microsecond resolution, except when interacting with the main loop itself, since the main loop has a millisecond resolution - at least until Ryan Lortie manages to switch that too to microseconds on Linux. The clutter_timeline_do_tick() function was erroneously not privatized, but it was still assumed to be private; we should just remove it from the public symbols.
* Remove the last few fixed-point entry pointsEmmanuele Bassi2009-06-191-1/+0
| | | | | | The last fixed-point entry points are just a few, and trivial. The end user is expected to do the conversion using the CoglFixed type and macros.
* Move elapsed-time calculations into ClutterTimelineOwen W. Taylor2009-06-091-2/+2
| | | | | | | | | | | | | | | | | | | | Instead of calculating a delta in the master clock, and passing that into each timeline, make each timeline individually responsible for remembering the last time and computing the delta. This: - Fixes a problem where we could spin infinitely processing timeline-only frames with < 1msec differences. - Makes timelines consistently start timing on the first frame; instead of doing different things for the first started timeline and other timelines. - Improves accuracy of elapsed time computations by avoiding accumulating microsecond => millisecond truncation errors. http://bugzilla.openedhand.com/show_bug.cgi?id=1637 Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
* [timeline] Remove the concept of frames from timelinesNeil Roberts2009-06-041-18/+6
| | | | | | | | | | | | | | | | | | | | | | | | | Timelines no longer work in terms of a frame rate and a number of frames but instead just have a duration in milliseconds. This better matches the working of the master clock where if any timelines are running it will redraw as fast as possible rather than limiting to the lowest rated timeline. Most applications will just create animations and expect them to finish in a certain amount of time without caring about how many frames are drawn. If a frame is going to be drawn it might as well update all of the animations to some fraction of the total animation rather than rounding to the nearest whole frame. The 'frame_num' parameter of the new-frame signal is now 'msecs' which is a number of milliseconds progressed along the timeline. Applications should use clutter_timeline_get_progress instead of the frame number. Markers can now only be attached at a time value. The position is stored in milliseconds rather than at a frame number. test-timeline-smoothness and test-timeline-dup-frames have been removed because they no longer make sense.
* Revert commit 762873e7Emmanuele Bassi2009-06-031-1/+1
| | | | | | | | The commit 762873e79e501c949f3ef55cbac20276b6f6ed4e is completely and utterly wrong and I should have never pushed it. Serves me well for trying to work on three different branches and on three different things.
* [master clock] Avoid excessive redrawsEmmanuele Bassi2009-06-031-1/+1
| | | | | | | | | | | | Currently, the clock source spins a redraw every time there is at least a timeline running. If the timelines were not advanced in the previous frame, though, because their interval is larger than the vblanking interval then this will lead to excessive redraws of the scenegraph even if nothing has changed. To avoid this a simple guard should be set by the MasterClock::advance method in case no timeline was effectively advanced, and checked before dispatching the stage redraws.
* [timeline] Expose the msec advancementEmmanuele Bassi2009-05-011-0/+4
| | | | | | | The method of ClutterTimeline that advances the timeline by a delta (in millisecond) is going to be useful for testing the timeline's behaviour -- and unbreak the timeline test suite that was broken by the MasterClock merge.
* [docs] Bring down the undocumented symbols to 2%Emmanuele Bassi2009-03-161-0/+20
| | | | | The usual pre-release documentation blitzing. Most of the remaining symbols are either COGL or X11 specific, or dummy interface typedefs.
* Move ClutterTimeline to CoglFixedEmmanuele Bassi2009-03-101-22/+7
| | | | | The ClutterTimeline::get_progressx() method should return a CoglFixed, now that ClutterFixed is being deprecated.
* 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com>Emmanuele Bassi2008-10-301-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug 1212 - Allow only a single include file for Clutter * clutter/*.h: Only allow including clutter.h in third party code. * clutter/cogl/cogl-color.h: * clutter/cogl/cogl-fixed.h: * clutter/cogl/cogl.h.in: Only allow including cogl.h in third party code. * clutter/cogl/common/Makefile.am: * clutter/cogl/gl/Makefile.am: * clutter/cogl/gles/Makefile.am: * clutter/eglnative/Makefile.am: * clutter/eglx/Makefile.am: * clutter/fruity/Makefile.am: * clutter/glx/Makefile.am: * clutter/glx/clutter-glx.h: * clutter/osx/Makefile.am: * clutter/pango/Makefile.am: * clutter/sdl/Makefile.am: * clutter/win32/Makefile.am: * clutter/x11/Makefile.am: Fix build environment. * clutter/x11/clutter-x11-texture-pixmap.h: * clutter/x11/clutter-x11.h: Fix inclusion rules. * tests/test-pixmap.c: Fix inclusion of GdkPixbuf header. * README: Update release notes.
* 7 small miscellaneous fixesTommi Komulainen2008-06-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug#959 - Multiple minor improvements * configure.ac: pick up GDKPIXBUF_PREFIX from gdk-pixbuf-2.0 module, not pango * clutter/clutter-keysyms-table.h: cosmetic fix for ifdef guard name in the comment (leftover from earlier commit) * tests/test-textures.c: don't depend on GdkPixbuf as we're not using any actual features from it, just plain pixel buffer manipulation * clutter/clutter-timeline.c * clutter/clutter-timeline.h (clutter_timeline_list_markers): Use gsize* to return number of items, not guint* * tests/test-paint-wrapper.c: use correct type (guint*) in call to clutter_actor_get_size() * tests/test-depth.c (janus_group): properly take height2 into account when calculating needed height for the rectangle * tests/test-cogl-tex-getset.c: use rowstride, not width*4, when calculating pixel offsets * tests/test-cogl-tex-getset.c: Don't assume/force RGBA format, also support ARGB format (needed with quartz imageloader.)
* 2008-03-18 Emmanuele Bassi <ebassi@openedhand.com>Emmanuele Bassi2008-03-181-0/+2
| | | | | | | | | | | | | | | | * clutter/clutter-score.[ch]: Remove all the API changes, and just add a clutter_score_append_at_marker(); the implementation remains the same, but the marker must be explicitly created by the developer. The ids are no longer used to create implicit markers, so they can return to be unsigned integers. * clutter/clutter-timeline.[ch]: (clutter_timeline_has_marker): Add a function to query a timeline for a marker being set. * tests/test-score.c (main): Update with the API changes. * clutter.symbols: Update exported symbols.
* 2008-03-18 Emmanuele Bassi <ebassi@openedhand.com>Emmanuele Bassi2008-03-181-10/+26
| | | | | | | | | | | | | | | | * clutter/clutter-marshal.list: Add signature for the ::marker-reached signal marshaller. * clutter/clutter-timeline.[ch]: Add timeline marker API; using markers it is possible to add a unique identifier to a particular frame of the timeline, and receive a signal notification when reaching that particular marker while playing the timeline. (#641) * tests/test-timeline.c: Update the test case to check for the marker-reached signal emission. * clutter.symbols: Add new symbols.
* 2007-11-30 Emmanuele Bassi <ebassi@openedhand.com>Emmanuele Bassi2007-11-301-0/+2
| | | | | | | | | | | * clutter/clutter-timeline.h: * clutter/clutter-timeline.c (timeline_timeout_func), (clutter_timeline_get_delta): Add a function for retrieving the number of frames and the time (in milliseconds) elapsed since the last timeline ::new-frame signal. This can be useful for implementing a physics engine or just for knowing how if and how many frames have been skipped.
* 2007-11-15 Emmanuele Bassi <ebassi@openedhand.com>Emmanuele Bassi2007-11-151-32/+49
| | | | | | | | | | * clutter/clutter-timeline.[ch]: Add ClutterTimeline:direction property, defining the direction (forward or backward) of the timeline. * tests/test-timeline.c: Test the direction property. * clutter.symbols: Update exported symbols
* 2007-10-16 Emmanuele Bassi <ebassi@openedhand.com>Emmanuele Bassi2007-10-161-0/+7
| | | | | | | | | | | | | * clutter/clutter-timeline.[ch]: Added ClutterTimeline:duration, a property for setting the duration of a timeline in milliseconds. The property comes with accessors and a new constructor. The frame rate used is the default value. * clutter/clutter-private.h: * clutter/clutter-main.[ch]: Add clutter_get_default_frame_rate() and clutter_set_default_frame_rate(); these two functions control the default frame rate to be used when creating timelines. Currently is set to 60 frames-per-second.
* Make gtk-doc produce the ClutterTimeline signalsEmmanuele Bassi2007-08-201-1/+4
|
* Add delay property to ClutterTimelineEmmanuele Bassi2007-06-071-0/+3
| | | | | | | This patch adds a "delay" property to the timeline object. If set, it will delay the start of the timeline of a number of milliseconds. If the timeline is looping, the delay will be applied just the first time and not for every loop.
* Rename clutter_timeline_copy to clutter_timeline_cloneEmmanuele Bassi2007-06-071-1/+2
| | | | | Usually, in OOP objects are cloned, while boxed types are copied; this holds true in GObject, where GBoxed types have copy functions.
* 2007-05-14 Matthew Allum <mallum@openedhand.com>Matthew Allum2007-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * clutter/clutter-behaviour-path.c: Fix bug where last knot position wouldn't get reached. * clutter/clutter-group.c: Add some docs * clutter/clutter-timeline.h: * clutter/clutter-timeline.c: Add clutter_timeline_copy (needed for ClutterEffect) * clutter/clutter-version.h.in: Export windowing system / GL backend etc defines. * clutter/Makefile.am: * clutter/clutter-effect.c: * clutter/clutter-effect.h: * clutter/clutter.h: * clutter/glx/clutter-backend-glx.c: Minor clean ups. * clutter/clutter-alpha.h: Add a fixme. * configure.ac: Add FPU define. * examples/Makefile.am: * examples/slider.c: Add Robs slider game.
* 2006-11-15 Emmanuele Bassi <ebassi@openedhand.com>Emmanuele Bassi2006-11-151-45/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * clutter/clutter-alpha.h: * clutter/clutter-alpha.c: Add a data parameter to the ClutterAlphaFunc; add a data+destroy parameter to clutter_alpha_set_func() and to clutter_alpha_new(), and turned the latter into clutter_alpha_new_full(); add a simple, empty constructor clutter_alpha_new(). These changes makes writing bindings a tad more easy, as bindings require passing their own functions in order to call the real alpha function. * clutter/clutter-behaviour.h: Clean up the header. * clutter/clutter-behaviours.[ch]: * clutter/clutter-behaviour-opacity.[ch]: * clutter/clutter-behaviour-path.[ch]: * clutter/clutter-behaviour-scale.[ch]: Split the ClutterBehaviourPath, ClutterBehaviourOpacity and ClutterBehaviourScale into their own files as they have been growing a bit. Fix ClutterBehaviourPath API. * clutter/clutter-media.h: Remove the commented "metadata_available" signal: gtk-doc chokes up on that. * clutter/clutter-timeline.h: * clutter/clutter-timeline.c: Remove the useless ClutterTimelineAlphaFunc signature; add missing accessor methods for the properties; clean up a bit. * clutter/clutter-util.h: * clutter/clutter-util.c: Remove unneeded function clutter_util_can_create_texture(). * clutter/clutter-feature.h: Sync the name of clutter_feature_get_all() with the name declared in clutter-feature.h. * clutter/Makefile.am: * clutter/clutter.h: Update. * examples/behave.c: Update to the new ClutterAlpha constructor. * examples/super-oh.c: Use the right pointer and avoid the compiler making a fuss about it.
* 2006-08-28 Jorn Baayen <jorn@openedhand.com>Jorn Baayen2006-08-281-24/+0
| | | | | | | | | | | | | | | | | | | | | | * clutter/Makefile.am: * clutter/clutter-alpha.c: * clutter/clutter-alpha.h: * clutter/clutter-behaviours.c: (clutter_behaviour_opacity_dispose), (clutter_behaviour_opacity_init), (clutter_behaviour_opacity_frame_foreach), (clutter_behaviour_opacity_frame): * clutter/clutter-behaviours.h: * clutter/clutter-timeline.c: (clutter_timeline_class_init): * clutter/clutter-timeline.h: * clutter/clutter.h: * examples/behave.c: (main): Separate alpha calculation into its own class. * clutter/clutter-behaviour.c: (clutter_behaviour_set_timelime): Correct NULL check.
* 2006-08-15 Matthew Allum <mallum@openedhand.com>Matthew Allum2006-08-151-1/+11
| | | | | | | | | | | | | | | | | * clutter/clutter-behaviour.c: * clutter/clutter-behaviour.h: * clutter/clutter-behaviours.c: * clutter/clutter-timeline.c: * clutter/clutter-timeline.h: * clutter/clutter.h: Make basic behaviour infrastructure actually work. * examples/Makefile.am: * examples/behave.c: Add a simple behaviour demo/test * clutter/clutter-media.c: (clutter_media_set_volume): Actuall set volume rather than position.. (Fixes #141)
* 2006-08-14 Matthew Allum <mallum@openedhand.com>Matthew Allum2006-08-131-0/+16
| | | | | | | | | | | | | | | | | | | | * clutter/Makefile.am: * clutter/clutter-behaviour.c: * clutter/clutter-behaviour.h: * clutter/clutter-behaviours.c: * clutter/clutter-behaviours.h: * clutter/clutter-timeline.c: * clutter/clutter-timeline.h: Add very initial new behaviour functionality. * clutter/clutter-stage.c: * clutter/clutter-main.c: * clutter/clutter-actor.c: Improve clipping using stencil test rather than scissor check. ( Should now handle rotated clips etc ). * clutter/clutter-group.c: (clutter_group_paint): Fix typo on position check.
* 2006-06-22 Emmanuele Bassi <ebassi@openedhand.com>Emmanuele Bassi2006-06-221-1/+14
| | | | | | | | | | | | | | | * clutter/clutter-timeline.h: * clutter/clutter-timeline.c: Add a "started" and a "paused" signals; add more sanity checks on the public functions. (clutter_timeline_get_loop): Add a getter function for the loop property. * clutter/clutter-marshal.list: Add marshallers. * clutter/clutter-timeline.h: * clutter/clutter-actor.h: Add padding for future expansion without breaking ABI.
* 2006-06-01 Matthew Allum <mallum@openedhand.com>Matthew Allum2006-06-011-0/+3
| | | | | | | | | * clutter/clutter-element.c: Fix a snafu in clutter_element_raise () * clutter/clutter-timeline.c: * clutter/clutter-timeline.h: Add new clutter_timeline_is_playing() method
* Merge gobject-branch into trunkMatthew Allum2006-05-291-0/+112