summaryrefslogtreecommitdiff
path: root/gdk/gdkframeclock.h
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2012-09-26 15:44:30 -0400
committerOwen W. Taylor <otaylor@fishsoup.net>2013-02-14 17:19:48 -0500
commit344a69880a73971b9d8839e5e19f693c0cb10d90 (patch)
treefb8d6afce12fbd06175d578e0c9439a873b78e70 /gdk/gdkframeclock.h
parent7dfa41218823d197cf21f74f37036cc66480d455 (diff)
downloadgtk+-344a69880a73971b9d8839e5e19f693c0cb10d90.tar.gz
Add an UPDATE phase and GdkFrameClockTarget, use for GtkStyleContext
Switch GtkStyleContext to using GdkFrameClock. To do this, add a new UPDATE phase to GdkFrameClock. Add a GdkFrameClockTarget interface with a single set_clock() method, and use this to deal with the fact that GtkWidget only has a frame clock when realized. https://bugzilla.gnome.org/show_bug.cgi?id=685460
Diffstat (limited to 'gdk/gdkframeclock.h')
-rw-r--r--gdk/gdkframeclock.h34
1 files changed, 28 insertions, 6 deletions
diff --git a/gdk/gdkframeclock.h b/gdk/gdkframeclock.h
index a733b558a9..ae445737df 100644
--- a/gdk/gdkframeclock.h
+++ b/gdk/gdkframeclock.h
@@ -35,20 +35,41 @@
G_BEGIN_DECLS
+typedef struct _GdkFrameClock GdkFrameClock;
+typedef struct _GdkFrameClockInterface GdkFrameClockInterface;
+typedef struct _GdkFrameClockTarget GdkFrameClockTarget;
+typedef struct _GdkFrameClockTargetInterface GdkFrameClockTargetInterface;
+
+#define GDK_TYPE_FRAME_CLOCK_TARGET (gdk_frame_clock_target_get_type ())
+#define GDK_FRAME_CLOCK_TARGET(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_FRAME_CLOCK_TARGET, GdkFrameClockTarget))
+#define GDK_IS_FRAME_CLOCK_TARGET(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_FRAME_CLOCK_TARGET))
+#define GDK_FRAME_CLOCK_TARGET_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GDK_TYPE_FRAME_CLOCK_TARGET, GdkFrameClockTargetInterface))
+
+struct _GdkFrameClockTargetInterface
+{
+ GTypeInterface base_iface;
+
+ void (*set_clock) (GdkFrameClockTarget *target,
+ GdkFrameClock *clock);
+};
+
+GType gdk_frame_clock_target_get_type (void) G_GNUC_CONST;
+
+void gdk_frame_clock_target_set_clock (GdkFrameClockTarget *target,
+ GdkFrameClock *clock);
+
#define GDK_TYPE_FRAME_CLOCK (gdk_frame_clock_get_type ())
#define GDK_FRAME_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GDK_TYPE_FRAME_CLOCK, GdkFrameClock))
#define GDK_IS_FRAME_CLOCK(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GDK_TYPE_FRAME_CLOCK))
#define GDK_FRAME_CLOCK_GET_IFACE(inst) (G_TYPE_INSTANCE_GET_INTERFACE ((inst), GDK_TYPE_FRAME_CLOCK, GdkFrameClockInterface))
-typedef struct _GdkFrameClock GdkFrameClock;
-typedef struct _GdkFrameClockInterface GdkFrameClockInterface;
-
typedef enum {
GDK_FRAME_CLOCK_PHASE_NONE = 0,
GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT = 1 << 0,
- GDK_FRAME_CLOCK_PHASE_LAYOUT = 1 << 1,
- GDK_FRAME_CLOCK_PHASE_PAINT = 1 << 2,
- GDK_FRAME_CLOCK_PHASE_AFTER_PAINT = 1 << 3
+ GDK_FRAME_CLOCK_PHASE_UPDATE = 1 << 1,
+ GDK_FRAME_CLOCK_PHASE_LAYOUT = 1 << 2,
+ GDK_FRAME_CLOCK_PHASE_PAINT = 1 << 3,
+ GDK_FRAME_CLOCK_PHASE_AFTER_PAINT = 1 << 4
} GdkFrameClockPhase;
struct _GdkFrameClockInterface
@@ -67,6 +88,7 @@ struct _GdkFrameClockInterface
/* signals */
/* void (* frame_requested) (GdkFrameClock *clock); */
/* void (* before_paint) (GdkFrameClock *clock); */
+ /* void (* update) (GdkFrameClock *clock); */
/* void (* layout) (GdkFrameClock *clock); */
/* void (* paint) (GdkFrameClock *clock); */
/* void (* after_paint) (GdkFrameClock *clock); */