1
0
Fork 0
Commit graph

205 commits

Author SHA1 Message Date
Emmanuele Bassi
755896664f [layout] Set a back pointer to Box inside the layout
Use the LayoutManager API to set a back pointer to the Box actor
inside the LayoutManager used by the box.

This also allows us to replace the LayoutManager on a Box, since
the LayoutManager will be able to replace all the metadata if
needed.
2009-10-14 11:31:29 +01:00
Emmanuele Bassi
9117ee2056 [layout] Allow taking a back pointer to the Container
The LayoutManager implementation might opt to take a back pointer
to the Container that is using the layout instance; this allows
direct access to the container itself from within the implementation.
2009-10-14 11:31:29 +01:00
Emmanuele Bassi
f58bdbad15 [layout] Rename Box::add to Box::pack
Since ClutterBox is a ClutterContainer we should avoid naming
collisions between methods.
2009-10-14 11:31:29 +01:00
Emmanuele Bassi
aaae60e178 [layout] Implement ClutterBox::add
The ClutterBox::add method is a simple wrapper around the Container
add_actor() method and the LayoutManager layout properties API. It
allows adding an actor to a Box and setting the layout properties in
one call.

If the LayoutManager used by the Box does not support layout properties
then the add() method short-circuits out.

Along with the varargs version of the method there's also a vector-based
variant, for language bindings to use.
2009-10-14 11:31:29 +01:00
Emmanuele Bassi
a2086f1178 [layout] Add LayoutMeta
Instead of overloading ClutterChildMeta with both container and layout
metadata and delegate to every LayoutManager implementation to keep a
backpointer to the layout manager instance, we can simply subclass
ChildMeta into LayoutMeta and presto! everything works out pretty well
for everyone.
2009-10-14 11:31:26 +01:00
Emmanuele Bassi
899db6f226 [layout, docs] Add layout managers sections
Add LayoutManager and its subclasses, and the Box actor to the
gtk-doc machinery needed to generate the API reference.
2009-10-14 11:30:43 +01:00
Emmanuele Bassi
0e33c10048 docs: Allow XInclude fallback for the annotation glossary 2009-10-14 09:07:11 +01:00
Emmanuele Bassi
a99f693c85 docs: Make StageManager a public class
The StageManager API is useful to track the stages of an application.
It will also be useful when we land the modules API.
2009-10-14 09:07:11 +01:00
Damien Lespiau
8605073edb [units] Add support for centimeters
The only tricky part of the patch is to remember that 1cm is 10mm.

Reviewed-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-10-07 16:06:26 +01:00
Emmanuele Bassi
6ddffac935 [docs] Update the "Subclassing Actor" chapter
The chapter on how to subclass ClutterActor inside the API reference for
Clutter is still using ClutterUnit and referencing to concepts that have
been changed since the document was written.
2009-09-27 11:39:25 +01:00
Emmanuele Bassi
c5195dda15 [docs] Add fixxref for Cairo symbols
Let gtk-doc resolve the Cairo types and symbols to the installed
Cairo documentation.
2009-09-09 16:15:54 +01:00
Emmanuele Bassi
f4e272ee9b [docs] Add a Path migration guide
ClutterBehaviourPath has been changed and ClutterBehaviourBspline has
been removed; now we use ClutterPath everywhere we need to describe a
path. This warrants a chapter in the migration guide.
2009-09-09 16:01:07 +01:00
Emmanuele Bassi
7783635af3 [docs] Add more collateral documentation
* Add the main Glossary for Clutter terms

* Add the annotation glossary, as generated by gtk-doc

* Add the objects index and tree
2009-09-03 16:51:14 +01:00
Emmanuele Bassi
d8d344f529 [docs] Add Interval get_type function
The get_type() function for ClutterInterval is missing from the
known GObject types, so gtk-doc doesn't know that it has to
introspect it for hierarchy, properties and signals.
2009-08-25 12:39:40 +01:00
Emmanuele Bassi
899f051cd9 [animation] Add Animation::update()
Currently, to update a property inside an animation you have to
get the interval for that property and then call the set_final_value()
method.

