Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/extensions/cpsection/accessibility/model.py
blob: 8769d24746bf7190232944dca3f6e999bbb50202 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
# Copyright (C) 2010 Plan Ceibal
#
# Author: Esteban Arias <earias@plan.ceibal.edu.uy>
# Contact information: comunidad@plan.ceibal.edu.uy 
# Plan Ceibal http://www.ceibal.edu.uy
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from jarabe.model import accessibility

keyboard = accessibility.Keyboard()
screen = accessibility.Screen()

KEYWORDS = ['mouse_keys', 'sticky_keys', 'bounce_keys', 'contrast']

def get_mouse_keys():
    return keyboard.get_mouse_keys()

def set_mouse_keys(activar):
    keyboard.set_mouse_keys(activar)

def print_mouse_keys():
    print str(get_mouse_keys())

def get_sticky_keys():    
    return keyboard.get_sticky_keys()

def set_sticky_keys(activar):
    keyboard.set_sticky_keys(activar)

def print_sticky_keys():
    print str(get_sticky_keys())

def get_bounce_keys():
    return keyboard.get_bounce_keys()

def set_bounce_keys(activar):
    keyboard.set_bounce_keys(activar)

def print_bounce_keys():
    print str(get_bounce_keys())

def get_contrast():
    return screen.get_contrast()

def set_contrast(activar):
    screen.set_contrast(activar)

def print_contrast():
    print str(get_contrast())