Commit Graph

52 Commits

Author SHA1 Message Date
Emmanuele Bassi
0ee7170dbb Move clutter-util.h into the deprecated section 2012-02-27 15:56:12 +00:00
Emmanuele Bassi
2daf2e8e6b Add a deprecated header for ClutterCairoTexture 2012-02-27 15:49:58 +00:00
Emmanuele Bassi
45d61d795b Add a deprecated header for ClutterTexture 2012-02-27 15:44:38 +00:00
Emmanuele Bassi
3c12b3575d Add deprecated header for ClutterAnimation 2012-02-27 15:38:11 +00:00
Emmanuele Bassi
4ae36f1e5f Add a deprecated header for ClutterAnimatable 2012-02-27 15:21:32 +00:00
Emmanuele Bassi
9613374c73 Add deprecated header for ClutterStageManager 2012-02-27 15:21:32 +00:00
Emmanuele Bassi
cf9c4e651d timeline: Move deprecated methods into a separate header 2012-02-13 17:30:22 +00:00
Emmanuele Bassi
5959099473 Deprecate Container add() and remove() methods
This will make things interesting.

We have better replacements in ClutterActor, that do The Right Thing™
instead of deferring control and requiring reimplementation in every
single container actor.
2012-01-16 23:37:11 +00:00
Emmanuele Bassi
6d268fe5ca Deprecate ClutterRectangle
A ClutterActor with a background color set covers 99% of the use cases
for a Rectangle.
2012-01-16 23:35:17 +00:00
Emmanuele Bassi
b4d269705e Deprecate ClutterBox
ClutterBox functionality has been implemented by ClutterActor, and
proxied by the Box subclass; with the removal of the abstract bit on
ClutterActor, we can safely deprecated ClutterBox.
2012-01-16 23:35:16 +00:00
Emmanuele Bassi
98b467f9b8 stage: Move the deprecated macros to a separate header
The clutter-stage.h header still has a bunch of macros that have, for
reasons unknown[*], survived the 1.0 API cut and have long since been
deprecated. Let's hide them under the deprecated/ carpet and let us
never speak of them ever again.

[*] pretty sure alcohol or other psychotropic substances were involved
but I take the 5th on that.
2011-11-03 15:13:54 +00:00
Emmanuele Bassi
11420a7057 group: Move deprecated macro into its own header 2011-11-03 15:02:35 +00:00
Emmanuele Bassi
530b07f12b Don't use a -deprecated suffix for headers
They are already in the deprecated/ directory, the suffix is redundant,
and there is no chance of collision.
2011-11-03 14:49:56 +00:00
Emmanuele Bassi
142cd0bf82 Move clutter-keysyms-compat.h to the deprecated section
No reason to have it lingering in the main section.
2011-11-03 14:42:39 +00:00
Emmanuele Bassi
b19c919645 actor: Move deprecated symbols into separate headers
The clutter-actor.h header is already pretty big, so let's try to keep
the deprecated symbols out of it.
2011-11-02 13:00:46 +00:00
Emmanuele Bassi
40d703a005 backend: Move deprecated symbols to a separate header 2011-11-02 13:00:46 +00:00
Emmanuele Bassi
a21f1d1580 Move clutter-fixed.[ch] to the deprecated section 2011-10-11 17:58:40 +01:00
Emmanuele Bassi
62d72b8690 Move ClutterBehaviour to the deprecated section 2011-10-11 17:58:40 +01:00
Emmanuele Bassi
bcd7845d91 Move ClutterBehaviour subclasses to the deprecated section
Moving ClutterBehaviour itself will require some minor header surgery,
so we'll do that next.
2011-10-11 17:58:40 +01:00
Emmanuele Bassi
e57f8c26f6 Move ClutterShader to the deprecated section 2011-10-11 17:58:40 +01:00
Emmanuele Bassi
4b33a9c5f4 Move ClutterScore to the deprecated section 2011-10-11 17:58:39 +01:00
Emmanuele Bassi
4b748f4334 Move timeout pool to the deprecated section 2011-10-11 17:58:39 +01:00
Emmanuele Bassi
50cda9fed1 build: Move deprecated code into its own prefix
The code that has been deprecated should live into its own directory,
both in the repository and when installed. This should make it clear
which functionality is actually maintained and which is not.

