[gtk/wip/baedert/transforms6: 11/31] widget: Add gtk_widget_set_transform
- From: Timm Bäder <baedert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/baedert/transforms6: 11/31] widget: Add gtk_widget_set_transform
- Date: Thu, 29 Nov 2018 08:09:19 +0000 (UTC)
commit 4f34db10708858e0b71fb7fdd050524bd5e371b9
Author: Timm Bäder <mail baedert org>
Date: Sat Jul 28 12:13:30 2018 +0200
widget: Add gtk_widget_set_transform
This might not stay until the end but for now it's good enough to test
widget transforms.
gtk/gtkwidget.c | 9 +++++++++
gtk/gtkwidget.h | 4 ++++
2 files changed, 13 insertions(+)
---
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c
index 3a69ed02ce..f49c63a086 100644
--- a/gtk/gtkwidget.c
+++ b/gtk/gtkwidget.c
@@ -13682,3 +13682,12 @@ gtk_widget_get_height (GtkWidget *widget)
border.top - border.bottom -
padding.top - padding.bottom;
}
+
+void
+gtk_widget_set_transform (GtkWidget *widget,
+ const graphene_matrix_t *transform)
+{
+ GtkWidgetPrivate *priv = gtk_widget_get_instance_private (widget);
+
+ graphene_matrix_init_from_matrix (&priv->transform, transform);
+}
diff --git a/gtk/gtkwidget.h b/gtk/gtkwidget.h
index 44e779c71a..c797cb7d5d 100644
--- a/gtk/gtkwidget.h
+++ b/gtk/gtkwidget.h
@@ -1051,6 +1051,10 @@ void gtk_widget_snapshot_child (GtkWidget *widget,
GtkWidget *child,
GtkSnapshot *snapshot);
+GDK_AVAILABLE_IN_ALL
+void gtk_widget_set_transform (GtkWidget *widget,
+ const graphene_matrix_t *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]