diff --git a/docs/reference/gtk/gtk4-sections.txt b/docs/reference/gtk/gtk4-sections.txt index ef1eaa0f0e..0ddedb183c 100644 --- a/docs/reference/gtk/gtk4-sections.txt +++ b/docs/reference/gtk/gtk4-sections.txt @@ -4865,7 +4865,6 @@ gtk_style_context_get_parent gtk_style_context_get_path gtk_style_context_get_property gtk_style_context_get_display -gtk_style_context_get_frame_clock gtk_style_context_get_state gtk_style_context_get_valist gtk_style_context_get_section @@ -4888,7 +4887,6 @@ gtk_style_context_remove_class gtk_style_context_has_class gtk_style_context_list_classes gtk_style_context_set_display -gtk_style_context_set_frame_clock gtk_style_context_set_state gtk_style_context_set_scale gtk_style_context_get_scale diff --git a/gtk/gtkstylecontext.c b/gtk/gtkstylecontext.c index 53888073f5..e9df80529c 100644 --- a/gtk/gtkstylecontext.c +++ b/gtk/gtkstylecontext.c @@ -123,8 +123,6 @@ struct _GtkStyleContextPrivate GtkCssNode *cssnode; GSList *saved_nodes; - GdkFrameClock *frame_clock; - GtkCssStyleChange *invalidating_context; }; typedef struct _GtkStyleContextPrivate GtkStyleContextPrivate; @@ -132,7 +130,6 @@ typedef struct _GtkStyleContextPrivate GtkStyleContextPrivate; enum { PROP_0, PROP_DISPLAY, - PROP_FRAME_CLOCK, PROP_PARENT, LAST_PROP }; @@ -212,13 +209,6 @@ gtk_style_context_class_init (GtkStyleContextClass *klass) GDK_TYPE_DISPLAY, GTK_PARAM_READWRITE); - properties[PROP_FRAME_CLOCK] = - g_param_spec_object ("paint-clock", - P_("FrameClock"), - P_("The associated GdkFrameClock"), - GDK_TYPE_FRAME_CLOCK, - GTK_PARAM_READWRITE); - /** * GtkStyleContext:parent: * @@ -344,9 +334,6 @@ gtk_style_context_impl_set_property (GObject *object, case PROP_DISPLAY: gtk_style_context_set_display (context, g_value_get_object (value)); break; - case PROP_FRAME_CLOCK: - gtk_style_context_set_frame_clock (context, g_value_get_object (value)); - break; case PROP_PARENT: gtk_style_context_set_parent (context, g_value_get_object (value)); break; @@ -370,9 +357,6 @@ gtk_style_context_impl_get_property (GObject *object, case PROP_DISPLAY: g_value_set_object (value, priv->display); break; - case PROP_FRAME_CLOCK: - g_value_set_object (value, priv->frame_clock); - break; case PROP_PARENT: g_value_set_object (value, priv->parent); break; @@ -1344,51 +1328,6 @@ gtk_style_context_get_display (GtkStyleContext *context) return priv->display; } -/** - * gtk_style_context_set_frame_clock: - * @context: a #GdkFrameClock - * @frame_clock: a #GdkFrameClock - * - * Attaches @context to the given frame clock. - * - * The frame clock is used for the timing of animations. - * - * If you are using a #GtkStyleContext returned from - * gtk_widget_get_style_context(), you do not need to - * call this yourself. - **/ -void -gtk_style_context_set_frame_clock (GtkStyleContext *context, - GdkFrameClock *frame_clock) -{ - GtkStyleContextPrivate *priv = gtk_style_context_get_instance_private (context); - - g_return_if_fail (GTK_IS_STYLE_CONTEXT (context)); - g_return_if_fail (frame_clock == NULL || GDK_IS_FRAME_CLOCK (frame_clock)); - - if (g_set_object (&priv->frame_clock, frame_clock)) - g_object_notify_by_pspec (G_OBJECT (context), properties[PROP_FRAME_CLOCK]); -} - -/** - * gtk_style_context_get_frame_clock: - * @context: a #GtkStyleContext - * - * Returns the #GdkFrameClock to which @context is attached. - * - * Returns: (nullable) (transfer none): a #GdkFrameClock, or %NULL - * if @context does not have an attached frame clock. - **/ -GdkFrameClock * -gtk_style_context_get_frame_clock (GtkStyleContext *context) -{ - GtkStyleContextPrivate *priv = gtk_style_context_get_instance_private (context); - - g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), NULL); - - return priv->frame_clock; -} - gboolean _gtk_style_context_resolve_color (GtkStyleContext *context, GtkCssValue *color, diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h index bfe513067f..0f349ff368 100644 --- a/gtk/gtkstylecontext.h +++ b/gtk/gtkstylecontext.h @@ -1018,12 +1018,6 @@ void gtk_style_context_set_display (GtkStyleContext *context, GDK_AVAILABLE_IN_ALL GdkDisplay *gtk_style_context_get_display (GtkStyleContext *context); -GDK_AVAILABLE_IN_ALL -void gtk_style_context_set_frame_clock (GtkStyleContext *context, - GdkFrameClock *frame_clock); -GDK_AVAILABLE_IN_ALL -GdkFrameClock *gtk_style_context_get_frame_clock (GtkStyleContext *context); - GDK_AVAILABLE_IN_ALL gboolean gtk_style_context_lookup_color (GtkStyleContext *context, const gchar *color_name, diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index 9595c6f2f7..69a5d2219b 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -3656,9 +3656,6 @@ gtk_widget_connect_frame_clock (GtkWidget *widget) } gtk_css_node_invalidate_frame_clock (priv->cssnode, FALSE); - - if (priv->context) - gtk_style_context_set_frame_clock (priv->context, frame_clock); } static void @@ -3681,9 +3678,6 @@ gtk_widget_disconnect_frame_clock (GtkWidget *widget) priv->clock_tick_id = 0; gdk_frame_clock_end_updating (frame_clock); } - - if (priv->context) - gtk_style_context_set_frame_clock (priv->context, NULL); } /** @@ -12208,7 +12202,6 @@ gtk_widget_get_style_context (GtkWidget *widget) if (G_UNLIKELY (priv->context == NULL)) { GdkDisplay *display; - GdkFrameClock *frame_clock; priv->context = gtk_style_context_new_for_node (priv->cssnode); @@ -12220,10 +12213,6 @@ gtk_widget_get_style_context (GtkWidget *widget) if (display) gtk_style_context_set_display (priv->context, display); - frame_clock = gtk_widget_get_frame_clock (widget); - if (frame_clock) - gtk_style_context_set_frame_clock (priv->context, frame_clock); - if (priv->parent) gtk_style_context_set_parent (priv->context, _gtk_widget_get_style_context (priv->parent));