/* 
 * 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.
 */

#ifndef _ACCESSIBILITY_ACCESSIBLE_IDL
#define _ACCESSIBILITY_ACCESSIBLE_IDL

#include <Bonobo_Unknown.idl>

#include "Accessibility_Relation.idl"
#include "Accessibility_State.idl"
#include "Accessibility_Role.idl"

module Accessibility {
  
  typedef sequence<Relation> RelationSet;

  struct BoundingBox {
	  long x;
	  long y;
	  long width;
	  long height;
  };

  interface Accessible : Bonobo::Unknown {

    /**
     * @name: a (short) #string representing the object's name.
     **/
    attribute string name;

    /**
     * @description: a #string describing the object in more detail than @name.
     **/
    attribute string description;

    /**
     * @parent: an #Accessible object which is this object's containing object.
     **/
    readonly attribute Accessible parent;

    /**
     * @childCount: the number of children contained by this object.
     **/
    readonly attribute long    	childCount;

    /**
     * isEqual:
     * @obj: an #Accessible object reference to compare to
     *
     * Determine whether an #Accessible refers to the same object as another
     *
     * Returns: a #boolean indicating whether the two object references
     *         point to the same object. 
     **/
    boolean isEqual (in Accessible obj);

    /**
     * getChildAtIndex:
     * @index: an in parameter indicating which child is requested (zero-indexed).
     *
     * Get the accessible child of this object at index @index.
     *
     * Returns: the 'nth' @Accessible child of this object.
     **/
    Accessible 	getChildAtIndex (in long index);

    /**
     * getIndexInParent:
     *
     * Get the index of this object in its parent's child list.
     *
     * Returns: a long integer indicating this object's index in the parent's list.
     **/
    long		getIndexInParent ();

    /**
     * getRelationSet:
     *
     * Get a set defining this object's relationship to other accessible objects.
     *
     * Returns: a @RelationSet defining this object's relationships.
     **/
    RelationSet	getRelationSet ();

    /**
     * getRole:
     * Get the @Role indicating the type of UI role played by this object.
     *
     * Returns: a @Role indicating the type of UI role played by this object.
     **/
    Role		getRole ();

    /**
     * getRoleName:
     * Get a string indicating the type of UI role played by this object.
     *
     * Returns: a UTF-8 string indicating the type of UI role played by this object.
     **/
    string		getRoleName ();

    /**
     * getState:
     *
     * Get the current state of the object as a @StateSet.
     * Returns: a @StateSet encapsulating the currently true states of the object.
     **/
    StateSet	getState ();

    void        unImplemented ();
    void        unImplemented2 ();
    void        unImplemented3 ();
    void        unImplemented4 ();
  };
};

#endif

