2003-03-05 Padraig O'Briain <padraig.obriain@sun.com>
[platform/core/uifw/at-spi2-atk.git] / libspi / hypertext.c
index 4ec1085..7c5aae7 100644 (file)
@@ -2,7 +2,8 @@
  * 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;
 }
@@ -58,7 +61,7 @@ impl_getNLinks (PortableServer_Servant servant,
 
   g_return_val_if_fail (hypertext != NULL, 0);
 
-  return (CORBA_long) atk_hypertext_get_n_links (hypertext);
+  return atk_hypertext_get_n_links (hypertext);
 }
 
 
@@ -76,7 +79,7 @@ impl_getLink (PortableServer_Servant servant,
   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);
 }
@@ -91,9 +94,8 @@ impl_getLinkIndex (PortableServer_Servant servant,
 
   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);
 }
 
 
@@ -118,5 +120,5 @@ spi_hypertext_init (SpiHypertext *hypertext)
 
 BONOBO_TYPE_FUNC_FULL (SpiHypertext,
                       Accessibility_Hypertext,
-                      BONOBO_TYPE_OBJECT,
+                      PARENT_TYPE,
                       spi_hypertext);