1
0
Fork 0
Commit graph

57 commits

Author SHA1 Message Date
Chris Kühl
d86dc377de Added documentation for alpha parameter in Behaviour constructors.
http://bugzilla.clutter-project.org/show_bug.cgi?id=2304

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2010-09-09 16:34:21 +01:00
Owen W. Taylor
f1c44a27a1 introspection: Add missing (out) annotations
Comprehensively add (out) annotations to functions parameters
returning int/float/double.

Not handled here: structure out returns like ClutterColor or
ClutterPerspective or GValue that should get (out caller-allocates).

Not handled here: Cogl

http://bugzilla.clutter-project.org/show_bug.cgi?id=2302
2010-09-08 15:43:07 +01:00
Neil Roberts
8d51617979 Conditionally use g_object_notify_by_pspec
This adds a wrapper macro to clutter-private that will use
g_object_notify_by_pspec if it's compiled against a version of GLib
that is sufficiently new. Otherwise it will notify by the property
name as before by extracting the name from the pspec. The objects can
then store a static array of GParamSpecs and notify using those as
suggested in the documentation for g_object_notify_by_pspec.

Note that the name of the variable used for storing the array of
GParamSpecs is obj_props instead of properties as used in the
documentation because some places in Clutter uses 'properties' as the
name of a local variable.

Mose of the classes in Clutter have been converted using the script in
the bug report. Some classes have not been modified even though the
script picked them up as described here:

json-generator:

 We probably don't want to modify the internal copy of JSON

behaviour-depth:
rectangle:
score:
stage-manager:

 These aren't using the separate GParamSpec* variable style.

blur-effect:
win32/device-manager:

 Don't actually define any properties even though it has the enum.

box-layout:
flow-layout:

  Have some per-child properties that don't work automatically with
  the script.

clutter-model:

  The script gets confused with ClutterModelIter

stage:

  Script gets confused because PROP_USER_RESIZE doesn't match
  "user-resizable"

test-layout:

  Don't really want to modify the tests

http://bugzilla.clutter-project.org/show_bug.cgi?id=2150
2010-08-10 17:12:06 +01:00
Emmanuele Bassi
fd27ca7398 Mark property strings for translation
Both the nick and the blurb fields should be translatable, for UI
builders and other introspection-based tools.
2010-07-15 14:07:07 +01:00
Emmanuele Bassi
8be43b5285 Add P_() macro for translating property strings
The P_() macro adds a context for the property nick and blurb. In order
to make xgettext recognize it, we need to drop glib-gettexize inside the
autogen.sh script and ship a modified Makefile.in.in with Clutter.
2010-07-15 12:09:01 +01:00
Emmanuele Bassi
79acb088e7 Remove mentions of the FSF address
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
2010-03-01 12:56:10 +00:00
Emmanuele Bassi
a79d6228aa Remove the last few fixed-point entry points
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.
2009-06-19 16:38:35 +01:00
Emmanuele Bassi
f1b237b2ec [docs] Remove ClutterFixed from the documentation
Now that ClutterFixed has finally gone the way of the Dodo, we
can safely remove it from the API reference as well.
2009-03-10 12:38:04 +00:00
Emmanuele Bassi
764dc3bac4 Move ClutterBehaviourEllipse to CoglFixed
Remove the wrong usage of ClutterFixed, and use CoglFixed instead
in the API and the implementation.
2009-03-10 12:38:03 +00:00
Emmanuele Bassi
cdb360107b Whitespace fixes for BehaviourEllipse
Simple fallout from the automated conversion scripts that
switched from ClutterFixed to float.
2009-01-24 14:32:10 +00:00
Emmanuele Bassi
792ffa1538 Merge branch 'float-alpha-value'
* float-alpha-value:
  [script] Parse easing modes by name
  [docs] Update the easing modes documentation
  [animation] Implement new easing functions
  [animation] Move the alpha value to floating point
2009-01-23 12:10:50 +00:00
Emmanuele Bassi
1876785d12 Fix the format for a floating point value
The debug annotation was still expecting an integer after
we switched the angle to float.
2009-01-22 11:46:23 +00:00
Emmanuele Bassi
7d7372af43 [animation] Move the alpha value to floating point
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.
2009-01-20 16:42:49 +00:00
Robert Bragg
a2cf7e4a19 [Automatic fixed-to-float.sh change] Applies a number fixed to float patches
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.
2009-01-20 16:20:54 +00:00
Robert Bragg
e82f656590 [Automatic fixed-to-float.sh change] Applies all scripted changes
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.
2009-01-20 16:20:54 +00:00
Emmanuele Bassi
b2f4363d95 Remove a double semi-colon typo
Fixes bug 1351 - Extra ; in clutter-behaviour-ellipse.c

Thanks to Haakon Sporsheim.
2008-12-13 11:53:03 +00:00
Neil Roberts
c81a0b3281 Bug 1323 - ClutterBehaviorDepth conflicts with other behaviors
* clutter/clutter-behaviour-ellipse.c (actor_apply_knot_foreach):
	Don't set the depth if there is no x or y tilt. That way it can
	still be used in conjunction with ClutterBehaviourDepth. Thanks to
	Tonny Tzeng.
