[gtk+/wip/attachment: 2/6] gdkwindow: add gdk_window_set_attachment_parameters ()



commit f1c02dc151069b60bd8f7a2bae28f5562d879ce5
Author: William Hua <william hua canonical com>
Date:   Sat Sep 12 01:00:42 2015 -0400

    gdkwindow: add gdk_window_set_attachment_parameters ()

 gdk/gdkwindow.c     |   23 +++++++++++++++++++++++
 gdk/gdkwindow.h     |   22 +++++++++++++---------
 gdk/gdkwindowimpl.h |    3 +++
 3 files changed, 39 insertions(+), 9 deletions(-)
---
diff --git a/gdk/gdkwindow.c b/gdk/gdkwindow.c
index e8cc0f1..8cc6711 100644
--- a/gdk/gdkwindow.c
+++ b/gdk/gdkwindow.c
@@ -11551,3 +11551,26 @@ gdk_attachment_parameters_add_secondary_constraint (GdkAttachmentParameters *par
   parameters->secondary_constraints = g_list_append (parameters->secondary_constraints,
                                                      gdk_attachment_constraint_new (variable, value));
 }
+
+/**
+ * gdk_window_set_attachment_parameters:
+ * @window: a #GdkWindow
+ * @parameters: a #GdkAttachmentParameters
+ *
+ * Constrains the position of the window.
+ *
+ * Since: 3.18
+ */
+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 03d3b1e..2be5aad 100644
--- a/gdk/gdkwindow.h
+++ b/gdk/gdkwindow.h
@@ -1171,21 +1171,25 @@ GDK_AVAILABLE_IN_3_18
 GdkAttachmentParameters * gdk_attachment_parameters_new                      (void);
 
 GDK_AVAILABLE_IN_3_18
-gpointer                  gdk_attachment_parameters_copy                     (gconstpointer            
parameters,
-                                                                              gpointer                 
unused);
+gpointer                  gdk_attachment_parameters_copy                     (gconstpointer                  
parameters,
+                                                                              gpointer                       
unused);
 
 GDK_AVAILABLE_IN_3_18
-void                      gdk_attachment_parameters_free                     (gpointer                 
parameters);
+void                      gdk_attachment_parameters_free                     (gpointer                       
parameters);
 
 GDK_AVAILABLE_IN_3_18
-void                      gdk_attachment_parameters_add_primary_constraint   (GdkAttachmentParameters 
*parameters,
-                                                                              GdkAttachmentVariable    
variable,
-                                                                              gint                     
value);
+void                      gdk_attachment_parameters_add_primary_constraint   (GdkAttachmentParameters       
*parameters,
+                                                                              GdkAttachmentVariable          
variable,
+                                                                              gint                           
value);
 
 GDK_AVAILABLE_IN_3_18
-void                      gdk_attachment_parameters_add_secondary_constraint (GdkAttachmentParameters 
*parameters,
-                                                                              GdkAttachmentVariable    
variable,
-                                                                              gint                     
value);
+void                      gdk_attachment_parameters_add_secondary_constraint (GdkAttachmentParameters       
*parameters,
+                                                                              GdkAttachmentVariable          
variable,
+                                                                              gint                           
value);
+
+GDK_AVAILABLE_IN_3_18
+void                      gdk_window_set_attachment_parameters               (GdkWindow                     
*window,
+                                                                              const GdkAttachmentParameters 
*parameters);
 
 G_END_DECLS
 
diff --git a/gdk/gdkwindowimpl.h b/gdk/gdkwindowimpl.h
index 07a307c..e9ce4dc 100644
--- a/gdk/gdkwindowimpl.h
+++ b/gdk/gdkwindowimpl.h
@@ -301,6 +301,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]