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.
This commit is contained in:
Emmanuele Bassi 2009-01-23 15:16:21 +00:00
parent ae40bd37c7
commit 134edac82c
4 changed files with 2 additions and 62 deletions

View File

@ -52,17 +52,7 @@
#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_ALPHA_RAMP_INC CLUTTER_ALPHA_RAMP_INC_DEPRECATED_BY_clutter_ramp_inc_func
#define CLUTTER_ALPHA_RAMP_DEC CLUTTER_ALPHA_RAMP_DEC_DEPRECATED_BY_clutter_ramp_dec_func
#define CLUTTER_ALPHA_RAMP CLUTTER_ALPHA_RAMP_DEPRECATED_BY_clutter_ramp_func
#define CLUTTER_ALPHA_SINE_INC CLUTTER_ALPHA_SINE_INC_DEPRECATED_BY_clutter_sine_inc_func
#define CLUTTER_ALPHA_SINE_DEC CLUTTER_ALPHA_SINE_DEC_DEPRECATED_BY_clutter_sine_dec_func
#define CLUTTER_ALPHA_SINE_HALF CLUTTER_ALPHA_SINE_HALF_DEPRECATED_BY_clutter_sine_half_func
#define CLUTTER_ALPHA_SINE CLUTTER_ALPHA_SINE_DEPRECATED_BY_clutter_sine_func
#define CLUTTER_ALPHA_SQUARE CLUTTER_ALPHA_SQUARE_DEPRECATED_BY_clutter_quare_func
#define CLUTTER_ALPHA_SMOOTHSTEP_INC CLUTTER_ALPHA_SMOOTHSTEP_INC_DEPRECATED_BY_clutter_smoothstep_inc_func
#define CLUTTER_ALPHA_SMOOTHSTEP_DEC CLUTTER_ALPHA_SMOOTHSTEP_DEC_DEPRECATED_BY_clutter_smoothstep_dec_func
#define CLUTTER_ALPHA_EXP_INC CLUTTER_ALPHA_EXP_INC_DEPRECATED_BY_clutter_exp_inc_func
#define CLUTTER_ALPHA_EXP_DEC CLUTTER_ALPHA_EXP_DEC_DEPRECATED_BY_clutter_exp_dec_func
#define clutter_stage_get_resolution clutter_backend_get_resolution
#define clutter_stage_get_resolutionx clutter_backend_get_resolution
#endif /* CLUTTER_DEPRECATED_H */

View File

@ -1718,52 +1718,6 @@ clutter_stage_get_fogx (ClutterStage *stage,
*fog = stage->priv->fog;
}
/**
* clutter_stage_get_resolution:
* @stage: the #ClutterStage
*
* Retrieves the resolution (in DPI) of the stage from the default
* backend.
*
* Return value: the resolution of the stage
*
* Since: 0.6
*/
gdouble
clutter_stage_get_resolution (ClutterStage *stage)
{
ClutterMainContext *context;
context = clutter_context_get_default ();
g_assert (context != NULL);
return clutter_backend_get_resolution (context->backend);
}
/**
* clutter_stage_get_resolutionx:
* @stage: the #ClutterStage
*
* Fixed point version of clutter_stage_get_resolution().
*
* Return value: the resolution of the stage
*
* Since: 0.6
*/
ClutterFixed
clutter_stage_get_resolutionx (ClutterStage *stage)
{
ClutterFixed res;
ClutterMainContext *context;
context = clutter_context_get_default ();
g_assert (context != NULL);
res = clutter_backend_get_resolution (context->backend);
return CLUTTER_FLOAT_TO_FIXED (res);
}
/*** Perspective boxed type ******/
static ClutterPerspective *

View File

@ -220,8 +220,6 @@ void clutter_stage_set_fogx (ClutterStage *stage,
ClutterFog *fog);
void clutter_stage_get_fogx (ClutterStage *stage,
ClutterFog *fog);
gdouble clutter_stage_get_resolution (ClutterStage *stage);
ClutterFixed clutter_stage_get_resolutionx (ClutterStage *stage);
void clutter_stage_set_key_focus (ClutterStage *stage,
ClutterActor *actor);

View File

@ -532,8 +532,6 @@ clutter_stage_queue_redraw
clutter_stage_event
clutter_stage_set_key_focus
clutter_stage_get_key_focus
clutter_stage_get_resolution
clutter_stage_get_resolutionx
clutter_stage_read_pixels
<SUBSECTION>