Fixed typo. Added assertions for object checks in AccessibleComponent code.
authormarcm <marcm@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Wed, 10 Oct 2001 15:17:23 +0000 (15:17 +0000)
committermarcm <marcm@e2bd861d-eb25-0410-b326-f6ed22b6b98c>
Wed, 10 Oct 2001 15:17:23 +0000 (15:17 +0000)
git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@77 e2bd861d-eb25-0410-b326-f6ed22b6b98c

ChangeLog
libspi/component.c
libspi/component.h
po/ChangeLog

index ae4fbf4..b6193b1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,4 +1,8 @@
-<2001-10-09  Bill Haneman <bill.haneman@sun.com>
+<2001-09-10  Marc Mulcahy <marc.mulcahy@sun.com
+       libspi/component.c libspi/component.h:
+               Fixed typo.  Added assertions for object checks in AccessibleComponent code.
+
+       <2001-10-09  Bill Haneman <bill.haneman@sun.com>
 
        * idl/Accessible.idl:
                Added 'isEqual (Accessible *object)' 
index 3c9ff9a..efd22c9 100644 (file)
@@ -77,10 +77,15 @@ impl_accessibility_component_contains (PortableServer_Servant servant,
                                        CORBA_Environment     *ev)
 {
   CORBA_boolean retval;
-  Component *component = COMPONENT (bonobo_object_from_servant (servant));
+  BonoboObject *obj;
+  Component *component;
+
+  obj = bonobo_object_from_servant (servant);
+  g_return_val_if_fail (IS_COMPONENT(obj), FALSE);
+  component = COMPONENT (obj);
+  g_return_val_if_fail (ATK_IS_COMPONENT(component->atko), FALSE);
   retval = atk_component_contains (ATK_COMPONENT (component->atko), (gint) x, (gint) y,
                                   (AtkCoordType) coord_type);
-  fprintf (stderr, "Component contains() called: %s\n", retval ? "true" : "false" );
   return retval;
 }
 
@@ -94,9 +99,16 @@ impl_accessibility_component_get_accessible_at_point (PortableServer_Servant ser
                                                       CORBA_short coord_type,
                                                       CORBA_Environment     *ev)
 {
+  BonoboObject *obj;
+  Component *component;
   Accessibility_Accessible retval;
-  Component *component = COMPONENT (bonobo_object_from_servant (servant));
   AtkObject *child;
+
+  obj = bonobo_object_from_servant (servant);
+  g_return_val_if_fail (IS_COMPONENT(obj), CORBA_OBJECT_NIL);
+  component = COMPONENT (obj);
+  g_return_val_if_fail (ATK_IS_COMPONENT(component->atko), CORBA_OBJECT_NIL);
+
   child = atk_component_ref_accessible_at_point (ATK_COMPONENT (component->atko),
                                                   (gint) x, (gint) y,
                                                   (AtkCoordType) coord_type);
@@ -116,8 +128,15 @@ impl_accessibility_component_get_extents (PortableServer_Servant servant,
                                           const CORBA_short coord_type,
                                           CORBA_Environment     *ev)
 {
-  Component *component = COMPONENT (bonobo_object_from_servant (servant));
+  BonoboObject *obj;
+  Component *component;
   gint ix, iy, iw, ih;
+
+  obj = bonobo_object_from_servant (servant);
+  g_return_if_fail (IS_COMPONENT(obj));
+  component = COMPONENT (obj);
+  g_return_if_fail (ATK_IS_COMPONENT (component->atko));
+
   atk_component_get_extents (ATK_COMPONENT (component->atko), &ix, &iy, &iw, &ih,
                                   (AtkCoordType) coord_type);
   *x = (CORBA_long) ix;
@@ -136,8 +155,14 @@ impl_accessibility_component_get_position (PortableServer_Servant servant,
                                            const CORBA_short coord_type,
                                            CORBA_Environment     *ev)
 {
-  Component *component = COMPONENT (bonobo_object_from_servant (servant));
+  BonoboObject *obj = bonobo_object_from_servant (servant);
+  Component *component;
   gint ix, iy;
+
+  g_return_if_fail (IS_COMPONENT(obj));
+  component = COMPONENT(obj);
+  g_return_if_fail (ATK_IS_COMPONENT(component->atko));
+
   atk_component_get_position (ATK_COMPONENT (component->atko), &ix, &iy,
                               (AtkCoordType) coord_type);
   *x = (CORBA_long) ix;
@@ -153,8 +178,13 @@ impl_accessibility_component_get_size (PortableServer_Servant servant,
                                        CORBA_long * height,
                                        CORBA_Environment     *ev)
 {
-  Component *component = COMPONENT (bonobo_object_from_servant (servant));
+  Component *component;
+  BonoboObject *obj = bonobo_object_from_servant (servant);
   gint iw, ih;
+
+  g_return_if_fail (IS_COMPONENT(obj));
+  component = COMPONENT(obj);
+  g_return_if_fail (ATK_IS_COMPONENT(component->atko));
   atk_component_get_size (ATK_COMPONENT (component->atko), &iw, &ih);
   *width = (CORBA_long) iw;
   *height = (CORBA_long) ih;
index e07184c..355fc06 100644 (file)
@@ -32,7 +32,7 @@ extern "C" {
 #define COMPONENT_TYPE        (accessibility_component_get_type ())
 #define COMPONENT(o)          (G_TYPE_CHECK_INSTANCE_CAST ((o), COMPONENT_TYPE, Component))
 #define COMPONENT_CLASS(k)    (G_TYPE_CHECK_CLASS_CAST((k), COMPONENT_TYPE, ComponentClass))
-#define IS_COMPONENT(o)       (G_TYPE_CHECK__INSTANCE_TYPE ((o), COMPONENT_TYPE))
+#define IS_COMPONENT(o)       (G_TYPE_CHECK_INSTANCE_TYPE ((o), COMPONENT_TYPE))
 #define IS_COMPONENT_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), COMPONENT_TYPE))
 
 typedef struct {
index 287d447..e973262 100644 (file)
@@ -1,3 +1,11 @@
+2001-10-10  gettextize  <bug-gnu-utils@gnu.org>
+
+       * Makefile.in.in: Upgrade to gettext-0.10.38.
+
+2001-10-08  gettextize  <bug-gnu-utils@gnu.org>
+
+       * Makefile.in.in: Upgrade to gettext-0.10.38.
+
 2001-10-01  gettextize  <bug-gnu-utils@gnu.org>
 
        * Makefile.in.in: Upgrade to gettext-0.10.38.