gir-repository r201 - trunk/gir
- From: racarr svn gnome org
- To: svn-commits-list gnome org
- Subject: gir-repository r201 - trunk/gir
- Date: Mon, 10 Nov 2008 08:52:57 +0000 (UTC)
Author: racarr
Date: Mon Nov 10 08:52:57 2008
New Revision: 201
URL: http://svn.gnome.org/viewvc/gir-repository?rev=201&view=rev
Log:
Add GtkAllocation helpers.
Modified:
   trunk/gir/Gtk-custom.c
   trunk/gir/Gtk-custom.h
Modified: trunk/gir/Gtk-custom.c
==============================================================================
--- trunk/gir/Gtk-custom.c	(original)
+++ trunk/gir/Gtk-custom.c	Mon Nov 10 08:52:57 2008
@@ -49,6 +49,42 @@
     return req->height;
 }
 
+const GtkAllocation*
+gtk_widget_get_allocation(const GtkWidget *wdg)
+{
+    return &wdg->allocation;
+}
+
+GtkAllocation*
+gtk_allocation_new(void)
+{
+    return g_new0(GtkAllocation, 1);
+}
+
+int
+gtk_allocation_get_x(const GtkAllocation *all)
+{
+    return all->x;
+}
+
+int
+gtk_allocation_get_y(const GtkAllocation *all)
+{
+    return all->y;
+}
+
+int
+gtk_allocation_get_width(const GtkAllocation *all)
+{
+    return all->width;
+}
+
+int
+gtk_allocation_get_height(const GtkAllocation *all)
+{
+    return all->height;
+}
+
 GtkTextIter*
 gtk_text_iter_new(void)
 {
Modified: trunk/gir/Gtk-custom.h
==============================================================================
--- trunk/gir/Gtk-custom.h	(original)
+++ trunk/gir/Gtk-custom.h	Mon Nov 10 08:52:57 2008
@@ -15,7 +15,13 @@
 GtkRequisition* gtk_requisition_new                   (void);
 int             gtk_requisition_get_width             (const GtkRequisition *req);
 int             gtk_requisition_get_height            (const GtkRequisition *req);
-GtkTextIter*    gtk_text_iter_new (void);
+const GtkAllocation*  gtk_widget_get_allocation       (const GtkWidget *wdg);
+GtkAllocation*  gtk_allocation_new                    (void);
+int             gtk_allocation_get_x                  (const GtkAllocation *all);
+int             gtk_allocation_get_y                  (const GtkAllocation *all);
+int             gtk_allocation_get_width              (const GtkAllocation *all);
+int             gtk_allocation_get_height             (const GtkAllocation *all);
+GtkTextIter*    gtk_text_iter_new                     (void);
 GtkWidget*      gtk_dialog_get_vbox                   (GtkDialog            *dialog);
 
 G_END_DECLS
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]