Added Document interface for gnome 2.16 release. Bug/RFE #326520, with
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_document.c
1 /*
2  * AT-SPI - Assistive Technology Service Provider Interface
3  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
4  *
5  * Copyright 2001, 2002 Sun Microsystems Inc.,
6  * Copyright 2001, 2002 Ximian, Inc.
7  *
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.
12  *
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.
17  *
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.
22  */
23
24 #include <cspi/spi.h>
25 #include <cspi/spi-private.h>
26
27
28 /**
29  * AccessibleDocument_ref:
30  * @obj: a pointer to the #AccessibleDocument object on which to operate.
31  *
32  * Increment the reference count for an #AccessibleDocument object.
33  **/
34 void
35 AccessibleDocument_ref (AccessibleDocument *obj)
36 {
37   cspi_object_ref (obj);
38 }
39
40 /**
41  * AccessibleDocument_unref:
42  * @obj: a pointer to the #Accessible object on which to operate.
43  *
44  * Decrement the reference count for an #AccessibleDocument object.
45  **/
46
47 void
48 AccessibleDocument_unref (AccessibleDocument *obj)
49 {
50   cspi_object_unref (obj);
51 }
52
53
54 char *
55 AccessibleDocument_getLocale (AccessibleDocument *obj)
56 {
57   char *retval = "C";
58
59   cspi_return_val_if_fail (obj != NULL, "C");
60
61   retval = Accessibility_Document_getLocale (CSPI_OBJREF (obj),
62                                              cspi_ev ());
63   
64   cspi_return_val_if_ev ("getLocale", NULL);
65
66   return retval;
67
68 }
69
70 char *
71 AccessibleDocument_getAttributeValue (AccessibleDocument *obj,
72                                       char *attribute)
73 {
74   
75   char *retval;
76
77   cspi_return_val_if_fail (obj != NULL, NULL);
78
79   retval = Accessibility_Document_getAttributeValue (CSPI_OBJREF (obj),
80                                                      attribute,
81                                                      cspi_ev ());
82
83   cspi_return_val_if_ev ("getAttributeValue", NULL);
84
85   return retval;
86   
87 }
88                                       
89
90 AccessibleAttributeSet * 
91 AccessibleDocument_getAttributes (AccessibleDocument *obj){
92
93   AccessibleAttributeSet *retval;
94
95   cspi_return_val_if_fail (obj != NULL, NULL);
96
97   retval = Accessibility_Document_getAttributes (CSPI_OBJREF (obj),
98                                                     cspi_ev ());
99   cspi_return_val_if_ev ("getAttributes", NULL);
100   
101   return retval;
102
103 }