4b0232001990a955ee7547b91efbcc84637eaeef
[platform/core/uifw/at-spi2-atk.git] / pyatspi / factory.py
1 #Copyright (C) 2008 Codethink Ltd
2
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.
6
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.
14
15 #------------------------------------------------------------------------------
16
17 class AccessibleFactory(object):
18         __accessible_interfaces = {}
19
20         def register_accessible_class(self, name, cls):
21                 self.__accessible_interfaces[name] = cls
22
23         def get_accessible_class(self, name):
24                 return self.__accessible_interfaces[name]
25
26 accessible_factory = AccessibleFactory()
27
28 #END----------------------------------------------------------------------------