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.
16 from base import BaseProxy
17 from factory import accessible_factory
23 #------------------------------------------------------------------------------
25 class Value(BaseProxy):
27 An interface supporting controls which allow a one-dimensional,
28 scalar quantity to be modified or which reflect a scalar quantity.
29 (If STATE_EDITABLE is not present, the valuator is treated as
33 def get_currentValue(self):
34 return self._pgetter(self._dbus_interface, "currentValue")
35 def set_currentValue(self, value):
36 self._psetter(self._dbus_interface, "currentValue", value)
39 The current value of the valuator.
41 currentValue = property(fget=get_currentValue, fset=set_currentValue, doc=_currentValueDoc)
43 def get_maximumValue(self):
44 return self._pgetter(self._dbus_interface, "maximumValue")
45 def set_maximumValue(self, value):
46 self._psetter(self._dbus_interface, "maximumValue", value)
49 The maximum value allowed by this valuator.
51 maximumValue = property(fget=get_maximumValue, fset=set_maximumValue, doc=_maximumValueDoc)
53 def get_minimumIncrement(self):
54 return self._pgetter(self._dbus_interface, "minimumIncrement")
55 def set_minimumIncrement(self, value):
56 self._psetter(self._dbus_interface, "minimumIncrement", value)
57 _minimumIncrementDoc = \
59 The smallest incremental change which this valuator allows. If
60 0, the incremental changes to the valuator are limited only by
61 the precision of a double precision value on the platform.
63 minimumIncrement = property(fget=get_minimumIncrement, fset=set_minimumIncrement, doc=_minimumIncrementDoc)
65 def get_minimumValue(self):
66 return self._pgetter(self._dbus_interface, "minimumValue")
67 def set_minimumValue(self, value):
68 self._psetter(self._dbus_interface, "minimumValue", value)
71 The minimum value allowed by this valuator.
73 minimumValue = property(fget=get_minimumValue, fset=set_minimumValue, doc=_minimumValueDoc)
75 # Register the accessible class with the factory.
76 accessible_factory.register_accessible_class(interfaces.ATSPI_VALUE, Value)
78 #END----------------------------------------------------------------------------