We can provide a simpler, bind()-like method for the convenience of
the developers that just validates everything and then calls the
Interval.set_final_value().
2009-08-25 12:16:41 +01:00
Emmanuele Bassi
6e1f9ad9b6 [docs] Remove the version number from the title
The version number in the title made sense when we were breaking
API with every minor release. Now that we're API stable we can
drop that and make the output in Devhelp and on the website slightly
more good looking.
2009-08-13 16:15:04 +01:00
Emmanuele Bassi
7963254c23 [docs] Close a tag 2009-08-04 11:39:09 +01:00
Joshua Lock
abdcf4debb [docs] Update building instructions for OS X
Recommend OS X users install the dependencies using MacPorts and build
Clutter themselves.

Signed-off-by: Emmanuele Bassi <ebassi@linux.intel.com>
2009-07-31 10:28:50 +01:00
Emmanuele Bassi
a5d6b23308 [units] Add binding-friendly initializers
We should follow the convention for boxed types initializers of:

  <type_name>_from_<another_type> (boxed, value)

For ClutterUnits as well; so:

  clutter_units_pixels -> clutter_units_from_pixels
  clutter_units_em     -> clutter_units_from_em
  ...

We should still keep the short-hand version as a macro, though.
2009-07-28 13:46:11 +01:00
Emmanuele Bassi
76140c5f52 [build] Use API_VERSION, not MAJORMINOR
The correct macro for Clutter's API version is CLUTTER_API_VERSION,
not CLUTTER_MAJORMINOR anymore.
2009-07-28 11:42:58 +01:00
Emmanuele Bassi
29d8d60487 [docs] Fix wrong XML elements 2009-07-21 16:35:50 +01:00
Emmanuele Bassi
2e38730eb1 [docs] Update the Actor subclassing documentation
Mention map/unmap and fix the examples code.

Update the Container virtual functions.
2009-07-21 14:13:31 +01:00
Emmanuele Bassi
ed005685c9 [docs] Update the "creating new behaviours" chapter
The signature of the ::alpha_notify virtual function has been
changed with the switch to float ClutterAlpha.
2009-07-21 11:51:20 +01:00
Emmanuele Bassi
c87fea6cf1 [docs] Update the building instructions
New configure script command line switches have been added since
the last time we updated the documentation.
2009-07-21 11:50:08 +01:00
Emmanuele Bassi
78773ab6fe [docs] Update the animations tutorial
Bring the Animation framework introduction/tutorial up to the 1.0
API for timelines and animations.
2009-07-21 11:29:52 +01:00
Emmanuele Bassi
605927db5b [docs] Fix typo in the effects migration guide
Fixes bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1706
2009-07-21 09:20:16 +01:00
Emmanuele Bassi
b1d98c25f4 [doc] Miscellaneous documentation fixes
Remove private symbols, and add missing public ones.
2009-07-20 12:49:35 +01:00
Emmanuele Bassi
56ef6727b5 Allow disabling motion event throttling
It might be desirable for some applications and/or platforms to get
every motion event that was delivered to Clutter from the windowing
backend. By adding a per-stage flag we can bypass the throttling
done when processing the events.

  http://bugzilla.openedhand.com/show_bug.cgi?id=1665
2009-07-20 11:44:52 +01:00
Emmanuele Bassi
af5e432ba9 [actor] Allow querying whether we are painted by a Clone
It would be useful inside a custom actor's paint function to be able to
tell if this is a primary paint call, or if we are in fact painting on
behalf of a clone.

In Mutter we have an optimization not to paint occluded windows; this is
desirable for the windows per se, to conserve bandwith to the card, but
if something like an application switcher is using clones of these windows,
they will not get painted either; currently we have no way of
differentiating between the two.

Fixes bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1685
2009-07-13 16:18:27 +01:00
Emmanuele Bassi
37bd35f592 [actor] Allow changing the transformations matrix
Currently, the transformation matrix for an actor is constructed
from scenegraph-related accessors. An actor, though, can call COGL
API to add new transformations inside the paint() implementation,
for instance:

  static void
  my_foo_paint (ClutterActor *a)
  {
    ...
    cogl_translate (-scroll_x, -scroll_y, 0);
    ...
  }

