1. 01 Mar, 2010 1 commit
    • Emmanuele Bassi's avatar
      Remove mentions of the FSF address · 79acb088
      Emmanuele Bassi authored
      Since using addresses that might change is something that finally
      the FSF acknowledge as a plausible scenario (after changing address
      twice), the license blurb in the source files should use the URI
      for getting the license in case the library did not come with it.
      
      Not that URIs cannot possibly change, but at least it's easier to
      set up a redirection at the same place.
      
      As a side note: this commit closes the oldes bug in Clutter's bug
      report tool.
      
      http://bugzilla.openedhand.com/show_bug.cgi?id=521
      79acb088
  2. 12 Feb, 2010 1 commit
  3. 08 Feb, 2010 1 commit
    • Emmanuele Bassi's avatar
      script: Use a node when resolving an animation mode · 09f91ff6
      Emmanuele Bassi authored
      Instead of taking a string and duplicating the "is it a string or an
      integer" check in both Alpha and Animation, the function in
      ClutterScript that resolves the animation mode values should take a
      JsonNode and do all the checks it needs.
      09f91ff6
  4. 13 Nov, 2009 1 commit
    • Emmanuele Bassi's avatar
      docs: Document the AnimationMode definition · 49cd887a
      Emmanuele Bassi authored
      Both ClutterAlpha:mode and ClutterAnimation:mode can be defined using:
      
        • an integer id
        • the "nick" field of the AnimationMode GEnumValue
        • a custom, tweener-like string
      
      All these methods should be documented.
      49cd887a
  5. 06 Nov, 2009 1 commit
  6. 21 Oct, 2009 3 commits
    • Emmanuele Bassi's avatar
      bd809f69
    • Emmanuele Bassi's avatar
      alpha: Manually parse the :mode property in ClutterScript · 7a52fddc
      Emmanuele Bassi authored
      The :mode property for a ClutterAlpha can either be an integer, for
      an easing mode logical id, or a string for the easing mode "nickname".
      7a52fddc
    • Emmanuele Bassi's avatar
      alpha: Allow setting the function in ClutterScript · f0ed71c7
      Emmanuele Bassi authored
      When defining an Alpha in ClutterScript we should allow setting
      the alpha function by using a custom property. This makes it
      possible to have both:
      
        {
          "id" : "behaviour-1",
          "type" : "ClutterBehaviourDepth",
          "alpha" : { "timeline" : "timeline-1", "function" : "alpha_func" },
          ...
        }
      
      And:
      
        {
          "id" : "alpha-1",
          "type" : "ClutterAlpha",
          "timeline" : "timeline-1",
          "function" : "alpha_func"
        },
        {
          "id" : "behaviour-1",
          "type" : "ClutterBehaviourDepth",
          "alpha" : "alpha-1",
          ...
        }
      
      The latter allows defining a single alpha function for multiple
      behaviours.
      f0ed71c7
  7. 04 Jun, 2009 1 commit
    • Neil Roberts's avatar
      [timeline] Remove the concept of frames from timelines · 9c7afe0c
      Neil Roberts authored
      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.
      9c7afe0c
  8. 23 Apr, 2009 1 commit
    • Emmanuele Bassi's avatar
      [alpha] Sanitize easing equations · d6ccecd7
      Emmanuele Bassi authored
      Bug 1561 - Bad code in clutter-alpha.c
      
      The implementation of the easing modes equations followed closely
      the JavaScript and ActionScript counterparts. Obviously, JS and AS
      are not C-compatible, so later versions of gcc (4.4.0 for instance)
      would complain about uninitialized variables and such. The code is
      also obfuscated and hard to debug/understand.
      
      For these reasons, the implementation should be unobfuscated and
      sanitized.
      d6ccecd7
  9. 27 Mar, 2009 1 commit
  10. 20 Feb, 2009 1 commit
  11. 20 Jan, 2009 5 commits
    • Emmanuele Bassi's avatar
      [docs] Update the easing modes documentation · 268abcd7
      Emmanuele Bassi authored
      The ClutterAlpha API reference page should also list the
      easing modes Clutter provides by default, by showing the
      curves used by each entry in the AnimationMode enumeration.
      
      We can also remove the incomplete graph showing the old
      alpha functions.
      268abcd7
    • Emmanuele Bassi's avatar
      [animation] Implement new easing functions · ec3b1a7b
      Emmanuele Bassi authored
      Instead of using our own homegrown alpha functions, we should
      use the easing functions also shared by other animation frameworks,
      like jQuery and Tween, in the interests of code portability.
      
      The easing functions have been defined by Robert Penner and
      are divided into three categories:
      
              In    Out     InOut
      
      Each category has a particular curve:
      
              Quadratic
              Cubic
              Quartic
              Quintic
              Sinusoidal
              Exponential
              Circular
      
      In addition, there are "physical" curves:
      
              Elastic
              Back (overshooting cubic)
              Bounce (exponentially decaying parabolic)
      
      Finally, the Linear curve is also provided as a reference.
      
      The functions are private, and are meant to be used only
      through their logical id as provided by the AnimationMode
      enumeration.
      
      The tests should be updated as well to match the new
      easing functions.
      ec3b1a7b
    • Emmanuele Bassi's avatar
      [animation] Move the alpha value to floating point · 7d7372af
      Emmanuele Bassi authored
      The current Alpha value is an unsigned integer that can be used
      implicitly as a fixed point value. This makes writing an alpha
      function overshooting below and above the current range basically
      impossible without complicating an already complex code, and
      creating weird corner cases.
      
      For this reason, the Alpha value should be defined as a floating
      point normalized value, spanning a range between 0.0 and 1.0; in
      order to allow overshooting, the valid range is extended one unit
      below and one unit above, thus making it -1.0 .. 2.0.
      
      This commit updates the various users of the ClutterAlpha API
      and the tests cases.
      
      This commit also removes all the current alpha functions exposed
      in the public API.
      7d7372af
    • Robert Bragg's avatar
      [Automatic fixed-to-float.sh change] Applies a number fixed to float patches · a2cf7e4a
      Robert Bragg authored
      To deal with all the corner cases that couldn't be scripted a number of patches
      were written for the remaining 10% of the effort.
      
      Note: again no API changes were made in Clutter, only in Cogl.
      a2cf7e4a
    • Robert Bragg's avatar
      [Automatic fixed-to-float.sh change] Applies all scripted changes · e82f6565
      Robert Bragg authored
      This is the result of running a number of sed and perl scripts over the code to
      do 90% of the work in converting from 16.16 fixed to single precision floating
      point.
      
      Note: A pristine cogl-fixed.c has been maintained as a standalone utility API
            so that applications may still take advantage of fixed point if they
            desire for certain optimisations where lower precision may be acceptable.
      
      Note: no API changes were made in Clutter, only in Cogl.
      
      Overview of changes:
      - Within clutter/* all usage of the COGL_FIXED_ macros have been changed to use
      the CLUTTER_FIXED_ macros.
      
      - Within cogl/* all usage of the COGL_FIXED_ macros have been completly stripped
      and expanded into code that works with single precision floats instead.
      
      - Uses of cogl_fixed_* have been replaced with single precision math.h
      alternatives.
      
      - Uses of COGL_ANGLE_* and cogl_angle_* have been replaced so we use a float for
      angles and math.h replacements.
      e82f6565
  12. 16 Jan, 2009 2 commits
    • Emmanuele Bassi's avatar
      [docs] Clarify what API registers a global alpha function · 7c935659
      Emmanuele Bassi authored
      Both clutter_alpha_new_with_func() and clutter_alpha_set_func()
      will not register a global alpha function, so we need to update
      the documentation to explicitly say so.
      7c935659
    • Emmanuele Bassi's avatar
      [alpha] Allow registering alpha functions · 74213e0e
      Emmanuele Bassi authored
      In order to unify alpha functions and animation modes in ClutterAlpha
      we should be able to register alpha functions and get a logical id
      for them; the logical id will then be available to be used by
      clutter_alpha_set_mode().
      
      The registration requires API changes in ClutterAlpha constructors
      and methods. It also provides the chance to shift ClutterAlpha
      towards the use of animations modes only, and to alpha functions
      as a convenience API for language bindings alone.
      74213e0e
  13. 05 Jan, 2009 2 commits
    • Neil Roberts's avatar
      Fix some *_set functions so they work if the object is the same value · 39f4848b
      Neil Roberts authored
      Bug 1392 - behaviour_set_alpha set same alpha twice lead to warning
      and destroy the input alpha
      
      The following functions are fixed:
      
      clutter_actor_set_shader
      clutter_alpha_set_timeline
      clutter_behaviour_set_alpha
      clutter_clone_texture_set_parent_texture
      
      They either now reference the new value before destroying the old
      value, or just return immediately if the values are the same.
      39f4848b
    • Neil Roberts's avatar
      In clutter_alpha_set_mode, set priv->mode after setting the func · 2ed60a52
      Neil Roberts authored
      Otherwise the call to clutter_alpha_set_func sets the mode back to
      CLUTTER_CUSTOM_MODE so clutter_alpha_get_mode won't get back the same
      value that was set.
      2ed60a52
  14. 18 Dec, 2008 1 commit
    • Neil Roberts's avatar
      Fix calculation in clutter_cubic_bezier · 4168ed09
      Neil Roberts authored
      The calculation for cubic bezier curves had an extra multiplication by
      3 which was causing the curve to go over 1.0 very quickly. This had
      the affect of making test-animation appear to complete much before the
      completed signal is emitted.
      4168ed09
  15. 18 Nov, 2008 2 commits
    • Emmanuele Bassi's avatar
      2008-11-18 Emmanuele Bassi <ebassi@linux.intel.com> · 34cc7fe2
      Emmanuele Bassi authored
      	* clutter/clutter-alpha.h:
      	* clutter/clutter-alpha.c:
      	(clutter_alpha_set_mode): Use a lookup table to find the alpha
      	function given the animation mode.
      
      	(clutter_exp_in_func),
      	(clutter_exp_out_func),
      	(clutter_exp_in_out_func): Add new exponential functions.
      
      	* clutter/clutter-script.c: Update the lookup table with the
      	new animation modes; match "linear" to the ramp-inc alpha
      	function.
      
      	* clutter/clutter-types.h: Add new AnimationMode values.
      
      	* tests/interactive/test-easing.c: Update the easing functions
      	test.
      34cc7fe2
    • Emmanuele Bassi's avatar
      2008-11-17 Emmanuele Bassi <ebassi@linux.intel.com> · 62844d5f
      Emmanuele Bassi authored
      	Bug 1014 - Clutter Animation API Improvements
      
      	* clutter/Makefile.am:
      	* clutter/clutter.h: Update the build
      
      	* clutter/clutter-types.h: Add AnimationMode, an enumeration
      	for easing functions.
      
      	* clutter/clutter-alpha.[ch]: Add the :mode property to
      	control the function bound to an Alpha instance using an
      	enumeration value. Also add six new alpha functions:
      
      		- ease-in, ease-out, ease-in-out
      		- sine-in, sine-out, sine-in-out
      
      	* clutter/clutter-deprecated.h: Deprecate the #defines for
      	the alpha functions. They will be replaced by entries in the
      	ClutterAnimationMode.
      
      	* clutter/clutter-interval.[ch]: Add ClutterInterval, an
      	object for defining, validating and computing an interval
      	between two values.
      
      	* clutter/clutter-animation.[ch]: Add ClutterAnimation, an
      	object responsible for animation the properties of a single
      	actor along an interval of values. ClutterAnimation memory
      	management is automatic. A simple wrapper method for
      	ClutterActor is provided:
      
      		clutter_actor_animate()
      
      	which will create, or update, an animation for the passed
      	actor.
      
      	* clutter/clutter-debug.h:
      	* clutter/clutter-main.c: Add a new 'animation' debug note.
      
      	* clutter/clutter-script.c: Clean up the alpha functions
      	whitelist, and add the new functions.
      
      	* doc/reference/clutter/Makefile.am:
      	* doc/reference/clutter/clutter-sections.txt: Update the
      	API reference.
      
      	* doc/reference/clutter/clutter-animation.xml: Renamed to
      	doc/reference/clutter/clutter-animation-tutorial.xml to
      	avoid clashes with the ClutterAnimation section.
      
      	* doc/reference/clutter/clutter-docs.sgml: Renamed to
      	doc/reference/clutter/clutter-docs.xml, as it was an XML
      	file and not a SGML file.
      
      	* tests/Makefile.am:
      	* tests/interactive/Makefile.am:
      	* tests/interactive/test-animation.c:
      	* tests/interactive/test-easing.c: Add two tests for the
      	new simple animation API and the easing functions.
      
      	* tests/interactive/test-actors.c:
      	* tests/interactive/test-behave.c:
      	* tests/interactive/test-depth.c:
      	* tests/interactive/test-effects.c:
      	* tests/interactive/test-layout.c:
      	* tests/interactive/test-multistage.c:
      	* tests/interactive/test-paint-wrapper.c:
      	* tests/interactive/test-rotate.c:
      	* tests/interactive/test-scale.c:
      	* tests/interactive/test-texture-quality.c:
      	* tests/interactive/test-threads.c:
      	* tests/interactive/test-viewport.c: Update interactive tests
      	to the deprecations and new alpha API.
      62844d5f
  16. 06 Nov, 2008 1 commit
  17. 30 Oct, 2008 1 commit
    • Emmanuele Bassi's avatar
      2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com> · 911b395c
      Emmanuele Bassi authored
      	Bug 1209 - Move fixed point API in COGL
      
      	* clutter/cogl/cogl-fixed.h:
      	* clutter/cogl/cogl.h.in:
      	* clutter/cogl/common/Makefile.am:
      	* clutter/cogl/common/cogl-fixed.c: Add fixed point API, modelled
      	after the ClutterFixed. The CoglFixed API supercedes the ClutterFixed
      	one and avoids the dependency of COGL on Clutter's own API.
      
      	* clutter/cogl/common/cogl-clip-stack.c:
      	* clutter/cogl/common/cogl-primitives.c:
      	* clutter/cogl/common/cogl-primitives.h: Update internal usage of
      	ClutterFixed to CoglFixed.
      
      	* clutter/cogl/gl/Makefile.am:
      	* clutter/cogl/gl/cogl-primitives.c:
      	* clutter/cogl/gl/cogl-texture.c:
      	* clutter/cogl/gl/cogl.c: Ditto, in the GL implementation of the
      	COGL API.
      
      	* clutter/cogl/gles/Makefile.am:
      	* clutter/cogl/gles/cogl-fbo.c:
      	* clutter/cogl/gles/cogl-gles2-wrapper.c:
      	* clutter/cogl/gles/cogl-primitives.c:
      	* clutter/cogl/gles/cogl-texture.c:
      	* clutter/cogl/gles/cogl.c: Ditto, in the GLES implementation of
      	the COGL API.
      
      	* clutter/pango/pangoclutter-glyph-cache.c:
      	* clutter/pango/pangoclutter-glyph-cache.h: Ditto, in the Pango
      	renderer glyphs cache.
      
      	* clutter/clutter-fixed.c:
      	* clutter/clutter-fixed.h: ClutterFixed and related API becomes
      	a simple transition API for bindings and public Clutter API.
      
      	* clutter/clutter-actor.c:
      	* clutter/clutter-alpha.c:
      	* clutter/clutter-backend.c:
      	* clutter/clutter-behaviour-depth.c:
      	* clutter/clutter-behaviour-ellipse.c:
      	* clutter/clutter-behaviour-path.c:
      	* clutter/clutter-behaviour-rotate.c:
      	* clutter/clutter-behaviour-scale.c:
      	* clutter/clutter-clone-texture.c:
      	* clutter/clutter-color.c:
      	* clutter/clutter-entry.c:
      	* clutter/clutter-stage.c:
      	* clutter/clutter-texture.c:
      	* clutter/clutter-timeline.c:
      	* clutter/clutter-units.h: Move from the internal usage of
      	ClutterFixed to CoglFixed.
      
      	* doc/reference/clutter/clutter-sections.txt:
      	* doc/reference/cogl/cogl-docs.sgml:
      	* doc/reference/cogl/cogl-sections.txt: Update the documentation.
      
      	* tests/test-cogl-tex-tile.c:
      	* tests/test-project.c: Fix tests after the API change
      
      	* README: Add release notes.
      911b395c
  18. 23 Sep, 2008 1 commit
    • Emmanuele Bassi's avatar
      2008-09-23 Emmanuele Bassi <ebassi@linux.intel.com> · 73adac98
      Emmanuele Bassi authored
      	* clutter/clutter-alpha.c:
      	(clutter_alpha_get_alpha): Do not return the cached value but
      	just compute the current alpha value. The use case is pretty
      	much straightforward: stop a timeline, advance it, and retrieve
      	the alpha value before starting the timeline to adjust an
      	animation dependent on the alpha. Caching the alpha value is
      	not needed because the behaviours will always pass the alpha
      	value inside the ::alpha-notify virtual function anyway, so
      	there is no need for them to call clutter_alpha_get_alpha().
      
      	This change makes it also possible to reliably unit-test
      	ClutterAlpha.
      
      	(timeline_new_frame_cb): Call clutter_alpha_get_alpha().
      73adac98
  19. 30 Jun, 2008 1 commit
    • Neil Roberts's avatar
      Bug 985 - MSC math.h / M_PI issue · 604990a5
      Neil Roberts authored
      	* clutter/cogl/gl/cogl.c (set_clip_plane): 
      	* clutter/clutter-alpha.c (sinc_func): Use G_PI instead of M_PI
      	because M_PI isn't defined in MSVC without a special
      	#define. Thanks to Haakon Sporsheim
      604990a5
  20. 18 Apr, 2008 1 commit
  21. 03 Apr, 2008 1 commit
  22. 26 Feb, 2008 1 commit
  23. 08 Feb, 2008 2 commits
    • Emmanuele Bassi's avatar
      2008-02-08 Emmanuele Bassi <ebassi@openedhand.com> · 9a05ab16
      Emmanuele Bassi authored
      	* clutter/clutter-actor.c: Reference the newly added event-flow.png
      
      	* clutter/clutter-alpha.c: Ditto, with alpha-func.png
      
      	* clutter/clutter-texture.c: Fix the XML.
      9a05ab16
    • Emmanuele Bassi's avatar
      2008-02-08 Emmanuele Bassi <ebassi@openedhand.com> · bcf968bc
      Emmanuele Bassi authored
      	* clutter/clutter-behaviour-path.c: Reference the newly
      	added image showing the effects of different alpha functions
      	on the same path behaviour.
      
      	* configure.ac: Find out the prefix of some of the libraries
      	we depend upon, so that gtk-doc can fix the references for us.
      bcf968bc
  24. 23 Nov, 2007 1 commit
    • Emmanuele Bassi's avatar
      2007-11-23 Emmanuele Bassi <ebassi@openedhand.com> · 07079204
      Emmanuele Bassi authored
      	* clutter/clutter-actor.c:
      	* clutter/clutter-alpha.c:
      	* clutter/clutter-effect.c:
      	* clutter/clutter-event.c:
      	* clutter/clutter-event.h:
      	* clutter/clutter-group.h:
      	* clutter/clutter-model.c:,
      	* clutter/clutter-script.c:
      	* clutter/clutter-scriptable.h:
      	* clutter/clutter-stage.c: Documentation fixes.
      
      	* clutter/clutter-score.c: Fix implementation.
      07079204
  25. 02 Oct, 2007 1 commit
    • Emmanuele Bassi's avatar
      2007-10-01 Emmanuele Bassi <ebassi@openedhand.com> · 4189c66a
      Emmanuele Bassi authored
      	* clutter/clutter-fixed.h: Add CLUTTER_FIXED_TO_INT() and
      	deprecate CLUTTER_FIXED_INT(), for symmetry with
      	CLUTTER_FIXED_FROM_INT().
      
      	* clutter/clutter-alpha.c:
      	* clutter/clutter-behaviour-depth.c:
      	* clutter/clutter-behaviour-ellipse.c:
      	* clutter/clutter-behaviour-path.c:
      	* clutter/clutter-fixed.h: Use CLUTTER_FIXED_TO_INT().
      4189c66a
  26. 15 Aug, 2007 1 commit
    • Emmanuele Bassi's avatar
      Fix for the smoothstep alpha function · 635b8497
      Emmanuele Bassi authored
      When computing the increasing smoothstep alpha value use the right type
      for the results, to avoid overflowing the [0, 0xffff] range of the alpha
      value.
      
      Also use the right format when printing out the opacity and alpha values
      in the opacity behaviour.
      635b8497
  27. 04 Jul, 2007 1 commit
  28. 12 Jun, 2007 1 commit
    • Matthew Allum's avatar
      2007-06-12 Matthew Allum <mallum@openedhand.com> · c2236bb7
      Matthew Allum authored
              * clutter/clutter-alpha.c:
              Remove stray g_debug.
      
              * clutter/clutter-behaviour-rotate.c:
              Register private class member.
      
              * clutter/clutter-behaviour.c:
              * clutter/clutter-behaviour.h:
              Add applied and removed signals.
      
              * Makefile.am:
              * configure.ac:
              * examples/Makefile.am:
              * examples/README:
              * examples/behave.c:
              * examples/slider.c:
              * examples/super-oh.c:
              * examples/test-entry.c:
              * examples/test-text.c:
              * examples/test.c:
              * tests/Makefile.am:
              Remove examples, moving applicable code into tests.
      c2236bb7
  29. 11 Jun, 2007 1 commit
  30. 30 May, 2007 1 commit