Add a Clutter-specific deprecation macro for symbols
Just like GLIB_DEPRECATED and GLIB_DEPRECATED_FOR, Clutter should have its own wrappers for G_DEPRECATED and G_DEPRECATED_FOR, to allow opting out of deprecation warnings. Deprecation warnings are enabled by default, now, even when building Clutter.
This commit is contained in:
parent
b34e89e0c5
commit
af7afc29a7
@ -398,6 +398,7 @@ void clutter_actor_set_name (ClutterActor
|
|||||||
const gchar * clutter_actor_get_name (ClutterActor *self);
|
const gchar * clutter_actor_get_name (ClutterActor *self);
|
||||||
|
|
||||||
#ifndef CLUTTER_DISABLE_DEPRECATED
|
#ifndef CLUTTER_DISABLE_DEPRECATED
|
||||||
|
CLUTTER_DEPRECATED
|
||||||
guint32 clutter_actor_get_gid (ClutterActor *self);
|
guint32 clutter_actor_get_gid (ClutterActor *self);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -470,19 +471,29 @@ gboolean clutter_actor_event (ClutterActor
|
|||||||
gboolean capture);
|
gboolean capture);
|
||||||
|
|
||||||
#ifndef CLUTTER_DISABLE_DEPRECATED
|
#ifndef CLUTTER_DISABLE_DEPRECATED
|
||||||
|
CLUTTER_DEPRECATED
|
||||||
ClutterActor * clutter_get_actor_by_gid (guint32 id_);
|
ClutterActor * clutter_get_actor_by_gid (guint32 id_);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
|
#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_actor_add_effect)
|
||||||
gboolean clutter_actor_set_shader (ClutterActor *self,
|
gboolean clutter_actor_set_shader (ClutterActor *self,
|
||||||
ClutterShader *shader);
|
ClutterShader *shader);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_actor_get_effect)
|
||||||
ClutterShader * clutter_actor_get_shader (ClutterActor *self);
|
ClutterShader * clutter_actor_get_shader (ClutterActor *self);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_shader_effect_set_uniform_value)
|
||||||
void clutter_actor_set_shader_param (ClutterActor *self,
|
void clutter_actor_set_shader_param (ClutterActor *self,
|
||||||
const gchar *param,
|
const gchar *param,
|
||||||
const GValue *value);
|
const GValue *value);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_shader_effect_set_uniform)
|
||||||
void clutter_actor_set_shader_param_int (ClutterActor *self,
|
void clutter_actor_set_shader_param_int (ClutterActor *self,
|
||||||
const gchar *param,
|
const gchar *param,
|
||||||
gint value);
|
gint value);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_shader_effect_set_uniform)
|
||||||
void clutter_actor_set_shader_param_float (ClutterActor *self,
|
void clutter_actor_set_shader_param_float (ClutterActor *self,
|
||||||
const gchar *param,
|
const gchar *param,
|
||||||
gfloat value);
|
gfloat value);
|
||||||
|
@ -98,6 +98,7 @@ struct _ClutterAnimatableIface
|
|||||||
GType clutter_animatable_get_type (void) G_GNUC_CONST;
|
GType clutter_animatable_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
#ifndef CLUTTER_DISABLE_DEPRECATED
|
#ifndef CLUTTER_DISABLE_DEPRECATED
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_animatable_interpolate_value)
|
||||||
gboolean clutter_animatable_animate_property (ClutterAnimatable *animatable,
|
gboolean clutter_animatable_animate_property (ClutterAnimatable *animatable,
|
||||||
ClutterAnimation *animation,
|
ClutterAnimation *animation,
|
||||||
const gchar *property_name,
|
const gchar *property_name,
|
||||||
|
@ -64,16 +64,29 @@ GType clutter_backend_get_type (void) G_GNUC_CONST;
|
|||||||
ClutterBackend *clutter_get_default_backend (void);
|
ClutterBackend *clutter_get_default_backend (void);
|
||||||
|
|
||||||
#ifndef CLUTTER_DISABLE_DEPRECATED
|
#ifndef CLUTTER_DISABLE_DEPRECATED
|
||||||
|
CLUTTER_DEPRECATED_FOR(ClutterSettings:font_dpi)
|
||||||
void clutter_backend_set_resolution (ClutterBackend *backend,
|
void clutter_backend_set_resolution (ClutterBackend *backend,
|
||||||
gdouble dpi);
|
gdouble dpi);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(ClutterSettings:double_click_time)
|
||||||
void clutter_backend_set_double_click_time (ClutterBackend *backend,
|
void clutter_backend_set_double_click_time (ClutterBackend *backend,
|
||||||
guint msec);
|
guint msec);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(ClutterSettings:double_click_time)
|
||||||
guint clutter_backend_get_double_click_time (ClutterBackend *backend);
|
guint clutter_backend_get_double_click_time (ClutterBackend *backend);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(ClutterSettings:double_click_distance)
|
||||||
void clutter_backend_set_double_click_distance (ClutterBackend *backend,
|
void clutter_backend_set_double_click_distance (ClutterBackend *backend,
|
||||||
guint distance);
|
guint distance);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(ClutterSettings:double_click_distance)
|
||||||
guint clutter_backend_get_double_click_distance (ClutterBackend *backend);
|
guint clutter_backend_get_double_click_distance (ClutterBackend *backend);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(ClutterSettings:font_name)
|
||||||
void clutter_backend_set_font_name (ClutterBackend *backend,
|
void clutter_backend_set_font_name (ClutterBackend *backend,
|
||||||
const gchar *font_name);
|
const gchar *font_name);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(ClutterSettings:font_name)
|
||||||
const gchar * clutter_backend_get_font_name (ClutterBackend *backend);
|
const gchar * clutter_backend_get_font_name (ClutterBackend *backend);
|
||||||
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
||||||
|
|
||||||
|
@ -117,11 +117,14 @@ ClutterActor * clutter_cairo_texture_new (guint
|
|||||||
guint height);
|
guint height);
|
||||||
|
|
||||||
#ifndef CLUTTER_DISABLE_DEPRECATED
|
#ifndef CLUTTER_DISABLE_DEPRECATED
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_cairo_texture_invalidate_rectangle)
|
||||||
cairo_t * clutter_cairo_texture_create_region (ClutterCairoTexture *self,
|
cairo_t * clutter_cairo_texture_create_region (ClutterCairoTexture *self,
|
||||||
gint x_offset,
|
gint x_offset,
|
||||||
gint y_offset,
|
gint y_offset,
|
||||||
gint width,
|
gint width,
|
||||||
gint height);
|
gint height);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_cairo_texture_invalidate)
|
||||||
cairo_t * clutter_cairo_texture_create (ClutterCairoTexture *self);
|
cairo_t * clutter_cairo_texture_create (ClutterCairoTexture *self);
|
||||||
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
||||||
|
|
||||||
|
@ -97,8 +97,8 @@ void clutter_main_quit (void);
|
|||||||
gint clutter_main_level (void);
|
gint clutter_main_level (void);
|
||||||
|
|
||||||
#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
|
#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
|
||||||
void clutter_redraw (ClutterStage *stage)
|
CLUTTER_DEPRECATED_FOR(clutter_stage_ensure_redraw)
|
||||||
G_GNUC_DEPRECATED_FOR (clutter_stage_ensure_redraw);
|
void clutter_redraw (ClutterStage *stage);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void clutter_do_event (ClutterEvent *event);
|
void clutter_do_event (ClutterEvent *event);
|
||||||
@ -111,6 +111,7 @@ gboolean clutter_get_accessibility_enabled (void);
|
|||||||
|
|
||||||
/* Threading functions */
|
/* Threading functions */
|
||||||
#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
|
#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
|
||||||
|
CLUTTER_DEPRECATED
|
||||||
void clutter_threads_init (void);
|
void clutter_threads_init (void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -134,9 +135,11 @@ guint clutter_threads_add_timeout_full (gint priority,
|
|||||||
GDestroyNotify notify);
|
GDestroyNotify notify);
|
||||||
|
|
||||||
#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
|
#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
|
||||||
|
CLUTTER_DEPRECATED
|
||||||
guint clutter_threads_add_frame_source (guint fps,
|
guint clutter_threads_add_frame_source (guint fps,
|
||||||
GSourceFunc func,
|
GSourceFunc func,
|
||||||
gpointer data);
|
gpointer data);
|
||||||
|
CLUTTER_DEPRECATED
|
||||||
guint clutter_threads_add_frame_source_full (gint priority,
|
guint clutter_threads_add_frame_source_full (gint priority,
|
||||||
guint fps,
|
guint fps,
|
||||||
GSourceFunc func,
|
GSourceFunc func,
|
||||||
@ -150,7 +153,10 @@ guint clutter_threads_add_repaint_func (GSourceFunc func,
|
|||||||
void clutter_threads_remove_repaint_func (guint handle_id);
|
void clutter_threads_remove_repaint_func (guint handle_id);
|
||||||
|
|
||||||
#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
|
#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_stage_set_motion_events_enabled)
|
||||||
void clutter_set_motion_events_enabled (gboolean enable);
|
void clutter_set_motion_events_enabled (gboolean enable);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_stage_get_motion_events_enabled)
|
||||||
gboolean clutter_get_motion_events_enabled (void);
|
gboolean clutter_get_motion_events_enabled (void);
|
||||||
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
||||||
|
|
||||||
@ -166,18 +172,27 @@ void clutter_ungrab_keyboard (void);
|
|||||||
ClutterActor * clutter_get_keyboard_grab (void);
|
ClutterActor * clutter_get_keyboard_grab (void);
|
||||||
|
|
||||||
#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
|
#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
|
||||||
|
CLUTTER_DEPRECATED_FOR(cogl_pango_font_map_clear_glyph_cache)
|
||||||
void clutter_clear_glyph_cache (void);
|
void clutter_clear_glyph_cache (void);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_backend_set_font_options)
|
||||||
void clutter_set_font_flags (ClutterFontFlags flags);
|
void clutter_set_font_flags (ClutterFontFlags flags);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_backend_get_font_options)
|
||||||
ClutterFontFlags clutter_get_font_flags (void);
|
ClutterFontFlags clutter_get_font_flags (void);
|
||||||
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
||||||
|
|
||||||
#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
|
#if !defined(CLUTTER_DISABLE_DEPRECATED) || defined(CLUTTER_COMPILATION)
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_device_manager_get_device)
|
||||||
ClutterInputDevice *clutter_get_input_device_for_id (gint id_);
|
ClutterInputDevice *clutter_get_input_device_for_id (gint id_);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_input_device_grab)
|
||||||
void clutter_grab_pointer_for_device (ClutterActor *actor,
|
void clutter_grab_pointer_for_device (ClutterActor *actor,
|
||||||
gint id_);
|
gint id_);
|
||||||
|
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_input_device_ungrab)
|
||||||
void clutter_ungrab_pointer_for_device (gint id_);
|
void clutter_ungrab_pointer_for_device (gint id_);
|
||||||
#endif
|
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
||||||
|
|
||||||
PangoFontMap * clutter_get_font_map (void);
|
PangoFontMap * clutter_get_font_map (void);
|
||||||
|
|
||||||
|
@ -128,6 +128,7 @@ ClutterActor * clutter_texture_new_from_file (const gchar
|
|||||||
GError **error);
|
GError **error);
|
||||||
|
|
||||||
#ifndef CLUTTER_DISABLE_DEPRECATED
|
#ifndef CLUTTER_DISABLE_DEPRECATED
|
||||||
|
CLUTTER_DEPRECATED_FOR(ClutterOffscreenEffect)
|
||||||
ClutterActor * clutter_texture_new_from_actor (ClutterActor *actor);
|
ClutterActor * clutter_texture_new_from_actor (ClutterActor *actor);
|
||||||
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
||||||
|
|
||||||
|
@ -32,6 +32,20 @@
|
|||||||
|
|
||||||
G_BEGIN_DECLS
|
G_BEGIN_DECLS
|
||||||
|
|
||||||
|
/* these macros are used to mark deprecated functions, and thus have to be
|
||||||
|
* exposed in a public header.
|
||||||
|
*
|
||||||
|
* do *not* use them in other libraries depending on Clutter: use G_DEPRECATED
|
||||||
|
* and G_DEPRECATED_FOR, or use your own wrappers around them.
|
||||||
|
*/
|
||||||
|
#ifdef CLUTTER_DISABLE_DEPRECATION_WARNINGS
|
||||||
|
#define CLUTTER_DEPRECATED
|
||||||
|
#define CLUTTER_DEPRECATED_FOR(f)
|
||||||
|
#else
|
||||||
|
#define CLUTTER_DEPRECATED G_DEPRECATED
|
||||||
|
#define CLUTTER_DEPRECATED_FOR(f) G_DEPRECATED_FOR(f)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CLUTTER_TYPE_ACTOR_BOX (clutter_actor_box_get_type ())
|
#define CLUTTER_TYPE_ACTOR_BOX (clutter_actor_box_get_type ())
|
||||||
#define CLUTTER_TYPE_GEOMETRY (clutter_geometry_get_type ())
|
#define CLUTTER_TYPE_GEOMETRY (clutter_geometry_get_type ())
|
||||||
#define CLUTTER_TYPE_KNOT (clutter_knot_get_type ())
|
#define CLUTTER_TYPE_KNOT (clutter_knot_get_type ())
|
||||||
|
@ -34,7 +34,8 @@ G_BEGIN_DECLS
|
|||||||
|
|
||||||
#ifndef CLUTTER_DISABLE_DEPRECATED
|
#ifndef CLUTTER_DISABLE_DEPRECATED
|
||||||
|
|
||||||
gint clutter_util_next_p2 (gint a) G_GNUC_DEPRECATED;
|
CLUTTER_DEPRECATED
|
||||||
|
gint clutter_util_next_p2 (gint a);
|
||||||
|
|
||||||
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
||||||
|
|
||||||
|
@ -62,6 +62,7 @@ G_BEGIN_DECLS
|
|||||||
*
|
*
|
||||||
* Deprecated: 1.6: Use clutter_egl_get_egl_display() instead
|
* Deprecated: 1.6: Use clutter_egl_get_egl_display() instead
|
||||||
*/
|
*/
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_egl_get_egl_display)
|
||||||
EGLDisplay clutter_eglx_display (void);
|
EGLDisplay clutter_eglx_display (void);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -73,6 +74,7 @@ EGLDisplay clutter_eglx_display (void);
|
|||||||
*
|
*
|
||||||
* Deprecated: 1.6: Use clutter_egl_get_egl_display() instead
|
* Deprecated: 1.6: Use clutter_egl_get_egl_display() instead
|
||||||
*/
|
*/
|
||||||
|
CLUTTER_DEPRECATED_FOR(clutter_egl_get_egl_display)
|
||||||
EGLDisplay clutter_egl_display (void);
|
EGLDisplay clutter_egl_display (void);
|
||||||
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
#endif /* CLUTTER_DISABLE_DEPRECATED */
|
||||||
|
|
||||||
|
@ -107,7 +107,8 @@ XVisualInfo *clutter_x11_get_visual_info (void);
|
|||||||
void clutter_x11_set_display (Display * xdpy);
|
void clutter_x11_set_display (Display * xdpy);
|
||||||
|
|
||||||
#ifndef CLUTTER_DISABLE_DEPRECATED
|
#ifndef CLUTTER_DISABLE_DEPRECATED
|
||||||
XVisualInfo *clutter_x11_get_stage_visual (ClutterStage *stage) G_GNUC_DEPRECATED;
|
CLUTTER_DEPRECATED_FOR(clutter_x11_get_visual_info)
|
||||||
|
XVisualInfo *clutter_x11_get_stage_visual (ClutterStage *stage);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
Window clutter_x11_get_stage_window (ClutterStage *stage);
|
Window clutter_x11_get_stage_window (ClutterStage *stage);
|
||||||
@ -127,7 +128,8 @@ gboolean clutter_x11_has_event_retrieval (void);
|
|||||||
ClutterStage *clutter_x11_get_stage_from_window (Window win);
|
ClutterStage *clutter_x11_get_stage_from_window (Window win);
|
||||||
|
|
||||||
#ifndef CLUTTER_DISABLE_DEPRECATED
|
#ifndef CLUTTER_DISABLE_DEPRECATED
|
||||||
const GSList* clutter_x11_get_input_devices (void) G_GNUC_DEPRECATED;
|
CLUTTER_DEPRECATED_FOR(clutter_device_manager_peek_devices)
|
||||||
|
const GSList* clutter_x11_get_input_devices (void);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void clutter_x11_enable_xinput (void);
|
void clutter_x11_enable_xinput (void);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user