1#Copyright (C) 2008 Codethink Ltd 2#Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany. 3 4#This library is free software; you can redistribute it and/or 5#modify it under the terms of the GNU Lesser General Public 6#License version 2 as published by the Free Software Foundation. 7 8#This program is distributed in the hope that it will be useful, 9#but WITHOUT ANY WARRANTY; without even the implied warranty of 10#MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11#GNU General Public License for more details. 12#You should have received a copy of the GNU Lesser General Public License 13#along with this program; if not, write to the Free Software 14#Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 15 16from gi.repository import Atspi 17from pyatspi.utils import * 18 19__all__ = [ 20 "Application", 21 ] 22 23#------------------------------------------------------------------------------ 24 25class Application: 26 """ 27 An interface identifying an object which is the root of the user 28 interface Accessible hierarchy associated with a running application. 29 Children of Application are typically, but not exclusively, top-level 30 windows. 31 """ 32 33 def __init__(self, obj): 34 self.obj = obj 35 36 def getLocale(self, locale_type): 37 """ 38 Gets the locale in which the application is currently operating. 39 For the current message locale, use lctype LOCALE_TYPE_MESSAGES. 40 @param : lctype 41 The LocaleType for which the locale is queried. 42 @return a string compliant with the POSIX standard for locale 43 description. 44 """ 45 print("pyatspi: getLocale unimplemented") 46 pass 47 48 def get_id(self): 49 return self.obj.get_id() 50 _idDoc = \ 51 """ 52 The application instance's unique ID as assigned by the registry. 53 """ 54 id = property(fget=get_id, doc=_idDoc) 55 56 def get_toolkitName(self): 57 return self.obj.get_toolkit_name() 58 _toolkitNameDoc = \ 59 """ 60 A string indicating the type of user interface toolkit which 61 is used by the application. 62 """ 63 toolkitName = property(fget=get_toolkitName, doc=_toolkitNameDoc) 64 65 def get_version(self): 66 return self.obj.get_version() 67 _versionDoc = \ 68 """ 69 A string indicating the version number of the application's accessibility 70 bridge implementation. 71 """ 72 version = property(fget=get_version, doc=_versionDoc) 73 74#END---------------------------------------------------------------------------- 75