We start with an oldie: the frame source API.
2011-10-11 17:58:35 +01:00
Emmanuele Bassi
fdfd208c04 Fix copy-and-paste errors in the deprecation macros
Fixes bug:

  http://bugzilla.openedhand.com/show_bug.cgi?id=1704
2009-07-21 09:22:38 +01:00
Emmanuele Bassi
45c85c4213 [actor] Remove the unused get_allocation_coords()
The clutter_actor_get_allocation_coords() is not used, and since
the switch to floats in the Actor's API, it returns exactly what
the get_allocation_box() returns.
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
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
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
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
Emmanuele Bassi
d6d208da7d Remove Units from the public API
With the recent change to internal floating point values, ClutterUnit
has become a redundant type, defined to be a float. All integer entry
points are being internally converted to floating point values to be
passed to the GL pipeline with the least amount of conversion.

ClutterUnit is thus exposed as just a "pixel with fractionary bits",
and not -- as users might think -- as generic, resolution and device
independent units. not that it was the case, but a definitive amount
of people was convinced it did provide this "feature", and was flummoxed
about the mere existence of this type.

So, having ClutterUnit exposed in the public API doubles the entry
points and has the following disadvantages:

  - we have to maintain twice the amount of entry points in ClutterActor
  - we still do an integer-to-float implicit conversion
  - we introduce a weird impedance between pixels and "pixels with
    fractionary bits"
  - language bindings will have to choose what to bind, and resort
    to manually overriding the API
    + *except* for language bindings based on GObject-Introspection, as
      they cannot do manual overrides, thus will replicate the entire
      set of entry points

For these reason, we should coalesces every Actor entry point for
pixels and for ClutterUnit into a single entry point taking a float,
like:

  void clutter_actor_set_x (ClutterActor *self,
                            gfloat        x);
  void clutter_actor_get_size (ClutterActor *self,
                               gfloat       *width,
                               gfloat       *height);
  gfloat clutter_actor_get_height (ClutterActor *self);

etc.

The issues I have identified are:

  - we'll have a two cases of compiler warnings:
    - printf() format of the return values from %d to %f
    - clutter_actor_get_size() taking floats instead of unsigned ints
  - we'll have a problem with varargs when passing an integer instead
    of a floating point value, except on 64bit platforms where the
    size of a float is the same as the size of an int

To be clear: the *intent* of the API should not change -- we still use
pixels everywhere -- but:

  - we remove ambiguity in the API with regard to pixels and units
  - we remove entry points we get to maintain for the whole 1.0
    version of the API
  - we make things simpler to bind for both manual language bindings
    and automatic (gobject-introspection based) ones
  - we have the simplest API possible while still exposing the
    capabilities of the underlying GL implementation
2009-05-06 16:44:47 +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
786161c75f [deprecated] Add Effect deprecation
The ClutterEffect API has been deprecated during 0.9, so it should be
added to the deprecation macros.
2009-03-13 14:29:27 +00:00
Emmanuele Bassi
ed2fe41b32 Add more deprecation notices
Most of the deprecated API does not have an entry inside
clutter-deprecated.h, thus making porting a tad more difficult.
2009-03-13 14:29:27 +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
Neil Roberts
e30c5b33b9 Undeprecate clutter_actor_set_scale_with_gravity
The scale center has returned so this function is available again but
it was still deprecated so you couldn't use it.
2009-01-28 16:24:02 +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
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
62844d5f04 2008-11-17 Emmanuele Bassi <ebassi@linux.intel.com>
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.
2008-11-18 09:50:03 +00:00
Emmanuele Bassi
931c9edde3 2008-07-23 Emmanuele Bassi <ebassi@openedhand.com>
Bug 1062 - clutter_actor_query_coords() replacement in 0.8

	* clutter/clutter-deprecated.h: Fix the deprecation warning
	for clutter_actor_query_coords(). (Gwenole Beauchesne)
