Add definition for atk_rectangle_get_type and ATK_TYPE_RECTANGLE. Correct
authorPadraig O'Briain <padraig.obriain@sun.com>
Thu, 10 Jun 2004 15:52:20 +0000 (15:52 +0000)
committerPadraig O'Briain <padraigo@src.gnome.org>
Thu, 10 Jun 2004 15:52:20 +0000 (15:52 +0000)
2004-06-10  Padraig O'Briain  <padraig.obriain@sun.com>

* atk/atkcomponent.h: Add definition for atk_rectangle_get_type
and ATK_TYPE_RECTANGLE.
* atk/atkcomponent.c (atk_component_base_init): Correct definition
of "bounds-changed" signal.
(atk_rectangle_copy): New function.
(atk_rectangle_get_type): New function.

ChangeLog
atk/atkcomponent.c
atk/atkcomponent.h

index c245670..545c036 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2004-06-10  Padraig O'Briain  <padraig.obriain@sun.com>
+
+       * atk/atkcomponent.h: Add definition for atk_rectangle_get_type
+       and ATK_TYPE_RECTANGLE.
+       * atk/atkcomponent.c (atk_component_base_init): Correct definition
+       of "bounds-changed" signal.
+       (atk_rectangle_copy): New function.
+       (atk_rectangle_get_type): New function.
+
 2004-06-08  Padraig O'Briain  <padraig.obriain@sun.com>
 
        * configure.in: Increment version to 1.7.2 and interface age to 2.
index bacc3ef..65659a2 100755 (executable)
@@ -87,7 +87,8 @@ atk_component_base_init (AtkComponentIface *class)
                       G_STRUCT_OFFSET (AtkComponentIface, bounds_changed),
                       (GSignalAccumulator) NULL, NULL,
                       g_cclosure_marshal_VOID__BOXED,
-                      G_TYPE_NONE, 0);
+                      G_TYPE_NONE, 1,
+                      ATK_TYPE_RECTANGLE | G_SIGNAL_TYPE_STATIC_SCOPE);
 
       initialized = TRUE;
     }
@@ -564,5 +565,24 @@ atk_component_real_get_size (AtkComponent *component,
   atk_component_get_extents (component, &x, &y, width, height, coord_type);
 }
 
+static AtkRectangle *
+atk_rectangle_copy (const AtkRectangle *rectangle)
+{
+  AtkRectangle *result = g_new (AtkRectangle, 1);
+  *result = *rectangle;
+
+  return result;
+}
 
+GType
+atk_rectangle_get_type (void)
+{
+  static GType our_type = 0;
+
+  if (our_type == 0)
+    our_type = g_boxed_type_register_static ("AtkRectangle",
+                                             (GBoxedCopyFunc)atk_rectangle_copy,
+                                             (GBoxedFreeFunc)g_free);
+  return our_type;
+}
 
index 5b4b834..53b4302 100755 (executable)
@@ -57,6 +57,9 @@ struct _AtkRectangle
   gint height;
 };
 
+GType atk_rectangle_get_type (void);
+
+#define ATK_TYPE_RECTANGLE (atk_rectangle_get_type ())
 struct _AtkComponentIface
 {
   GTypeInterface parent;