Unfortunately these transformations will be completely ignored by
the scenegraph machinery; for instance, getting the actor-relative
coordinates from event coordinates is going to break badly because
of this.

In order to make the scenegraph aware of the potential of additional
transformations, we need a ::apply_transform() virtual function. This
vfunc will pass a CoglMatrix which can be used to apply additional
operations:

  static void
  my_foo_apply_transform (ClutterActor *a, CoglMatrix *m)
  {
    CLUTTER_ACTOR_CLASS (my_foo_parent_class)->apply_transform (a, m);
    ...
    cogl_matrix_translate (m, -scroll_x, -scroll_y, 0);
    ...
  }

The ::paint() implementation will be called with the actor already
using the newly applied transformation matrix, as expected:

  static void
  my_foo_paint (ClutterActor *a)
  {
    ...
  }

The ::apply_transform() implementations *must* chain up, so that the
various transformations of each class are preserved. The default
implementation inside ClutterActor applies all the transformations
defined by the scenegraph-related accessors.

Actors performing transformations inside the paint() function will
continue to work as previously.
2009-07-01 15:30:21 +01:00
Emmanuele Bassi
81bc2b4cc7 [actor] Remove unused clutter_actor_pick()
The clutter_actor_pick() function just emits the ::pick signal
on the actor. Nobody should be using it, since the paint() method
is already context sensitive and will result in a ::pick emission
by itself. The clutter_actor_pick() is just confusing things.
2009-06-29 17:01:10 +01:00
Emmanuele Bassi
9e84e52034 [docs] Update after the Input API changes 2009-06-25 14:54:16 +01:00
Emmanuele Bassi
537ccc3cd9 [docs] Add an initial porting guide
The Clutter API reference should have a section on how to port
applications from older version of Clutter to the new API.

The first guide deals on how to port animations created with
ClutterEffect to clutter_actor_animate().
2009-06-25 14:54:16 +01:00
Emmanuele Bassi
3d49edad85 [docs] Add new input-related accessors
Add the ClutterEvent accessors for the device pointer and type, and
the ClutterInputDevice accessors for the id and type.
2009-06-19 18:07:34 +01: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
4bed539b21 Add more ActorBox utility methods
ActorBox should have methods for easily extracting the X and Y
coordinates of the origin, and the width and height separately.

These methods will make it easier for high-level language bindings
to manipulate ActorBox instances and avoid the Geometry type.
2009-06-16 16:43:00 +01:00
Emmanuele Bassi
275f292ab9 Add accessors for the boxed types
The Vertex and ActorBox boxed types are meant to be used across
the API, but are fairly difficult to bind. Their memory management
is also unclear, and has to go through the indirection of
g_boxed_copy() and g_boxed_free().
2009-06-16 16:42:59 +01:00
Emmanuele Bassi
61c45da90a Bug 1637 - Master clock improvements
Merge branch 'master-clock-updates'

* master-clock-updates: (22 commits)
  Change the paint forcing on the Text cache text
  [timelines] Improve marker hit check and don't fudge the delta
  Revert "[timeline] Don't clamp the elapsed time when a looping tl reaches the end"
  [tests] Don't add a newline to the end of g_test_message calls
  [test-timeline] Add a marker at the beginning of the timeline
  [timeline] Don't clamp the elapsed time when a looping tl reaches the end
  [master-clock] Throttle if no redraw was performed
  [docs] Update Clutter's API reference
  Force a paint instead of calling clutter_redraw()
  Fix clutter_redraw() to match the redraw cycle
  Run the repaint functions inside the redraw cycle
  Remove useless manual timeline ticking
  Move elapsed-time calculations into ClutterTimeline
  Limit the frame rate when not syncing to VBLANK
  Decrease the main-loop priority of the frame cycle
  Avoid motion-compression in test-picking test
  Compress events as part of the frame cycle
  Remove stage update idle and do updates from the master clock
  Call g_main_context_wakeup() when we start running timelines
  Remove unused msecs_delta member
  ...
