Clutter 2.0 API Changes
A list of API warts that should be fixed when we break the API for 2.0. See also the Apocalypses
- ClutterKnot should be removed, and ClutterPoint should be defined as { float x, y; };
- ClutterPath should use the new ClutterPoint and take float arguments to all functions
- Make setting the size of the stage asynchronous so that it works better with X. (Ie, setting the size is just a request and calling clutter_actor_get_size immediately won't necessarily give you the size you asked for yet).
-
Consider hiding the EGL backend fields (DONE)
- Consider renaming clutter_stage_get_actor_at_pos() to clutter_stage_get_actor_at_coords()
- Drop the inheritance from Texture in CairoTexture (and possibly rename it)
- or deprecate it entirely along with ClutterTexture
-
Make Stage implement Container directly, or at least do not make Stage a Group (DONE)
- Remove the 'has-border' property of ClutterRectangle. The border-ness could just be inferred from the border with and color
-
Remove the default stage: clutter_stage_new() should always work at least the first time (DONE)
- if the backend does not support multiple stages, the second call to clutter_stage_new() will fail
- the default stage has various confusing idiosyncratic behaviors.
- ClutterText: Rename the "position" property to "cursor-position" to avoid the conflict with clutter_actor_set_position() and be consistent with all the other "cursor-*" properties.
-
Get rid of Clutter behaviours (DONE)
-
Get rid of ClutterAlpha (at least publicly; perhaps keep an internal version named ClutterEasing) - keep a renamed clutter_alpha_register_func for adding custom easing functions. (DONE: Alpha is now soft-deprecated)
-
Get rid of ClutterGroup and rename ClutterBox to ClutterGroup. (DONE: both Box and Group have been deprecated)
- Remove ClutterClone
- Use a boolean return value for DragAction signals, to stop propagation
- Remove ClutterModel
-
Convert .width and .height members in ClutterGeometry to signed integers (DONE)
- or use cairo_rectangle_t instead
- make ClutterEvent an opaque type
- clutter_init should abort if the init failed like gtk_init does. We should add a clutter_try_init() function that apps can use if they want to handle it gracefully.
- ClutterDeformEffect should not use CoglTextureVertex in the public API. This struct should disappear because it contains a CoglColor which is really awkward to use, it has padding and it makes drawing from an array of CoglTextureVertices really awkward because you either have to depend on the internal representation of CoglColor or copy the array.
- All event-related signals and virtual functions should pass a const ClutterEvent*
- Rename :depth to :z
- or use a :position property with a ClutterVertex
-
Make all Actors also Containers (DONE)
- store the position inside the ChildMeta
- remove set_x,y,z and set_width,height in favour of a FixedLayout API
- or keep those and remove the allocation property
-
Remove clutter_actor_show_all()/clutter_actor_hide_all() (DONE)
- Remove ClutterActor:show-on-set-parent and replace it with ClutterActor:visible default to TRUE
-
Map/unmap should be handled internally and we should get rid of the map/unmap virtuals (DONE)
- Rename anchor point to 'translate transformation'
- Remove all of the transformation centers - eg rotation center, scale center etc - bug 2378
- Add a single 'transformation center' that does the translation before all transformations and then translates back after
- Consider getting rid of the realized state. Clutter applications can create Cogl resources at any time and they do not have to create a GtkWindow so realization is not generally useful.
- Make the opacity of an actor range from 0.0->1.0 instead of 0->255
-
Make the opacity of composite actors automatically be more normal in it's behavior (paint the subtree of the scene graph offscreen, and paint the result with the opacity instead of altering all childrens opacities) (DONE)
- Remove per-event signals, and use a detail for the event type
- the two event-related signals on ClutterActor should be: ::event and ::event-captured. in order to get only button presses, you should connect to ::event:button-press or ::event-captured:button-press.
- ClutterColor should not be opaque and we should continue to store it in 4 bytes but pass it around by value rather than by reference
- or ClutterColor should be opaque, and use normalized values between 0.0 and 1.0
Cogl
see Cogl/Cogl20Changes