1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
/* vim:expandtab:shiftwidth=4:tabstop=4:
4
/* ***** BEGIN LICENSE BLOCK *****
5
* Version: NPL 1.1/GPL 2.0/LGPL 2.1
8
* The contents of this file are subject to the Mozilla Public
9
* License Version 1.1 (the "License"); you may not use this file
10
* except in compliance with the License. You may obtain a copy of
11
* the License at http://www.mozilla.org/MPL/
13
* Software distributed under the License is distributed on an "AS
14
* IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
15
* implied. See the License for the specific language governing
16
* rights and limitations under the License.
18
* The Original Code is mozilla.org code.
20
* The Initial Developer of the Original Code is Sun Microsystems, Inc.
21
* Portions created by Sun Microsystems are Copyright (C) 2002 Sun
22
* Microsystems, Inc. All Rights Reserved.
24
* Original Author: Bolian Yin (bolian.yin@sun.com)
28
* Alternatively, the contents of this file may be used under the terms of
29
* either the GNU General Public License Version 2 or later (the "GPL"), or
30
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
31
* in which case the provisions of the GPL or the LGPL are applicable instead
32
* of those above. If you wish to allow use of your version of this file only
33
* under the terms of either the GPL or the LGPL, and not to allow others to
34
* use your version of this file under the terms of the NPL, indicate your
35
* decision by deleting the provisions above and replace them with the notice
36
* and other provisions required by the GPL or the LGPL. If you do not delete
37
* the provisions above, a recipient may use your version of this file under
38
* the terms of any one of the NPL, the GPL or the LGPL.
40
* ***** END LICENSE BLOCK ***** */
42
#ifndef __NS_APP_ROOT_ACCESSIBLE_H__
43
#define __NS_APP_ROOT_ACCESSIBLE_H__
46
#include "nsIAccessibleDocument.h"
47
#include "nsAccessibilityService.h"
48
#include "nsAccessibleWrap.h"
49
#include "nsRootAccessibleWrap.h"
51
#define MAI_TYPE_APP_ROOT (MAI_TYPE_ATK_OBJECT)
53
/* nsAppRootAccessible is for the whole application of Mozilla.
54
* Only one instance of nsAppRootAccessible exists for one Mozilla instance.
55
* And this one should be created when Mozilla Startup (if accessibility
56
* feature has been enabled) and destroyed when Mozilla Shutdown.
58
* All the accessibility objects for toplevel windows are direct children of
59
* the nsAppRootAccessible instance.
61
class nsAppRootAccessible;
62
class nsAppRootAccessible: public nsAccessibleWrap
65
virtual ~nsAppRootAccessible();
67
// virtual void DumpMaiObjectInfo(int aDepth);
70
static nsAppRootAccessible *Create();
73
nsAppRootAccessible();
75
/* virtual functions from nsAccessibleNode */
77
NS_IMETHOD Shutdown();
79
/* virtual functions from nsAccessible */
80
NS_IMETHOD GetName(nsAString & aName);
81
NS_IMETHOD GetDescription(nsAString & aDescription);
82
NS_IMETHOD GetRole(PRUint32 *aRole);
83
NS_IMETHOD GetParent(nsIAccessible * *aParent);
84
NS_IMETHOD GetNextSibling(nsIAccessible * *aNextSibling);
85
NS_IMETHOD GetPreviousSibling(nsIAccessible **aPreviousSibling);
86
NS_IMETHOD GetChildAt(PRInt32 aChildNum, nsIAccessible **aChild);
88
NS_IMETHOD GetFirstChild(nsIAccessible * *aFirstChild);
89
NS_IMETHOD GetChildCount(PRInt32 *aAccChildCount);
91
// return the atk object for app root accessible
92
NS_IMETHOD GetNativeInterface(void **aOutAccessible);
94
nsresult AddRootAccessible(nsRootAccessibleWrap *aRootAccWrap);
95
nsresult RemoveRootAccessible(nsRootAccessibleWrap *aRootAccWrap);
97
nsCOMPtr<nsIMutableArray> mChildren;
101
#endif /* __NS_APP_ROOT_ACCESSIBLE_H__ */