2009-06-11 13:01:34 +01:00
Emmanuele Bassi
7c08f554bc [docs] Update Clutter's API reference 2009-06-10 14:54:19 +01:00
Emmanuele Bassi
92a7e23ec1 [build] Use top_srcdir instead of relative paths 2009-06-10 14:24:33 +01:00
Emmanuele Bassi
e1cac4fece Fix clutter_redraw() to match the redraw cycle
The clutter_redraw() function is used by embedding toolkits to
force a redraw on a stage. Since everything is performed by
toggling a flag inside the Stage itself and then letting the
master clock advance, we need a ClutterStage method to ensure
that we start the master clock and redraw.
2009-06-09 16:29:29 +01:00
Emmanuele Bassi
19c2e66398 [docs] Various gtk-docs fixes 2009-06-09 14:47:36 +01:00
Emmanuele Bassi
33f5fe73b3 [stage] Rename fullscreen methods
The clutter_stage_fullscreen() and clutter_stage_unfullscreen() are
a GDK-ism. The underlying implementation is already using an accessor
with a boolean parameter.

This should take the amount of collisions between properties, methods
and signals to zero.
2009-06-09 14:07:35 +01:00
Emmanuele Bassi
41e85f3073 introspection-friendly ClutterEvent accessors
ClutterEvent is not really gobject-introspection friendly because
of the whole discriminated union thing. In particular, if you get
a ClutterEvent in a signal handler, you probably can't access the
event-type-specific fields, and you probably can't call methods
like clutter_key_event_symbol() either, because you can't cast the
ClutterEvent to a ClutterKeyEvent.

The cleanest solution is to turn every accessor into ClutterEvent
methods, accepting a ClutterEvent* and internally checking the event
type.

Fixes bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1585
2009-06-08 12:05:20 +01:00
Neil Roberts
3ee093e356 Merge branch 'timeline-no-fps' into 1.0-integration 2009-06-05 12:20:41 +01:00
Emmanuele Bassi
0d5e17ecd1 [units] Rework Units into logical distance value
Units as they have been implemented since Clutter 0.4 have always been
misdefined as "logical distance unit", while they were just pixels with
fractionary bits.

Units should be reworked to be opaque structures to hold a value and
its unit type, that can be then converted into pixels when Clutter needs
to paint or compute size requisitions and perform allocations.

The previous API should be completely removed to avoid collisions, and
a new type:

        ClutterUnits

should be added; the ability to install GObject properties using
ClutterUnits should be maintained.
2009-06-04 16:30:31 +01:00
Neil Roberts
9c7afe0c5b [timeline] Remove the concept of frames from timelines
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.
2009-06-04 13:21:57 +01:00
Emmanuele Bassi
ffd5fb172b [docs] Rework the API reference version generation
Clutter copies the gtk-doc from the usual gtk+ template, and
has a version.xml.in containing only:

  @VERSION@

Without a newline at the end. Unfortunately, it appears that
autoconf has started adding a newline to the generated version.xml
which then is used as the payload for the "version" XML entity.

Instead of using a secondary file we can make configure generate
the whole clutter-docs.xml and cogl-docs.xml files from a template;
this way we also get the ability to substitute more autoconf variables
into the documentation -- if needs be.
2009-06-01 17:40:23 +01:00
Emmanuele Bassi
4afe1e9a8b [actor] Add allocate_available_size()
The allocate_available_size() method is a convenience method in
the same spirit as allocate_preferred_size(). While the latter
will allocate the preferred size of an actor regardless of the
available size provided by the actor's parent -- and thus it's
suitable for simple fixed layout managers like ClutterGroup -- the
former will take into account the available size provided by the
parent and never allocate more than that; it is, thus, suitable
for simple fluid layout managers.
2009-05-29 17:53:19 +01:00
Emmanuele Bassi
7b75f93db1 [docs] Fixes for the API reference
* Add unused symbols

* Document and sync argument names with their gtk-doc counterpart

