diff options
author | Emmanuele Bassi <ebassi@linux.intel.com> | 2011-06-22 13:00:55 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@linux.intel.com> | 2011-06-22 13:00:55 +0100 |
commit | eae2ab6516c114ad3e9452dbbbc3111b9f047e6d (patch) | |
tree | 1efc3c1b5dcc73825fccfd2bd081273856f261c5 | |
parent | c4a53e92de9105951f8a41cedd882459e331aab6 (diff) | |
download | clutter-eae2ab6516c114ad3e9452dbbbc3111b9f047e6d.tar.gz |
[2.0] Remove global motion event delivery toggle
-rw-r--r-- | clutter/clutter-main.c | 72 | ||||
-rw-r--r-- | clutter/clutter-main.h | 5 | ||||
-rw-r--r-- | clutter/clutter-private.h | 2 | ||||
-rw-r--r-- | clutter/clutter-stage.c | 9 |
4 files changed, 1 insertions, 87 deletions
diff --git a/clutter/clutter-main.c b/clutter/clutter-main.c index 4341a28af..a6f4d6cbb 100644 --- a/clutter/clutter-main.c +++ b/clutter/clutter-main.c @@ -242,69 +242,6 @@ clutter_redraw (ClutterStage *stage) clutter_stage_ensure_redraw (stage); } -/** - * clutter_set_motion_events_enabled: - * @enable: %TRUE to enable per-actor motion events - * - * Sets whether per-actor motion events should be enabled or not on - * all #ClutterStage<!-- -->s managed by Clutter. - * - * If @enable is %FALSE the following events will not work: - * <itemizedlist> - * <listitem><para>ClutterActor::motion-event, unless on the - * #ClutterStage</para></listitem> - * <listitem><para>ClutterActor::enter-event</para></listitem> - * <listitem><para>ClutterActor::leave-event</para></listitem> - * </itemizedlist> - * - * Since: 0.6 - * - * Deprecated: 1.8: Use clutter_stage_set_motion_events_enabled() instead. - */ -void -clutter_set_motion_events_enabled (gboolean enable) -{ - ClutterStageManager *stage_manager; - ClutterMainContext *context; - const GSList *l; - - enable = !!enable; - - context = _clutter_context_get_default (); - if (context->motion_events_per_actor == enable) - return; - - /* store the flag for later query and for newly created stages */ - context->motion_events_per_actor = enable; - - /* propagate the change to all stages */ - stage_manager = clutter_stage_manager_get_default (); - - for (l = clutter_stage_manager_peek_stages (stage_manager); - l != NULL; - l = l->next) - { - clutter_stage_set_motion_events_enabled (l->data, enable); - } -} - -/** - * clutter_get_motion_events_enabled: - * - * Gets whether the per-actor motion events are enabled. - * - * Return value: %TRUE if the motion events are enabled - * - * Since: 0.6 - * - * Deprecated: 1.8: Use clutter_stage_get_motion_events_enabled() instead. - */ -gboolean -clutter_get_motion_events_enabled (void) -{ - return _clutter_context_get_motion_events_enabled (); -} - ClutterActor * _clutter_get_actor_by_id (ClutterStage *stage, guint32 actor_id) @@ -1087,7 +1024,6 @@ _clutter_context_get_default (void) ctx->backend = g_object_new (_clutter_backend_impl_get_type (), NULL); ctx->is_initialized = FALSE; - ctx->motion_events_per_actor = TRUE; #ifdef CLUTTER_ENABLE_DEBUG ctx->timer = g_timer_new (); @@ -3094,11 +3030,3 @@ _clutter_context_pop_shader_stack (ClutterActor *actor) return _clutter_context_peek_shader_stack (); } - -gboolean -_clutter_context_get_motion_events_enabled (void) -{ - ClutterMainContext *context = _clutter_context_get_default (); - - return context->motion_events_per_actor; -} diff --git a/clutter/clutter-main.h b/clutter/clutter-main.h index 43aa28f6e..33a45e92a 100644 --- a/clutter/clutter-main.h +++ b/clutter/clutter-main.h @@ -132,11 +132,6 @@ guint clutter_threads_add_repaint_func (GSourceFunc func, GDestroyNotify notify); void clutter_threads_remove_repaint_func (guint handle_id); -#ifndef CLUTTER_DISABLE_DEPRECATED -void clutter_set_motion_events_enabled (gboolean enable); -gboolean clutter_get_motion_events_enabled (void); -#endif /* CLUTTER_DISABLE_DEPRECATED */ - void clutter_set_default_frame_rate (guint frames_per_sec); guint clutter_get_default_frame_rate (void); diff --git a/clutter/clutter-private.h b/clutter/clutter-private.h index 2c3dd6eb9..bf57b2f5f 100644 --- a/clutter/clutter-private.h +++ b/clutter/clutter-private.h @@ -162,7 +162,6 @@ struct _ClutterMainContext /* boolean flags */ guint is_initialized : 1; - guint motion_events_per_actor : 1; guint defer_display_setup : 1; guint options_parsed : 1; }; @@ -188,7 +187,6 @@ ClutterActor * _clutter_context_pop_shader_stack (Clutter 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); const gchar *_clutter_gettext (const gchar *str); diff --git a/clutter/clutter-stage.c b/clutter/clutter-stage.c index db68a84d5..6039b1dc7 100644 --- a/clutter/clutter-stage.c +++ b/clutter/clutter-stage.c @@ -1997,14 +1997,7 @@ clutter_stage_init (ClutterStage *self) priv->use_fog = FALSE; priv->throttle_motion_events = TRUE; priv->min_size_changed = FALSE; - - /* XXX - we need to keep the invariant that calling - * clutter_set_motion_event_enabled() before the stage creation - * will cause motion event delivery to be disabled on any newly - * created stage. this can go away when we break API and remove - * deprecated functions. - */ - priv->motion_events_enabled = _clutter_context_get_motion_events_enabled (); + priv->motion_events_enabled = TRUE; priv->color = default_stage_color; |