qwebviewaccessible_p.h 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. /*
  2. * Copyright (C) 2012 Nokia Corporation and/or its subsidiary(-ies)
  3. * This library is free software; you can redistribute it and/or
  4. * modify it under the terms of the GNU Library General Public
  5. * License as published by the Free Software Foundation; either
  6. * version 2 of the License, or (at your option) any later version.
  7. * This library is distributed in the hope that it will be useful,
  8. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
  10. * Library General Public License for more details.
  11. * You should have received a copy of the GNU Library General Public License
  12. * along with this library; see the file COPYING.LIB. If not, write to
  13. * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  14. * Boston, MA 02110-1301, USA.
  15. */
  16. #ifndef qwebviewaccessible_p_h
  17. #define qwebviewaccessible_p_h
  18. #include <qaccessible.h>
  19. #include <qaccessibleobject.h>
  20. #if QT_VERSION >= QT_VERSION_CHECK(5, 1, 0)
  21. #include <private/qaccessiblewidget_p.h>
  22. #else
  23. #include <qaccessiblewidget.h>
  24. #endif
  25. class QWebFrame;
  26. class QWebPage;
  27. class QWebView;
  28. /*
  29. * Classes representing accessible objects for View, Frame and Page.
  30. *
  31. * Each of these just returns one child which lets the accessibility
  32. * framwork navigate towards the actual contents in the frame.
  33. */
  34. class QWebFrameAccessible : public QAccessibleObject {
  35. public:
  36. QWebFrameAccessible(QWebFrame*);
  37. QWebFrame* frame() const;
  38. QAccessibleInterface* parent() const;
  39. int childCount() const;
  40. QAccessibleInterface* child(int index) const;
  41. int indexOfChild(const QAccessibleInterface*) const;
  42. int navigate(QAccessible::RelationFlag, int, QAccessibleInterface** target) const;
  43. QString text(QAccessible::Text) const;
  44. QAccessible::Role role() const;
  45. QAccessible::State state() const;
  46. };
  47. class QWebPageAccessible : public QAccessibleObject {
  48. public:
  49. QWebPageAccessible(QWebPage*);
  50. QWebPage* page() const;
  51. QAccessibleInterface* parent() const;
  52. int childCount() const;
  53. QAccessibleInterface* child(int index) const;
  54. int indexOfChild(const QAccessibleInterface*) const;
  55. int navigate(QAccessible::RelationFlag, int, QAccessibleInterface** target) const;
  56. QString text(QAccessible::Text) const;
  57. QAccessible::Role role() const;
  58. QAccessible::State state() const;
  59. };
  60. class QWebViewAccessible : public QAccessibleWidget {
  61. public:
  62. QWebViewAccessible(QWebView*);
  63. QWebView* view() const;
  64. int childCount() const;
  65. QAccessibleInterface* child(int index) const;
  66. };
  67. #endif