]> Pileus Git - ~andy/gtk/blobdiff - gdk/gdkframeclock.h
GdkDisplay: handle multiple calls to _gdk_display_pause_events()
[~andy/gtk] / gdk / gdkframeclock.h
index a733b558a9ec2b9ccde64dd9324f693ed192454d..d75fce984a2c43ffc07c8ded9d5d44d5c50a12a4 100644 (file)
 
 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_NONE          = 0,
+  GDK_FRAME_CLOCK_PHASE_FLUSH_EVENTS  = 1 << 0,
+  GDK_FRAME_CLOCK_PHASE_BEFORE_PAINT  = 1 << 1,
+  GDK_FRAME_CLOCK_PHASE_UPDATE        = 1 << 2,
+  GDK_FRAME_CLOCK_PHASE_LAYOUT        = 1 << 3,
+  GDK_FRAME_CLOCK_PHASE_PAINT         = 1 << 4,
+  GDK_FRAME_CLOCK_PHASE_RESUME_EVENTS = 1 << 5,
+  GDK_FRAME_CLOCK_PHASE_AFTER_PAINT   = 1 << 6
 } GdkFrameClockPhase;
 
 struct _GdkFrameClockInterface
@@ -66,10 +89,13 @@ struct _GdkFrameClockInterface
 
   /* signals */
   /* void (* frame_requested)    (GdkFrameClock *clock); */
+  /* void (* flush_events)       (GdkFrameClock *clock); */
   /* void (* before_paint)       (GdkFrameClock *clock); */
+  /* void (* update)             (GdkFrameClock *clock); */
   /* void (* layout)             (GdkFrameClock *clock); */
   /* void (* paint)              (GdkFrameClock *clock); */
   /* void (* after_paint)        (GdkFrameClock *clock); */
+  /* void (* resume_events)      (GdkFrameClock *clock); */
 };
 
 GType    gdk_frame_clock_get_type             (void) G_GNUC_CONST;