From a2408088240d25157f56f85dd0dcdef6fc063682 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 10 Apr 2012 15:37:35 +0200 Subject: stylecontext: Add an animating framework The design principles were: - synchronized If multiple style contexts are animating, they should all do an animation step at the same time. - degrades well Even when there's thousands of style contexts all animating at the same time, the animation steps don't starve the CPU. This is achieved by making sure the timeout is really fast. It just sets a bunch of flags. - no hidden bottlenecks Turning animatability on or off on a style context is O(1). So far it is unused. --- gtk/gtkcsstypesprivate.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'gtk/gtkcsstypesprivate.h') diff --git a/gtk/gtkcsstypesprivate.h b/gtk/gtkcsstypesprivate.h index 8890a5cce9..b0db18d0b9 100644 --- a/gtk/gtkcsstypesprivate.h +++ b/gtk/gtkcsstypesprivate.h @@ -43,10 +43,11 @@ typedef enum { /*< skip >*/ GTK_CSS_CHANGE_PARENT_SIBLING_POSITION = (1 << 14), GTK_CSS_CHANGE_PARENT_SIBLING_STATE = (1 << 15), /* add more */ - GTK_CSS_CHANGE_SOURCE = (1 << 16) + GTK_CSS_CHANGE_SOURCE = (1 << 16), + GTK_CSS_CHANGE_ANIMATE = (1 << 17) } GtkCssChange; -#define GTK_CSS_CHANGE_ANY ((1 << 17) - 1) +#define GTK_CSS_CHANGE_ANY ((1 << 18) - 1) #define GTK_CSS_CHANGE_ANY_SELF (GTK_CSS_CHANGE_CLASS | GTK_CSS_CHANGE_NAME | GTK_CSS_CHANGE_POSITION | GTK_CSS_CHANGE_STATE) #define GTK_CSS_CHANGE_ANY_SIBLING (GTK_CSS_CHANGE_SIBLING_CLASS | GTK_CSS_CHANGE_SIBLING_NAME | \ GTK_CSS_CHANGE_SIBLING_POSITION | GTK_CSS_CHANGE_SIBLING_STATE) -- cgit v1.2.1