2 * AT-SPI - Assistive Technology Service Provider Interface
3 * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
5 * Copyright 2001, 2002 Sun Microsystems Inc.,
6 * Copyright 2001, 2002 Ximian, Inc.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Library General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Library General Public License for more details.
18 * You should have received a copy of the GNU Library General Public
19 * License along with this library; if not, write to the
20 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
21 * Boston, MA 02111-1307, USA.
24 #include "atspi-private.h"
27 * atspi_document_get_locale:
28 * @obj: a pointer to the #Accessible object on which to operate.
30 * Gets the locale associated with the document's content.
31 * e.g. the locale for LOCALE_TYPE_MESSAGES.
33 * Returns: a string compliant with the POSIX standard for locale description.
36 atspi_document_get_locale (AtspiDocument *obj, GError **error)
40 g_return_val_if_fail (obj != NULL, g_strdup ("C"));
42 _atspi_dbus_call (obj, atspi_interface_document, "GetLocale", error, "=>s", &retval);
48 * atspi_document_get_attribute_value:
49 * @obj: a pointer to the #Accessible object on which to operate.
50 * @attribute: a string indicating the name of a specific attribute
52 * Gets the value of a single attribute, if specified for the document as a whole.
54 * (name-value pair) being queried.
56 * Returns a string corresponding to the value of the specified attribute, or
57 * an empty string if the attribute is unspecified for the object.
60 atspi_document_get_attribute_value (AtspiDocument *obj,
66 g_return_val_if_fail (obj != NULL, NULL);
68 _atspi_dbus_call (obj, atspi_interface_document, "GetAttributevaluee", error, "s=>s", attribute, &retval);
71 retval = g_strdup ("");
78 * atspi_document_get_attributes:
79 * @obj: a pointer to the #Accessible object on which to operate.
81 * Gets all attributes specified for a document as a whole.
83 * For attributes which change within
84 * the document content, see atspi_text_get_attribute_run instead.
86 * Returns: (element-type gchar* gchar*) (transfer full): an ::AttributeSet
87 * containing the attributes of the document, as name-value pairs.
90 atspi_document_get_attributes (AtspiDocument *obj, GError **error)
94 g_return_val_if_fail (obj != NULL, NULL);
96 message = _atspi_dbus_call_partial (obj, atspi_interface_document, "GetAttributes", error, "");
97 return _atspi_dbus_return_hash_from_message (message);
101 atspi_document_base_init (AtspiDocument *klass)
106 atspi_document_get_type (void)
108 static GType type = 0;
111 static const GTypeInfo tinfo =
113 sizeof (AtspiDocument),
114 (GBaseInitFunc) atspi_document_base_init,
115 (GBaseFinalizeFunc) NULL,
118 type = g_type_register_static (G_TYPE_INTERFACE, "AtspiDocument", &tinfo, 0);