From: Mike Gorse Date: Fri, 28 Nov 2008 15:31:30 +0000 (-0600) Subject: 2008-11-28 Mike Gorse X-Git-Tag: AT_SPI2_ATK_2_12_0~577 X-Git-Url: http://review.tizen.org/git/?p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git;a=commitdiff_plain;h=db9d717a24c1863cf9a75a90c025badc54a5526f 2008-11-28 Mike Gorse * atk-adaptor/accessible.c, xml/org.freedesktop.atspi.Accessible.xml: Add getChildAtIndex. --- diff --git a/atk-adaptor/accessible.c b/atk-adaptor/accessible.c index 499e0ef..220167e 100644 --- a/atk-adaptor/accessible.c +++ b/atk-adaptor/accessible.c @@ -95,6 +95,22 @@ impl_get_childCount (const char *path, DBusMessageIter * iter, } static DBusMessage * +impl_getChildAtIndex (DBusConnection * bus, DBusMessage * message, + void *user_data) +{ + AtkObject *object = get_object (message); + dbus_int32_t i; + AtkObject *child; + + if (!object) + return spi_dbus_general_error (message); + if (!dbus_message_get_args (message, NULL, DBUS_TYPE_INT32, &i, DBUS_TYPE_INVALID)) + return spi_dbus_general_error (message); + child = atk_object_ref_accessible_child (object, i); + return spi_dbus_return_object (message, child, FALSE); +} + +static DBusMessage * impl_getChildren (DBusConnection * bus, DBusMessage * message, void *user_data) { @@ -530,7 +546,7 @@ impl_getApplication (DBusConnection * bus, DBusMessage * message, } static DRouteMethod methods[] = { - //{impl_isEqual, "isEqual"}, + {impl_getChildAtIndex, "getChildAtIndex"}, {impl_getChildren, "getChildren"}, {impl_getIndexInParent, "getIndexInParent"}, {impl_getRelationSet, "getRelationSet"}, @@ -547,8 +563,7 @@ static DRouteProperty properties[] = { {impl_get_name, impl_set_name, "name"}, {impl_get_description, impl_set_description, "description"}, {impl_get_parent, NULL, "parent"}, - //{impl_get_childCount, NULL, "childCount"}, - //{NULL, NULL, NULL, "role"}, + {impl_get_childCount, NULL, "childCount"}, {NULL, NULL, NULL} }; diff --git a/xml/org.freedesktop.atspi.Accessible.xml b/xml/org.freedesktop.atspi.Accessible.xml index a59d303..4a40d41 100644 --- a/xml/org.freedesktop.atspi.Accessible.xml +++ b/xml/org.freedesktop.atspi.Accessible.xml @@ -105,6 +105,21 @@ + + + Get the accessible child of this object at \c index. + + + + an in parameter indicating which child is requested (zero-indexed). + + + + + the 'nth' ::Accessible child of this object. + + + Get the index of this object in its parent's child list.