accessible/src/windows/msaa/EnumVariant.h

Wed, 31 Dec 2014 06:09:35 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Wed, 31 Dec 2014 06:09:35 +0100
changeset 0
6474c204b198
permissions
-rw-r--r--

Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.

     1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     2 /* vim: set ts=2 et sw=2 tw=80: */
     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 file,
     5  * You can obtain one at http://mozilla.org/MPL/2.0/. */
     7 #ifndef mozilla_a11y_EnumVariant_h__
     8 #define mozilla_a11y_EnumVariant_h__
    10 #include "AccessibleWrap.h"
    11 #include "IUnknownImpl.h"
    13 namespace mozilla {
    14 namespace a11y {
    16 /**
    17  * Used to fetch accessible children.
    18  */
    19 class ChildrenEnumVariant MOZ_FINAL : public IEnumVARIANT
    20 {
    21 public:
    22   ChildrenEnumVariant(AccessibleWrap* aAnchor) : mAnchorAcc(aAnchor),
    23     mCurAcc(mAnchorAcc->GetChildAt(0)), mCurIndex(0) { }
    25   // IUnknown
    26   DECL_IUNKNOWN
    28   // IEnumVariant
    29   virtual /* [local] */ HRESULT STDMETHODCALLTYPE Next(
    30     /* [in] */ ULONG aCount,
    31     /* [length_is][size_is][out] */ VARIANT* aItems,
    32     /* [out] */ ULONG* aCountFetched);
    34   virtual HRESULT STDMETHODCALLTYPE Skip(
    35     /* [in] */ ULONG aCount);
    37   virtual HRESULT STDMETHODCALLTYPE Reset();
    39   virtual HRESULT STDMETHODCALLTYPE Clone(
    40     /* [out] */ IEnumVARIANT** aEnumVaraint);
    42 private:
    43   ChildrenEnumVariant() MOZ_DELETE;
    44   ChildrenEnumVariant& operator =(const ChildrenEnumVariant&) MOZ_DELETE;
    46   ChildrenEnumVariant(const ChildrenEnumVariant& aEnumVariant) :
    47     mAnchorAcc(aEnumVariant.mAnchorAcc), mCurAcc(aEnumVariant.mCurAcc),
    48     mCurIndex(aEnumVariant.mCurIndex) { }
    49   virtual ~ChildrenEnumVariant() { }
    51 protected:
    52   nsRefPtr<AccessibleWrap> mAnchorAcc;
    53   Accessible* mCurAcc;
    54   uint32_t mCurIndex;
    55 };
    57 } // a11y namespace
    58 } // mozilla namespace
    60 #endif

mercurial