michael@0: /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ michael@0: /* vim:expandtab:shiftwidth=2:tabstop=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 mozilla_a11y_HyperTextAccessibleWrap_h__ michael@0: #define mozilla_a11y_HyperTextAccessibleWrap_h__ michael@0: michael@0: #include "HyperTextAccessible.h" michael@0: #include "ia2AccessibleEditableText.h" michael@0: #include "ia2AccessibleHypertext.h" michael@0: #include "IUnknownImpl.h" michael@0: michael@0: namespace mozilla { michael@0: template class StaticAutoPtr; michael@0: template class StaticRefPtr; michael@0: michael@0: namespace a11y { michael@0: michael@0: class HyperTextAccessibleWrap : public HyperTextAccessible, michael@0: public ia2AccessibleHypertext, michael@0: public ia2AccessibleEditableText michael@0: { michael@0: public: michael@0: HyperTextAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) : michael@0: HyperTextAccessible(aContent, aDoc) {} michael@0: michael@0: // IUnknown michael@0: DECL_IUNKNOWN_INHERITED michael@0: michael@0: // nsISupports michael@0: NS_DECL_ISUPPORTS_INHERITED michael@0: michael@0: // Accessible michael@0: virtual nsresult HandleAccEvent(AccEvent* aEvent); michael@0: michael@0: protected: michael@0: virtual nsresult GetModifiedText(bool aGetInsertedText, nsAString& aText, michael@0: uint32_t *aStartOffset, michael@0: uint32_t *aEndOffset); michael@0: michael@0: static StaticRefPtr sLastTextChangeAcc; michael@0: static StaticAutoPtr sLastTextChangeString; michael@0: static bool sLastTextChangeWasInsert; michael@0: static uint32_t sLastTextChangeStart; michael@0: static uint32_t sLastTextChangeEnd; michael@0: michael@0: friend void PlatformInit(); michael@0: }; michael@0: michael@0: } // namespace a11y michael@0: } // namespace mozilla michael@0: michael@0: #endif