Deprecate some more old, useless API
We still ship clutter_get_show_fps() and clutter_get_debug_enabled() as public entry points. Yet another case of missing API review prior to the 1.0 release, so really the bucket stops around my desk. Let's deprecate these two useless functions, and reduce the API footprint of Clutter.
This commit is contained in:
parent
66d46fd55e
commit
bf9339b8f4
@ -462,11 +462,23 @@ clutter_config_read (void)
|
||||
* Return value: %TRUE if Clutter should show the FPS.
|
||||
*
|
||||
* Since: 0.4
|
||||
*
|
||||
* Deprecated: 1.10: This function does not do anything. Use the environment
|
||||
* variable or the configuration file to determine whether Clutter should
|
||||
* print out the FPS counter on the console.
|
||||
*/
|
||||
gboolean
|
||||
clutter_get_show_fps (void)
|
||||
{
|
||||
return clutter_show_fps;
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
gboolean
|
||||
_clutter_context_get_show_fps (void)
|
||||
{
|
||||
ClutterMainContext *context = _clutter_context_get_default ();
|
||||
|
||||
return context->show_fps;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -1291,18 +1303,16 @@ clutter_threads_leave (void)
|
||||
/**
|
||||
* clutter_get_debug_enabled:
|
||||
*
|
||||
* Check if clutter has debugging turned on.
|
||||
* Check if Clutter has debugging enabled.
|
||||
*
|
||||
* Return value: TRUE if debugging is turned on, FALSE otherwise.
|
||||
* Return value: %FALSE
|
||||
*
|
||||
* Deprecated: 1.10: This function does not do anything.
|
||||
*/
|
||||
gboolean
|
||||
clutter_get_debug_enabled (void)
|
||||
{
|
||||
#ifdef CLUTTER_ENABLE_DEBUG
|
||||
return clutter_debug_flags != 0;
|
||||
#else
|
||||
return FALSE;
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
@ -1767,10 +1777,10 @@ post_parse_hook (GOptionContext *context,
|
||||
}
|
||||
|
||||
clutter_context->frame_rate = clutter_default_fps;
|
||||
clutter_context->show_fps = clutter_show_fps;
|
||||
clutter_context->options_parsed = TRUE;
|
||||
|
||||
/*
|
||||
* If not asked to defer display setup, call clutter_init_real(),
|
||||
/* If not asked to defer display setup, call clutter_init_real(),
|
||||
* which in turn calls the backend post parse hooks.
|
||||
*/
|
||||
if (!clutter_context->defer_display_setup)
|
||||
|
@ -98,8 +98,6 @@ gint clutter_main_level (void);
|
||||
void clutter_do_event (ClutterEvent *event);
|
||||
|
||||
/* Debug utility functions */
|
||||
gboolean clutter_get_debug_enabled (void);
|
||||
gboolean clutter_get_show_fps (void);
|
||||
gboolean clutter_get_accessibility_enabled (void);
|
||||
|
||||
/* Threading functions */
|
||||
|
@ -177,6 +177,7 @@ struct _ClutterMainContext
|
||||
guint motion_events_per_actor : 1;
|
||||
guint defer_display_setup : 1;
|
||||
guint options_parsed : 1;
|
||||
guint show_fps : 1;
|
||||
};
|
||||
|
||||
/* shared between clutter-main.c and clutter-frame-source.c */
|
||||
@ -203,6 +204,7 @@ ClutterActor * _clutter_context_peek_shader_stack (void);
|
||||
guint32 _clutter_context_acquire_id (gpointer key);
|
||||
void _clutter_context_release_id (guint32 id_);
|
||||
gboolean _clutter_context_get_motion_events_enabled (void);
|
||||
gboolean _clutter_context_get_show_fps (void);
|
||||
|
||||
const gchar *_clutter_gettext (const gchar *str);
|
||||
|
||||
|
@ -1043,7 +1043,7 @@ clutter_stage_do_redraw (ClutterStage *stage)
|
||||
|
||||
_clutter_backend_ensure_context (backend, stage);
|
||||
|
||||
if (clutter_get_show_fps ())
|
||||
if (_clutter_context_get_show_fps ())
|
||||
{
|
||||
if (priv->fps_timer == NULL)
|
||||
priv->fps_timer = g_timer_new ();
|
||||
@ -1053,7 +1053,7 @@ clutter_stage_do_redraw (ClutterStage *stage)
|
||||
|
||||
_clutter_backend_redraw (backend, stage);
|
||||
|
||||
if (clutter_get_show_fps ())
|
||||
if (_clutter_context_get_show_fps ())
|
||||
{
|
||||
priv->timer_n_frames += 1;
|
||||
|
||||
|
@ -54,6 +54,12 @@ void clutter_set_default_frame_rate (guint
|
||||
CLUTTER_DEPRECATED
|
||||
gulong clutter_get_timestamp (void);
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
gboolean clutter_get_debug_enabled (void);
|
||||
|
||||
CLUTTER_DEPRECATED
|
||||
gboolean clutter_get_show_fps (void);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
#endif /* __CLUTTER_MAIN_DEPRECATED_H__ */
|
||||
|
Loading…
Reference in New Issue
Block a user