X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=atk-adaptor%2Fadaptors%2Ftext-adaptor.c;h=0fa35f9e36b34015f4cf21b6014c8f56888962df;hb=62ef943cbe84b8293bd99910a6a01d432d122eb5;hp=a15f9c73594aea71e01906600f521da5961a2523;hpb=d5d4ced0bea6b1b1e00b0549e15752176d6ef5dc;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/atk-adaptor/adaptors/text-adaptor.c b/atk-adaptor/adaptors/text-adaptor.c index a15f9c7..0fa35f9 100644 --- a/atk-adaptor/adaptors/text-adaptor.c +++ b/atk-adaptor/adaptors/text-adaptor.c @@ -28,8 +28,8 @@ #include #include "common/spi-dbus.h" - -#include "accessible-marshaller.h" +#include "object.h" +#include "introspection.h" static dbus_bool_t impl_get_CharacterCount (DBusMessageIter * iter, void *user_data) @@ -370,7 +370,7 @@ impl_GetAttributes (DBusConnection * bus, DBusMessage * message, if (reply) { dbus_message_iter_init_append (reply, &iter); - spi_atk_append_attribute_set (&iter, set); + spi_object_append_attribute_set (&iter, set); dbus_message_append_args (reply, DBUS_TYPE_INT32, &startOffset, DBUS_TYPE_INT32, &endOffset, DBUS_TYPE_INVALID); @@ -398,7 +398,7 @@ impl_GetDefaultAttributes (DBusConnection * bus, DBusMessage * message, if (reply) { dbus_message_iter_init_append (reply, &iter); - spi_atk_append_attribute_set (&iter, set); + spi_object_append_attribute_set (&iter, set); } atk_attribute_set_free (set); return reply; @@ -735,7 +735,7 @@ impl_GetAttributeRun (DBusConnection * bus, DBusMessage * message, dbus_int32_t startOffset, endOffset; gint intstart_offset = 0, intend_offset = 0; DBusMessage *reply; - AtkAttributeSet *attributes, *default_attributes = NULL; + AtkAttributeSet *attributes = NULL; AtkAttribute *attr = NULL; DBusMessageIter iter, iterArray; @@ -753,20 +753,18 @@ impl_GetAttributeRun (DBusConnection * bus, DBusMessage * message, atk_text_get_run_attributes (text, offset, &intstart_offset, &intend_offset); + if (includeDefaults) + { + attributes = g_slist_concat (attributes, + atk_text_get_default_attributes (text)); + } + reply = dbus_message_new_method_return (message); if (!reply) return NULL; dbus_message_iter_init_append (reply, &iter); - dbus_message_iter_open_container (&iter, DBUS_TYPE_ARRAY, "{ss}", - &iterArray); - spi_atk_append_attribute_set_inner (&iterArray, attributes); - if (includeDefaults) - { - default_attributes = atk_text_get_default_attributes (text); - spi_atk_append_attribute_set_inner (&iterArray, default_attributes); - } - dbus_message_iter_close_container (&iter, &iterArray); + spi_object_append_attribute_set (&iter, attributes); startOffset = intstart_offset; endOffset = intend_offset; @@ -774,8 +772,6 @@ impl_GetAttributeRun (DBusConnection * bus, DBusMessage * message, dbus_message_iter_append_basic (&iter, DBUS_TYPE_INT32, &endOffset); atk_attribute_set_free (attributes); - if (default_attributes) - atk_attribute_set_free (default_attributes); return reply; } @@ -798,7 +794,7 @@ impl_GetDefaultAttributeSet (DBusConnection * bus, DBusMessage * message, if (reply) { dbus_message_iter_init_append (reply, &iter); - spi_atk_append_attribute_set (&iter, attributes); + spi_object_append_attribute_set (&iter, attributes); } if (attributes) @@ -841,5 +837,5 @@ void spi_initialize_text (DRoutePath * path) { droute_path_add_interface (path, - SPI_DBUS_INTERFACE_TEXT, methods, properties); + SPI_DBUS_INTERFACE_TEXT, spi_org_a11y_atspi_Text, methods, properties); };