* AT-SPI - Assistive Technology Service Provider Interface
* (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
*
- * Copyright 2001 Sun Microsystems Inc, Ximian Inc.
+ * Copyright 2001, 2002 Sun Microsystems Inc.,
+ * Copyright 2001, 2002 Ximian, Inc. Ximian Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
#include <libspi/hyperlink.h>
#include <libspi/hypertext.h>
+#define PARENT_TYPE SPI_TYPE_BASE
+
SpiHypertext *
spi_hypertext_interface_new (AtkObject *obj)
{
SpiHypertext *new_hypertext = g_object_new (SPI_HYPERTEXT_TYPE, NULL);
- spi_text_construct (SPI_TEXT (new_hypertext), obj);
+ spi_base_construct (SPI_BASE (new_hypertext), G_OBJECT (obj));
return new_hypertext;
}
{
SpiBase *object = SPI_BASE (bonobo_object_from_servant (servant));
- if (!object)
- {
- return NULL;
- }
-
- return ATK_HYPERTEXT (object->atko);
+ g_return_val_if_fail (object, NULL);
+ g_return_val_if_fail (ATK_IS_OBJECT(object->gobj), NULL);
+ return ATK_HYPERTEXT (object->gobj);
}
g_return_val_if_fail (hypertext != NULL, 0);
- return (CORBA_long) atk_hypertext_get_n_links (hypertext);
+ return atk_hypertext_get_n_links (hypertext);
}
link = atk_hypertext_get_link (hypertext, linkIndex);
g_return_val_if_fail (link != NULL, CORBA_OBJECT_NIL);
- rv = BONOBO_OBJREF (spi_hyperlink_new (ATK_OBJECT (link)));
+ rv = BONOBO_OBJREF (spi_hyperlink_new (link));
return CORBA_Object_duplicate (rv, ev);
}
g_return_val_if_fail (hypertext != NULL, 0);
- return (CORBA_long)
- atk_hypertext_get_link_index (hypertext,
- (gint) characterIndex);
+ return atk_hypertext_get_link_index (hypertext,
+ characterIndex);
}
BONOBO_TYPE_FUNC_FULL (SpiHypertext,
Accessibility_Hypertext,
- BONOBO_TYPE_OBJECT,
+ PARENT_TYPE,
spi_hypertext);