1 #Copyright (C) 2008 Codethink Ltd
3 #This library is free software; you can redistribute it and/or
4 #modify it under the terms of the GNU Lesser General Public
5 #License version 2 as published by the Free Software Foundation.
7 #This program is distributed in the hope that it will be useful,
8 #but WITHOUT ANY WARRANTY; without even the implied warranty of
9 #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10 #GNU General Public License for more details.
11 #You should have received a copy of the GNU Lesser General Public License
12 #along with this program; if not, write to the Free Software
13 #Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15 from interfaces import *
16 from factory import accessible_factory
17 from accessible import Accessible
25 #------------------------------------------------------------------------------
27 class Application(Accessible):
29 An interface identifying an object which is the root of the user
30 interface Accessible hierarchy associated with a running application.
31 Children of Application are typically, but not exclusively, top-level
35 def getLocale(self, locale_type):
37 Gets the locale in which the application is currently operating.
38 For the current message locale, use lctype LOCALE_TYPE_MESSAGES.
40 The LocaleType for which the locale is queried.
41 @return a string compliant with the POSIX standard for locale
44 func = self.get_dbus_method("getLocale", dbus_interface=ATSPI_APPLICATION)
45 return func(local_type)
47 def get_toolkitName(self):
48 return dbus.String(self._pgetter(self._dbus_interface, "toolkitName"))
51 A string indicating the type of user interface toolkit which
52 is used by the application.
54 toolkitName = property(fget=get_toolkitName, doc=_toolkitNameDoc)
56 def get_version(self):
57 return dbus.String(self._pgetter(self._dbus_interface, "version"))
60 A string indicating the version number of the application's accessibility
61 bridge implementation.
63 version = property(fget=get_version, doc=_versionDoc)
65 # Register the accessible class with the factory.
66 accessible_factory.register_accessible_class(ATSPI_APPLICATION, Application)
68 #END----------------------------------------------------------------------------