2008-07-23 12:20:35 +00:00
Emmanuele Bassi
473d0e9fc3 2008-06-10 Emmanuele Bassi <ebassi@openedhand.com>
Bug #815 - Split up request, allocation, and paint box

	* clutter/clutter-actor.[ch]: Rework the size allocation,
	request and paint area. Now ::request_coords() is called
	::allocate(), and ::query_coords() has been split into
	::get_preferred_width() and ::get_preferred_height(). See
	the documentation and the layout test on how to implement
	a container and layout manager with the new API. (#915,
	based on a patch by Havoc Pennington, Lucas Rocha and Johan
	Bilien)

	* clutter/clutter-clone-texture.c: Port CloneTexture to
	the new size negotiation API; it just means forwarding
	the requests to the parent texture.

	* clutter/clutter-deprecated.h: Add deprecated and replaced
	API.

	* clutter/clutter-entry.c: Port Entry to the new size
	negotiation API.

	* clutter/clutter-group.c: Port Group to the new size
	negotiation API; the semantics of the Group actor do not
	change.

	* clutter/clutter-label.c: Port Label to the new size
	negotiation API, and vastly simplify the code.

	* clutter/clutter-main.[ch]: Add API for executing a
	relayout when needed.

	* clutter/clutter-private.h: Add new Stage private API.

	* clutter/clutter-rectangle.c: Update the get_abs_opacity()
	call to get_paint_opacity().

	* clutter/clutter-stage.c:
	(clutter_stage_get_preferred_width),
	(clutter_stage_get_preferred_height),
	(clutter_stage_allocate),
	(clutter_stage_class_init): Port Stage to the new size
	negotiation API.

	* clutter/clutter-texture.c: Port Texture to the new size
	negotiation API.

	* clutter/clutter-types.h: Add ClutterRequestMode enumeration.

	* clutter/x11/clutter-stage-x11.c: Port the X11 stage
	implementation to the new size negotiation API.

	* tests/Makefile.am: Add the layout manager test case.

	* tests/test-opacity.c: Update.

	* tests/test-project.c: Update.

	* tests/test-layout.c: Test case for a layout manager implemented
	using the new size negotiation API; the layout manager handles
	both transformed and untransformed children.
