get_document_from_path (const char *path, void *user_data)
{
AtkObject *obj = spi_dbus_get_object (path);
- if (!obj)
+ if (!obj || !ATK_IS_DOCUMENT(obj))
return NULL;
return ATK_DOCUMENT (obj);
}
}
static DRouteMethod methods[] = {
- {DROUTE_METHOD, impl_getLocale, "getLocale", "s,,o"},
- {DROUTE_METHOD, impl_getAttributeValue, "getAttributeValue",
- "s,attributename,i:s,,o"},
- {DROUTE_METHOD, impl_getAttributes, "getAttributes", "as,,o"},
- {0, NULL, NULL, NULL}
+ {impl_getLocale, "getLocale"},
+ {impl_getAttributeValue, "getAttributeValue"},
+ {impl_getAttributes, "getAttributes"},
+ {NULL, NULL}
};
void
spi_initialize_document (DRouteData * data)
{
- droute_add_interface (data, "org.freedesktop.accessibility.Document",
+ droute_add_interface (data, "org.freedesktop.atspi.Document",
methods, NULL,
(DRouteGetDatumFunction) get_document_from_path,
NULL);