|
1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */ |
|
2 /* vim:expandtab:shiftwidth=2:tabstop=2: |
|
3 */ |
|
4 /* This Source Code Form is subject to the terms of the Mozilla Public |
|
5 * License, v. 2.0. If a copy of the MPL was not distributed with this |
|
6 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
|
7 |
|
8 #ifndef mozilla_a11y_HyperTextAccessibleWrap_h__ |
|
9 #define mozilla_a11y_HyperTextAccessibleWrap_h__ |
|
10 |
|
11 #include "HyperTextAccessible.h" |
|
12 #include "ia2AccessibleEditableText.h" |
|
13 #include "ia2AccessibleHypertext.h" |
|
14 #include "IUnknownImpl.h" |
|
15 |
|
16 namespace mozilla { |
|
17 template<class T> class StaticAutoPtr; |
|
18 template<class T> class StaticRefPtr; |
|
19 |
|
20 namespace a11y { |
|
21 |
|
22 class HyperTextAccessibleWrap : public HyperTextAccessible, |
|
23 public ia2AccessibleHypertext, |
|
24 public ia2AccessibleEditableText |
|
25 { |
|
26 public: |
|
27 HyperTextAccessibleWrap(nsIContent* aContent, DocAccessible* aDoc) : |
|
28 HyperTextAccessible(aContent, aDoc) {} |
|
29 |
|
30 // IUnknown |
|
31 DECL_IUNKNOWN_INHERITED |
|
32 |
|
33 // nsISupports |
|
34 NS_DECL_ISUPPORTS_INHERITED |
|
35 |
|
36 // Accessible |
|
37 virtual nsresult HandleAccEvent(AccEvent* aEvent); |
|
38 |
|
39 protected: |
|
40 virtual nsresult GetModifiedText(bool aGetInsertedText, nsAString& aText, |
|
41 uint32_t *aStartOffset, |
|
42 uint32_t *aEndOffset); |
|
43 |
|
44 static StaticRefPtr<Accessible> sLastTextChangeAcc; |
|
45 static StaticAutoPtr<nsString> sLastTextChangeString; |
|
46 static bool sLastTextChangeWasInsert; |
|
47 static uint32_t sLastTextChangeStart; |
|
48 static uint32_t sLastTextChangeEnd; |
|
49 |
|
50 friend void PlatformInit(); |
|
51 }; |
|
52 |
|
53 } // namespace a11y |
|
54 } // namespace mozilla |
|
55 |
|
56 #endif |