X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=libspi%2Faccessible.c;h=575ead9630b7be69540262623bd3a7e3ca6f0b5a;hb=2a52cece4bf09e15a526a0e7b67569a5e0de6b43;hp=9dd14f883dc52681b47a2caf91041ab0bb0d5e16;hpb=edf9ed64974254eade7ed3b1ddcad9f963c03694;p=platform%2Fcore%2Fuifw%2Fat-spi2-atk.git diff --git a/libspi/accessible.c b/libspi/accessible.c index 9dd14f8..575ead9 100644 --- a/libspi/accessible.c +++ b/libspi/accessible.c @@ -38,6 +38,15 @@ * This pulls the definition for the BonoboObject (Gtk Type) */ #include "accessible.h" +#include "component.h" +#include "editabletext.h" +#include "hyperlink.h" +#include "hypertext.h" +#include "image.h" +#include "selection.h" +#include "table.h" +#include "text.h" +#include "value.h" /* * Our parent Gtk object type @@ -74,7 +83,7 @@ impl_accessibility_accessible_get_name (PortableServer_Servant servant, { CORBA_char * retval; Accessible *accessible = ACCESSIBLE (bonobo_object_from_servant (servant)); - retval = atk_object_get_name (accessible->atko); + retval = (CORBA_char *) atk_object_get_name (accessible->atko); if (retval ) retval = CORBA_string_dup (retval); else @@ -256,64 +265,72 @@ accessible_new (AtkObject *o) retval->atko = ATK_OBJECT (o); /* - * TODO: add interface containers/constructors for ACTION, EDITABLE_TEXT, HYPERTEXT, + * TODO: add interface containers/constructors for EDITABLE_TEXT, HYPERTEXT, * IMAGE, SELECTION, TABLE, TEXT, VALUE. */ /* add appropriate ATK interfaces */ - /* Action: not yet implemented if (ATK_IS_ACTION (o)) { bonobo_object_add_interface (bonobo_object (retval), - bonobo_object (action_interface_new (o))); + BONOBO_OBJECT (action_interface_new (o))); } - */ if (ATK_IS_COMPONENT (o)) { bonobo_object_add_interface (bonobo_object (retval), - bonobo_object (component_interface_new (o))); + BONOBO_OBJECT (component_interface_new (o))); } - /* Others: not yet implemented if (ATK_IS_EDITABLE_TEXT (o)) { bonobo_object_add_interface (bonobo_object (retval), - bonobo_object (editable_text_interface_new (o))); + BONOBO_OBJECT(editable_text_interface_new (o))); } + else if (ATK_IS_HYPERTEXT (o)) { bonobo_object_add_interface (bonobo_object (retval), - bonobo_object (hypertext_interface_new (o))); + BONOBO_OBJECT (hypertext_interface_new (o))); } + else if (ATK_IS_TEXT (o)) { bonobo_object_add_interface (bonobo_object (retval), - bonobo_object (text_interface_new (o))); + BONOBO_OBJECT (text_interface_new (o))); + } + + if (ATK_IS_HYPERLINK (o)) + { + bonobo_object_add_interface (bonobo_object (retval), + BONOBO_OBJECT (hyperlink_interface_new(o))); } + if (ATK_IS_IMAGE (o)) { bonobo_object_add_interface (bonobo_object (retval), - bonobo_object (image_interface_new (o))); + BONOBO_OBJECT (image_interface_new (o))); } + if (ATK_IS_SELECTION (o)) { bonobo_object_add_interface (bonobo_object (retval), - bonobo_object (selection_interface_new (o))); + BONOBO_OBJECT (selection_interface_new (o))); } + if (ATK_IS_TABLE (o)) { bonobo_object_add_interface (bonobo_object (retval), - bonobo_object (table_interface_new (o))); + BONOBO_OBJECT (table_interface_new (o))); } + if (ATK_IS_VALUE (o)) { bonobo_object_add_interface (bonobo_object (retval), - bonobo_object (value_interface_new (o))); + BONOBO_OBJECT (value_interface_new (o))); } - */ return retval; }