[mutter/gbsneto/more-screencast: 4/9] clutter/stage: Add new before_paint signal hook
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gbsneto/more-screencast: 4/9] clutter/stage: Add new before_paint signal hook
- Date: Tue, 1 Sep 2020 13:26:46 +0000 (UTC)
commit 2959b06ee7d00bd7f5ec82596efb3dfe363dd488
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Mon Aug 31 10:22:35 2020 -0300
clutter/stage: Add new before_paint signal hook
It'll allow subclasses to get notified of the before-paint
signal without having to connect to it. This will allow
MetaStage to have proper watches being fired there without
the cost of the signal handling machinery.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1421
clutter/clutter/clutter-stage.c | 2 +-
clutter/clutter/clutter-stage.h | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/clutter/clutter/clutter-stage.c b/clutter/clutter/clutter-stage.c
index be690ca7df..52310ca0b4 100644
--- a/clutter/clutter/clutter-stage.c
+++ b/clutter/clutter/clutter-stage.c
@@ -1874,7 +1874,7 @@ clutter_stage_class_init (ClutterStageClass *klass)
g_signal_new (I_("before-paint"),
G_TYPE_FROM_CLASS (gobject_class),
G_SIGNAL_RUN_LAST,
- 0,
+ G_STRUCT_OFFSET (ClutterStageClass, before_paint),
NULL, NULL, NULL,
G_TYPE_NONE, 1,
CLUTTER_TYPE_STAGE_VIEW);
diff --git a/clutter/clutter/clutter-stage.h b/clutter/clutter/clutter-stage.h
index cceb8d8362..7d94b68c38 100644
--- a/clutter/clutter/clutter-stage.h
+++ b/clutter/clutter/clutter-stage.h
@@ -80,6 +80,9 @@ struct _ClutterStageClass
void (* activate) (ClutterStage *stage);
void (* deactivate) (ClutterStage *stage);
+ void (* before_paint) (ClutterStage *stage,
+ ClutterStageView *view);
+
void (* paint_view) (ClutterStage *stage,
ClutterStageView *view,
const cairo_region_t *redraw_clip);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]