2002-09-13 Michael Meeks <michael@ximian.com>
[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, 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 /*
25  *
26  * AccessibleApplication function prototypes
27  *
28  */
29
30 #include <cspi/spi-private.h>
31
32 /**
33  * AccessibleApplication_ref:
34  * @obj: a pointer to the #AccessibleApplication on which to operate.
35  *
36  * Increment the reference count for an #AccessibleApplication.
37  **/
38 void
39 AccessibleApplication_ref (AccessibleApplication *obj)
40 {
41   cspi_object_ref (obj);
42 }
43
44 /**
45  * AccessibleApplication_unref:
46  * @obj: a pointer to the #AccessibleApplication object on which to operate.
47  *
48  * Decrement the reference count for an #AccessibleApplication.
49  **/
50 void
51 AccessibleApplication_unref (AccessibleApplication *obj)
52 {
53   cspi_object_unref (obj);
54 }
55
56 /**
57  * AccessibleApplication_getToolkitName:
58  * @obj: a pointer to the #AccessibleApplication to query.
59  *
60  * Get the name of the UI toolkit used by an #AccessibleApplication.
61  *
62  * Returns: a UTF-8 string indicating which UI toolkit is
63  *          used by an application.
64  **/
65 char *
66 AccessibleApplication_getToolkitName (AccessibleApplication *obj)
67 {
68   char *retval;
69
70   cspi_return_val_if_fail (obj != NULL, NULL);
71
72   retval =
73     Accessibility_Application__get_toolkitName (CSPI_OBJREF (obj),
74                                                 cspi_ev ());
75
76   cspi_return_val_if_ev ("toolkitName", NULL);
77
78   return retval;
79 }
80
81 /**
82  * AccessibleApplication_getVersion:
83  * @obj: a pointer to the #AccessibleApplication being queried.
84  *
85  * Get the version of the at-spi bridge exported by an
86  *      #AccessibleApplication instance.
87  *
88  * Returns: a UTF-8 string indicating the application's
89  *          at-spi version.
90  **/
91 char *
92 AccessibleApplication_getVersion (AccessibleApplication *obj)
93 {
94   char *retval;
95
96   cspi_return_val_if_fail (obj != NULL, NULL);
97
98   retval =
99     Accessibility_Application__get_version (CSPI_OBJREF (obj),
100                                             cspi_ev ());
101
102   cspi_return_val_if_ev ("version", NULL);
103
104   return retval;
105 }
106
107 /**
108  * AccessibleApplication_getID:
109  * @obj: a pointer to the #AccessibleApplication being queried.
110  *
111  * Get the unique ID assigned by the Registry to an
112  *      #AccessibleApplication instance.
113  * (Not Yet Implemented by the registry).
114  *
115  * Returns: a unique #long integer associated with the application
116  *          by the Registry, or 0 if the application is not registered.
117  **/
118 long
119 AccessibleApplication_getID (AccessibleApplication *obj)
120 {
121   long retval;
122
123   cspi_return_val_if_fail (obj != NULL, 0);
124
125   retval = Accessibility_Application__get_id (CSPI_OBJREF (obj),
126                                               cspi_ev ());
127
128   cspi_return_val_if_ev ("id", 0);
129
130   return retval;
131 }
132
133 /**
134  * AccessibleApplication_pause:
135  * @obj: a pointer to the #Accessible object on which to operate.
136  *
137  * Attempt to pause the application (used when client event queue is
138  *  over-full).
139  * Not Yet Implemented.
140  *
141  * Returns: #TRUE if the application was paused successfully, #FALSE otherwise.
142  *
143  **/
144 SPIBoolean
145 AccessibleApplication_pause (AccessibleApplication *obj)
146 {
147   return FALSE;
148 }
149
150 /**
151  * AccessibleApplication_resume:
152  * @obj: a pointer to the #Accessible object on which to operate.
153  *
154  * Attempt to resume the application (used after #AccessibleApplication_pause).
155  * Not Yet Implemented.
156  *
157  * Returns: #TRUE if application processing resumed successfully, #FALSE otherwise.
158  *
159  **/
160 SPIBoolean
161 AccessibleApplication_resume (AccessibleApplication *obj)
162 {
163   return FALSE;
164 }