* Add missing descriptions
2009-05-28 17:18:13 +01:00
Emmanuele Bassi
f8f54989be Merge commit 'origin/master' into 1.0-integration
Conflicts:
	clutter/clutter-texture.c
	clutter/cogl/gl/cogl-fbo.c
2009-05-20 16:49:22 +01:00
Emmanuele Bassi
407ac5075f [texture] Add missing accessors
ClutterTexture has many properties that can only be accessed using
the GObject API. This is fairly inefficient and makes binding the
class overly complicated.

The Texture class should have accessor methods for all its properties,
properly documented.
2009-05-19 13:24:56 +01:00
Emmanuele Bassi
21e3901d62 [text] Expose position_to_coords()
The clutter_text_position_to_coords() is useful for ClutterText
subclasses.

See bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1521

Based on a patch by: Raymond Liu <raymond.liu@intel.com>
2009-05-14 16:19:15 +01:00
Emmanuele Bassi
ca23838752 [text] Add ClutterText::delete_selection()
Add a method for deleting the current selection inside a Text actor.

This is useful for subclasses.

See bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1521

Based on a patch by: Raymond Liu <raymond.liu@intel.com>
2009-05-14 16:16:06 +01:00
Emmanuele Bassi
0f7a3b9739 [docs] Add Animation get_type() function
We need to reference clutter_animation_get_type() if we want the
properties, signals and object hierarchy to show up in the API
reference
2009-05-14 16:11:47 +01:00
Emmanuele Bassi
4cb3fa8728 [docs] Update documentation
Remove the units-based API and add the missing symbols.

Also, do not let gtk-doc check the master clock header, since
it's private.
2009-05-06 17:57:34 +01:00
Emmanuele Bassi
d0ad5a8abb [text] Expose position_to_coords()
The clutter_text_position_to_coords() is useful for ClutterText
subclasses.

See bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1521

Based on a patch by: Raymond Liu <raymond.liu@intel.com>
2009-05-06 17:18:12 +01:00
Emmanuele Bassi
a28b9f31eb [text] Add ClutterText::delete_selection()
Add a method for deleting the current selection inside a Text actor.

This is useful for subclasses.

See bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1521

Based on a patch by: Raymond Liu <raymond.liu@intel.com>
2009-05-06 17:13:33 +01:00
Emmanuele Bassi
c2abdd5e82 [docs] Add Animation get_type() function
We need to reference clutter_animation_get_type() if we want the
properties, signals and object hierarchy to show up in the API
reference
2009-05-06 16:43:52 +01:00
Emmanuele Bassi
d2cd636fb6 [docs] Add ClutterModel::get_filter_set() 2009-04-29 15:40:13 +01:00
Emmanuele Bassi
08ba42a5ab Allow passing the pick mode to get_actor_at_pos()
Bug 1513 - Allow passing in ClutterPickMode to
           clutter_stage_get_actor_at_pos()

At the moment, clutter_stage_get_actor_at_pos() uses CLUTTER_PICK_ALL
internally to find an actor. It would be useful to allow passing in
ClutterPickMode to clutter_stage_get_actor_at_pos(), so that the caller
can specify CLUTTER_PICK_REACTIVE as a criteria.
2009-04-24 15:25:58 +01:00
Neil Roberts
1edc19d1d3 [clutter-text] Add a separate property for the selection color
Adds a new property so that the selection color can be different from
the cursor color. If no selection color is specified it will use the
cursor color as before. If no cursor color is specified either it will
use the text color.
2009-04-06 15:22:31 +01:00
Emmanuele Bassi
bd8d3f6bd8 [group] Remove long deprecated API
ClutterGroup still ships with API deprecated since 0.4. We did
promise to keep it around for a minor release cycle -- not for 3.

Since we plan on shipping 1.0 without the extra baggage of the
deprecated entry points, here's the chance to remove the accumulated
cruft.

