[gtk/wip/otte/boxes: 46/52] root: Add gtk_root_get_surface_transform()
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/otte/boxes: 46/52] root: Add gtk_root_get_surface_transform()
- Date: Fri, 15 Feb 2019 05:57:17 +0000 (UTC)
commit 446713fb8b03ec058833e2380c52637a48f9ff1c
Author: Benjamin Otte <otte redhat com>
Date: Sat Feb 9 22:15:32 2019 +0100
root: Add gtk_root_get_surface_transform()
The function isn't used yet, so this is just infrastructure.
gtk/gtkroot.c | 25 +++++++++++++++++++++++++
gtk/gtkroot.h | 4 ++++
gtk/gtkrootprivate.h | 3 +++
gtk/gtkwindow.c | 10 ++++++++++
4 files changed, 42 insertions(+)
---
diff --git a/gtk/gtkroot.c b/gtk/gtkroot.c
index 23674e48a1..d94dd2e273 100644
--- a/gtk/gtkroot.c
+++ b/gtk/gtkroot.c
@@ -43,10 +43,20 @@ gtk_root_default_get_display (GtkRoot *self)
return gdk_display_get_default ();
}
+static void
+gtk_root_default_get_surface_transform (GtkRoot *self,
+ int *x,
+ int *y)
+{
+ *x = 0;
+ *y = 0;
+}
+
static void
gtk_root_default_init (GtkRootInterface *iface)
{
iface->get_display = gtk_root_default_get_display;
+ iface->get_surface_transform = gtk_root_default_get_surface_transform;
}
GdkDisplay *
@@ -60,3 +70,18 @@ gtk_root_get_display (GtkRoot *self)
return iface->get_display (self);
}
+
+void
+gtk_root_get_surface_transform (GtkRoot *self,
+ int *x,
+ int *y)
+{
+ GtkRootInterface *iface;
+
+ g_return_if_fail (GTK_IS_ROOT (self));
+ g_return_if_fail (x != 0);
+ g_return_if_fail (y != 0);
+
+ iface = GTK_ROOT_GET_IFACE (self);
+ return iface->get_surface_transform (self, x, y);
+}
diff --git a/gtk/gtkroot.h b/gtk/gtkroot.h
index e1d7ee670d..b0680462a5 100644
--- a/gtk/gtkroot.h
+++ b/gtk/gtkroot.h
@@ -46,6 +46,10 @@ struct _GtkRootInterface
/*< public >*/
GdkDisplay * (* get_display) (GtkRoot *self);
+
+ void (* get_surface_transform) (GtkRoot *root,
+ int *x,
+ int *y);
};
diff --git a/gtk/gtkrootprivate.h b/gtk/gtkrootprivate.h
index 6d633cf2bc..964e832ba0 100644
--- a/gtk/gtkrootprivate.h
+++ b/gtk/gtkrootprivate.h
@@ -7,6 +7,9 @@ G_BEGIN_DECLS
GdkDisplay * gtk_root_get_display (GtkRoot *root);
+void gtk_root_get_surface_transform (GtkRoot *self,
+ int *x,
+ int *y);
G_END_DECLS
#endif /* __GTK_ROOT_PRIVATE_H__ */
diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c
index 2497c866c5..ba2b37c315 100644
--- a/gtk/gtkwindow.c
+++ b/gtk/gtkwindow.c
@@ -2507,10 +2507,20 @@ gtk_window_root_get_display (GtkRoot *root)
return priv->display;
}
+static void
+gtk_window_root_get_surface_transform (GtkRoot *root,
+ int *x,
+ int *y)
+{
+ *x = 0;
+ *y = 0;
+}
+
static void
gtk_window_root_interface_init (GtkRootInterface *iface)
{
iface->get_display = gtk_window_root_get_display;
+ iface->get_surface_transform = gtk_window_root_get_surface_transform;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]