Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:28:16

0001 /*
0002  * AT-SPI - Assistive Technology Service Provider Interface
0003  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
0004  *
0005  * Copyright 2002 Ximian, Inc.
0006  *           2002 Sun Microsystems Inc.
0007  *
0008  *
0009  * This library is free software; you can redistribute it and/or
0010  * modify it under the terms of the GNU Lesser General Public
0011  * License as published by the Free Software Foundation; either
0012  * version 2.1 of the License, or (at your option) any later version.
0013  *
0014  * This library is distributed in the hope that it will be useful,
0015  * but WITHOUT ANY WARRANTY; without even the implied warranty of
0016  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
0017  * Lesser General Public License for more details.
0018  *
0019  * You should have received a copy of the GNU Lesser General Public
0020  * License along with this library; if not, write to the
0021  * Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
0022  * Boston, MA 02110-1301, USA.
0023  */
0024 
0025 #ifndef _ATSPI_DOCUMENT_H_
0026 #define _ATSPI_DOCUMENT_H_
0027 
0028 #include "glib-object.h"
0029 
0030 #include "atspi-constants.h"
0031 
0032 #include "atspi-types.h"
0033 
0034 G_BEGIN_DECLS
0035 
0036 #define ATSPI_TYPE_DOCUMENT (atspi_document_get_type ())
0037 #define ATSPI_IS_DOCUMENT(obj) G_TYPE_CHECK_INSTANCE_TYPE ((obj), ATSPI_TYPE_DOCUMENT)
0038 #define ATSPI_DOCUMENT(obj) G_TYPE_CHECK_INSTANCE_CAST ((obj), ATSPI_TYPE_DOCUMENT, AtspiDocument)
0039 #define ATSPI_DOCUMENT_GET_IFACE(obj) (G_TYPE_INSTANCE_GET_INTERFACE ((obj), ATSPI_TYPE_DOCUMENT, AtspiDocument))
0040 
0041 GType atspi_document_get_type ();
0042 
0043 /**
0044  * AtspiTextSelection:
0045  * @start_object: the AtspiAccessible containing the start of the selection.
0046  * @start_offset: the text offset of the beginning of the selection within
0047  *                @start_object.
0048  * @end_object: the AtspiAccessible containing the end of the selection.
0049  * @end_offset: the text offset of the end of the selection within @end_object.
0050  * @start_is_active: a gboolean indicating whether the start of the selection
0051  *                  is the active point.
0052  *
0053  * This structure represents a single  text selection within a document. This
0054  * selection is defined by two points in the content, where each one is defined
0055  * by an AtkObject supporting the AtkText interface and a character offset
0056  * relative to it.
0057  *
0058  * The end object must appear after the start object in the accessibility tree,
0059  * i.e. the end object must be reachable from the start object by navigating
0060  * forward (next, first child etc).
0061  *
0062  * This struct also contains a @start_is_active boolean, to communicate if the
0063  * start of the selection is the active point or not.
0064  *
0065  * The active point corresponds to the user's focus or point of interest. The
0066  * user moves the active point to expand or collapse the range. The anchor
0067  * point is the other point of the range and typically remains constant. In
0068  * most cases, anchor is the start of the range and active is the end. However,
0069  * when selecting backwards (e.g. pressing shift+left arrow in a text field),
0070  * the start of the range is the active point, as the user moves this to
0071  * manipulate the selection.
0072  *
0073  * Since: 2.52
0074  */
0075 typedef struct _AtspiTextSelection AtspiTextSelection;
0076 struct _AtspiTextSelection
0077 {
0078   AtspiAccessible *start_object;
0079   gint start_offset;
0080   AtspiAccessible *end_object;
0081   gint end_offset;
0082   gboolean start_is_active;
0083 };
0084 
0085 struct _AtspiDocument
0086 {
0087   GTypeInterface parent;
0088 };
0089 
0090 gchar *atspi_document_get_locale (AtspiDocument *obj, GError **error);
0091 
0092 #ifndef ATSPI_DISABLE_DEPRECATED
0093 gchar *atspi_document_get_attribute_value (AtspiDocument *obj, const gchar *attribute, GError **error);
0094 #endif
0095 
0096 gchar *atspi_document_get_document_attribute_value (AtspiDocument *obj, const gchar *attribute, GError **error);
0097 
0098 #ifndef ATSPI_DISABLE_DEPRECATED
0099 GHashTable *atspi_document_get_attributes (AtspiDocument *obj, GError **error);
0100 #endif
0101 
0102 GHashTable *atspi_document_get_document_attributes (AtspiDocument *obj, GError **error);
0103 
0104 gint atspi_document_get_page_count (AtspiDocument *obj, GError **error);
0105 gint atspi_document_get_current_page_number (AtspiDocument *obj, GError **error);
0106 
0107 GArray *atspi_document_get_text_selections (AtspiDocument *document, GError **error);
0108 
0109 gboolean atspi_document_set_text_selections (AtspiDocument *document, GArray *selections, GError **error);
0110 G_END_DECLS
0111 
0112 #endif /* _ATSPI_DOCUMENT_H_ */