[gtk/wip/baedert/transforms6: 251/273] widget Add gtk_widget_get_transform



commit cea975677f30487a95db03694e05e180c95bd235
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 97a00280b8..347190d672 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -13816,3 +13816,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 fdba3b170d..0b4a53f011 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -1061,6 +1061,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]