All the removed methods and signals have a ClutterContainer
counterpart.
2009-04-03 12:47:21 +01:00
Emmanuele Bassi
9d0ce68c2f [shader] Remove deprecated set_uniform_1f()
Since we're planning to release 1.0 without any of the deprecated
API baggage, we can simply remove the set_uniform_1f() method from
ClutterShader public API and add it to the deprecated header.
2009-04-03 12:47:21 +01:00
Emmanuele Bassi
6114c6c1db [docs] Pick up backend-specific API
The various backend API outside from clutter-x11.h and clutter-win32.h
is documented but not picked up by gtk-doc.
2009-03-18 17:06:56 +00:00
Emmanuele Bassi
e7c5b15e60 [docs] Ignore the TimeoutInterval internal API
The TimeoutInterval API is internal, and thus should not be part
of the API reference.
2009-03-16 16:56:51 +00:00
Emmanuele Bassi
9229fb6114 [docs] Bring down the undocumented symbols to 2%
The usual pre-release documentation blitzing. Most of the remaining
symbols are either COGL or X11 specific, or dummy interface typedefs.
2009-03-16 15:00:55 +00:00
Emmanuele Bassi
216373047b [animation] Enhance consistency of the Animation API
The Animation API should follow this pattern:

  - functions with an Interval as part of the arguments should have
    "interval" inside their name, e.g.:

      clutter_animation_bind_interval
      clutter_animation_update_interval

  - functions dealing with property names should have "property"
    inside their name, e.g.:

      clutter_animation_has_property
      clutter_animation_unbind_property

    - unless -

  - functions dealing with a property and its value should not
    have any modifier, e.g.:

      clutter_animation_bind

The change from update_property() to update_interval() frees up
clutter_animation_update(), to be added at a later date.
2009-03-16 14:16:18 +00:00
Emmanuele Bassi
bb795dec56 [docs] Update after Animation API changes
Rename the bind/unbind_property functions, and add the bind_interval,
completed method.

Also, add clutter_actor_get_animation().
2009-03-16 14:02:09 +00:00
Emmanuele Bassi
89e3e3a4cc [animation] Add vector variants for ::animate()
Bug 1438 - Implicit Animation API could use animatev variants

The clutter_actor_animate* family of functions use va_lists to
handle the property/value pairs for the final state of the
animation.

Language bindings have problems with variadic arguments functions,
and usually prefer vector-based API which allow a greater level
of control and conversion from native data types.

For each variadic arguments function in the clutter_actor_animate*
family there should be a vector-based version that takes:

  - the number of property/value pairs
  - a constant array of constant strings
  - an array of GValues

Most of the internal implementation can be refactored from the
current one, thus both the var_args and the vector entry points
share a common implementation of the code; then, both versions
of the API are just loops over a list of arguments.

Based on a patch by: Robert Carr <carrr@rpi.edu>
2009-03-10 12:38:04 +00:00
Emmanuele Bassi
c46106f6dd [docs] Update API reference
The API reference was still listing some symbols that have been
removed.
2009-03-10 12:38:04 +00: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
7d674db9d2 Clean up of the ClutterColor API
The ClutterColor API has some inconsistencies:

  - the string deserialization function does not match the rest of
    the conversion function naming policy; the naming should be:

        clutter_color_parse()   ->      clutter_color_from_string()

    and the first parameter should be the ClutterColor that will
    be set from the string, not the string itself (a GDK-ism).

  - the fixed point API should not be exposed, especially in the
    form of ClutterFixed values

  - the non-fixed point HLS conversion functions do not make any
    sense. The values returned should be:

      hue        := range [ 0, 360 ]
      luminance  := range [ 0,   1 ]
      saturation := range [ 0,   1 ]

    like the current fixed point API does. Returning a value in
    the [ 0, 255 ] range is completely useless

  - the clutter_color_equal() should be converted for its use inside
    a GHashTable; a clutter_color_hash() should be added as well

  - the second parameter of the clutter_color_shade() function should
    be the shading factor, not the result (another GDK-ism). this way
    the function call can be translated from this:

      color.shade(out result, factor)

    to the more natural:

      color.shade(factor, out result)

