2011-04-27 17:42:27 +04:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
|
2011-05-28 02:37:24 +04:00
|
|
|
/* vim: set ts=2 et sw=2 tw=80: */
|
2012-05-21 15:12:37 +04:00
|
|
|
/* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
2003-05-06 06:23:50 +04:00
|
|
|
|
|
|
|
#ifndef __MAI_HYPERLINK_H__
|
|
|
|
#define __MAI_HYPERLINK_H__
|
|
|
|
|
|
|
|
#include "nsMai.h"
|
2012-05-29 05:18:45 +04:00
|
|
|
#include "Accessible.h"
|
2003-05-06 06:23:50 +04:00
|
|
|
|
|
|
|
struct _AtkHyperlink;
|
|
|
|
typedef struct _AtkHyperlink AtkHyperlink;
|
|
|
|
|
2012-11-18 06:01:44 +04:00
|
|
|
namespace mozilla {
|
|
|
|
namespace a11y {
|
|
|
|
|
2003-05-06 06:23:50 +04:00
|
|
|
/*
|
|
|
|
* MaiHyperlink is a auxiliary class for MaiInterfaceHyperText.
|
|
|
|
*/
|
|
|
|
|
2006-05-29 09:46:38 +04:00
|
|
|
class MaiHyperlink
|
2003-05-06 06:23:50 +04:00
|
|
|
{
|
|
|
|
public:
|
2016-01-19 15:20:23 +03:00
|
|
|
explicit MaiHyperlink(AccessibleOrProxy aHyperLink);
|
2012-05-29 05:18:45 +04:00
|
|
|
~MaiHyperlink();
|
2003-05-06 06:23:50 +04:00
|
|
|
|
|
|
|
public:
|
2015-04-07 22:56:28 +03:00
|
|
|
AtkHyperlink* GetAtkHyperlink() const { return mMaiAtkHyperlink; }
|
2012-05-29 05:18:45 +04:00
|
|
|
Accessible* GetAccHyperlink()
|
2015-04-21 23:31:58 +03:00
|
|
|
{
|
2016-01-19 15:20:23 +03:00
|
|
|
if (!mHyperlink.IsAccessible())
|
2015-04-21 23:31:58 +03:00
|
|
|
return nullptr;
|
|
|
|
|
2016-01-19 15:20:23 +03:00
|
|
|
Accessible* link = mHyperlink.AsAccessible();
|
|
|
|
if (!link) {
|
|
|
|
return nullptr;
|
|
|
|
}
|
|
|
|
|
2015-04-21 23:31:58 +03:00
|
|
|
NS_ASSERTION(link->IsLink(), "Why isn't it a link!");
|
|
|
|
return link;
|
|
|
|
}
|
2003-05-06 06:23:50 +04:00
|
|
|
|
2016-01-19 15:20:23 +03:00
|
|
|
ProxyAccessible* Proxy() const { return mHyperlink.AsProxy(); }
|
2015-04-23 01:31:19 +03:00
|
|
|
|
2003-05-06 06:23:50 +04:00
|
|
|
protected:
|
2016-01-19 15:20:23 +03:00
|
|
|
AccessibleOrProxy mHyperlink;
|
2012-05-29 05:18:45 +04:00
|
|
|
AtkHyperlink* mMaiAtkHyperlink;
|
2003-05-06 06:23:50 +04:00
|
|
|
};
|
2012-11-18 06:01:44 +04:00
|
|
|
|
|
|
|
} // namespace a11y
|
|
|
|
} // namespace mozilla
|
|
|
|
|
2003-05-06 06:23:50 +04:00
|
|
|
#endif /* __MAI_HYPERLINK_H__ */
|