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.
26 * AccessibleApplication function prototypes
30 #include <cspi/spi-private.h>
34 * AccessibleApplication_ref:
35 * @obj: a pointer to the #AccessibleApplication on which to operate.
37 * Increment the reference count for an #AccessibleApplication.
40 AccessibleApplication_ref (AccessibleApplication *obj)
42 cspi_object_ref (obj);
46 * AccessibleApplication_unref:
47 * @obj: a pointer to the #AccessibleApplication object on which to operate.
49 * Decrement the reference count for an #AccessibleApplication.
52 AccessibleApplication_unref (AccessibleApplication *obj)
54 cspi_object_unref (obj);
58 * AccessibleApplication_getToolkitName:
59 * @obj: a pointer to the #AccessibleApplication to query.
61 * Get the name of the UI toolkit used by an #AccessibleApplication.
63 * Returns: a UTF-8 string indicating which UI toolkit is
64 * used by an application.
67 AccessibleApplication_getToolkitName (AccessibleApplication *obj)
71 cspi_return_val_if_fail (obj != NULL, NULL);
73 cspi_dbus_get_property (obj, spi_interface_application, "tooklitName", NULL, "s", &retval);
75 cspi_return_val_if_ev ("toolkitName", NULL);
81 * AccessibleApplication_getVersion:
82 * @obj: a pointer to the #AccessibleApplication being queried.
84 * Get the version of the at-spi bridge exported by an
85 * #AccessibleApplication instance.
87 * Returns: a UTF-8 string indicating the application's
91 AccessibleApplication_getVersion (AccessibleApplication *obj)
95 cspi_return_val_if_fail (obj != NULL, NULL);
97 cspi_dbus_get_property (obj, spi_interface_application, "version", NULL, "s", &retval);
99 cspi_return_val_if_ev ("version", NULL);
105 * AccessibleApplication_getID:
106 * @obj: a pointer to the #AccessibleApplication being queried.
108 * Get the unique ID assigned by the Registry to an
109 * #AccessibleApplication instance.
110 * (Not Yet Implemented by the registry).
112 * Returns: a unique #long integer associated with the application
113 * by the Registry, or 0 if the application is not registered.
116 AccessibleApplication_getID (AccessibleApplication *obj)
120 cspi_return_val_if_fail (obj != NULL, 0);
122 cspi_dbus_get_property (obj, spi_interface_application, "id", NULL, "u", &retval);
124 cspi_return_val_if_ev ("id", 0);
130 * AccessibleApplication_getLocale:
131 * @obj: a pointer to the #AccessibleApplication being queried.
132 * @lc_category: one of the POSIX LC_TYPE enumeration, for instance
135 * Get a POSIX-compliant string describing the application's current
136 * locale setting for a particular @lctype category.
140 * Returns: a POSIX-compliant locale string, e.g. "C", "pt_BR", "sr@latn", etc.
143 AccessibleApplication_getLocale (AccessibleApplication *obj, int lc_category)
146 dbus_uint32_t lctype;
148 cspi_return_val_if_fail (obj != NULL, g_strdup (""));
153 lctype = Accessibility_LOCALE_TYPE_COLLATE;
156 lctype = Accessibility_LOCALE_TYPE_CTYPE;
159 lctype = Accessibility_LOCALE_TYPE_NUMERIC;
162 lctype = Accessibility_LOCALE_TYPE_MONETARY;
166 lctype = Accessibility_LOCALE_TYPE_MESSAGES;
170 cspi_dbus_call (obj, spi_interface_application, "getLocale", NULL, "u=>s", lctype, &retval);
172 cspi_return_val_if_ev ("id", g_strdup (""));
174 return g_strdup (retval);
178 * AccessibleApplication_pause:
179 * @obj: a pointer to the #Accessible object on which to operate.
181 * Attempt to pause the application (used when client event queue is
183 * Not Yet Implemented.
185 * Returns: #TRUE if the application was paused successfully, #FALSE otherwise.
189 AccessibleApplication_pause (AccessibleApplication *obj)
195 * AccessibleApplication_resume:
196 * @obj: a pointer to the #Accessible object on which to operate.
198 * Attempt to resume the application (used after #AccessibleApplication_pause).
199 * Not Yet Implemented.
201 * Returns: #TRUE if application processing resumed successfully, #FALSE otherwise.
205 AccessibleApplication_resume (AccessibleApplication *obj)