mutter/clutter/clutter-deprecated.h
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

63 lines
4.9 KiB
C

#ifndef _CLUTTER_DEPRECATED_H
#define _CLUTTER_DEPRECATED_H
/* This header contains defines that makes the compiler provide useful
* direction for resolving compile problems when code is using old APIs
* When using a function name that no longer applies the compiler will
* tell the developer the name of the new function call.
*
* Functions that are simply renamed should give errors containing
* _REPLACED_BY_ whilst functions that are deprecated by new functions with
* new functionality should giver errors containing _DEPRECATED_BY_.
*/
#define clutter_group_find_child_by_id clutter_group_find_child_by_id_REPLACED_BY_clutter_container_find_child_by_name
#define clutter_behaviour_ellipse_set_angle_begin clutter_behaviour_ellipse_set_angle_begin_REPLACED_BY_clutter_behaviour_set_angle_start
#define clutter_behaviour_ellipse_set_angle_beginx clutter_behaviour_ellipse_set_angle_beginx_REPLACED_BY_clutter_behaviour_set_angle_startx
#define clutter_behaviour_ellipse_get_angle_begin clutter_behaviour_ellipse_get_angle_begin_REPLACED_BY_clutter_behaviour_get_angle_start
#define clutter_behaviour_ellipse_get_angle_beginx clutter_behaviour_ellipse_get_angle_beginx_REPLACED_BY_clutter_behaviour_get_angle_startx
#define clutter_behaviour_bspline_append clutter_behaviour_bspline_append_REPLACED_BY_clutter_behaviour_bspline_append_knots
#define clutter_actor_get_id clutter_actor_get_id_REPLACED_BY_clutter_actor_get_gid
#define clutter_actor_rotate_x clutter_actor_rotate_x_DEPRECATED_BY_clutter_actor_set_rotation
#define clutter_actor_rotate_y clutter_actor_rotate_y_DEPRECATED_BY_clutter_actor_set_rotation
#define clutter_actor_rotate_z clutter_actor_rotate_z_DEPRECATED_BY_clutter_actor_set_rotation
#define clutter_actor_rotate_xx clutter_actor_rotate_xx_DEPRECATED_BY_clutter_actor_set_rotationx
#define clutter_actor_rotate_yx clutter_actor_rotate_yx_DEPRECATED_BY_clutter_actor_set_rotationx
#define clutter_actor_rotate_zx clutter_actor_rotate_zx_DEPRECATED_BY_clutter_actor_set_rotationx
#define clutter_actor_get_rxang clutter_actor_get_rxang_DEPRECATED_BY_clutter_actor_get_rotation
#define clutter_actor_get_ryang clutter_actor_get_ryang_DEPRECATED_BY_clutter_actor_get_rotation
#define clutter_actor_get_rzang clutter_actor_get_rzang_DEPRECATED_BY_clutter_actor_get_rotation
#define clutter_actor_get_rxangx clutter_actor_get_rxangx_DEPRECATED_BY_clutter_actor_get_rotationx
#define clutter_actor_get_ryangx clutter_actor_get_ryangx_DEPRECATED_BY_clutter_actor_get_rotationx
#define clutter_actor_get_rzangx clutter_actor_get_rzangx_DEPRECATED_BY_clutter_actor_get_rotationx
#define clutter_actor_set_scale_with_gravityx clutter_actor_set_scale_with_gravityx_DEPRECATED_BY_clutter_actor_set_scale_with_gravity
#define clutter_entry_set_position clutter_entry_set_position_REPLACED_BY_clutter_entry_set_cursor_position
#define clutter_entry_get_position clutter_entry_get_position_REPLACED_BY_clutter_entry_get_cursor_position
#define clutter_shader_bind clutter_shader_bind_REPLACED_BY_clutter_shader_compile
#define clutter_shader_is_bound clutter_shader_is_bound_REPLACED_BY_clutter_shader_is_compiled
#define clutter_texture_new_from_pixbuf clutter_texture_new_from_pixbuf_DEPRECATED_BY_clutter_texture_new_from_file_OR_clutter_texture_new_AND_clutter_texture_set_from_rgb_data
#define clutter_texture_set_pixbuf clutter_texture_set_pixbuf+DEPRECATED_BY_clutter_texture_set_from_rgb_data
#define clutter_actor_query_coords clutter_actor_query_coords_REPLACED_BY_clutter_actor_get_preferred_size_OR_clutter_actor_get_allocation_box
#define clutter_actor_request_coords clutter_actor_request_coords_REPLACED_BY_clutter_actor_allocate
#define clutter_actor_get_abs_position clutter_actor_get_abs_position_REPLACED_BY_clutter_actor_get_transformed_position
#define clutter_actor_get_abs_size clutter_actor_get_abs_size_REPLACED_BY_clutter_actor_get_transformed_size
#define clutter_actor_get_abs_opacity clutter_actor_get_abs_opacity_REPLACED_BY_clutter_actor_get_paint_opacity
#define clutter_stage_get_resolution clutter_backend_get_resolution
#define clutter_stage_get_resolutionx clutter_backend_get_resolution
#define clutter_set_use_mipmapped_text clutter_actor_set_use_mipmapped_text_REPLACED_BY_clutter_set_font_flags
#define clutter_get_use_mipmapped_text clutter_actor_get_use_mipmapped_text_REPLACED_BY_clutter_get_font_flags
#define clutter_color_parse clutter_color_parse_REPLACED_BY_clutter_color_from_string
#endif /* CLUTTER_DEPRECATED_H */