This somewhat large commit fixes all these issues and updates the
internal users of the API.
2009-03-10 12:38:02 +00:00
Emmanuele Bassi
0bc1f36ead [docs] Document envvars and command line switches
Clutter uses checks on various environment variables and installs
various command line switches. The API reference should list them
and document them both.
2009-02-23 13:44:03 +00:00
Emmanuele Bassi
255faf602f [docs] Add the 1.0 symbols index
Add the index of symbols available since 1.0 to the Clutter
API reference.
2009-02-20 12:00:41 +00:00
Emmanuele Bassi
6b2c8f68e0 [docs] Use the --name-space option
Now that we depend on gtk-doc 1.11 we can use the --name-space
command line option for the mkdb utility.
2009-02-20 11:58:04 +00:00
Emmanuele Bassi
ef7df4b736 [docs] Update the sections file
The newly added symbols should also be added to the section file.

The CairoTexture section was referenced twice.
2009-02-19 15:01:33 +00:00
Emmanuele Bassi
9cf02bfdb9 [text] Rename :alignment to :line-alignment
The :alignment property is prone to generate confusion: developers
will set it thinking that the contents of a ClutterText will
automagically align themselves.

Instead of using the generic term :alignment, and following the
GTK+ convention, we should use a more specific term, conveying the
actual effect of the property: alignment of the lines with respect
to each other, and not to the overall allocated area.

See bug 1428:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1428
2009-02-05 19:54:48 +00:00
Emmanuele Bassi
b053d51321 [docs] Add clutter_text_set_markup()
The clutter_text_set_markup() has been added to the public API, and
should be listed in the ClutterText section of the API reference.
2009-02-02 12:07:29 +00:00
Emmanuele Bassi
801e535e94 Add Actor::create_pango_layout()
Final bit of integration between ClutterActor and Pango: a simple
method for creating a PangoLayout, pre-filled with text and ready
to be rendered using cogl_pango_render_layout().

This should make writing new Actors rendering custom text in their
paint() implementation easy and reliable.
2009-02-02 12:07:28 +00:00
Emmanuele Bassi
0530405899 [clutter-docs] Update the animation tutorial
The Alpha API and usage has been changed by the recent overhaul
of the ClutterAlpha class; hence, we need to update the relative
documentation in the animation tutorial.
2009-01-28 16:47:41 +00:00
Neil Roberts
3e68b23ea8 Merge branch 'scale-center'
Bug 1349 - Using the anchor point to set the scale center is messy

The branch adds an extra center point for scaling which can be used
for example to set a scale about the center without affecting the
position of the actor.

The scale center can be specified as a unit offset from the origin or
as a gravity. If specified as a gravity it will be stored as a
fraction of the actor's size so that the position will track when the
actor changes size.

The anchor point and rotation centers have been modified so they can
be set with a gravity in the same way. However, only the Z rotation
exposes a property to set using a gravity because the other two
require a Z coordinate which doesn't make sense to interpret as a
fraction of the actor's width or height.

Conflicts:

	clutter/clutter-actor.c
2009-01-28 15:39:51 +00:00
Emmanuele Bassi
f9588b2487 [docs] Update Clutter API reference symbols
Add the new symbols from the ClutterClone and COGL material API
to the API reference.
2009-01-27 16:41:51 +00:00
Emmanuele Bassi
3cfc7fb1ca Merge branch 'generic-actor-clone'
* generic-actor-clone:
  Remove CloneTexture from the API
  [tests] Clean up the Clone interactive test
  Rename ActorClone to Clone/2
  Rename ActorClone to Clone/1
  Improves the unit test to verify more awkward scaling and some corresponding fixes
  Implements a generic ClutterActorClone that doesn't need fbos.
2009-01-27 16:14:35 +00:00
Emmanuele Bassi
86e95a779a Remove CloneTexture from the API
ClutterClone supercedes ClutterCloneTexture, since it can clone
every kind of actor -- including composite ones.

This is another "brain surgery with a shotgun" kind of commit: it
removes CloneTexture and updates every test case using CloneTexture
to ClutterClone. The API fallout is minimal, luckily for us.
2009-01-27 15:18:45 +00:00
Neil Roberts
418fb995c8 Replace clutter_set_use_mipmapped_text with clutter_set_font_flags
The hope is that this function makes it easier to extend the font
settings with more flags without having to add a function for every
setting.

