diff options
author | Owen W. Taylor <otaylor@fishsoup.net> | 2012-09-26 15:44:30 -0400 |
---|---|---|
committer | Owen W. Taylor <otaylor@fishsoup.net> | 2013-02-14 17:19:48 -0500 |
commit | 344a69880a73971b9d8839e5e19f693c0cb10d90 (patch) | |
tree | fb8d6afce12fbd06175d578e0c9439a873b78e70 /gdk/gdkframeclock.c | |
parent | 7dfa41218823d197cf21f74f37036cc66480d455 (diff) | |
download | gtk+-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.c')
-rw-r--r-- | gdk/gdkframeclock.c | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/gdk/gdkframeclock.c b/gdk/gdkframeclock.c index d385123842..569ab6b52e 100644 --- a/gdk/gdkframeclock.c +++ b/gdk/gdkframeclock.c @@ -28,6 +28,19 @@ #include "gdkframeclock.h" +G_DEFINE_INTERFACE (GdkFrameClockTarget, gdk_frame_clock_target, G_TYPE_OBJECT) + +static void +gdk_frame_clock_target_default_init (GdkFrameClockTargetInterface *iface) +{ +} + +void gdk_frame_clock_target_set_clock (GdkFrameClockTarget *target, + GdkFrameClock *clock) +{ + GDK_FRAME_CLOCK_TARGET_GET_IFACE (target)->set_clock (target, clock); +} + /** * SECTION:frameclock * @Short_description: Frame clock syncs painting to a window or display @@ -79,6 +92,7 @@ G_DEFINE_INTERFACE (GdkFrameClock, gdk_frame_clock, G_TYPE_OBJECT) enum { FRAME_REQUESTED, BEFORE_PAINT, + UPDATE, LAYOUT, PAINT, AFTER_PAINT, @@ -124,6 +138,21 @@ gdk_frame_clock_default_init (GdkFrameClockInterface *iface) G_TYPE_NONE, 0); /** + * GdkFrameClock::update: + * @clock: the frame clock emitting the signal + * + * FIXME. + */ + signals[UPDATE] = + g_signal_new (g_intern_static_string ("update"), + GDK_TYPE_FRAME_CLOCK, + G_SIGNAL_RUN_LAST, + 0, + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); + + /** * GdkFrameClock::layout: * @clock: the frame clock emitting the signal * |