summaryrefslogtreecommitdiff
path: root/offapi
diff options
context:
space:
mode:
authorColomban Wendling <cwendling@hypra.fr>2020-04-30 10:49:37 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-05-07 12:11:33 +0200
commitb46a0a7f9f88a0213b0a5ca2712b6eb93b74d088 (patch)
treeaf83d20d3c08508268c465a7c6983db294f64559 /offapi
parente420b89a698f50b174422b962a24e2a21672a178 (diff)
tdf#118418 implement scrollSubstringTo() for gtk
Define & use new accessibility scroll type compatible with IAccessible2 and extend the XAccessibleText interface to require scrollSubstringTo(). Co-authored-by: Martin Pieuchot <mpi@grenadille.net> Change-Id: Id3b2e8616892d7dcbfb41a14b72a8a457fd1dbf6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89851 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'offapi')
-rw-r--r--offapi/UnoApi_offapi.mk1
-rw-r--r--offapi/com/sun/star/accessibility/AccessibleScrollType.idl81
-rw-r--r--offapi/com/sun/star/accessibility/XAccessibleText.idl27
3 files changed, 109 insertions, 0 deletions
diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 8f4079009f12..61262689343b 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -1621,6 +1621,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,com/sun/star/accessibility,\
AccessibleRelation \
AccessibleRelationType \
AccessibleRole \
+ AccessibleScrollType \
AccessibleStateType \
AccessibleTableModelChange \
AccessibleTableModelChangeType \
diff --git a/offapi/com/sun/star/accessibility/AccessibleScrollType.idl b/offapi/com/sun/star/accessibility/AccessibleScrollType.idl
new file mode 100644
index 000000000000..fd096b09b3d9
--- /dev/null
+++ b/offapi/com/sun/star/accessibility/AccessibleScrollType.idl
@@ -0,0 +1,81 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * 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/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+
+#ifndef __com_sun_star_accessibility_AccessibleScrollType_idl__
+#define __com_sun_star_accessibility_AccessibleScrollType_idl__
+
+module com { module sun { module star { module accessibility {
+
+/** Scroll types
+
+ <p>Describes the type of scrolling that are available for the methods of
+ the XAccessibleScrollableText interface.</p>
+
+ @since LibreOffice 7.0
+*/
+enum AccessibleScrollType
+{
+ /**
+ Scroll the top left corner of the object or string such that the
+ top left corner is within the top level window.
+ */
+ SCROLL_TOP_LEFT,
+
+ /**
+ Scroll the bottom right corner of the object or string such that the
+ bottom right corner is within the top level window.
+ */
+ SCROLL_BOTTOM_RIGHT,
+
+ /**
+ Scroll the top edge of the object or string such that the top edge is
+ within the top level window.
+ */
+ SCROLL_TOP_EDGE,
+
+ /**
+ Scroll the bottom edge of the object or string such that the bottom
+ edge is within the top level window.
+ */
+ SCROLL_BOTTOM_EDGE,
+
+ /**
+ Scroll the left edge of the object or string such that the left edge
+ is within the top level window.
+ */
+ SCROLL_LEFT_EDGE,
+
+ /**
+ Scroll the right edge of the object or string such that the right edge
+ is within the top level window.
+ */
+ SCROLL_RIGHT_EDGE,
+
+ /**
+ Scroll the object or string such that as much as possible of the
+ object or string is within the top level window.
+ */
+ SCROLL_ANYWHERE
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/offapi/com/sun/star/accessibility/XAccessibleText.idl b/offapi/com/sun/star/accessibility/XAccessibleText.idl
index 7e90f2d8a463..98af06445733 100644
--- a/offapi/com/sun/star/accessibility/XAccessibleText.idl
+++ b/offapi/com/sun/star/accessibility/XAccessibleText.idl
@@ -491,6 +491,33 @@ interface XAccessibleText : ::com::sun::star::uno::XInterface
boolean copyText ([in] long nStartIndex, [in] long nEndIndex)
raises (::com::sun::star::lang::IndexOutOfBoundsException);
+ /** Scroll the specified text to make it visible on screen.
+
+ @param nStartIndex
+ Start index of the text to scroll.
+ The valid range is 0..length.
+
+ @param nEndIndex
+ End index of the text to scroll.
+ The valid range is nStartIndex..length.
+
+ @param aScrollType
+ Type of scroll to perform. See AccessibleScrollType for the
+ complete list.
+
+ @return
+ Returns `TRUE` if the specified text has been scrolled
+ successfully.
+
+ @throws ::com::sun::star::lang::IndexOutOfBoundsException
+ if the indices are invalid
+
+ @since LibreOffice 7.0
+ */
+ boolean
+ scrollSubstringTo ([in] long nStartIndex, [in] long nEndIndex,
+ [in] AccessibleScrollType aScrollType)
+ raises (::com::sun::star::lang::IndexOutOfBoundsException);
};
}; }; }; };