* cspi/cspi-lowlevel.h cspi/spi-impl.h cspi/spi-listener.h
[platform/core/uifw/at-spi2-atk.git] / cspi / spi_application.c
1 /*
2  * AT-SPI - Assistive Technology Service Provider Interface
3  * (Gnome Accessibility Project; http://developer.gnome.org/projects/gap)
4  *
5  * Copyright 2001 Sun Microsystems Inc.
6  *
7  * This library is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU Library General Public
9  * License as published by the Free Software Foundation; either
10  * version 2 of the License, or (at your option) any later version.
11  *
12  * This library is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Library General Public License for more details.
16  *
17  * You should have received a copy of the GNU Library General Public
18  * License along with this library; if not, write to the
19  * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20  * Boston, MA 02111-1307, USA.
21  */
22
23 /*
24  *
25  * AccessibleApplication function prototypes
26  *
27  */
28
29 #include <cspi/spi-private.h>
30
31 /**
32  * AccessibleApplication_ref:
33  * @obj: a pointer to the #AccessibleApplication on which to operate.
34  *
35  * Increment the reference count for an #AccessibleApplication.
36  **/
37 void
38 AccessibleApplication_ref (AccessibleApplication *obj)
39 {
40   cspi_object_ref (obj);
41 }
42
43 /**
44  * AccessibleApplication_unref:
45  * @obj: a pointer to the #AccessibleApplication object on which to operate.
46  *
47  * Decrement the reference count for an #AccessibleApplication.
48  **/
49 void
50 AccessibleApplication_unref (AccessibleApplication *obj)
51 {
52   cspi_object_unref (obj);
53 }
54
55 /**
56  * AccessibleApplication_getToolkitName:
57  * @obj: a pointer to the #AccessibleApplication to query.
58  *
59  * Get the name of the UI toolkit used by an #AccessibleApplication.
60  *
61  * Returns: a UTF-8 string indicating which UI toolkit is
62  *          used by an application.
63  **/
64 char *
65 AccessibleApplication_getToolkitName (AccessibleApplication *obj)
66 {
67   char *retval;
68
69   cspi_return_val_if_fail (obj != NULL, NULL);
70
71   retval =
72     Accessibility_Application__get_toolkitName (CSPI_OBJREF (obj),
73                                                 cspi_ev ());
74
75   cspi_return_val_if_ev ("toolkitName", NULL);
76
77   return retval;
78 }
79
80 /**
81  * AccessibleApplication_getVersion:
82  * @obj: a pointer to the #AccessibleApplication being queried.
83  *
84  * Get the version of the at-spi bridge exported by an
85  *      #AccessibleApplication instance.
86  *
87  * Returns: a UTF-8 string indicating the application's
88  *          at-spi version.
89  **/
90 char *
91 AccessibleApplication_getVersion (AccessibleApplication *obj)
92 {
93   char *retval;
94
95   cspi_return_val_if_fail (obj != NULL, NULL);
96
97   retval =
98     Accessibility_Application__get_version (CSPI_OBJREF (obj),
99                                             cspi_ev ());
100
101   cspi_return_val_if_ev ("getVersion", NULL);
102
103   return retval;
104 }
105
106 /**
107  * AccessibleApplication_getID:
108  * @obj: a pointer to the #AccessibleApplication being queried.
109  *
110  * Get the unique ID assigned by the Registry to an
111  *      #AccessibleApplication instance.
112  * (Not Yet Implemented by the registry).
113  *
114  * Returns: a unique #long integer associated with the application
115  *          by the Registry, or 0 if the application is not registered.
116  **/
117 long
118 AccessibleApplication_getID (AccessibleApplication *obj)
119 {
120   long retval;
121
122   cspi_return_val_if_fail (obj != NULL, 0);
123
124   retval = Accessibility_Application__get_id (CSPI_OBJREF (obj),
125                                               cspi_ev ());
126
127   cspi_return_val_if_ev ("get_id", 0);
128
129   return retval;
130 }
131
132 /**
133  * AccessibleApplication_pause:
134  * @obj: a pointer to the #Accessible object on which to operate.
135  *
136  * Attempt to pause the application (used when client event queue is
137  *  over-full).
138  * Not Yet Implemented.
139  *
140  * Returns: #TRUE if the application was paused successfully, #FALSE otherwise.
141  *
142  **/
143 SPIBoolean
144 AccessibleApplication_pause (AccessibleApplication *obj)
145 {
146   return FALSE;
147 }
148
149 /**
150  * AccessibleApplication_resume:
151  * @obj: a pointer to the #Accessible object on which to operate.
152  *
153  * Attempt to resume the application (used after #AccessibleApplication_pause).
154  * Not Yet Implemented.
155  *
156  * Returns: #TRUE if application processing resumed successfully, #FALSE otherwise.
157  *
158  **/
159 SPIBoolean
160 AccessibleApplication_resume (AccessibleApplication *obj)
161 {
162   return FALSE;
163 }