[gtk+/wip/attachment-parameters: 2/24] gdkwindow: add gdk_window_set_attachment_parameters ()
- From: William Hua <williamhua src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+/wip/attachment-parameters: 2/24] gdkwindow: add gdk_window_set_attachment_parameters ()
- Date: Wed, 14 Oct 2015 16:33:46 +0000 (UTC)
commit 63b6f53ad22518d6ca8933a09eef8317c679bdea
Author: William Hua <william hua canonical com>
Date: Fri Sep 18 16:09:20 2015 -0400
gdkwindow: add gdk_window_set_attachment_parameters ()
docs/reference/gdk/gdk3-sections.txt | 1 +
gdk/gdkwindow.c | 24 ++++++++++++++++++++++++
gdk/gdkwindow.h | 5 +++++
gdk/gdkwindowimpl.h | 4 ++++
4 files changed, 34 insertions(+), 0 deletions(-)
---
diff --git a/docs/reference/gdk/gdk3-sections.txt b/docs/reference/gdk/gdk3-sections.txt
index 285242f..eca4dcf 100644
--- a/docs/reference/gdk/gdk3-sections.txt
+++ b/docs/reference/gdk/gdk3-sections.txt
@@ -491,6 +491,7 @@ GdkWMDecoration
gdk_window_set_functions
GdkWMFunction
gdk_get_default_root_window
+gdk_window_set_attachment_parameters
<SUBSECTION>
gdk_window_get_support_multidevice
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index 75d1034..0c28a8a 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -11519,3 +11519,27 @@ gdk_window_show_window_menu (GdkWindow *window,
else
return FALSE;
}
+
+/**
+ * gdk_window_set_attachment_parameters:
+ * @window: (transfer none) (not nullable): a #GdkWindow
+ * @parameters: (transfer none) (nullable): information for positioning @window
+ *
+ * Moves @window to the best position according to @parameters. The best
+ * position is decided by the backend.
+ *
+ * Since: 3.20
+ */
+void
+gdk_window_set_attachment_parameters (GdkWindow *window,
+ const GdkAttachmentParameters *parameters)
+{
+ GdkWindowImplClass *impl_class;
+
+ g_return_if_fail (GDK_IS_WINDOW (window));
+
+ impl_class = GDK_WINDOW_IMPL_GET_CLASS (window->impl);
+
+ if (impl_class->set_attachment_parameters)
+ impl_class->set_attachment_parameters (window, parameters);
+}
diff --git a/gdk/gdkwindow.h b/gdk/gdkwindow.h
index 2fc934f..2795883 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -33,6 +33,7 @@
#include <gdk/gdktypes.h>
#include <gdk/gdkevents.h>
#include <gdk/gdkframeclock.h>
+#include <gdk/gdkattachmentparameters.h>
G_BEGIN_DECLS
@@ -1075,6 +1076,10 @@ GDK_AVAILABLE_IN_3_16
GdkGLContext * gdk_window_create_gl_context (GdkWindow *window,
GError **error);
+GDK_AVAILABLE_IN_3_20
+void gdk_window_set_attachment_parameters (GdkWindow *window,
+ const GdkAttachmentParameters *parameters);
+
G_END_DECLS
#endif /* __GDK_WINDOW_H__ */
diff --git a/gdk/gdkwindowimpl.h b/gdk/gdkwindowimpl.h
index 07a307c..0d7e0ce 100644
--- a/gdk/gdkwindowimpl.h
+++ b/gdk/gdkwindowimpl.h
@@ -27,6 +27,7 @@
#include <gdk/gdkwindow.h>
#include <gdk/gdkproperty.h>
+#include <gdk/gdkattachmentparameters.h>
G_BEGIN_DECLS
@@ -301,6 +302,9 @@ struct _GdkWindowImplClass
GError **error);
void (*invalidate_for_new_frame)(GdkWindow *window,
cairo_region_t *update_area);
+
+ void (* set_attachment_parameters) (GdkWindow *window,
+ const GdkAttachmentParameters *parameters);
};
/* Interface Functions */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]