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