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.

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

mercurial