accessible/src/windows/msaa/HyperTextAccessibleWrap.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/src/windows/msaa/HyperTextAccessibleWrap.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,56 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* vim:expandtab:shiftwidth=2:tabstop=2:
     1.6 + */
     1.7 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.8 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.9 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
    1.10 +
    1.11 +#ifndef mozilla_a11y_HyperTextAccessibleWrap_h__
    1.12 +#define mozilla_a11y_HyperTextAccessibleWrap_h__
    1.13 +
    1.14 +#include "HyperTextAccessible.h"
    1.15 +#include "ia2AccessibleEditableText.h"
    1.16 +#include "ia2AccessibleHypertext.h"
    1.17 +#include "IUnknownImpl.h"
    1.18 +
    1.19 +namespace mozilla {
    1.20 +template<class T> class StaticAutoPtr;
    1.21 +template<class T> class StaticRefPtr;
    1.22 +
    1.23 +namespace a11y {
    1.24 +
    1.25 +class HyperTextAccessibleWrap : public HyperTextAccessible,
    1.26 +                                public ia2AccessibleHypertext,
    1.27 +                                public ia2AccessibleEditableText
    1.28 +{
    1.29 +public:
    1.30 +  HyperTextAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) :
    1.31 +    HyperTextAccessible(aContent, aDoc) {}
    1.32 +
    1.33 +  // IUnknown
    1.34 +  DECL_IUNKNOWN_INHERITED
    1.35 +
    1.36 +  // nsISupports
    1.37 +  NS_DECL_ISUPPORTS_INHERITED
    1.38 +
    1.39 +  // Accessible
    1.40 +  virtual nsresult HandleAccEvent(AccEvent* aEvent);
    1.41 +
    1.42 +protected:
    1.43 +  virtual nsresult GetModifiedText(bool aGetInsertedText, nsAString& aText,
    1.44 +                                   uint32_t *aStartOffset,
    1.45 +                                   uint32_t *aEndOffset);
    1.46 +
    1.47 +  static StaticRefPtr<Accessible> sLastTextChangeAcc;
    1.48 +  static StaticAutoPtr<nsString> sLastTextChangeString;
    1.49 +  static bool sLastTextChangeWasInsert;
    1.50 +  static uint32_t sLastTextChangeStart;
    1.51 +  static uint32_t sLastTextChangeEnd;
    1.52 +
    1.53 +  friend void PlatformInit();
    1.54 +};
    1.55 +
    1.56 +} // namespace a11y
    1.57 +} // namespace mozilla
    1.58 +
    1.59 +#endif

mercurial