From: marcm Date: Wed, 10 Oct 2001 15:17:23 +0000 (+0000) Subject: Fixed typo. Added assertions for object checks in AccessibleComponent code. X-Git-Tag: AT_SPI2_ATK_2_12_0~1554 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git;a=commitdiff_plain;h=dd5422582cd1423af69d25ad8104e6ac0cd80f72 Fixed typo. Added assertions for object checks in AccessibleComponent code. git-svn-id: http://svn.gnome.org/svn/at-spi/trunk@77 e2bd861d-eb25-0410-b326-f6ed22b6b98c --- diff --git a/ChangeLog b/ChangeLog index ae4fbf4..b6193b1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,8 @@ -<2001-10-09 Bill Haneman +<2001-09-10 Marc Mulcahy * idl/Accessible.idl: Added 'isEqual (Accessible *object)' diff --git a/libspi/component.c b/libspi/component.c index 3c9ff9a..efd22c9 100644 --- a/libspi/component.c +++ b/libspi/component.c @@ -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; diff --git a/libspi/component.h b/libspi/component.h index e07184c..355fc06 100644 --- a/libspi/component.h +++ b/libspi/component.h @@ -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 { diff --git a/po/ChangeLog b/po/ChangeLog index 287d447..e973262 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,11 @@ +2001-10-10 gettextize + + * Makefile.in.in: Upgrade to gettext-0.10.38. + +2001-10-08 gettextize + + * Makefile.in.in: Upgrade to gettext-0.10.38. + 2001-10-01 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38.