2008-06-10 17:07:52 +00:00
Emmanuele Bassi
1abccbad21 2008-05-09 Emmanuele Bassi <ebassi@openedhand.com>
Bug #902 - Support transform from G_TYPE_INT to ClutterUnit

	* clutter/clutter-units.c:
	(clutter_value_transform_int_unit),
	(clutter_unit_get_type): Add GValue transformation function from
	integer values to ClutterUnit. (#902)

	(param_unit_validate): Fix validation for ClutterParamSpecUnit;
	this allows writable ClutterUnit properties.

	* clutter/clutter-fixed.c:
	(clutter_value_transform_int_fixed),
	(clutter_value_transform_double_fixed),
	(clutter_value_transform_float_fixed): Add GValue transformation
	functions from native types (int, double, float) to ClutterFixed.

	(clutter_fixed_get_type): Register the new transformation functions.

	(param_fixed_validate): Fix validation for ClutterParamSpecUnit;
	this allows writable ClutterFixed properties.
2008-05-09 10:58:26 +00:00
Neil Roberts
6409b1adeb Merged clutter-ivan branch into trunk.
svn merge \
 https://svn.o-hand.com/repos/clutter/trunk/clutter@2509 \
 https://svn.o-hand.com/repos/clutter/branches/clutter-ivan@HEAD
2008-04-25 13:37:36 +00:00
Emmanuele Bassi
8867c1bae5 2008-04-11 Emmanuele Bassi <ebassi@openedhand.com>
* README: Add a note about the Shader API changes.

	* clutter/clutter-deprecated.h: Add deprecation symbols.

	* clutter/clutter-shader.[ch]: Rename the :bound read-only
	property to :compiled. Also rename clutter_shader_bind()
	and clutter_shader_is_bound() to clutter_shader_compil() and
	clutter_shader_is_compiled(), respectively.

	* clutter/glx/clutter-stage-glx.c:
	(clutter_stage_glx_unrealize): Update after
	clutter_shader_release_all() rename.

	* tests/test-shader.c (button_release_cb), (main): Update.
2008-04-11 12:00:50 +00:00
Matthew Allum
8366a906e2 2008-02-01 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-feature.h:
        * clutter/clutter-texture.c:
        * clutter/clutter-texture.h:
        * clutter/cogl/cogl.h:
        * clutter/cogl/gl/cogl.c:
        * clutter/cogl/gles/cogl.c:
        * tests/Makefile.am:
        * tests/test.fbo.c:
        Add initial support for FBO's in Clutter (OpenGL only so far).
        See new clutter_texture_new_from_actor()
        Initial implementation, needs work.

        * clutter/x11/clutter-stage-x11.c:
        (clutter_stage_x11_set_cursor_visible):
        Fall back to again not relying on xfixes to hide cursor. *sigh*

        * clutter/clutter-deprecated.h:
        Add clutter_group_find_child_by_id
2008-02-01 15:29:00 +00:00
Emmanuele Bassi
d0b0e1bcd4 2008-01-31 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-entry.h:
	* clutter/clutter-entry.c:
	(clutter_entry_set_cursor_position),
	(clutter_entry_get_cursor_position): Rename [gs]et_position()
	to [gs]set_cursor_position(), and avoid method name collisions
	with bindings for high-level languages.

	* clutter/clutter-deprecated.h: Add replacement warnings for the
	renamed methods.
2008-01-31 14:24:04 +00:00
Tomas Frydrych
20a9bf142c 2007-11-28 Tomas Frydrych <tf@openedhand.com>
* clutter/NEWS:
	Started 0.6.0 section with comment on actor anchor point.

        * clutter/clutter/clutter-actor.c:
        * clutter/clutter/clutter-actor.h:
        * clutter/clutter/clutter-behaviour-scale.c:
        * clutter/clutter/clutter-deprecated.h:
	(clutter_actor_set_anchor_point):
	(clutter_actor_set_anchor_pointu):
	(clutter_actor_get_anchor_point):
	(clutter_actor_get_anchor_pointu):
	(clutter_actor_set_anchor_point_from_gravity):
	New anchor point API deprecating old gravity scaling, added
	comments on modelview matrix construction to ClutterActor
	documentation.

	(clutter_actor_set_scale_with_gravity):
	(clutter_actor_set_scale_with_gravityx):
	Deprecated; use clutter_actor_set_anchor_point_from_gravity() instead.
2007-11-28 12:23:31 +00:00
Emmanuele Bassi
7495848f14 2007-11-18 Emmanuele Bassi <ebassi@openedhand.com>
* clutter.symbols: Update exported symbols.

	* clutter/clutter-actor.[ch]: Remove clutter_actor_rotate_*
	and clutter_actor_get_rx* and provide a simpler rotation API:
	clutter_actor_set_rotation() and clutter_actor_get_rotation().

	* clutter/clutter-deprecated.h: Deprecate the old rotation API.

	* clutter/clutter-behaviour-bspline.c:
	* clutter/clutter-behaviour-rotate.c:
	* clutter/clutter-effect.c: Update internal usage of the
	rotation API.

	* tests/test-project.c: Ditto as above.
2007-11-18 15:36:04 +00:00
Emmanuele Bassi
4de1adb04a 2007-11-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/clutter-actor.[ch]: Rename clutter_actor_get_id() to
	clutter_actor_get_gid().

	(clutter_actor_set_parent): Use GUINT_TO_POINTER().

	* clutter/clutter-deprecated.h: Add a replacement warning for
	clutter_actor_get_id().

	* clutter/clutter-texture.c (texture_upload_data): Use
	clutter_actor_get_gid(), and don't leak the filename string.
2007-11-14 11:43:18 +00:00
Emmanuele Bassi
bbf57ee461 2007-11-14 Emmanuele Bassi <ebassi@openedhand.com>
* clutter/cutter-deprecated.h: Don't let everyone know from where
	we have stolen^Wtaken inspiration for the deprecation warnings.
2007-11-14 11:00:01 +00:00