2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
|
|
|
* ***** BEGIN LICENSE BLOCK *****
|
|
|
|
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
|
|
|
|
*
|
|
|
|
* The contents of this file are subject to the Mozilla Public License Version
|
|
|
|
* 1.1 (the "License"); you may not use this file except in compliance with
|
|
|
|
* the License. You may obtain a copy of the License at
|
|
|
|
* http://www.mozilla.org/MPL/
|
|
|
|
*
|
|
|
|
* Software distributed under the License is distributed on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
|
|
|
|
* for the specific language governing rights and limitations under the
|
|
|
|
* License.
|
|
|
|
*
|
|
|
|
* The Original Code is the Mozilla browser.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is
|
|
|
|
* Netscape Communications Corporation.
|
|
|
|
* Portions created by the Initial Developer are Copyright (C) 1999
|
|
|
|
* the Initial Developer. All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s):
|
|
|
|
*
|
|
|
|
* Alternatively, the contents of this file may be used under the terms of
|
|
|
|
* either of the GNU General Public License Version 2 or later (the "GPL"),
|
|
|
|
* or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
|
|
|
|
* in which case the provisions of the GPL or the LGPL are applicable instead
|
|
|
|
* of those above. If you wish to allow use of your version of this file only
|
|
|
|
* under the terms of either the GPL or the LGPL, and not to allow others to
|
|
|
|
* use your version of this file under the terms of the MPL, indicate your
|
|
|
|
* decision by deleting the provisions above and replace them with the notice
|
|
|
|
* and other provisions required by the GPL or the LGPL. If you do not delete
|
|
|
|
* the provisions above, a recipient may use your version of this file under
|
|
|
|
* the terms of any one of the MPL, the GPL or the LGPL.
|
|
|
|
*
|
|
|
|
* ***** END LICENSE BLOCK ***** */
|
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
#include "nsIAccessibleRetrieval.idl"
|
|
|
|
|
|
|
|
interface nsIAccessibleEventListener;
|
|
|
|
interface nsIDocument;
|
|
|
|
interface nsIFrame;
|
|
|
|
interface nsObjectFrame;
|
|
|
|
interface nsIContent;
|
2008-02-26 00:51:10 -08:00
|
|
|
interface nsITimer;
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2009-09-10 18:07:56 -07:00
|
|
|
[uuid(6a58f7e8-587c-40dd-b684-dc3e54f1342a)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface nsIAccessibilityService : nsIAccessibleRetrieval
|
|
|
|
{
|
|
|
|
nsIAccessible createOuterDocAccessible(in nsIDOMNode aNode);
|
|
|
|
nsIAccessible createRootAccessible(in nsIPresShell aShell, in nsIDocument aDocument);
|
|
|
|
|
2009-01-12 11:20:59 -08:00
|
|
|
nsIAccessible createHTML4ButtonAccessible(in nsIFrame aFrame);
|
|
|
|
nsIAccessible createHyperTextAccessible(in nsIFrame aFrame);
|
|
|
|
nsIAccessible createHTMLBRAccessible(in nsIFrame aFrame);
|
|
|
|
nsIAccessible createHTMLButtonAccessible(in nsIFrame aFrame);
|
2007-09-18 14:43:19 -07:00
|
|
|
nsIAccessible createHTMLAccessibleByMarkup(in nsIFrame aFrame, in nsIWeakReference aWeakShell, in nsIDOMNode aDOMNode);
|
2009-01-12 11:20:59 -08:00
|
|
|
nsIAccessible createHTMLLIAccessible(in nsIFrame aFrame, in nsIFrame aBulletFrame, in AString aBulletText);
|
|
|
|
nsIAccessible createHTMLCheckboxAccessible(in nsIFrame aFrame);
|
2007-03-22 10:30:00 -07:00
|
|
|
nsIAccessible createHTMLComboboxAccessible(in nsIDOMNode aNode, in nsIWeakReference aPresShell);
|
2009-01-12 11:20:59 -08:00
|
|
|
nsIAccessible createHTMLGenericAccessible(in nsIFrame aFrame);
|
|
|
|
nsIAccessible createHTMLGroupboxAccessible(in nsIFrame aFrame);
|
|
|
|
nsIAccessible createHTMLHRAccessible(in nsIFrame aFrame);
|
|
|
|
nsIAccessible createHTMLImageAccessible(in nsIFrame aFrame);
|
|
|
|
nsIAccessible createHTMLLabelAccessible(in nsIFrame aFrame);
|
2007-03-22 10:30:00 -07:00
|
|
|
nsIAccessible createHTMLListboxAccessible(in nsIDOMNode aNode, in nsIWeakReference aPresShell);
|
2009-04-20 00:09:21 -07:00
|
|
|
nsIAccessible createHTMLMediaAccessible(in nsIFrame aFrame);
|
2007-03-22 10:30:00 -07:00
|
|
|
nsIAccessible createHTMLObjectFrameAccessible(in nsObjectFrame aFrame);
|
2009-01-12 11:20:59 -08:00
|
|
|
nsIAccessible createHTMLRadioButtonAccessible(in nsIFrame aFrame);
|
2007-03-22 10:30:00 -07:00
|
|
|
nsIAccessible createHTMLSelectOptionAccessible(in nsIDOMNode aNode, in nsIAccessible aAccParent, in nsIWeakReference aPresShell);
|
2009-01-12 11:20:59 -08:00
|
|
|
nsIAccessible createHTMLTableAccessible(in nsIFrame aFrame);
|
|
|
|
nsIAccessible createHTMLTableCellAccessible(in nsIFrame aFrame);
|
|
|
|
nsIAccessible createHTMLTextAccessible(in nsIFrame aFrame);
|
|
|
|
nsIAccessible createHTMLTextFieldAccessible(in nsIFrame aFrame);
|
|
|
|
nsIAccessible createHTMLCaptionAccessible(in nsIFrame aFrame);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
2007-05-16 06:38:05 -07:00
|
|
|
nsIAccessible getAccessible(in nsIDOMNode aNode, in nsIPresShell aPresShell,
|
2007-03-22 10:30:00 -07:00
|
|
|
in nsIWeakReference aWeakShell,
|
|
|
|
inout nsIFrame frameHint, out boolean aIsHidden);
|
|
|
|
|
|
|
|
// For gtk+ native window accessible
|
2007-05-16 06:38:05 -07:00
|
|
|
nsIAccessible addNativeRootAccessible(in voidPtr aAtkAccessible);
|
|
|
|
void removeNativeRootAccessible(in nsIAccessible aRootAccessible);
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
/**
|
2009-09-09 02:03:14 -07:00
|
|
|
* Used to describe sort of changes leading to accessible tree invalidation.
|
2007-03-22 10:30:00 -07:00
|
|
|
*/
|
2009-09-09 02:03:14 -07:00
|
|
|
const unsigned long NODE_APPEND = 0x01;
|
|
|
|
const unsigned long NODE_REMOVE = 0x02;
|
|
|
|
const unsigned long NODE_SIGNIFICANT_CHANGE = 0x03;
|
|
|
|
const unsigned long FRAME_SHOW = 0x04;
|
|
|
|
const unsigned long FRAME_HIDE = 0x05;
|
|
|
|
const unsigned long FRAME_SIGNIFICANT_CHANGE = 0x06;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Invalidate the accessible tree when DOM tree or frame tree is changed.
|
|
|
|
*
|
|
|
|
* @param aPresShell [in] the presShell where changes occured
|
|
|
|
* @param aContent [in] the affected DOM content
|
|
|
|
* @param aChangeType [in] the change type (see constants declared above)
|
|
|
|
*/
|
|
|
|
void invalidateSubtreeFor(in nsIPresShell aPresShell, in nsIContent aContent,
|
|
|
|
in PRUint32 aChangeType);
|
2008-02-26 00:51:10 -08:00
|
|
|
|
|
|
|
/**
|
|
|
|
* An internal doc load event has occured. Handle the event and remove it from the list.
|
|
|
|
* @param aTimer The timer created to handle this doc load event
|
|
|
|
* @param aClosure The nsIWebProgress* for the load event
|
|
|
|
* @param aEventType The type of load event, one of: nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_START,
|
|
|
|
* nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_COMPLETE or
|
|
|
|
* nsIAccessibleEvent::EVENT_DOCUMENT_LOAD_STOPPED
|
|
|
|
*/
|
|
|
|
void processDocLoadEvent(in nsITimer aTimer, in voidPtr aClosure, in PRUint32 aEventType);
|
|
|
|
|
2008-11-03 19:36:36 -08:00
|
|
|
/**
|
|
|
|
* Fire accessible event of the given type for the given target.
|
|
|
|
*
|
|
|
|
* @param aEvent [in] accessible event type
|
|
|
|
* @param aTarget [in] target of accessible event
|
|
|
|
*/
|
|
|
|
void fireAccessibleEvent(in unsigned long aEvent, in nsIAccessible aTarget);
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
%{ C++
|
|
|
|
|
|
|
|
// for component registration
|
|
|
|
// {DE401C37-9A7F-4278-A6F8-3DE2833989EF}
|
|
|
|
#define NS_ACCESSIBILITY_SERVICE_CID \
|
|
|
|
{ 0xde401c37, 0x9a7f, 0x4278, { 0xa6, 0xf8, 0x3d, 0xe2, 0x83, 0x39, 0x89, 0xef } }
|
|
|
|
|
|
|
|
extern nsresult
|
|
|
|
NS_GetAccessibilityService(nsIAccessibilityService** aResult);
|
|
|
|
|
|
|
|
%}
|