/* 
 * AT-SPI - Assistive Technology Service Provider Interface 
 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
 *
 * Copyright 2001 Sun Microsystems, Inc.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public
 * License along with this library; if not, write to the
 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
 * Boston, MA 02111-1307, USA.
 */

#include <Accessibility.idl>

module Accessibility {
  /** 
   * An interface used for objects which implement linking between
   * multiple resource or content locations, or multiple 'markers'
   * within a single document.  A Hypertext instance is associated with
   * one or more Hyperlinks, which are associated with particular
   * offsets within the Hypertext's included content.
   *
   * @note While this interface is derived from ::Text, 
   *       there is no requirement that Hypertext instances have
   *       textual content; they may implement ::Image as well,
   *       and Hyperlinks need not have non-zero text offsets.
   */
  interface Hypertext : Bonobo::Unknown {
    /** 
     * Query the hypertext object for the number of Hyperlinks it
     * contains.
     *
     * @returns the number of Hyperlinks associated with this Hypertext
     *  object, as a long integer.
     */
    long getNLinks ();
    /** 
     * Get one of the Hyperlinks associated with this Hypertext object,
     * by index.
     *
     * @param linkIndex an integer from 0 to getNLinks() - 1.
     * @returns the Hyperlink in this Hypertext object.
     */
    Hyperlink getLink (in long linkIndex);
    /** 
     * Get the hyperlink index, if any, associated with a 
     * particular character offset in the Hypertext object.
     * For Hypertext implementors without textual content, all
     * hyperlinks are associated with character offset '0'.
     *
     * @return the index of the Hyperlink associated with character
     *     offset \c characterIndex, or -1 if no Hyperlink is associated
     *     with that character offset.
     */
    long getLinkIndex (in long characterIndex);

    /** \cond */
    void unImplemented ();
    void unImplemented2 ();
    void unImplemented3 ();
    void unImplemented4 ();
    /** \endcond */
  };
};
