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/. */
7 #include "InterfaceInitFuncs.h"
9 #include "nsMaiHyperlink.h"
10 #include "mozilla/Likely.h"
12 using namespace mozilla::a11y
;
15 static AtkHyperlink
* getHyperlinkCB(AtkHyperlinkImpl
* aImpl
) {
16 Accessible
* acc
= GetInternalObj(ATK_OBJECT(aImpl
));
21 NS_ASSERTION(acc
->IsLink(), "why isn't it a link!");
23 return MAI_ATK_OBJECT(aImpl
)->GetAtkHyperlink();
27 void hyperlinkImplInterfaceInitCB(AtkHyperlinkImplIface
* aIface
) {
28 NS_ASSERTION(aIface
, "no interface!");
29 if (MOZ_UNLIKELY(!aIface
)) return;
31 aIface
->get_hyperlink
= getHyperlinkCB
;