2008-12-10 11:27:14 +00:00
Emmanuele Bassi
bb6751b84b 2008-11-13 Emmanuele Bassi <ebassi@linux.intel.com>
* clutter/clutter-behaviour-ellipse.c:
	(clutter_behaviour_ellipse_applied): Do not reset the depth
	of the actors to which the Ellipse behaviour has been applied
	to, unless the behaviour is going to update it because it has
	a tilt on the X or Y axis.
2008-11-13 10:54:06 +00:00
Emmanuele Bassi
911b395c8a 2008-10-30 Emmanuele Bassi <ebassi@linux.intel.com>
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.
2008-10-30 16:37:55 +00:00
Tomas Frydrych
967710c836 2007-12-17 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
	* clutter/clutter-behaviour-rotate.c:
	Clamping of start and end angles to <0, 360).
2007-12-17 17:16:49 +00:00
Emmanuele Bassi
b4bc9f8320 2007-12-10 Emmanuele Bassi,,, <ebassi@sprite>
* clutter/clutter-behaviour-ellipse.c:
	(clutter_behaviour_ellipse_get_angle_tilt),
	(clutter_behaviour_ellipse_get_angle_tiltx),
	(clutter_behaviour_ellipse_set_tilt): Fix a double conversion
	that was messing up the returned results. (#665)
2007-12-10 12:00:08 +00:00
Emmanuele Bassi
bd355346de 2007-12-09 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.c: Document the values for full
	transparency and full opacity in the set_opacity()
	method. (#662)

	* clutter/clutter-behaviour-ellipse.c: Improve consistency
	in the apidoc.
2007-12-09 08:47:11 +00:00
Tomas Frydrych
a4234ab4cf 2007-12-07 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
	(clutter_behaviour_ellipse_set_angle_start):
	(clutter_behaviour_ellipse_set_angle_end):
	(clutter_behaviour_ellipse_set_angle_tilt):
	(clutter_behaviour_ellipse_set_tilt):
	Removed strayed degree -> ClutterAngle conversions left over from
	API changes.

	(clutter_behaviour_ellipse_set_angle_tiltx):
	Removed stray printf.
2007-12-07 11:00:01 +00:00
Tomas Frydrych
57d523c276 2007-12-07 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
	Fixed tilt setters and getters.
2007-12-07 07:48:57 +00:00
Tomas Frydrych
55d53acc8f 2007-11-27 Tomas Frydrych <tf@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
        * clutter/clutter-behaviour-ellipse.h:
	(clutter_behaviour_ellipse_get_angle_startx):
	(clutter_behaviour_ellipse_set_angle_startx):
	(clutter_behaviour_ellipse_get_angle_endx):
	(clutter_behaviour_ellipse_set_angle_endx):
	(clutter_behaviour_ellipse_get_angle_tiltx):
	(clutter_behaviour_ellipse_set_angle_tiltx):
	Changed to take and return angles in degrees represented as
	ClutterFixed.
2007-11-27 12:34:28 +00:00
Emmanuele Bassi
531be399b7 2007-11-19 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-bspline.c:
	* clutter/clutter-behaviour-depth.c:
	* clutter/clutter-behaviour-ellipse.c:
	* clutter/clutter-behaviour-opacity.c:
	* clutter/clutter-behaviour-path.c:
	* clutter/clutter-behaviour-rotate.c:
	* clutter/clutter-behaviour-scale.c: Fix gtk-doc short description.
2007-11-19 16:35:46 +00:00
Øyvind Kolås
0dee5eaac3 Renamed all properties of behaviours (and related
functions/variables/parameters)
to match the pattern something-start, something-end. Fixes bug #577.
* clutter/clutter-behaviour-depth.c:
* clutter/clutter-behaviour-depth.h:
* clutter/clutter-behaviour-ellipse.c:
* clutter/clutter-behaviour-ellipse.h:
* clutter/clutter-behaviour-path.c: 
* clutter/clutter-behaviour-rotate.c:
* clutter/clutter-behaviour-rotate.h:
* clutter/clutter-behaviour-scale.c:
* clutter/clutter-behaviour-scale.h:
* clutter/clutter-effect.c: 
* clutter/clutter-effect.h:
* clutter/clutter-script.c:
* tests/test-depth.c: 
* tests/test-script.c:
2007-11-13 13:21:56 +00:00
Emmanuele Bassi
4189c66a21 2007-10-01 Emmanuele Bassi <ebassi@openedhand.com>
* 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().
2007-10-02 14:53:32 +00:00
Tomas Frydrych
a40f50fffa Fixed CCW rotation in rotate behaviour (bug 483); fixed overall path length calculation for angles > 360 in rotate and ellipse. 2007-08-22 10:33:26 +00:00
Emmanuele Bassi
5bf83b3f0a 2007-08-08 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-ellipse:
	(clutter_behaviour_ellipse_get_tiltx): Remove useless
	"Return" in the API documentation.
2007-08-08 23:23:18 +00:00
Emmanuele Bassi
f57edd70d3 Even more documentation fixes 2007-08-07 14:03:58 +00:00
Matthew Allum
3a8cc2226b 2007-08-07 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
        Add a documentation note regarding ellipse setting
        the applied actors position.
2007-08-07 12:17:15 +00:00
Emmanuele Bassi
f32dca44e2 2007-08-03 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
	(clutter_behaviour_ellipse_get_angle_tilt): Avoid recursion
	by fixing a typo.

	(clutter_behaviour_ellipse_get_angle_begin),
	(clutter_behaviour_ellipse_get_angle_end): Correct the angles
	here too.

2007-08-03  Emmanuele Bassi  <ebassi@openedhand.com>
2007-08-03 15:40:11 +00:00
Emmanuele Bassi
ac5ca04fa5 2007-08-03 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
	(clutter_behaviour_ellipse_get_property): Do not forget to
	correct the angles when returning them.
2007-08-03 15:18:43 +00:00
Tomas Frydrych
b368f1833a added direction paramenter to clutter_behaviour_ellipse_new (), made direction to be respected, unclamped angle values 2007-08-03 09:52:52 +00:00
Tomas Frydrych
936fea0b37 Fixed invalid assumption about z cooordiance in calculation of
tilt in y axis.
2007-07-30 16:09:40 +00:00
Emmanuele Bassi
0d287fc4d4 2007-07-29 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-ellipse.c: Documentation
	fixes; kill some indirections; freeze the notification
	queue when (potentially) emitting multiple notify
	signals.

	* clutter/clutter-alpha.h: Remove the unused macro
	CLUTTER_TYPE_SMOOTHSTEP.
2007-07-29 08:54:24 +00:00
Emmanuele Bassi
ad64200aa7 2007-07-28 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Use GInitiallyUnowned
	as the parent structure in the ClutterActor structure
	definition; somehow, this has escaped everyone attention
	in one year and a half. Luckily, GInitiallyUnowned is
	as big as GObject.
	 
	 (clutter_actor_get_abs_position_units),
	 (clutter_actor_get_abs_position): Check parameters.

	 * clutter/clutter-texture.h: Unmangle the flags enum
	 type declaration, so that dumb parsers like h2defs.py
	 are not fooled.

	 * clutter/clutter-behaviour-ellipse.[ch]:
	 * clutter/clutter-effect.c: Fix some documentation
	 issues and make gtk-doc happy.
2007-07-28 17:11:39 +00:00
Tomas Frydrych
aed6a0cbe2 pruned ClutterBehaviourEllipse api 2007-07-27 13:44:42 +00:00
Tomas Frydrych
e17173edb4 ClutterBehaviourEllipse: allow tilt in all three axis 2007-07-27 08:18:41 +00:00
Emmanuele Bassi
5724178685 Miscellaneous fixes to make gtk-doc scanner happy 2007-07-26 15:14:45 +00:00
Tomas Frydrych
de27074b48 cleanup some trailing whitespace 2007-07-26 13:48:58 +00:00
Tomas Frydrych
43854a3e0a fixed ClutterBehaviourEllipse angle setters; updated ChangeLog 2007-07-26 13:48:50 +00:00
Tomas Frydrych
f1b27d9e1b added direction property to ClutterBehaviourEllipse 2007-07-26 13:48:44 +00:00
Emmanuele Bassi
049f2feedc 2007-07-22 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-behaviour-ellipse.c: Remove pointer indirections;
	add sanity checks on the public entry points; make all the public
	properties floating point (where needed) andconvert them to fixed
	point internally. (Partial fix for #389)
2007-07-22 22:35:45 +00:00
Tomas Frydrych
f605136c39 improvements to ClutterBehaviourEllipse 2007-07-11 07:16:21 +00:00
Tomas Frydrych
e1a8434d64 Documentation updates 2007-06-01 10:00:35 +00:00
Tomas Frydrych
7ada1c0ae0 Changed behaviour so that a beginning angle of 0 would correspond to 12 o'clock 2007-05-31 10:11:06 +00:00
Tomas Frydrych
733de46f3b Fixed ellipse behaviour for negative angles; fixed double to int conversion for negative numbers; fixed CLUTTER_ANGLE_FROM_DEGX; added ClutterVertices and clutter_actor_get_transformed_vertices() 2007-05-31 09:29:12 +00:00
Matthew Allum
8310a87bfc 2007-05-31 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-behaviour-ellipse.c:
        Remove uneeded knot signal

        * clutter/clutter-behaviour-path.c:
        Fix so knot signal is emitted only when a knot is reached.

        * clutter/clutter-effect.c:
        * clutter/clutter-effect.h:
        Add a scale effect.

        * configure.ac:
        * doc/manual/Makefile.am:
        * doc/manual/clutter-manual.xml.in:
        * doc/manual/manual.xsl:
        * doc/manual/style.css:
        Add various bits for application developers manual.
2007-05-30 23:16:58 +00:00