forked from AuroraMiddleware/gtk
API: stylecontext: Remove old unused animation functions
This commit is contained in:
parent
f2c455fedb
commit
66dd954290
@ -5805,11 +5805,6 @@ gtk_style_context_get_font
|
||||
gtk_style_context_invalidate
|
||||
gtk_style_context_state_is_running
|
||||
gtk_style_context_lookup_color
|
||||
gtk_style_context_notify_state_change
|
||||
gtk_style_context_pop_animatable_region
|
||||
gtk_style_context_push_animatable_region
|
||||
gtk_style_context_cancel_animations
|
||||
gtk_style_context_scroll_animations
|
||||
gtk_style_context_remove_provider
|
||||
gtk_style_context_remove_provider_for_screen
|
||||
gtk_style_context_reset_widgets
|
||||
|
@ -1053,37 +1053,6 @@ gtk_style_context_get_scale (GtkStyleContext *context)
|
||||
return _gtk_style_cascade_get_scale (context->priv->cascade);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_context_state_is_running:
|
||||
* @context: a #GtkStyleContext
|
||||
* @state: a widget state
|
||||
* @progress: (out): return location for the transition progress
|
||||
*
|
||||
* Returns %TRUE if there is a transition animation running for the
|
||||
* current region (see gtk_style_context_push_animatable_region()).
|
||||
*
|
||||
* If @progress is not %NULL, the animation progress will be returned
|
||||
* there, 0.0 means the state is closest to being unset, while 1.0 means
|
||||
* it’s closest to being set. This means transition animation will
|
||||
* run from 0 to 1 when @state is being set and from 1 to 0 when
|
||||
* it’s being unset.
|
||||
*
|
||||
* Returns: %TRUE if there is a running transition animation for @state.
|
||||
*
|
||||
* Since: 3.0
|
||||
*
|
||||
* Deprecated: 3.6: This function always returns %FALSE
|
||||
**/
|
||||
gboolean
|
||||
gtk_style_context_state_is_running (GtkStyleContext *context,
|
||||
GtkStateType state,
|
||||
gdouble *progress)
|
||||
{
|
||||
g_return_val_if_fail (GTK_IS_STYLE_CONTEXT (context), FALSE);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_context_set_path:
|
||||
* @context: a #GtkStyleContext
|
||||
@ -2202,171 +2171,6 @@ gtk_style_context_lookup_color (GtkStyleContext *context,
|
||||
return _gtk_style_context_resolve_color (context, value, color);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_context_notify_state_change:
|
||||
* @context: a #GtkStyleContext
|
||||
* @window: a #GdkWindow
|
||||
* @region_id: (allow-none): animatable region to notify on, or %NULL.
|
||||
* See gtk_style_context_push_animatable_region()
|
||||
* @state: state to trigger transition for
|
||||
* @state_value: %TRUE if @state is the state we are changing to,
|
||||
* %FALSE if we are changing away from it
|
||||
*
|
||||
* Notifies a state change on @context, so if the current style makes use
|
||||
* of transition animations, one will be started so all rendered elements
|
||||
* under @region_id are animated for state @state being set to value
|
||||
* @state_value.
|
||||
*
|
||||
* The @window parameter is used in order to invalidate the rendered area
|
||||
* as the animation runs, so make sure it is the same window that is being
|
||||
* rendered on by the gtk_render_*() functions.
|
||||
*
|
||||
* If @region_id is %NULL, all rendered elements using @context will be
|
||||
* affected by this state transition.
|
||||
*
|
||||
* As a practical example, a #GtkButton notifying a state transition on
|
||||
* the prelight state:
|
||||
* |[<!-- language="C" -->
|
||||
* gtk_style_context_notify_state_change (context,
|
||||
* gtk_widget_get_window (widget),
|
||||
* NULL,
|
||||
* GTK_STATE_PRELIGHT,
|
||||
* button->in_button);
|
||||
* ]|
|
||||
*
|
||||
* Can be handled in the CSS file like this:
|
||||
* |[
|
||||
* GtkButton {
|
||||
* background-color: #f00
|
||||
* }
|
||||
*
|
||||
* GtkButton:hover {
|
||||
* background-color: #fff;
|
||||
* transition: 200ms linear
|
||||
* }
|
||||
* ]|
|
||||
*
|
||||
* This combination will animate the button background from red to white
|
||||
* if a pointer enters the button, and back to red if the pointer leaves
|
||||
* the button.
|
||||
*
|
||||
* Note that @state is used when finding the transition parameters, which
|
||||
* is why the style places the transition under the :hover pseudo-class.
|
||||
*
|
||||
* Since: 3.0
|
||||
*
|
||||
* Deprecated: 3.6: This function does nothing.
|
||||
**/
|
||||
void
|
||||
gtk_style_context_notify_state_change (GtkStyleContext *context,
|
||||
GdkWindow *window,
|
||||
gpointer region_id,
|
||||
GtkStateType state,
|
||||
gboolean state_value)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
g_return_if_fail (state > GTK_STATE_NORMAL && state <= GTK_STATE_FOCUSED);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_context_cancel_animations:
|
||||
* @context: a #GtkStyleContext
|
||||
* @region_id: (allow-none): animatable region to stop, or %NULL.
|
||||
* See gtk_style_context_push_animatable_region()
|
||||
*
|
||||
* Stops all running animations for @region_id and all animatable
|
||||
* regions underneath.
|
||||
*
|
||||
* A %NULL @region_id will stop all ongoing animations in @context,
|
||||
* when dealing with a #GtkStyleContext obtained through
|
||||
* gtk_widget_get_style_context(), this is normally done for you
|
||||
* in all circumstances you would expect all widget to be stopped,
|
||||
* so this should be only used in complex widgets with different
|
||||
* animatable regions.
|
||||
*
|
||||
* Since: 3.0
|
||||
*
|
||||
* Deprecated: 3.6: This function does nothing.
|
||||
**/
|
||||
void
|
||||
gtk_style_context_cancel_animations (GtkStyleContext *context,
|
||||
gpointer region_id)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_context_scroll_animations:
|
||||
* @context: a #GtkStyleContext
|
||||
* @window: a #GdkWindow used previously in
|
||||
* gtk_style_context_notify_state_change()
|
||||
* @dx: Amount to scroll in the X axis
|
||||
* @dy: Amount to scroll in the Y axis
|
||||
*
|
||||
* This function is analogous to gdk_window_scroll(), and
|
||||
* should be called together with it so the invalidation
|
||||
* areas for any ongoing animation are scrolled together
|
||||
* with it.
|
||||
*
|
||||
* Since: 3.0
|
||||
*
|
||||
* Deprecated: 3.6: This function does nothing.
|
||||
**/
|
||||
void
|
||||
gtk_style_context_scroll_animations (GtkStyleContext *context,
|
||||
GdkWindow *window,
|
||||
gint dx,
|
||||
gint dy)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
||||
g_return_if_fail (GDK_IS_WINDOW (window));
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_context_push_animatable_region:
|
||||
* @context: a #GtkStyleContext
|
||||
* @region_id: unique identifier for the animatable region
|
||||
*
|
||||
* Pushes an animatable region, so all further gtk_render_*() calls between
|
||||
* this call and the following gtk_style_context_pop_animatable_region()
|
||||
* will potentially show transition animations for this region if
|
||||
* gtk_style_context_notify_state_change() is called for a given state,
|
||||
* and the current theme/style defines transition animations for state
|
||||
* changes.
|
||||
*
|
||||
* The @region_id used must be unique in @context so the themes
|
||||
* can uniquely identify rendered elements subject to a state transition.
|
||||
*
|
||||
* Since: 3.0
|
||||
*
|
||||
* Deprecated: 3.6: This function does nothing.
|
||||
**/
|
||||
void
|
||||
gtk_style_context_push_animatable_region (GtkStyleContext *context,
|
||||
gpointer region_id)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
||||
g_return_if_fail (region_id != NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gtk_style_context_pop_animatable_region:
|
||||
* @context: a #GtkStyleContext
|
||||
*
|
||||
* Pops an animatable region from @context.
|
||||
* See gtk_style_context_push_animatable_region().
|
||||
*
|
||||
* Since: 3.0
|
||||
*
|
||||
* Deprecated: 3.6: This function does nothing.
|
||||
**/
|
||||
void
|
||||
gtk_style_context_pop_animatable_region (GtkStyleContext *context)
|
||||
{
|
||||
g_return_if_fail (GTK_IS_STYLE_CONTEXT (context));
|
||||
}
|
||||
|
||||
static GtkCssStyleChange magic_number;
|
||||
|
||||
void
|
||||
|
@ -1036,11 +1036,6 @@ void gtk_style_context_set_scale (GtkStyleContext *context,
|
||||
GDK_AVAILABLE_IN_3_10
|
||||
gint gtk_style_context_get_scale (GtkStyleContext *context);
|
||||
|
||||
GDK_DEPRECATED_IN_3_6
|
||||
gboolean gtk_style_context_state_is_running (GtkStyleContext *context,
|
||||
GtkStateType state,
|
||||
gdouble *progress);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_style_context_set_path (GtkStyleContext *context,
|
||||
GtkWidgetPath *path);
|
||||
@ -1120,27 +1115,6 @@ gboolean gtk_style_context_lookup_color (GtkStyleContext *context,
|
||||
const gchar *color_name,
|
||||
GdkRGBA *color);
|
||||
|
||||
GDK_DEPRECATED_IN_3_6
|
||||
void gtk_style_context_notify_state_change (GtkStyleContext *context,
|
||||
GdkWindow *window,
|
||||
gpointer region_id,
|
||||
GtkStateType state,
|
||||
gboolean state_value);
|
||||
GDK_DEPRECATED_IN_3_6
|
||||
void gtk_style_context_cancel_animations (GtkStyleContext *context,
|
||||
gpointer region_id);
|
||||
GDK_DEPRECATED_IN_3_6
|
||||
void gtk_style_context_scroll_animations (GtkStyleContext *context,
|
||||
GdkWindow *window,
|
||||
gint dx,
|
||||
gint dy);
|
||||
|
||||
GDK_DEPRECATED_IN_3_6
|
||||
void gtk_style_context_push_animatable_region (GtkStyleContext *context,
|
||||
gpointer region_id);
|
||||
GDK_DEPRECATED_IN_3_6
|
||||
void gtk_style_context_pop_animatable_region (GtkStyleContext *context);
|
||||
|
||||
/* Some helper functions to retrieve most common properties */
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gtk_style_context_get_color (GtkStyleContext *context,
|
||||
|
Loading…
Reference in New Issue
Block a user