michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- michael@0: * michael@0: * This Source Code Form is subject to the terms of the Mozilla Public michael@0: * License, v. 2.0. If a copy of the MPL was not distributed with this michael@0: * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ michael@0: michael@0: #ifndef _nsIAccessibilityService_h_ michael@0: #define _nsIAccessibilityService_h_ michael@0: michael@0: #include "nsIAccessibleRetrieval.h" michael@0: #include "nsIAccessibleEvent.h" michael@0: michael@0: #include "nsAutoPtr.h" michael@0: michael@0: namespace mozilla { michael@0: namespace a11y { michael@0: michael@0: class Accessible; michael@0: michael@0: } // namespace a11y michael@0: } // namespace mozilla michael@0: michael@0: class nsINode; michael@0: class nsIContent; michael@0: class nsIFrame; michael@0: class nsIPresShell; michael@0: class nsObjectFrame; michael@0: michael@0: // 10ff6dca-b219-4b64-9a4c-67a62b86edce michael@0: #define NS_IACCESSIBILITYSERVICE_IID \ michael@0: { 0x84dd9182, 0x6639, 0x4377, \ michael@0: { 0xa4, 0x13, 0xad, 0xe1, 0xae, 0x4e, 0x52, 0xdd } } michael@0: michael@0: class nsIAccessibilityService : public nsIAccessibleRetrieval michael@0: { michael@0: public: michael@0: NS_DECLARE_STATIC_IID_ACCESSOR(NS_IACCESSIBILITYSERVICE_IID) michael@0: michael@0: /** michael@0: * Return root document accessible that is or contains a document accessible michael@0: * for the given presshell. michael@0: * michael@0: * @param aPresShell [in] the presshell michael@0: * @param aCanCreate [in] points whether the root document accessible michael@0: * should be returned from the cache or can be created michael@0: */ michael@0: virtual mozilla::a11y::Accessible* michael@0: GetRootDocumentAccessible(nsIPresShell* aPresShell, bool aCanCreate) = 0; michael@0: michael@0: /** michael@0: * Adds/remove ATK root accessible for gtk+ native window to/from children michael@0: * of the application accessible. michael@0: */ michael@0: virtual mozilla::a11y::Accessible* michael@0: AddNativeRootAccessible(void* aAtkAccessible) = 0; michael@0: virtual void michael@0: RemoveNativeRootAccessible(mozilla::a11y::Accessible* aRootAccessible) = 0; michael@0: michael@0: /** michael@0: * Fire accessible event of the given type for the given target. michael@0: * michael@0: * @param aEvent [in] accessible event type michael@0: * @param aTarget [in] target of accessible event michael@0: */ michael@0: virtual void FireAccessibleEvent(uint32_t aEvent, michael@0: mozilla::a11y::Accessible* aTarget) = 0; michael@0: }; michael@0: michael@0: NS_DEFINE_STATIC_IID_ACCESSOR(nsIAccessibilityService, michael@0: NS_IACCESSIBILITYSERVICE_IID) michael@0: michael@0: // for component registration michael@0: // {DE401C37-9A7F-4278-A6F8-3DE2833989EF} michael@0: #define NS_ACCESSIBILITY_SERVICE_CID \ michael@0: { 0xde401c37, 0x9a7f, 0x4278, { 0xa6, 0xf8, 0x3d, 0xe2, 0x83, 0x39, 0x89, 0xef } } michael@0: michael@0: extern nsresult michael@0: NS_GetAccessibilityService(nsIAccessibilityService** aResult); michael@0: michael@0: #endif