accessible/public/nsIAccessibilityService.h

changeset 0
6474c204b198
equal deleted inserted replaced
-1:000000000000 0:54ce05e94ba0
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
2 *
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
6
7 #ifndef _nsIAccessibilityService_h_
8 #define _nsIAccessibilityService_h_
9
10 #include "nsIAccessibleRetrieval.h"
11 #include "nsIAccessibleEvent.h"
12
13 #include "nsAutoPtr.h"
14
15 namespace mozilla {
16 namespace a11y {
17
18 class Accessible;
19
20 } // namespace a11y
21 } // namespace mozilla
22
23 class nsINode;
24 class nsIContent;
25 class nsIFrame;
26 class nsIPresShell;
27 class nsObjectFrame;
28
29 // 10ff6dca-b219-4b64-9a4c-67a62b86edce
30 #define NS_IACCESSIBILITYSERVICE_IID \
31 { 0x84dd9182, 0x6639, 0x4377, \
32 { 0xa4, 0x13, 0xad, 0xe1, 0xae, 0x4e, 0x52, 0xdd } }
33
34 class nsIAccessibilityService : public nsIAccessibleRetrieval
35 {
36 public:
37 NS_DECLARE_STATIC_IID_ACCESSOR(NS_IACCESSIBILITYSERVICE_IID)
38
39 /**
40 * Return root document accessible that is or contains a document accessible
41 * for the given presshell.
42 *
43 * @param aPresShell [in] the presshell
44 * @param aCanCreate [in] points whether the root document accessible
45 * should be returned from the cache or can be created
46 */
47 virtual mozilla::a11y::Accessible*
48 GetRootDocumentAccessible(nsIPresShell* aPresShell, bool aCanCreate) = 0;
49
50 /**
51 * Adds/remove ATK root accessible for gtk+ native window to/from children
52 * of the application accessible.
53 */
54 virtual mozilla::a11y::Accessible*
55 AddNativeRootAccessible(void* aAtkAccessible) = 0;
56 virtual void
57 RemoveNativeRootAccessible(mozilla::a11y::Accessible* aRootAccessible) = 0;
58
59 /**
60 * Fire accessible event of the given type for the given target.
61 *
62 * @param aEvent [in] accessible event type
63 * @param aTarget [in] target of accessible event
64 */
65 virtual void FireAccessibleEvent(uint32_t aEvent,
66 mozilla::a11y::Accessible* aTarget) = 0;
67 };
68
69 NS_DEFINE_STATIC_IID_ACCESSOR(nsIAccessibilityService,
70 NS_IACCESSIBILITYSERVICE_IID)
71
72 // for component registration
73 // {DE401C37-9A7F-4278-A6F8-3DE2833989EF}
74 #define NS_ACCESSIBILITY_SERVICE_CID \
75 { 0xde401c37, 0x9a7f, 0x4278, { 0xa6, 0xf8, 0x3d, 0xe2, 0x83, 0x39, 0x89, 0xef } }
76
77 extern nsresult
78 NS_GetAccessibilityService(nsIAccessibilityService** aResult);
79
80 #endif

mercurial