164a90dad2d195e0608962d8a47a67a10c48d867
[enigma2.git] / lib / python / Components / InputDevice.py
1 from config import configElement
2 from config import config                               #global config instance
3 from config import ConfigSubsection
4
5 class inputDevices:
6         def __init__(self):
7                 pass
8         def setRepeat(self, value):
9                 print "setup rc repeat"
10                 pass
11         def setDelay(self, value):
12                 print "setup rc delay"
13                 pass
14
15 def InitInputDevices():
16         config.inputDevices = ConfigSubsection;
17         config.inputDevices.repeat = configElement("config.inputDevices.repeat", config.Slider, 10);
18         config.inputDevices.delay = configElement("config.inputDevices.delay", config.Slider, 10);
19
20         #this instance anywhere else needed?    
21         iDevices = inputDevices();      
22         
23         def inputDevicesRepeatChanged(configElement):
24                 iDevices.setRepeat(configElement.value);
25
26         def inputDevicesDelayChanged(configElement):
27                 iDevices.setDelay(configElement.value);
28
29         # this will call the "setup-val" initial
30         config.inputDevices.repeat.addNotifier(inputDevicesRepeatChanged);
31         config.inputDevices.delay.addNotifier(inputDevicesDelayChanged);