[gtk/wip/baedert/transforms6: 39/61] widget Add gtk_widget_get_transform



commit 49e1fa1064819f0d8b35e4243e7fe68693a98b70
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 45172a1802..a448af64c6 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -13699,3 +13699,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 bf54273ffd..01d7327116 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -1057,6 +1057,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]