nsMaiHyperlink.h (1214B)
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 5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 6 7 #ifndef __MAI_HYPERLINK_H__ 8 #define __MAI_HYPERLINK_H__ 9 10 #include "nsMai.h" 11 #include "mozilla/a11y/Accessible.h" 12 #include "mozilla/a11y/LocalAccessible.h" 13 #include "mozilla/a11y/RemoteAccessible.h" 14 #include "nsDebug.h" 15 16 struct _AtkHyperlink; 17 typedef struct _AtkHyperlink AtkHyperlink; 18 19 namespace mozilla { 20 namespace a11y { 21 22 /* 23 * MaiHyperlink is a auxiliary class for MaiInterfaceHyperText. 24 */ 25 26 class MaiHyperlink { 27 public: 28 explicit MaiHyperlink(Accessible* aHyperLink); 29 ~MaiHyperlink(); 30 31 public: 32 AtkHyperlink* GetAtkHyperlink() const { return mMaiAtkHyperlink; } 33 Accessible* Acc() { 34 if (!mHyperlink) { 35 return nullptr; 36 } 37 NS_ASSERTION(mHyperlink->IsLink(), "Why isn't it a link!"); 38 return mHyperlink; 39 } 40 41 protected: 42 Accessible* mHyperlink; 43 AtkHyperlink* mMaiAtkHyperlink; 44 }; 45 46 } // namespace a11y 47 } // namespace mozilla 48 49 #endif /* __MAI_HYPERLINK_H__ */