[gtk/wip/baedert/transforms6: 20/31] widget Add gtk_widget_get_transform



commit 831da3c7029e3f03851b1981367426845f13b44d
Author: Timm Bäder <mail baedert org>
Date:   Sun Aug 12 13:09:59 2018 +0200

    widget Add gtk_widget_get_transform

 gtk/gtkwidget.c | 12 ++++++++++++
 gtk/gtkwidget.h |  3 +++
 2 files changed, 15 insertions(+)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index bee2948f11..4b13b08eb7 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -13786,3 +13786,15 @@ gtk_widget_set_transform (GtkWidget               *widget,
 
   graphene_matrix_init_from_matrix (&priv->transform, transform);
 }
+
+void
+gtk_widget_get_transform (GtkWidget         *widget,
+                          graphene_matrix_t *out_transform)
+{
+  GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
+
+  g_return_if_fail (GTK_IS_WIDGET (widget));
+  g_return_if_fail (out_transform != NULL);
+
+  *out_transform = priv->transform;
+}
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index de4caafca6..c094eaf3ab 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -1062,6 +1062,9 @@ void                    gtk_widget_snapshot_child       (GtkWidget   *widget,
 GDK_AVAILABLE_IN_ALL
 void                    gtk_widget_set_transform        (GtkWidget               *widget,
                                                          const graphene_matrix_t *transform);
+GDK_AVAILABLE_IN_ALL
+void                    gtk_widget_get_transform        (GtkWidget               *widget,
+                                                         graphene_matrix_t       *out_transform);
 
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkWidget, g_object_unref)
 G_DEFINE_AUTOPTR_CLEANUP_FUNC(GtkRequisition, gtk_requisition_free)


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]