A new flag for enabling hinting has been added. If set, this changes
the font options on the global PangoContext and any newly created
PangoContexts. The options are only set if the flag is changed from
the default so it won't override any detailed setting chosen by the
backend.
2009-01-27 14:43:44 +00:00
Neil Roberts
9ea6ab76fb Fix gtk-doc reference since the anchor point changes
The documentation has been updated to reflect the fact that the anchor
point will move when the actor changes size if it was specified using
a gravity value. The new functions for setting the scale center and z
rotation gravity are also documented.
2009-01-23 18:41:41 +00:00
Emmanuele Bassi
134edac82c Bug 1361 - Unused ClutterStage::get_resolution() methods
The clutter_stage_get_resolution() and fixed-point API are just
shorthands for:

        clutter_backend_get_resolution (default_backend);

And as such do not fit at all in the ClutterStage class. The only
reason for their existence was the ClutterUnit conversion macros,
which have now been fixed to use the default backend through a
function call instead.

Thus, we can safely remove the stage entry points.
2009-01-23 15:16:21 +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
ee883f30d4 Add units-from-em conversion
An em is a unit of measurement in typography, equal to the point
size of the current font.

It should be possible to convert a value expressed in em to
ClutterUnits by using the current font and the current DPI as
stored by the default backend.
2009-01-21 17:35:47 +00:00
Emmanuele Bassi
93a0454c09 Remove the single-stage units converters
The stage-with/height-percentage converters had been broken by
the multiple-stages support of Clutter 0.8. They are also made
useless by the fact that Units are now floating point values.

The millimeters and typographic points converters also depended
on the default stage, but they can be reworked to use the default
DPI coming from the default Backend instead.
2009-01-21 17:10:36 +00:00
Emmanuele Bassi
0be613109e [docs] Remove sources of warnings in API references 2009-01-21 16:41:18 +00:00
Emmanuele Bassi
8736db6aed [docs] Update ClutterMedia section
The ClutterMedia API has been changed, so we need to update
the API reference to reflect that.
2009-01-20 23:40:25 +00:00
Emmanuele Bassi
268abcd786 [docs] Update the easing modes documentation
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.
2009-01-20 18:13:36 +00:00
Emmanuele Bassi
74213e0ee3 [alpha] Allow registering alpha functions
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.
2009-01-16 14:37:35 +00:00
Emmanuele Bassi
41386a5f72 Remove the Effects API
The Effects API and all related symbols have been superceded by
the newly added Animation API and clutter_actor_animate().

This commit removes the Effects implementation, the documentation
and the interactive test/example code.
2009-01-14 16:56:21 +00:00
Emmanuele Bassi
1cac3d91f9 Add unused symbols
Append the newly added ClutterBindingPool symbols and
clutter_stage_ensure_viewport() to the API reference.
2009-01-14 15:05:03 +00:00
Emmanuele Bassi
a074106ded Merge branch 'animation-improvements'
* animation-improvements:
  [docs] Add ClutterAnimatable to the API reference
  Add license notice to ClutterAnimation files
  [docs] Update the ClutterAnimation section
  [animation] Extend ClutterAnimation support to all objects
  [animation] Use ClutterAnimatable inside Animation
  [animation] Add ClutterAnimatable
  [animation] Allow registering custom progress function
  [animation] Interval::compute_value should return a boolean
  Animate ClutterColor properties
2009-01-14 15:00:44 +00:00
Emmanuele Bassi
2693ea3ddc [docs] Documentation warnings
Fix the various warnings issued by gtk-doc when enabling the API
reference generation for both COGL and Clutter.
2009-01-09 14:26:35 +00:00
Emmanuele Bassi
db3d2e9568 Merge branch 'animatable-iface' into animation-improvements
* animatable-iface:
  [docs] Add ClutterAnimatable to the API reference
  Add license notice to ClutterAnimation files
  [animation] Use ClutterAnimatable inside Animation
  [animation] Add ClutterAnimatable
2009-01-08 13:38:51 +00:00