accessible/src/html/HTMLLinkAccessible.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/accessible/src/html/HTMLLinkAccessible.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,51 @@
     1.4 +/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
     1.5 +/* This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
     1.8 +
     1.9 +#ifndef mozilla_a11y_HTMLLinkAccessible_h__
    1.10 +#define mozilla_a11y_HTMLLinkAccessible_h__
    1.11 +
    1.12 +#include "HyperTextAccessibleWrap.h"
    1.13 +
    1.14 +namespace mozilla {
    1.15 +namespace a11y {
    1.16 +
    1.17 +class HTMLLinkAccessible : public HyperTextAccessibleWrap
    1.18 +{
    1.19 +public:
    1.20 +  HTMLLinkAccessible(nsIContent* aContent, DocAccessible* aDoc);
    1.21 + 
    1.22 +  NS_DECL_ISUPPORTS_INHERITED
    1.23 +
    1.24 +  // nsIAccessible
    1.25 +  NS_IMETHOD GetActionName(uint8_t aIndex, nsAString& aName);
    1.26 +  NS_IMETHOD DoAction(uint8_t aIndex);
    1.27 +
    1.28 +  // Accessible
    1.29 +  virtual void Value(nsString& aValue);
    1.30 +  virtual a11y::role NativeRole();
    1.31 +  virtual uint64_t NativeState();
    1.32 +  virtual uint64_t NativeLinkState() const;
    1.33 +  virtual uint64_t NativeInteractiveState() const;
    1.34 +
    1.35 +  // ActionAccessible
    1.36 +  virtual uint8_t ActionCount();
    1.37 +
    1.38 +  // HyperLinkAccessible
    1.39 +  virtual bool IsLink();
    1.40 +  virtual already_AddRefed<nsIURI> AnchorURIAt(uint32_t aAnchorIndex);
    1.41 +
    1.42 +protected:
    1.43 +  enum { eAction_Jump = 0 };
    1.44 +
    1.45 +  /**
    1.46 +   * Returns true if the link has href attribute.
    1.47 +   */
    1.48 +  bool IsLinked();
    1.49 +};
    1.50 +
    1.51 +} // namespace a11y
    1.52 +} // namespace mozilla
    1.53 +
    1.54 +#endif

mercurial