accessible/public/nsIAccessibilityService.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/public/nsIAccessibilityService.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,80 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
     1.5 + *
     1.6 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.7 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.8 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef _nsIAccessibilityService_h_
    1.11 +#define _nsIAccessibilityService_h_
    1.12 +
    1.13 +#include "nsIAccessibleRetrieval.h"
    1.14 +#include "nsIAccessibleEvent.h"
    1.15 +
    1.16 +#include "nsAutoPtr.h"
    1.17 +
    1.18 +namespace mozilla {
    1.19 +namespace a11y {
    1.20 +
    1.21 +class Accessible;
    1.22 +
    1.23 +} // namespace a11y
    1.24 +} // namespace mozilla
    1.25 +
    1.26 +class nsINode;
    1.27 +class nsIContent;
    1.28 +class nsIFrame;
    1.29 +class nsIPresShell;
    1.30 +class nsObjectFrame;
    1.31 +
    1.32 +// 10ff6dca-b219-4b64-9a4c-67a62b86edce
    1.33 +#define NS_IACCESSIBILITYSERVICE_IID \
    1.34 +{ 0x84dd9182, 0x6639, 0x4377, \
    1.35 + { 0xa4, 0x13, 0xad, 0xe1, 0xae, 0x4e, 0x52, 0xdd } }
    1.36 +
    1.37 +class nsIAccessibilityService : public nsIAccessibleRetrieval
    1.38 +{
    1.39 +public:
    1.40 +  NS_DECLARE_STATIC_IID_ACCESSOR(NS_IACCESSIBILITYSERVICE_IID)
    1.41 +
    1.42 +  /**
    1.43 +   * Return root document accessible that is or contains a document accessible
    1.44 +   * for the given presshell.
    1.45 +   *
    1.46 +   * @param aPresShell  [in] the presshell
    1.47 +   * @param aCanCreate  [in] points whether the root document accessible
    1.48 +   *                        should be returned from the cache or can be created
    1.49 +   */
    1.50 +  virtual mozilla::a11y::Accessible*
    1.51 +    GetRootDocumentAccessible(nsIPresShell* aPresShell, bool aCanCreate) = 0;
    1.52 +
    1.53 +   /**
    1.54 +   * Adds/remove ATK root accessible for gtk+ native window to/from children
    1.55 +   * of the application accessible.
    1.56 +   */
    1.57 +  virtual mozilla::a11y::Accessible*
    1.58 +    AddNativeRootAccessible(void* aAtkAccessible) = 0;
    1.59 +  virtual void
    1.60 +    RemoveNativeRootAccessible(mozilla::a11y::Accessible* aRootAccessible) = 0;
    1.61 +
    1.62 +  /**
    1.63 +   * Fire accessible event of the given type for the given target.
    1.64 +   *
    1.65 +   * @param aEvent   [in] accessible event type
    1.66 +   * @param aTarget  [in] target of accessible event
    1.67 +   */
    1.68 +  virtual void FireAccessibleEvent(uint32_t aEvent,
    1.69 +                                   mozilla::a11y::Accessible* aTarget) = 0;
    1.70 +};
    1.71 +
    1.72 +NS_DEFINE_STATIC_IID_ACCESSOR(nsIAccessibilityService,
    1.73 +                              NS_IACCESSIBILITYSERVICE_IID)
    1.74 +
    1.75 +// for component registration
    1.76 +// {DE401C37-9A7F-4278-A6F8-3DE2833989EF}
    1.77 +#define NS_ACCESSIBILITY_SERVICE_CID \
    1.78 +{ 0xde401c37, 0x9a7f, 0x4278, { 0xa6, 0xf8, 0x3d, 0xe2, 0x83, 0x39, 0x89, 0xef } }
    1.79 +
    1.80 +extern nsresult
    1.81 +NS_GetAccessibilityService(nsIAccessibilityService** aResult);
    1.82 +
    1.83 +#endif

mercurial