accessible/src/windows/uia/uiaRawElmProvider.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/src/windows/uia/uiaRawElmProvider.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,75 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim: set ts=2 et sw=2 tw=80: */
     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 file,
     1.8 + * You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.9 +
    1.10 +#ifndef mozilla_a11y_uiaRawElmProvider_h__
    1.11 +#define mozilla_a11y_uiaRawElmProvider_h__
    1.12 +
    1.13 +#include "objbase.h"
    1.14 +#include "AccessibleWrap.h"
    1.15 +#include "IUnknownImpl.h"
    1.16 +#include "uiautomation.h"
    1.17 +
    1.18 +namespace mozilla {
    1.19 +namespace a11y {
    1.20 +
    1.21 +class AccessibleWrap;
    1.22 +
    1.23 +/**
    1.24 + * IRawElementProviderSimple implementation (maintains IAccessibleEx approach).
    1.25 + */
    1.26 +class uiaRawElmProvider MOZ_FINAL : public IAccessibleEx,
    1.27 +                                    public IRawElementProviderSimple
    1.28 +{
    1.29 +public:
    1.30 +  uiaRawElmProvider(AccessibleWrap* aAcc) : mAcc(aAcc) { }
    1.31 +
    1.32 +  // IUnknown
    1.33 +  DECL_IUNKNOWN
    1.34 +
    1.35 +  // IAccessibleEx
    1.36 +  virtual HRESULT STDMETHODCALLTYPE GetObjectForChild(
    1.37 +    /* [in] */ long aIdChild,
    1.38 +    /* [retval][out] */ __RPC__deref_out_opt IAccessibleEx** aAccEx);
    1.39 +
    1.40 +  virtual HRESULT STDMETHODCALLTYPE GetIAccessiblePair(
    1.41 +    /* [out] */ __RPC__deref_out_opt IAccessible** aAcc,
    1.42 +    /* [out] */ __RPC__out long* aIdChild);
    1.43 +
    1.44 +  virtual HRESULT STDMETHODCALLTYPE GetRuntimeId(
    1.45 +    /* [retval][out] */ __RPC__deref_out_opt SAFEARRAY** aRuntimeIds);
    1.46 +
    1.47 +  virtual HRESULT STDMETHODCALLTYPE ConvertReturnedElement(
    1.48 +    /* [in] */ __RPC__in_opt IRawElementProviderSimple* aRawElmProvider,
    1.49 +    /* [out] */ __RPC__deref_out_opt IAccessibleEx** aAccEx);
    1.50 +
    1.51 +  // IRawElementProviderSimple
    1.52 +  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_ProviderOptions(
    1.53 +    /* [retval][out] */ __RPC__out enum ProviderOptions* aProviderOptions);
    1.54 +
    1.55 +  virtual HRESULT STDMETHODCALLTYPE GetPatternProvider(
    1.56 +    /* [in] */ PATTERNID aPatternId,
    1.57 +    /* [retval][out] */ __RPC__deref_out_opt IUnknown** aPatternProvider);
    1.58 +
    1.59 +  virtual HRESULT STDMETHODCALLTYPE GetPropertyValue(
    1.60 +    /* [in] */ PROPERTYID aPropertyId,
    1.61 +    /* [retval][out] */ __RPC__out VARIANT* aPropertyValue);
    1.62 +
    1.63 +  virtual /* [propget] */ HRESULT STDMETHODCALLTYPE get_HostRawElementProvider(
    1.64 +    /* [retval][out] */ __RPC__deref_out_opt IRawElementProviderSimple** aRawElmProvider);
    1.65 +
    1.66 +private:
    1.67 +  uiaRawElmProvider() MOZ_DELETE;
    1.68 +  uiaRawElmProvider& operator =(const uiaRawElmProvider&) MOZ_DELETE;
    1.69 +  uiaRawElmProvider(const uiaRawElmProvider&) MOZ_DELETE;
    1.70 +
    1.71 +protected:
    1.72 +  nsRefPtr<AccessibleWrap> mAcc;
    1.73 +};
    1.74 +
    1.75 +} // a11y namespace
    1.76 +} // mozilla namespace
    1.77 +
    1.78 +#endif

mercurial