[gtk/wip/baedert/for-master: 739/748] cssimagepaintable: Implement is_computed()
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/for-master: 739/748] cssimagepaintable: Implement is_computed()
- Date: Fri, 24 Jan 2020 05:21:25 +0000 (UTC)
commit aea27b86c1b8f24981952b621dc93fd4b0d8232a
Author: Timm Bäder <mail baedert org>
Date: Mon Jan 20 10:20:26 2020 +0100
cssimagepaintable: Implement is_computed()
gtk/gtkcssimagepaintable.c | 9 +++++++++
1 file changed, 9 insertions(+)
---
diff --git a/gtk/gtkcssimagepaintable.c b/gtk/gtkcssimagepaintable.c
index 327ca90862..d4056ab263 100644
--- a/gtk/gtkcssimagepaintable.c
+++ b/gtk/gtkcssimagepaintable.c
@@ -150,6 +150,14 @@ gtk_css_image_paintable_dispose (GObject *object)
G_OBJECT_CLASS (gtk_css_image_paintable_parent_class)->dispose (object);
}
+static gboolean
+gtk_css_image_paintable_is_computed (GtkCssImage *image)
+{
+ GtkCssImagePaintable *self = GTK_CSS_IMAGE_PAINTABLE (image);
+
+ return (gdk_paintable_get_flags (self->paintable) & GDK_PAINTABLE_IMMUTABLE) == GDK_PAINTABLE_IMMUTABLE;
+}
+
static void
gtk_css_image_paintable_class_init (GtkCssImagePaintableClass *klass)
{
@@ -164,6 +172,7 @@ gtk_css_image_paintable_class_init (GtkCssImagePaintableClass *klass)
image_class->compute = gtk_css_image_paintable_compute;
image_class->equal = gtk_css_image_paintable_equal;
image_class->is_dynamic = gtk_css_image_paintable_is_dynamic;
+ image_class->is_computed = gtk_css_image_paintable_is_computed;
image_class->get_dynamic_image = gtk_css_image_paintable_get_dynamic_image;
object_class->dispose = gtk_css_image_paintable_dispose;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]